- Added logic to display a temporary chat message while waiting for the response from the agent.
- When a user sends a message, a temporary chat message is created and displayed.
- Implemented a method to remove the temporary chat message when the response is received or in case of an error.
- Updated the UI to invoke the method for adding a temporary chat message when the send button is pressed.
Feedback:
- This change improves the user experience by allowing them to see their own message immediately while waiting for the response from the agent.
- Added a boolean property `isWaitingForAgentResponse` to the `TaskViewModel` class to track whether a task is being created and waiting for a response from the agent.
- When a task is being created, we set `isWaitingForAgentResponse` to `true` and notify the listeners.
- When the task creation process is completed (successfully or not), `isWaitingForAgentResponse` is set to `false` and listeners are notified.
- Updated the `ChatView` class to listen to changes in `TaskViewModel.isWaitingForAgentResponse` to show the loading indicator conditionally.
- Updated the regular expression pattern to include matching fenced code blocks in addition to headers.
- Set the `dotAll` parameter to `true` to match across multiple lines in the regular expression.
- Wrapped the message container with a `SingleChildScrollView` widget to enable scrolling when the message content exceeds the available space.
- Implemented logic to conditionally render the message as markdown or selectable text based on the value of `hasMarkdown`.
- Modified the `MarkdownStyleSheet` to customize the appearance of blockquotes and code blocks.
- Updated the child widget of the message container to reflect the changes.
- Implement `containsMarkdown` function to identify messages with Markdown
- Utilize `flutter_markdown` package to render detected Markdown content
- Enhance chat UI to conditionally display plain text or formatted Markdown
This commit addresses a UI issue where the ListView items were overlapping with the Positioned widget in the TaskQueueView. The Positioned widget has been replaced with a more flexible layout using a Column widget to ensure proper spacing and positioning of elements on the screen. The ListView now takes up all available space above the buttons, preventing any overlap and enhancing the user experience.
Implemented a new LoadingIndicator widget that displays a pulsating gradient line, giving users visual feedback during asynchronous operations such as API calls. The indicator animates a gradient from white to AppColors.primaryLight and back to the grey background color, signifying the loading state.
- Enhanced the `Chat` model to include an `artifacts` field to hold associated artifacts.
- Updated the `AgentMessageTile` widget to display the number of artifacts and added functionality to trigger artifact downloads upon button press.
- Introduced a method in `ChatViewModel` to leverage the `ChatService` for artifact downloads.
This commit updates the Leaderboard Submission Dialog to pass the team name, repository URL, and commit SHA as parameters to the submitToLeaderboard function in the SkillTreeViewModel. These changes ensure that the dialog and the ViewModel are aligned in terms of parameter requirements, facilitating efficient and accurate leaderboard submissions.
This commit integrates the newly created UriUtility class into the LeaderboardSubmissionDialog. The isURL method from UriUtility is used to add an additional layer of validation for the GitHub repository URL input field. It ensures that users enter a valid URL format before submitting their leaderboard entries.
Changes made:
- Integrated UriUtility’s isURL method in the _validateAndSubmit function of the LeaderboardSubmissionDialog.
- Added a specific error message "Invalid URL format" to inform users when the entered URL does not meet the validation criteria.
- Updated the state management to reflect the URL validation status and re-render the dialog with appropriate error messages when necessary.
With this integration, the application now provides real-time feedback on the validity of the entered URL, enhancing user experience and data integrity by ensuring that only valid URLs are submitted to the leaderboard.
Integrated both the TestSuiteButton and LeaderboardSubmissionButton in the TaskQueueView. Added conditions to disable the LeaderboardSubmissionButton based on benchmark running status and if the benchmarkStatusMap is empty. The onPressed logic for both buttons has been integrated as per requirements.
Added a new LeaderboardSubmissionButton widget to facilitate user submissions to the leaderboard. The button is styled consistently with other application buttons and features an emoji trophy icon to indicate leaderboard submissions. It provides a mechanism for disabling submissions based on certain conditions.
Introduced a new reusable TestSuiteButton widget. It provides flexibility for positioning and is intended for initiating the test suite in the TaskQueueView.
Introduce the LeaderboardSubmissionDialog widget which allows users to submit their team name, GitHub repo URL, and commit SHA for leaderboard consideration.
Features:
- Field validation: Ensure that all required fields are filled before submission.
- SharedPreferences integration: Save the user's last submission values and auto-populate the fields with these values when the dialog is shown next time.
This enhancement provides a smoother user experience by reducing repetitive data entry for subsequent leaderboard submissions.
- Introduced a new dialog, ContinuousModeDialog, to inform users about the repercussions of the continuous mode.
- Integrated ContinuousModeDialog with ChatInputField. The dialog is shown when the fast-forward icon is clicked, based on the user's shared preferences.
- Leveraged shared preferences to remember if the user has chosen not to see the dialog again.
- Enhanced the ChatInputField to handle different states and user interactions related to continuous mode.
- Introduced a new `SkillTreeType` enum to represent different skill tree categories: General, Coding, Data, and Scrape/Synthesize.
- Extended the `SkillTreeType` enum to provide associated string values and JSON file names for each category.
- Refactored the `SkillTreeViewModel` to reload the skill tree data based on the selected category.
- Enhanced `SkillTreeView` by adding a positioned dropdown in the top-left corner to allow users to select and load different skill tree categories dynamically.
- Deprecated `ApiSettingsViewModel` in favor of enhancing `SettingsViewModel`.
- Moved the API Base URL field from `TaskView` to `SettingsView` to centralize configuration.
- Integrated `RestApiUtility` dependency into `SettingsViewModel` to ensure consistent URL management across the app.
Refactored the ChatViewModel's sendChatMessage method to utilize the continuousModeSteps setting from the SettingsViewModel. This allows the continuous chat mode to honor the user's preference from the settings. Also introduced an optional currentStep parameter with a default value, enabling better control over the progression of continuous mode.
Changed the architecture of the SettingsView to align with the existing pattern in the application. Instead of creating its own instance of SettingsViewModel, the view now accepts an external viewModel as a parameter. This ensures consistency across the application and allows for better modularity and reusability of components.
This commit enriches the `SettingsViewModel` by integrating state persistence functionality and a sign-out method, thus ensuring a more robust and user-friendly settings feature.
Key Enhancements:
1. **State Persistence**:
- Leveraging the `shared_preferences` package, the app now stores and retrieves user preferences related to app settings, ensuring consistency across app restarts.
- Preferences like Dark Mode, Developer Mode, Base URL, and Continuous Mode Steps are persistently stored and loaded when the ViewModel is initialized.
2. **Sign Out Method**:
- A `signOut` method has been introduced in the ViewModel, utilizing the `AuthService` to facilitate user sign-out processes.
- This addition allows for seamless integration of sign-out functionality within the settings interface, granting users the ability to easily terminate sessions.
3. **SettingsView Enhancement**:
- The `SettingsView` has been adapted to incorporate a UI element invoking the `signOut` method, enhancing user interaction within the settings environment.
This enhancement not only bolsters the resilience and usability of the app’s settings but also lays down a structured approach for potential future additions to user preferences and settings-related functionalities.