ViteHub is still experimental. Expect bugs and breaking changes.

Chat Prompt

Compose Nuxt UI's prompt behavior with attachments and an AI SDK status-aware submit control.

AgentChatPrompt retains Nuxt UI's autoresize, IME handling, Enter behavior, Escape blur, error state, and submit button states. ViteHub adds an attachment row and one submit payload.

Preview
<AgentChatPrompt
  v-model="input"
  v-model:files="files"
  accept="image/*,.pdf"
  :status
  @submit="({ text, files }) => sendMessage({ text, files })"
  @reload="reload"
  @stop="stop"
/>

Events

EventPayload
update:modelValueCurrent prompt text.
update:filesCurrent FileUIPart[].
submit{ text, files }. Empty text is accepted when files exist.
reloadNo payload. Connect it to the AI SDK reload() helper.
stopNo payload. Connect it to the AI SDK stop() helper.

Use #files, #actions, and #submit to replace each built-in section without rebuilding keyboard behavior. The composer, attachment picker, and status-aware submit action have default accessible names; pass aria-label to override the composer name.