Commit Graph

180 Commits (52d40d0f8bdbf18c024977447843bf14cb7b0075)

Author SHA1 Message Date
hunteraraujo cfc6180233 Add BenchmarkRun Class to Model Complete Benchmark Runs
This commit introduces the `BenchmarkRun` class, designed to model a complete benchmark run. The class encapsulates all data and sub-models related to a benchmark, providing a centralized object to handle various aspects of a benchmark run.

The `BenchmarkRun` class includes the following sub-models:
- `RepositoryInfo`: Information about the repository and team.
- `RunDetails`: Specific details like the run identifier, command, and timings.
- `TaskInfo`: Information about the task being benchmarked.
- `Metrics`: Performance metrics for the benchmark run.
- `Config`: Configuration settings for the benchmark run.

A `reachedCutoff` field is also included to indicate whether a certain cutoff was reached during the benchmark run.

Methods for serializing and deserializing the object to and from JSON are also provided.
2023-09-20 13:24:19 -07:00
hunteraraujo 311f69b7cf Add RepositoryInfo Class for Benchmark Repository and Team Details
This commit introduces the RepositoryInfo class, designed to encapsulate details about the repository and team associated with a benchmark run.

The class includes the following fields:
- repoUrl: The URL of the repository where the benchmark code resides.
- teamName: The name of the team responsible for the benchmark.
- benchmarkGitCommitSha: The Git commit SHA for the benchmark code.
- agentGitCommitSha: The Git commit SHA for the agent code.

The class supports JSON serialization and deserialization, making it easy to use with Flutter's JSON handling mechanisms.
2023-09-20 13:17:46 -07:00
hunteraraujo fc193568b9 Add RunDetails class for encapsulating benchmark run information
Added a new Dart class called `RunDetails` to represent specific details related to a benchmark run.

The class includes fields for:
- The unique run identifier (`runId`)
- The command used to initiate the benchmark (`command`)
- The time the benchmark was completed (`completionTime`)
- The time the benchmark started (`benchmarkStartTime`)
- The name of the test being run (`testName`)

Serialization and deserialization methods are also provided for JSON compatibility.
2023-09-20 13:12:03 -07:00
hunteraraujo afe77bbc4f Add TaskInfo class with serialization and documentation
Added a new TaskInfo class to encapsulate information related to a specific benchmark task.

- The TaskInfo class holds attributes like the data file path, regression status, task categories, task details, expected answer, and description.
- Included methods for JSON serialization and deserialization.
- Added comprehensive documentation to describe the purpose, properties, and methods of the TaskInfo class.
2023-09-20 13:07:54 -07:00
hunteraraujo 50ef7b31eb Add Metrics class with serialization and documentation
Added a new Metrics class to represent key performance metrics of a benchmark test run.

- The Metrics class encapsulates various data points like difficulty, success rate, attempted status, success percentage, cost, and runtime.
- Included serialization and deserialization methods for converting between Metrics objects and JSON.
- Added comprehensive documentation to describe the purpose, properties, and methods of the Metrics class.
2023-09-20 13:04:47 -07:00
hunteraraujo 39f8ae515b Add Config Class for Benchmark Configuration Management
This commit introduces a new `Config` class, designed to manage and store configuration settings related to the benchmark run. The class contains two key fields:

1. `agentBenchmarkConfigPath`: The path to the agent's benchmark configuration file.
2. `host`: The address of the host where the benchmark is running.

The class includes methods for serialization and deserialization, allowing easy conversion between `Config` objects and JSON maps.

