From 8edb2179431e29c271868950912513fd33b40e76 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Sat, 17 May 2025 01:41:29 +0530 Subject: [PATCH] (fix) source.link is new source.source --- .../src/conversation/ConversationBubble.tsx | 18 +++++++++--------- .../src/conversation/conversationModels.ts | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index 1efff13f..920005e3 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -49,7 +49,7 @@ const ConversationBubble = forwardRef< feedback?: FEEDBACK; handleFeedback?: (feedback: FEEDBACK) => void; thought?: string; - sources?: { title: string; text: string; source: string }[]; + sources?: { title: string; text: string; link: string }[]; toolCalls?: ToolCallsType[]; retryBtn?: React.ReactElement; questionNumber?: number; @@ -233,7 +233,7 @@ const ConversationBubble = forwardRef< {DisableSourceFE || type === 'ERROR' || sources?.length === 0 || - sources?.some((source) => source.source === 'None') ? null : !sources && + sources?.some((source) => source.link === 'None') ? null : !sources && chunks !== '0' && selectedDocs ? (
@@ -300,14 +300,14 @@ const ConversationBubble = forwardRef<

- source.source && source.source !== 'local' + source.link && source.link !== 'local' ? window.open( - source.source, + source.link, '_blank', 'noopener, noreferrer', ) @@ -322,13 +322,13 @@ const ConversationBubble = forwardRef<

- {source.source && source.source !== 'local' - ? source.source + {source.link && source.link !== 'local' + ? source.link : source.title}

diff --git a/frontend/src/conversation/conversationModels.ts b/frontend/src/conversation/conversationModels.ts index 734e1992..8c5a479b 100644 --- a/frontend/src/conversation/conversationModels.ts +++ b/frontend/src/conversation/conversationModels.ts @@ -43,7 +43,7 @@ export interface Query { conversationId?: string | null; title?: string | null; thought?: string; - sources?: { title: string; text: string; source: string }[]; + sources?: { title: string; text: string; link: string }[]; tool_calls?: ToolCallsType[]; error?: string; attachments?: { fileName: string; id: string }[];