/* * ============================================================================= * VibeQuant (vquant) — AI-Powered Financial Intelligence Platform * ----------------------------------------------------------------------------- * File: client/src/components/chat/thinking-widget.tsx * * Author: Simon-Pierre Boucher * Contact: contact@spboucher.ai * Website: https://www.spboucher.ai * Demo: https://www.vquant.ai * License: MIT (see LICENSE) * * Copyright © 2026 Simon-Pierre Boucher. All rights reserved. * ============================================================================= */ import { useState, useEffect } from "react"; import { Brain, ChevronDown } from "lucide-react"; interface ThinkingWidgetProps { content: string; isStreaming?: boolean; } export function ThinkingWidget({ content, isStreaming = false }: ThinkingWidgetProps) { const [open, setOpen] = useState(false); // Auto-expand while the model is thinking, collapse once done. useEffect(() => { setOpen(isStreaming); }, [isStreaming]); if (!content) return null; return (
{open && (
            {content}
          
)}
); }