import { useEffect, useState } from "react"; import { cn } from "../lib/utils"; export interface ThinkingIndicatorProps { className?: string; } export function ThinkingIndicator({ className }: ThinkingIndicatorProps) { const [elapsed, setElapsed] = useState(0); useEffect(() => { const interval = window.setInterval(() => setElapsed((current) => current + 1), 1000); return () => window.clearInterval(interval); }, []); return (
{elapsed > 3 && ( {elapsed}s )}
); }