diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index 4d657950..1f1d6c0d 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -649,50 +649,68 @@ const ConversationBubble = forwardRef< }); type AllSourcesProps = { - sources: { title: string; text: string; source: string }[]; + sources: { title: string; text: string; link?: string }[]; }; function AllSources(sources: AllSourcesProps) { + const { t } = useTranslation(); + + const handleCardClick = (link: string) => { + if (link && link !== 'local') { + window.open(link, '_blank', 'noopener,noreferrer'); + } + }; + return (
{`${sources.sources.length} Sources`}
+{`${sources.sources.length} ${t('conversation.sources.title')}`}
- {`${index + 1}. ${source.title}`} + {sources.sources.map((source, index) => { + const isExternalSource = source.link && source.link !== 'local'; + return ( +
+ {`${index + 1}. ${source.title}`} +
+ ++ {source.text}
- {source.source && source.source !== 'local' ? ( -- {source.text} -
-