From 709488beb112ab94c8f0848f46eda949c179e475 Mon Sep 17 00:00:00 2001 From: Siddhant Rai Date: Mon, 23 Jun 2025 09:23:18 +0530 Subject: [PATCH] fix: sources not getting set on stream end --- frontend/src/conversation/ConversationBubble.tsx | 3 +-- frontend/src/conversation/conversationSlice.ts | 11 +++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index bc8395a4..864e0a0e 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -289,8 +289,7 @@ const ConversationBubble = forwardRef< type === 'ERROR' || sources?.length === 0 || sources?.some((source) => source.link === 'None') ? null : !sources && - chunks !== '0' && - selectedDocs ? ( + chunks !== '0' ? (
; }>, ) { - const { conversationId, index, query } = action.payload; - if (state.conversationId !== conversationId) return; - - if (!state.queries[index].sources) { - state.queries[index].sources = query?.sources; - } else if (query.sources) { - state.queries[index].sources!.push(...query.sources); - } + const { index, query } = action.payload; + if (query.sources !== undefined) + state.queries[index].sources = query.sources; }, updateToolCall(state, action) { const { index, tool_call } = action.payload;