'use client'; import { useEffect, useState } from 'react'; import { ChevronDown, ChevronUp, BrainCircuit } from 'lucide-react'; interface ThinkBoxProps { content: string; thinkingEnded: boolean; } const ThinkBox = ({ content, thinkingEnded }: ThinkBoxProps) => { const [isExpanded, setIsExpanded] = useState(true); useEffect(() => { if (thinkingEnded) { setIsExpanded(false); } else { setIsExpanded(true); } }, [thinkingEnded]); return (
{isExpanded && (
{content}
)}
); }; export default ThinkBox;