Commit Graph

15 Commits

Author SHA1 Message Date
hunteraraujo
8c58df706a Show helpful toast if someone hits a 404 2023-09-28 23:43:02 -07:00
hunteraraujo
88a4d1a0dd Update _leaderboardBaseUrl to point at prod leaderboard 2023-09-28 22:37:40 -07:00
hunteraraujo
61653d122f Update _leaderboardBaseUrl to point at dev leaderboard 2023-09-28 12:12:42 -07:00
hunteraraujo
122c996714 Add helpful print statements and fix isURL validation 2023-09-27 15:46:05 -07:00
hunteraraujo
52c0929e3b Add UriUtility Class for URL Validation
This commit introduces the UriUtility class to the codebase. This utility class contains a static method, isURL, used for validating URLs. The method checks for common URL validation criteria, ensuring that the input string adheres to the standard URL format. It verifies that the URL is non-empty, does not contain invalid characters, is not a mailto link, can be parsed as a URI, and has both a scheme and a host. Additional validations include checks on user info and port numbers.

Changes made:
- Created UriUtility class with isURL static method for URL validation.
- Included validations for empty strings, invalid characters, mailto links, scheme, host, user info, and port numbers.
- The utility will be utilized in forms and other areas where URL validation is necessary.

This enhancement improves the robustness of URL validation across the application, ensuring that only valid URLs are processed and stored.
2023-09-27 15:10:14 -07:00
hunteraraujo
5f4454737d Added PUT method support to RestApiUtility
Enhanced the RestApiUtility class to support HTTP PUT requests. The new method, `put`, allows for updating data at a specified endpoint. This addition provides more comprehensive CRUD operations for the API interactions, ensuring the client can perform updates when necessary.
2023-09-27 00:12:17 -07:00
hunteraraujo
bec207568a Add userExperienceIterationTwo feature flag utility
Added a FeatureFlags utility class to manage feature toggling within the application. This initial commit introduces a flag for the userExperienceIterationTwo feature, allowing for controlled testing and phased rollout as development progresses. The flag can be manually adjusted as needed.
2023-09-25 19:30:26 -07:00
hunteraraujo
a6446ce43e Fix leaderboard URL 2023-09-24 22:30:17 -07:00
hunteraraujo
1a471b73cd Fix _leaderboardBaseUrl 2023-09-20 14:44:29 -07:00
hunteraraujo
7901c750b6 Extend RestApiUtility to Support Leaderboard Base URL
This commit extends the `RestApiUtility` class to include support for a new leaderboard base URL. A new `ApiType` enum value `ApiType.leaderboard` has been added, and the `_getEffectiveBaseUrl` method has been updated to handle this new type. The leaderboard base URL is "https://leaderboard.vercel.app/".
2023-09-20 14:43:45 -07:00
hunteraraujo
99035103e0 Rename benchmark_service directory to benchmark 2023-09-19 22:16:58 -07:00
hunteraraujo
5afab461ee Refactor Benchmarking Workflow and Introduce New Data Models (#5264)
* New benchmark data models

* Update _benchmarkBaseUrl

* Remove ReportRequestBody

* Update benchmark service methods for proxy approach

* Add eval id to SkillNodeData

* Refactor runBenchmark Method for proxy approach
2023-09-19 17:01:15 -07:00
hunteraraujo
5ac4b38bda Extend RestApiUtility to Support Multiple Base URLs via ApiType Enum
This commit enhances the `RestApiUtility` class to support multiple base URLs by incorporating an `ApiType` enum parameter in its methods. The changes include:

1. `_agentBaseUrl`: The base URL for the agent-related API calls.
2. `_benchmarkBaseUrl`: A hard-coded base URL for benchmark-related API calls.
3. `_getEffectiveBaseUrl`: A new private method that determines the effective base URL based on the given `ApiType`.

All public methods (`get`, `post`, `getBinary`) have been updated to include an optional `ApiType` parameter, which defaults to `ApiType.agent`. Based on this parameter, `_getEffectiveBaseUrl` is called to decide the base URL for the HTTP request.

This change allows for flexible API calls without the need to instantiate multiple `RestApiUtility` objects for different services.
2023-09-14 20:09:30 -07:00
hunteraraujo
3ccffdab19 Implement artifact download functionality in Flutter web app
Added the downloadArtifact method to the ChatService class, enabling the download of artifacts in the Flutter web application. The function uses the dart:html package to trigger a browser-based file download, allowing users to save artifacts locally. This implementation complements the existing REST API and enhances the user experience.
2023-09-06 16:08:51 -07:00
hunteraraujo
ef2d64513b Merge commit 'e5d30a9f6d0854e20049309333c2f637cd03025c' as 'frontend' 2023-09-06 11:22:37 -07:00