From 787d9e3bf527a6f41f075514bf4e92f320a83c1e Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Thu, 5 Jun 2025 02:54:36 +0530 Subject: [PATCH] (feat:attachments) ui details in bubble --- .../src/conversation/ConversationBubble.tsx | 109 +++++++++--------- 1 file changed, 54 insertions(+), 55 deletions(-) diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index 296caeda..93edfc9a 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -12,7 +12,7 @@ import { import rehypeKatex from 'rehype-katex'; import remarkGfm from 'remark-gfm'; import remarkMath from 'remark-math'; - +import DocumentationDark from '../assets/documentation-dark.svg'; import ChevronDown from '../assets/chevron-down.svg'; import Cloud from '../assets/cloud.svg'; import DocsGPT3 from '../assets/cute_docsgpt3.svg'; @@ -108,40 +108,63 @@ const ConversationBubble = forwardRef< onMouseEnter={() => setIsQuestionHovered(true)} onMouseLeave={() => setIsQuestionHovered(false)} > -
- - } - /> - {!isEditClicked && ( - <> -
+
+ {attachmentsMetadata && attachmentsMetadata.length > 0 && ( +
+ {attachmentsMetadata.map((attachment, index) => (
- {message} +
+ Attachment +
+ + {attachment.filename} +
-
- - + ))} +
)} +
+ + } + /> + {!isEditClicked && ( + <> +
+
+ {message} +
+
+ + + )} +
{isEditClicked && (
{ - if (!attachmentsMetadata || attachmentsMetadata.length === 0) return null; - - return ( -
- {attachmentsMetadata.map((attachment, index) => ( -
- Attachment - - {attachment.filename} - -
- ))} -
- ); - }; bubble = (
- {type === 'ANSWER' && renderAttachments()} {DisableSourceFE || type === 'ERROR' || sources?.length === 0 ||