"use client" import { useTranslations } from "next-intl" import type { ConnectionStatus, PromptCapabilitiesInfo, PromptDraft, SessionConfigOptionInfo, SessionModeInfo, AvailableCommandInfo, } from "@/lib/types" import { MessageInput } from "@/components/chat/message-input" interface ChatInputProps { status: ConnectionStatus | null promptCapabilities: PromptCapabilitiesInfo defaultPath?: string onFocus?: () => void onSend: (draft: PromptDraft, modeId?: string | null) => void onCancel: () => void modes?: SessionModeInfo[] configOptions?: SessionConfigOptionInfo[] modeLoading?: boolean configOptionsLoading?: boolean selectedModeId?: string | null onModeChange?: (modeId: string) => void onConfigOptionChange?: (configId: string, valueId: string) => void availableCommands?: AvailableCommandInfo[] | null attachmentTabId?: string | null draftStorageKey?: string | null } export function ChatInput({ status, promptCapabilities, defaultPath, onFocus, onSend, onCancel, modes, configOptions, modeLoading = false, configOptionsLoading = false, selectedModeId, onModeChange, onConfigOptionChange, availableCommands, attachmentTabId, draftStorageKey, }: ChatInputProps) { const t = useTranslations("Folder.chat.chatInput") const isConnected = status === "connected" const isPrompting = status === "prompting" const isConnecting = status === "connecting" || status === "downloading" return (