diff --git a/frontend/public/toolIcons/tool_duckduckgo.svg b/frontend/public/toolIcons/tool_duckduckgo.svg new file mode 100644 index 00000000..8215a918 --- /dev/null +++ b/frontend/public/toolIcons/tool_duckduckgo.svg @@ -0,0 +1 @@ +duckduckgo \ No newline at end of file diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index 864e0a0e..21bfa442 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -288,135 +288,101 @@ const ConversationBubble = forwardRef< {DisableSourceFE || type === 'ERROR' || sources?.length === 0 || - sources?.some((source) => source.link === 'None') ? null : !sources && - chunks !== '0' ? ( -
-
- source.link === 'None') + ? null + : sources && ( +
+
+ + } /> - } - /> -

- {t('conversation.sources.title')} -

-
-
- {Array.from({ length: 4 }).map((_, index) => ( -
- - - - - - +

+ {t('conversation.sources.title')} +

- ))} -
-
- ) : ( - sources && ( -
-
- - } - /> -

- {t('conversation.sources.title')} -

-
-
-
- {sources?.slice(0, 3)?.map((source, index) => ( -
-
setActiveTooltip(index)} - onMouseOut={() => setActiveTooltip(null)} - > -

- {source.text} -

+
+
+ {sources?.slice(0, 3)?.map((source, index) => ( +
- source.link && source.link !== 'local' - ? window.open( - source.link, - '_blank', - 'noopener, noreferrer', - ) - : null - } - > - Document -

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

-
-
- {activeTooltip === index && ( -
setActiveTooltip(index)} onMouseOut={() => setActiveTooltip(null)} > -

+

{source.text}

+
+ source.link && source.link !== 'local' + ? window.open( + source.link, + '_blank', + 'noopener, noreferrer', + ) + : null + } + > + Document +

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

+
- )} -
- ))} - {(sources?.length ?? 0) > 3 && ( -
setIsSidebarOpen(true)} - > -

- {t('conversation.sources.view_more', { - count: sources?.length ? sources.length - 3 : 0, - })} -

-
- )} + {activeTooltip === index && ( +
setActiveTooltip(index)} + onMouseOut={() => setActiveTooltip(null)} + > +

+ {source.text} +

+
+ )} +
+ ))} + {(sources?.length ?? 0) > 3 && ( +
setIsSidebarOpen(true)} + > +

+ {t('conversation.sources.view_more', { + count: sources?.length ? sources.length - 3 : 0, + })} +

+
+ )} +
-
- ) - )} + )} {toolCalls && toolCalls.length > 0 && ( )}