Update ReasoningMessage_Files.tsx

This commit is contained in:
Nate Kelley 2025-03-05 15:49:46 -07:00
parent 4828d77473
commit 5f972ea3e9
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
1 changed files with 23 additions and 3 deletions

View File

@ -7,10 +7,30 @@ import { useMessageIndividual } from '@/context/Chats';
export const ReasoningMessage_Files: React.FC<ReasoningMessageProps> = React.memo(
({ isCompletedStream, chatId, reasoningMessageId, messageId }) => {
const { status, id, type, title, secondary_title, file_ids } = useMessageIndividual(
const status = useMessageIndividual(
messageId,
(x) => x?.reasoning_messages[reasoningMessageId]
) as BusterChatMessageReasoning_files;
(x) => (x?.reasoning_messages[reasoningMessageId] as BusterChatMessageReasoning_files)?.status
);
const file_ids = useMessageIndividual(
messageId,
(x) =>
(x?.reasoning_messages[reasoningMessageId] as BusterChatMessageReasoning_files)?.file_ids
);
const title = useMessageIndividual(
messageId,
(x) => (x?.reasoning_messages[reasoningMessageId] as BusterChatMessageReasoning_files)?.title
);
const secondary_title = useMessageIndividual(
messageId,
(x) =>
(x?.reasoning_messages[reasoningMessageId] as BusterChatMessageReasoning_files)
?.secondary_title
);
if (!title) return null;
return (
<BarContainer