AI Chat
BlockA complete chat surface: transcript, reasoning, tool calls, sources and composer.
- AI
- 11 components
- 1 file
Loading the example…
pnpm dlx @dowel-ui/cli add ai-chatimport { AiChatBlock } from "@/components/blocks/ai-chat";<AiChatBlock>
| Prop | Type | Default |
|---|---|---|
messages (required) | ChatMessage[] | — |
busyA response is in flight. | boolean | false |
emptyShown when the transcript is empty. | ReactNode | — |
model | string | — |
models | ModelOption[] | — |
onModelChange | (model: string) => void | — |
onSend | (message: string) => void | — |
onStop | () => void | — |
placeholder | string | "Ask anything…" |
waitingShown before the first token arrives. | boolean | false |
className | string | — |
Assembled from the AI components rather than reimplementing them, so their decisions still hold: the transcript is a list and not a live region, state is announced separately through ConversationStatus, and the composer will not send while an IME composition is active. Tool payloads are named per tool, so two open tool calls do not present two regions called "Result".