buster/web/src/controllers/ReasoningController/ReasoningMessages/ReasoningMessage_Thought/ReasoningMessage_ThoughtCon...

30 lines
1.1 KiB
TypeScript
Raw Normal View History

2025-03-01 02:30:39 +08:00
import { BusterChatMessageReasoning_pillsPillContainer } from '@/api/asset_interfaces';
2025-02-11 02:55:18 +08:00
import React from 'react';
2025-02-20 11:05:30 +08:00
import { Text } from '@/components/ui';
2025-02-11 02:55:18 +08:00
import { PillContainer } from './ReasoningMessage_ThoughtPills';
import { itemAnimationConfig } from '../animationConfig';
import { AnimatePresence, motion } from 'framer-motion';
export const ReasoningMessage_ThoughtContainer: React.FC<{
2025-03-01 02:43:32 +08:00
pillContainer: BusterChatMessageReasoning_pillsPillContainer;
2025-02-11 02:55:18 +08:00
isCompletedStream: boolean;
2025-03-01 02:43:32 +08:00
}> = React.memo(({ pillContainer, isCompletedStream }) => {
2025-02-11 02:55:18 +08:00
return (
<AnimatePresence initial={!isCompletedStream}>
<motion.div {...itemAnimationConfig}>
<div className="flex flex-col space-y-1">
<Text size="xs" type="tertiary">
2025-03-01 02:43:32 +08:00
{pillContainer.title}
2025-02-11 02:55:18 +08:00
</Text>
2025-03-01 02:43:32 +08:00
<PillContainer
pills={pillContainer.thought_pills}
isCompletedStream={isCompletedStream}
/>
2025-02-11 02:55:18 +08:00
</div>
</motion.div>
</AnimatePresence>
);
});
ReasoningMessage_ThoughtContainer.displayName = 'ReasoningMessage_ThoughtContainer';