diff --git a/frontend/hooks/useChatStreaming.ts b/frontend/hooks/useChatStreaming.ts index 6836ed4b..c67a0ca6 100644 --- a/frontend/hooks/useChatStreaming.ts +++ b/frontend/hooks/useChatStreaming.ts @@ -4,6 +4,7 @@ import type { Message, SelectedFilters, } from "@/app/chat/_types/types"; +import { useChat } from "@/contexts/chat-context"; interface UseChatStreamingOptions { endpoint?: string; @@ -32,6 +33,8 @@ export function useChatStreaming({ const streamAbortRef = useRef(null); const streamIdRef = useRef(0); + const { refreshConversations } = useChat(); + const sendMessage = async ({ prompt, previousResponseId, @@ -498,6 +501,7 @@ export function useChatStreaming({ // Clear streaming message and call onComplete with final message setStreamingMessage(null); onComplete?.(finalMessage, newResponseId); + refreshConversations(true); return finalMessage; }