AI Chat Suite
Composable chat primitives for assistants, tool calls, and streaming UX.
Quickstart
- Ensure the registry is set up in Installation.
- Run the registry command:
npx shadcn@latest add https://gen-ui-eta-two.vercel.app/r/generic-chat-shellArchitecture
AiChatSystemis the high-level system for production chat UI.- Message renderer handles role formatting, timestamps, and status.
- Tool call card supports status/result/error outputs.
- Stream state component surfaces token/status progress.
- Chat shell composes all parts with controlled input, auto-scroll, and retry.
System Example
import { AiChatSystem } from "@/components/systems/ai-chat/ai-chat-system"
<AiChatSystem
messages={messages}
value={input}
isStreaming={isStreaming}
sendOnEnter
maxInputLength={4000}
onChange={setInput}
onSend={handleSend}
onRetry={retryLastMessage}
/>Install Commands
npx shadcn@latest add https://gen-ui-eta-two.vercel.app/r/generic-chat-shell
npx shadcn@latest add https://gen-ui-eta-two.vercel.app/r/generic-message-renderer
npx shadcn@latest add https://gen-ui-eta-two.vercel.app/r/generic-tool-call
npx shadcn@latest add https://gen-ui-eta-two.vercel.app/r/generic-stream-state
Demo
Live example: AI chat demo.
API Reference
| Prop | Type | Notes |
|---|---|---|
| AiChatSystem | system | Production chat shell with keyboard, stream, and retry controls |
| generic-chat-shell | /r/generic-chat-shell | Thread shell + composer + streaming state |
| generic-message-renderer | /r/generic-message-renderer | Role-aware message rendering |
| generic-tool-call | /r/generic-tool-call | Tool-call execution card |
| generic-stream-state | /r/generic-stream-state | Streaming lifecycle indicator |