From ec02eb640fe86ef0d1045fdabf3c8fc9cc06f7a8 Mon Sep 17 00:00:00 2001 From: Udhay-Adithya Date: Sat, 27 Sep 2025 16:22:33 +0530 Subject: [PATCH] fix: clear chat button --- lib/dashbot/features/chat/viewmodel/chat_viewmodel.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/dashbot/features/chat/viewmodel/chat_viewmodel.dart b/lib/dashbot/features/chat/viewmodel/chat_viewmodel.dart index 3e08027a..310dbdb2 100644 --- a/lib/dashbot/features/chat/viewmodel/chat_viewmodel.dart +++ b/lib/dashbot/features/chat/viewmodel/chat_viewmodel.dart @@ -265,7 +265,11 @@ class ChatViewmodel extends StateNotifier { final id = _currentRequest?.id ?? 'global'; final newSessions = {...state.chatSessions}; newSessions[id] = []; - state = state.copyWith(); + state = state.copyWith( + chatSessions: newSessions, + isGenerating: false, + currentStreamingResponse: '', + ); } Future sendTaskMessage(ChatMessageType type) async {