- Extracted the API Base URL field and associated buttons into a new ApiBaseUrlField widget.
- Utilized Consumer to listen for changes in ApiSettingsViewModel.
- Maintained the look and feel consistent with the application's existing UI elements.
This refactor enhances code modularity and readability by isolating the API settings UI in its own widget.
This commit adds functionality to handle user interactions in the TaskView class by implementing the onPressed, onTap, and onDelete methods:
- onPressed: Triggered when the "New Task" button is pressed. It clears the current task ID and chat history in the ChatViewModel.
- onTap: Triggered when a task list tile is tapped. It selects the task in TaskViewModel and updates the current task ID in ChatViewModel.
- onDelete: Triggered when the delete button on a task list tile is pressed. It deletes the task from TaskViewModel and clears the current task ID and chat history in ChatViewModel if the deleted task was the current task.
These implementations provide a seamless user experience for managing tasks and associated chats.
This commit introduces the ChatInputField widget, a custom text input field designed for use within the ChatView. The ChatInputField widget handles varying screen sizes and gracefully resizes itself according to the available width. It starts with a height of 50 and can expand up to 400 as the user types more lines of text.
In addition to the implementation, this commit also includes widget tests to ensure the ChatInputField behaves as expected.
- Add ChatInputField widget with dynamic resizing
- Include IconButton for sending messages
- Add widget tests for ChatInputField
- Handle edge cases and overflows