import { useState } from 'react' import { Sparkles, FileText, Terminal } from 'lucide-react' import type { AISessionCreateRequest } from '@/types/ai-session' interface FlowPilotIntakeProps { onSubmit: (request: AISessionCreateRequest) => void isLoading: boolean } export function FlowPilotIntake({ onSubmit, isLoading }: FlowPilotIntakeProps) { const [text, setText] = useState('') const [showLogs, setShowLogs] = useState(false) const [logContent, setLogContent] = useState('') const handleSubmit = () => { if (!text.trim() && !logContent.trim()) return const intake_content: Record = {} if (text.trim()) intake_content.text = text.trim() if (logContent.trim()) intake_content.log_content = logContent.trim() const intake_type = logContent.trim() ? text.trim() ? 'combined' : 'log_paste' : 'free_text' onSubmit({ intake_type, intake_content }) } const hasContent = text.trim() || logContent.trim() if (isLoading) { return (

Analyzing your issue...

FlowPilot is classifying the problem and searching for relevant flows

) } return (

What are you troubleshooting?

Describe the issue, paste an error message, or paste log output

{/* Main text area */}