import React, { useState } from 'react'; import { Play, Shuffle, Square } from 'lucide-react'; export default function ChatControls({ onStart, onStop, disabled, isRunning }) { const [starterText, setStarterText] = useState(''); const handleStartWithText = () => { onStart(starterText.trim() || null); }; const handleAutoStart = () => { onStart(null); }; return (
{isRunning ? ( ) : ( <> setStarterText(e.target.value)} disabled={disabled} onKeyDown={e => { if (e.key === 'Enter' && !disabled) handleStartWithText(); }} /> )}
); }