import { useState } from "react"; import { Button } from "@/components/ui/button"; import { SquarePen, Brain, Send, StopCircle, Zap, Cpu } from "lucide-react"; import { Textarea } from "@/components/ui/textarea"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; // Updated InputFormProps interface InputFormProps { onSubmit: (inputValue: string, effort: string, model: string) => void; onCancel: () => void; isLoading: boolean; hasHistory: boolean; } export const InputForm: React.FC = ({ onSubmit, onCancel, isLoading, hasHistory, }) => { const [internalInputValue, setInternalInputValue] = useState(""); const [effort, setEffort] = useState("medium"); const [model, setModel] = useState("gemini-2.5-flash-preview-04-17"); const handleInternalSubmit = (e?: React.FormEvent) => { if (e) e.preventDefault(); if (!internalInputValue.trim()) return; onSubmit(internalInputValue, effort, model); setInternalInputValue(""); }; const handleInternalKeyDown = ( e: React.KeyboardEvent ) => { if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); handleInternalSubmit(); } }; const isSubmitDisabled = !internalInputValue.trim() || isLoading; return (