
The prompt input, and the hardest part of a chat to get right. Files arrive by picker, drag or paste, each reporting its own upload state; a menu switches tools and connectors on for the turn; the model picker carries reasoning effort with it; and dictation swaps the field for a live waveform without shifting the layout. The unsent draft survives leaving and coming back. Speaks the AI SDK's message shape, and drops into a chat you already have.
@shadcncraft
onSubmit is the seam: it hands you the text and the files, and nothing else. What the model picker, the tool switches and the connectors are set to is a preference rather than part of the message, so it is held in localStorage and survives a reload without passing through your submit handler. Drafts are kept the same way, one per draftKey. Dictation runs on the browser's own Web Speech API, which asks for the microphone on first use. The button stays visible where that API is missing, since support cannot be read before the first attempt: pressing it reports the refusal through onError, which this block sends to a toast.






















