mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-27 19:04:25 +01:00
This commit enhances the ChatView class by implementing the onSendPressed functionality, which is triggered when the user sends a message through the ChatInputField: - When onSendPressed is triggered, it checks if a task ID is currently selected (currentTaskId in ChatViewModel). - If a task ID is selected, the message is sent as a chat message for that task using sendChatMessage from ChatViewModel. - If no task ID is selected, a new task is created using createTask from TaskViewModel, and then the message is sent for that new task. This change provides a complete workflow for sending chat messages, either within an existing task or by creating a new task.