Cookbooks / AI chat
AI chat page
base-chat is the product primitive: message list, streaming cursor, tool-call rows, and a prompt box. Point (send) at your model API.
- Install chat. Run npx base-ui-cli add chat.
- Bind state. Pass messages and streaming into base-chat.
- Handle send. Point (send) at your model API; use (stop) to cancel.
- Show tool calls. Push messages with role: 'tool' for tool-call rows.
Ask how to install a component. This page fakes streaming — nothing leaves the browser.
Enter to send · Shift+Enter for a new line