update reasoning message

This commit is contained in:
Nate Kelley 2025-03-10 09:45:08 -06:00
parent e466951d96
commit 2e8286233b
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
2 changed files with 9 additions and 3 deletions

View File

@ -44,6 +44,12 @@ export const useChatStreamMessage = () => {
})!;
chatRefMessages.current[chatMessage.id] = iChatMessage;
console.log(
'iChatMessage',
Object.keys(iChatMessage.reasoning_messages),
iChatMessage.reasoning_message_ids
);
onUpdateChatMessage(iChatMessage);
startTransition(() => {

View File

@ -71,7 +71,7 @@ export const ReasoningMessageSelector: React.FC<ReasoningMessageSelectorProps> =
status: x?.reasoning_messages[reasoningMessageId]?.status
}));
if (!title || !secondary_title || !type || !status) return null;
if (!type || !status) return null;
const ReasoningMessage = ReasoningMessageRecord[type];
const animationKey = reasoningMessageId + type;
@ -81,8 +81,8 @@ export const ReasoningMessageSelector: React.FC<ReasoningMessageSelectorProps> =
showBar={true}
status={status}
isCompletedStream={isCompletedStream}
title={title}
secondaryTitle={secondary_title}>
title={title ?? ''}
secondaryTitle={secondary_title ?? ''}>
<AnimatePresence mode="wait">
<motion.div key={animationKey} {...itemAnimationConfig} className="overflow-hidden" layout>
<ReasoningMessage