Generic Chat Shell
Composable assistant shell with message rendering, tool calls, and stream state.
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-shellUsage
import { GenericChatShell } from "@/components/systems/ai-chat/generic-chat-shell"
<GenericChatShell
messages={messages}
value={prompt}
isStreaming={isStreaming}
onChange={setPrompt}
onSend={handleSend}
sendOnEnter
maxInputLength={4000}
onRetry={retry}
/>API Reference
| Prop | Type | Notes |
|---|---|---|
| messages | ChatMessage[] | Conversation timeline |
| value | string | Composer state |
| isStreaming | boolean | Streaming UI state |
| sendOnEnter | boolean | Enter submits, Shift+Enter adds newline |
| maxInputLength | number | Composer payload guardrail |
| autoScroll | boolean | Auto-follow latest message |
| onSend | (value) => Promise<void> | void | Submit handler |
| onRetry | () => void | Retry failed answer |