import { useState, useRef } from 'react'; import { Send } from 'lucide-react'; import { Button } from '@/components/ui/button'; export function ChatInput({ onSend }: { onSend: (content: string) => void }) { const [input, setInput] = useState(''); const ref = useRef(null); const handleSend = () => { if (!input.trim()) return; onSend(input.trim()); setInput(''); ref.current?.focus(); }; const handleKeyDown = (e: React.KeyboardEvent) => { if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault(); handleSend(); } }; return (