diff --git a/frontend/src/contexts/chat-context.tsx b/frontend/src/contexts/chat-context.tsx index a5e8497c..40bea36c 100644 --- a/frontend/src/contexts/chat-context.tsx +++ b/frontend/src/contexts/chat-context.tsx @@ -137,6 +137,8 @@ export function ChatProvider({ children }: ChatProviderProps) { // Clear placeholder when loading a real conversation setPlaceholderConversation(null); setConversationLoaded(true); + // Clear conversation docs to prevent duplicates when switching conversations + setConversationDocs([]); }, []); const startNewConversation = useCallback(() => {