Documentation comments have also been added for better code readability and understanding.
2023-09-20 13:00:22 -07:00
hunteraraujo 377d0af228
Refactor SkillTreeViewModel and Update TaskQueueView UI for Task Status (#5269)
* Refactor SkillTreeViewModel and Update TaskQueueView UI for Task Status

* Notify UI when updating benchmark status
2023-09-19 23:30:22 -07:00
hunteraraujo 99035103e0 Rename benchmark_service directory to benchmark 2023-09-19 22:16:58 -07:00
hunteraraujo 525571c32e
Enhance runBenchmark with TestSuite Tracking (#5268) 2023-09-19 21:31:02 -07:00
hunteraraujo 80682b41cb
Add Early Termination to runBenchmark on Benchmark Failure (#5267) 2023-09-19 20:24:52 -07:00
hunteraraujo a37b486227
Enhance SkillTreeViewModel to Manage Benchmark Status (#5266)
Enhance SkillTreeViewModel to Manage Benchmark Execution and Status
2023-09-19 20:20:31 -07:00
hunteraraujo f130aa7972 Correct triggerEvaluation endpoint 2023-09-19 17:19:59 -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 bf03dd8739 Refactor runBenchmark in SkillTreeViewModel for New Report Generation Flow
This commit updates the runBenchmark method in the SkillTreeViewModel class to align with the new report generation flow. The updated method does the following:

1. Checks if a benchmark is already running to prevent overlapping runs.
2. Sets a flag to indicate that the benchmark is running and notifies the UI.
3. Reverses the selected node hierarchy for report generation.
4. Loops through each node in the reversed hierarchy to:
  - Generate a unique UUID for each test run.
  - Create a ReportRequestBody object.
  - Call the generateSingleReport method in the BenchmarkService.
  - Update the UI after each single report is generated.

5. After all single reports are generated, it calls the generateCombinedReport method in the BenchmarkService, passing in all the generated UUIDs.

6. Finally, it sets the benchmark running flag to false and notifies the UI.

This change improves the report generation flow and allows for both individual and combined reports.
2023-09-18 19:55:01 -07:00
hunteraraujo 5814c5a365 Change mock property to be required in ReportRequestBody 2023-09-18 19:46:56 -07:00
hunteraraujo 0e069c2679 Add generateCombinedReport Method and Rename Existing Method
This commit introduces two major updates to the BenchmarkService class:

1. Renamed the `generateReport` method to `generateSingleReport` for better clarity and specificity.

2. Added a new method called `generateCombinedReport` that takes a list of test run IDs and generates a combined report by posting to the `/reports/query` endpoint.

These changes aim to improve the modularity and readability of the code, while also extending its functionality to handle combined reports.
2023-09-18 17:15:44 -07:00
hunteraraujo da9fd926c8 Refactor ReportRequestBody for a single test 2023-09-18 17:09:23 -07:00
hunteraraujo 8923e79b29 Refactor TaskView to Support Combined Data and Test Suite Detail View
This commit introduces substantial improvements to the TaskView class to accommodate both tasks and test suites in a unified view. It also integrates the TestSuiteDetailView to display test suite details when a test suite is selected.

Key Enhancements:

1. Modified the `initState` method to call `fetchAndCombineData()` from TaskViewModel, thereby populating the combined data source.
2. Replaced the ListView that was rendering tasks with a ListView that can render both tasks and test suites.
3. Introduced conditional rendering for TestSuiteDetailView when a test suite is selected.
4. Updated onTap actions to select and deselect tasks and test suites appropriately.
5. Moved to using a Stack layout to allow overlay of TestSuiteDetailView on top of the existing layout.

This refactor enhances the TaskView's capabilities to manage and display both tasks and test suites, offering a more integrated user experience.
2023-09-18 15:08:22 -07:00
hunteraraujo 93094c7223 Extend TaskViewModel to Support Test Suites and Combined Data Sources
This commit significantly expands the functionalities of TaskViewModel to manage both tasks and test suites in a unified manner. The view model now serves as the primary business logic class that interacts with the UI for task and test suite management.

Key Enhancements:
- Introduced `_testSuites` list to store TestSuite objects.
- Added `combinedDataSource` to hold both tasks and test suites.
- Introduced `selectTestSuite` and `deselectTestSuite` methods for TestSuite selection management.
- Added methods for TestSuite CRUD operations (`addTestSuite`, `fetchTestSuites`, `_saveTestSuitesToPrefs`).
- Created `fetchAndCombineData` method to fetch and combine tasks and test suites into a single list, `combinedDataSource`.

This update provides a more robust and unified approach for managing tasks and test suites, thereby improving the application's modularity and scalability.
2023-09-18 15:03:53 -07:00
hunteraraujo 9f92488443 Add TestSuiteDetailView for Detailed Test Suite Management
This commit introduces a new StatefulWidget, TestSuiteDetailView, to offer a dedicated view for managing and interacting with individual Test Suites.

Key Features:
- Created a TestSuiteDetailView class that takes a TestSuite object and a TaskViewModel as parameters.
- Added an AppBar with a back button for easy navigation.
- Utilized ListView.builder to display a list of tasks that belong to the selected Test Suite.
- Integrated with existing TaskViewModel to select and delete tasks within the Test Suite.
- Included a Provider for the ChatViewModel to update the current task ID when a task is selected.

This new view enhances the user experience by providing a focused interface for managing tasks within individual Test Suites. This facilitates better organization and navigation for the user.
2023-09-18 14:59:26 -07:00
hunteraraujo 3cbe5a84e4 Implement TestSuiteListTile Widget for Displaying Test Suites
This commit adds a new StatelessWidget, TestSuiteListTile, designed to display individual TestSuite items in a list.

Key Features:
- Created a TestSuiteListTile class that takes a TestSuite object and a VoidCallback for the onTap event as parameters.
- Utilized Material Design with custom styling to ensure the tile fits well within the application's UI.
- The tile displays the timestamp of the TestSuite, which serves as its title.
- Included a play arrow icon to indicate that the tile is actionable.
- Utilized MediaQuery to adapt the tile width based on the screen size, capped at a maximum width of 260.

By adding this widget, we improve the UX by providing a consistent and intuitive way to interact with TestSuite objects in the UI.
2023-09-18 14:55:03 -07:00
hunteraraujo 1d735caf40 Add TestSuite Model with Serialization and Deserialization Support
This commit introduces a new class, TestSuite, designed to encapsulate a collection of Task objects under a common timestamp. This will help in grouping tasks that belong to a particular test suite.

Key Features:
- Add a TestSuite class with fields for `timestamp` and a list of `tests` (Task objects).
- Implement `toJson` method for serializing TestSuite objects to JSON-compatible format.
- Implement `fromJson` factory method for deserializing JSON data back into a TestSuite object.

By providing serialization and deserialization support directly in the model, we facilitate easier storage and data exchange for test suites.
2023-09-18 14:41:25 -07:00
hunteraraujo e446d723ee Extend Task Model to Include Serialization
This commit adds serialization support to the Task model by including a `toJson` method. This will allow easy conversion of Task objects to a JSON-compatible format, facilitating storage or network transmission.
2023-09-18 14:35:34 -07:00
hunteraraujo e90eb0fd61 Update ApiSettingsViewModel _baseURL 2023-09-18 13:31:48 -07:00
merwanehamadi 2cf350b783
Agent Protocol v1 (#5254)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-09-18 11:09:55 -07:00
Swifty 8b3a915b2f
Serving frontend from the forge agent server (#5252) 2023-09-18 16:27:03 +02:00
hunteraraujo 4463f75756 Fix issue where side bar view is not disabled 2023-09-16 22:19:42 -07:00
hunteraraujo 60ae12dfd5 Implement UI Disable Feature During Benchmark Run
Added a state variable isBenchmarkRunning in SkillTreeViewModel to track the status of benchmark execution. This state variable is used to conditionally disable specific UI components:

- The "Initiate test suite" button in TaskQueueView is disabled during the benchmark.
- All IconButtons in SideBarView are disabled during the benchmark.
- Node selection in SkillTreeView is disabled during the benchmark.

This ensures that the user cannot interact with these components while a benchmark test is running, thereby improving UX and preventing potential issues.
2023-09-16 19:24:54 -07:00
hunteraraujo 11101286a3 Remove comment 2023-09-16 19:02:45 -07:00
hunteraraujo 6b921b5eda Refactor test suite button + rename method to runBenchmark 2023-09-16 18:56:42 -07:00
hunteraraujo 25ce1d6be0 Fix regression with deleting tasks 2023-09-16 17:28:58 -07:00
hunteraraujo d48eb99669 Pass Real Data to callGenerateReport in TaskQueueView
This commit updates the `TaskQueueView` to pass real data from the `selectedNodeHierarchy` to the `callGenerateReport` method in `SkillTreeViewModel`. An array of test names is constructed from the reversed node hierarchy, and these names are used as the `tests` field in the `ReportRequestBody`.

Note: The `category` field is now an empty string as per the new requirement, and `mock` continues to be set to true.
2023-09-16 15:14:34 -07:00
hunteraraujo 454b78c1ac Integrate callGenerateReport with TaskQueueView's Checkmark Button
This commit integrates the `callGenerateReport` method from `SkillTreeViewModel` into the `TaskQueueView`. Now, when the user clicks the green checkmark button, the `callGenerateReport` method is triggered with hardcoded values for testing purposes.

Note: The implementation is still temporary and will be updated for dynamic behavior in the future.
2023-09-16 11:04:40 -07:00
hunteraraujo 7f5c50dfeb Extend ReportRequestBody to Include "mock" Boolean Field
This commit adds a new boolean field, "mock", to the `ReportRequestBody` class. This additional field is in line with the new requirements to specify whether the report is a mock or not.

The `toJson()` method is also updated to include this new field during serialization.
2023-09-16 10:39:33 -07:00
hunteraraujo f26ae288d0 Integrate Firebase Authentication and Streamline Auth Flow in main.dart
This commit integrates Firebase Authentication into the application and refactors the `main.dart` file to streamline the user authentication flow. The application will now automatically switch between the main layout and the authentication UI based on the user's sign-in status.

- Added Firebase initialization to the `main()` function for Firebase Authentication.
- Replaced the home page in `MyApp` with a `StreamBuilder` that listens for Firebase auth state changes.
- Based on the auth state, the home page will either show `MainLayout` (if the user is signed in) or `FirebaseAuthView` (if the user is not signed in).
- Added necessary imports for the Firebase and authentication services.
2023-09-15 14:37:15 -07:00
hunteraraujo 4d41584547 Implement FirebaseAuthView for Google and GitHub Sign-In
This commit adds the `FirebaseAuthView` class, a Flutter widget that serves as the UI for user authentication using Google and GitHub. The class uses the `AuthService` to handle the actual sign-in logic.

Features:
- Added an OutlinedButton for Google Sign-In, styled with Google's colors and logo.
- Added an OutlinedButton for GitHub Sign-In, styled with GitHub's colors and logo.
- Integrated the `AuthService` methods for Google and GitHub sign-in.
2023-09-15 14:26:04 -07:00
hunteraraujo a6541b60fc Add AuthService Class for Google and GitHub Authentication
This commit introduces the AuthService class, which encapsulates the logic for signing in with Google and GitHub using Firebase Authentication. The class provides methods for initiating the OAuth flows for both providers and for signing out the user.

- Implemented `signInWithGoogle()` to handle Google Sign-In.
- Implemented `signInWithGitHub()` to handle GitHub Sign-In via popup.
- Added `signOut()` method for logging out the user.
- Added `getCurrentUser()` method to fetch the currently authenticated user.
2023-09-15 14:20:18 -07:00
hunteraraujo f3a112fca3 Integrate BenchmarkService into main.dart with Provider
This commit integrates the `BenchmarkService` into the main application setup through the `MultiProvider` in `main.dart`. The changes include:

1. Adding `BenchmarkService` to the list of service providers, allowing it to be accessible throughout the application via dependency injection.

2. Using `ProxyProvider` to ensure `BenchmarkService` gets the `RestApiUtility` instance as a dependency.

3. Modifying the `MyApp` class to fetch the `BenchmarkService` from the provider, making it ready for use in the application's lifecycle.

This addition allows `BenchmarkService` to be centrally managed and readily available for any part of the application that requires benchmark-related functionalities.
2023-09-14 20:12:58 -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 a97e0dbe62 Integrate BenchmarkService into SkillTreeViewModel with Incomplete Methods
This commit extends the `SkillTreeViewModel` to include `BenchmarkService` as a dependency. This integration allows for leveraging benchmark-related API calls within the skill tree logic.

Two new methods have been added to `SkillTreeViewModel`:

1. `callGenerateReport`: This method attempts to call the `generateReport` function from the `BenchmarkService`. Currently, it only prints the API response and is incomplete in terms of full functionality.

2. `callPollUpdates`: Similar to `callGenerateReport`, this method aims to call `pollUpdates` from `BenchmarkService` and prints the API response. This is also incomplete and will require further development.

Both methods are preliminary and will require additional features to become fully functional.
2023-09-14 20:07:18 -07:00
hunteraraujo 16efb96409 Implement BenchmarkService with generateReport and pollUpdates methods
This commit introduces the `BenchmarkService` class, which encapsulates API calls related to benchmarking operations. The class includes two methods:

1. `generateReport`: Takes a `ReportRequestBody` object as input and performs a POST request to the `/reports` URL, serializing the object to JSON format.
2. `pollUpdates`: Accepts a UNIX UTC timestamp as an argument and performs a GET request to the `/updates?last_update_time=<timestamp>` URL.

Both methods use the `RestApiUtility` for making HTTP requests and are designed to work with different base URLs, controlled by the `ApiType` enum.
2023-09-14 20:04:44 -07:00
hunteraraujo 595a892f71 Introduce ApiType enum for API selection
This commit adds a new enum, `ApiType`, to allow dynamic selection between different base URLs for API calls. The enum has two values: `agent` and `benchmark`, corresponding to different services.

The `ApiType` enum is designed to be passed as a parameter to the `RestApiUtility` methods, enabling the utility to decide which base URL to use for HTTP requests.
2023-09-14 20:02:36 -07:00
hunteraraujo 8e25cd2391 Add ReportRequestBody model with JSON serialization
This commit introduces a new Dart class, `ReportRequestBody`, which represents the request body for generating reports in the `BenchmarkService`. The class includes a `toJson` method for easy serialization to JSON format.

- `category`: Specifies the category of the report (e.g., "coding").
- `tests`: A list of tests to be included in the report.
2023-09-14 20:01:05 -07:00
hunteraraujo 3bba27dd3c Integrate JSON-based Skill Tree Initialization in ViewModel
This commit substantially upgrades the SkillTreeViewModel by incorporating asynchronous initialization from a JSON asset. Now, both nodes and edges of the skill tree are dynamically generated based on the JSON data. This not only enhances the modularity of the code but also simplifies the process of updating or modifying the skill tree.

Other improvements include:
- Changed node IDs from integers to strings for better flexibility.
- Added a function to get a node by its ID, improving code reusability.
- Introduced error handling for potential issues during JSON parsing or node retrieval.
- Updated the sibling, level, and subtree separation configurations for the graph view layout.

These changes make the skill tree more dynamic and maintainable, setting the stage for future extensions.
2023-09-13 17:53:24 -07:00
hunteraraujo a7bb335752 Enhance SkillTreeView with Asynchronous Initialization and Node Mapping
This commit refactors the SkillTreeView class to include asynchronous initialization through FutureBuilder. The new version also replaces the integer-based node IDs with string-based IDs, aligning better with the SkillTreeNode model. The code now clears previous graph nodes and edges before adding new ones, preventing duplication. Additionally, the TreeNodeView component is now populated dynamically with data from the SkillTreeNode model, making the tree view more robust and integrated.
2023-09-13 17:50:53 -07:00
hunteraraujo 01b2892775 Remove comments 2023-09-13 17:47:17 -07:00
hunteraraujo 876fe5a590 Refactor TreeNodeView to Use Stateful Widget and Add Interactivity
This commit updates the TreeNodeView class from a stateless widget to a stateful widget to handle hover interactions. The new version also replaces the old simple text-based representation with a more interactive and visually appealing design that includes icons and hover effects. The SkillTreeNode model is now used to populate the node information, making the TreeNodeView more dynamic and integrated with the rest of the application.
2023-09-13 17:43:32 -07:00
hunteraraujo b58894ef33 Update TaskQueueView to display node label + description 2023-09-13 17:37:03 -07:00
hunteraraujo 30934f400a Enhance SkillTreeNode Model to Include Additional Attributes
This commit extends the SkillTreeNode class to incorporate new attributes such as 'data', 'label', and 'shape', making the model more comprehensive. The JSON deserialization is also updated to handle optional or missing fields by providing default values, improving the robustness of the model.
2023-09-13 17:32:23 -07:00
hunteraraujo 774ccc4ed2 Refactor SkillNodeData model for robust JSON deserialization
This commit updates the SkillNodeData class to handle optional or missing JSON fields more robustly. Now, the model provides default values for each field, ensuring that the object can be instantiated successfully even if some JSON fields are missing or set to null.
2023-09-13 17:31:00 -07:00
hunteraraujo 3c35cab55e Enhance Info model to handle optional JSON fields gracefully
This commit updates the Info class to provide default values for optional or missing fields in the JSON payload. This ensures that the model can be successfully instantiated even when some JSON fields are absent or set to null.
2023-09-13 17:30:41 -07:00
hunteraraujo 5e2e7a11c3 Update Ground model to handle optional JSON fields
This commit modifies the Ground class to make it more robust against optional or missing fields in the incoming JSON data. Default values have been added to ensure that the model can be instantiated even if some JSON fields are missing or set to null.
2023-09-13 17:29:05 -07:00
hunteraraujo 314cce75b5
Integrate TaskQueueView and Enhance SkillTree Functionality (#5206)
* Add TestQueueView to Main Layout

This commit integrates the TestQueueView into the main layout. The layout now conditionally displays the TestQueueView based on whether a node in the SkillTree is selected.

- TestQueueView appears when a SkillTree node is selected.
- Main layout adjusts to accommodate TestQueueView alongside SkillTreeView and ChatView.
- Implemented responsive layout logic to manage the widths of the different views based on the screen width and the state of the SkillTree.

* Extend SkillTreeViewModel to Track Selected Node Hierarchy

This commit enhances the SkillTreeViewModel to maintain a list of nodes that form a hierarchy from the currently selected node to the root. This allows for more interactive and informative views that can leverage this hierarchical data.

- Added a new property `selectedNodeHierarchy` to keep track of the node hierarchy.
- Modified the `toggleNodeSelection` method to populate or clear `selectedNodeHierarchy` based on node selection.
- Introduced a new method `populateSelectedNodeHierarchy` to build the hierarchy from the selected node to the root.

* Extract skill tree view model reset state to method

* Implement UI enhancements for TaskQueueView

This commit introduces several UI improvements to the TaskQueueView:
- Tiles are padded 20 units from both the leading and trailing edges.
- Tiles now have a white background.
- Added a thin black border to the tiles.
- Incorporated a slight corner radius for the tiles.
- Centered the title and subtitle horizontally within the tiles.
- Added a checkmark button with a tooltip at the bottom-right corner for running a suite of tests.

These changes aim to improve the user experience and visual appeal of the TaskQueueView.

* Make MainLayout a consumer of SkillTreeViewModel
2023-09-12 14:01:32 -07:00
hunteraraujo e1a5a2a481 Clear skill tree state when initializing tree 2023-09-10 15:12:52 -07:00
hunteraraujo 19db097709 ChangeNotifierProvider for SkillTreeViewModel 2023-09-10 14:45:37 -07:00
hunteraraujo 60264d68b5 Integrate SkillTreeViewModel into MainLayout 2023-09-10 14:45:21 -07:00
hunteraraujo 70a05ec82a Replace Placeholder SkillTreeView with Full Implementation
This commit replaces the placeholder implementation of the SkillTreeView class with a complete, functional version.

Features:
- Initializes the skill tree from the SkillTreeViewModel during `initState`.
- Dynamically creates Node and Edge objects for GraphView based on ViewModel data.
- Utilizes the TreeNodeView to render individual nodes.
- Integrates node selection functionality from the ViewModel.
- Adds InteractiveViewer for zoom and pan capabilities.

The new SkillTreeView is designed to work closely with SkillTreeViewModel to manage and display the skill tree.
2023-09-10 14:42:15 -07:00
hunteraraujo 90e73b83a1 Implement TreeNodeView with selection functionality
This commit adds the TreeNodeView class, a StatelessWidget responsible for rendering individual nodes in the skill tree.

Features:
- Displays the node ID in the view.
- Uses the Provider package to interact with the SkillTreeViewModel.
- Includes an onTap method to toggle node selection state.
- Updates the UI to reflect the selected state by changing the background color.

The TreeNodeView is designed to work in conjunction with SkillTreeViewModel to manage node selection states.
2023-09-10 14:33:42 -07:00
hunteraraujo d6b0894c6b Add SkillTreeViewModel for managing skill tree state
The SkillTreeViewModel class serves as the view model for the skill tree and extends Flutter's ChangeNotifier for state management.

Features include:
- Storing and managing the list of SkillTreeNodes and SkillTreeEdges.
- Managing the state of the selected node.
- Initializing the skill tree with predefined nodes and edges.
- Methods for toggling node selection, allowing for only a single node to be selected at any given time.

The view model utilizes the GraphView package for visualization and layout.
2023-09-10 14:28:17 -07:00
hunteraraujo a6b791c4f0 Update SkillTreeNode data model for skill tree
The SkillTreeNode model represents a single node in the skill tree.
It includes:
- Node ID
- Node color
2023-09-10 13:58:02 -07:00
hunteraraujo e16e48f893 Add SkillTreeEdge data model for skill tree
The SkillTreeEdge model represents the relationship between different skill nodes.
It includes:
- Edge ID
- Source node ID
- Destination node ID
- Arrows property to indicate directionality
2023-09-10 13:57:25 -07:00
hunteraraujo 5726613dfb Add SkillNodeData data model for skill tree
The SkillNodeData model aggregates various data related to a skill node.
It includes:
- Node name
- Node category
- Associated task
- Dependencies
- Cutoff value
- Ground object for evaluation details
- Info object for metadata
2023-09-10 13:56:59 -07:00
hunteraraujo 5ed6a08c22 Add Info data model for skill tree
The Info data model holds metadata about a skill node.
It includes:
- The difficulty level of the skill node
- A description of the skill node
- A list of potential side effects related to the skill node
2023-09-10 13:52:02 -07:00
hunteraraujo e13f7ca757 Add Ground data model for skill tree
The Ground data model stores evaluation information for each skill node.
It includes:
- The answer to be evaluated
- A list of terms that should be contained in the answer
- A list of terms that should not be contained in the answer
- A list of associated files
- A map for additional evaluation criteria
2023-09-10 13:51:36 -07:00
hunteraraujo b00be97030 Create placeholder SkillTreeView 2023-09-08 08:53:49 -07:00
hunteraraujo 97bd56b263 Move SIdeBarView to new directory 2023-09-08 08:53:25 -07:00
hunteraraujo 1320ce66d4 Integrate SideBarView into MainLayout for Wider Screens 2023-09-07 17:24:57 -07:00
hunteraraujo 0e977e6818 Add SideBarView with Toggleable Icons 2023-09-07 17:24:48 -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 17f284a9ac Add auto-scroll behavior to chat message list
Implemented auto-scrolling in the chat message list to ensure that the view scrolls down to the most recent message when a new chat is added. This behavior only triggers if the user is already at the bottom of the list, providing a seamless user experience.
2023-09-06 15:05:26 -07:00
hunteraraujo a933f117fb Add the ability to deselect a task 2023-09-06 12:21:30 -07:00
hunteraraujo a8023c2598 Fix empty user chats 2023-09-06 12:15:57 -07:00
hunteraraujo 27e9868aa5 End continuous mode when clicking text field 2023-09-06 12:10:57 -07:00
hunteraraujo 2e62c517e2 Include tooltips for single message + continuous mode 2023-09-06 12:04:52 -07:00
hunteraraujo 4e499c5bac Deselect text field after user goes into continuous mode 2023-09-06 11:56:45 -07:00
hunteraraujo d3b4b50a5c Update parameters for ChatInputField to support continuous mode 2023-09-06 11:46:43 -07:00
hunteraraujo d80053e8dc Refactor ChatInputField to Support Continuous Mode
- Added a new boolean state `isContinuousMode` to the `ChatInputField` widget to handle the continuous mode feature.
- Introduced a new callback function `onContinuousModePressed` to manage the state of the continuous mode from an external source.
- Conditionally rendered the send button based on the `isContinuousMode` state.
- Enhanced the UI by adding a button to toggle between continuous mode and single message mode, which triggers the `onContinuousModePressed` callback.
2023-09-06 11:46:03 -07:00
hunteraraujo 5cd1abab94 Implement Continuous Mode in ChatViewModel
Added a new state variable `_isContinuousMode` to the ChatViewModel to track whether the chat is in continuous mode or not. This state is toggled via a setter and triggers UI updates through `notifyListeners()`.

Enhanced the `sendChatMessage` method to automatically send a null message if continuous mode is active, triggering the next step in the chat.
2023-09-06 11:42:45 -07:00
hunteraraujo a7c37da713 Make input and additionalInput optional in StepRequestBody
Updated the StepRequestBody class to allow both 'input' and 'additionalInput' to be optional. Added logic in toJson() method to return an empty JSON object if both fields are null.
2023-09-06 11:41:23 -07:00
hunteraraujo ef2d64513b Merge commit 'e5d30a9f6d0854e20049309333c2f637cd03025c' as 'frontend' 2023-09-06 11:22:37 -07:00