From 4862548e656885a3b673c1890739fccc4862761c Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Fri, 6 Jun 2025 21:52:10 +0530 Subject: [PATCH] (feat:attach) renaming, semantic identifier names --- frontend/src/conversation/Conversation.tsx | 4 ++-- frontend/src/conversation/ConversationBubble.tsx | 10 +++++----- frontend/src/conversation/ConversationMessages.tsx | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index c433514f..3d0d5ac2 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -109,7 +109,7 @@ export default function Conversation() { const trimmedQuestion = question.trim(); if (trimmedQuestion === '') return; - const attachmentMetadata = attachments + const filesAttached = attachments .filter((a) => a.id && a.status === 'completed') .map((a) => ({ id: a.id as string, fileName: a.fileName })); @@ -121,7 +121,7 @@ export default function Conversation() { dispatch( addQuery({ prompt: trimmedQuestion, - attachments: attachmentMetadata, + attachments: filesAttached, }), ); handleFetchAnswer({ question: trimmedQuestion, index }); diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index c850ad01..709a9843 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -59,7 +59,7 @@ const ConversationBubble = forwardRef< updated?: boolean, index?: number, ) => void; - attachmentsMetadata?: { id: string; fileName: string }[]; + filesAttached?: { id: string; fileName: string }[]; } >(function ConversationBubble( { @@ -75,7 +75,7 @@ const ConversationBubble = forwardRef< questionNumber, isStreaming, handleUpdatedQuestionSubmission, - attachmentsMetadata, + filesAttached, }, ref, ) { @@ -109,9 +109,9 @@ const ConversationBubble = forwardRef< onMouseLeave={() => setIsQuestionHovered(false)} >
- {attachmentsMetadata && attachmentsMetadata.length > 0 && ( + {filesAttached && filesAttached.length > 0 && (
- {attachmentsMetadata.map((attachment, index) => ( + {filesAttached.map((file, index) => (
- {attachment.fileName} + {file.fileName}
))} diff --git a/frontend/src/conversation/ConversationMessages.tsx b/frontend/src/conversation/ConversationMessages.tsx index 49329445..8b31dc9c 100644 --- a/frontend/src/conversation/ConversationMessages.tsx +++ b/frontend/src/conversation/ConversationMessages.tsx @@ -223,7 +223,7 @@ export default function ConversationMessages({ handleUpdatedQuestionSubmission={handleQuestionSubmission} questionNumber={index} sources={query.sources} - attachmentsMetadata={query.attachments} + filesAttached={query.attachments} /> {renderResponseView(query, index)}