mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-27 19:04:25 +01:00
This commit refactors the ChatViewModel to use the newly created ChatService and Step model for chat-related functionalities. The changes include: - Replaced mock data source with real API calls via ChatService. - Introduced _currentTaskId to keep track of the current task ID. - Added fetchChatsForTask method to fetch steps related to the current task and populate the chat list. - Implemented sendChatMessage to execute a step and add both user and agent messages to the chat list. By making these changes, the ChatViewModel is now fully integrated with the backend services and models, thus enabling a more realistic and dynamic chat experience.