Generic Chat Shell

Composable assistant shell with message rendering, tool calls, and stream state.

Quickstart

  1. Ensure the registry is set up in Installation.
  2. Run the registry command:
npx shadcn@latest add https://gen-ui-eta-two.vercel.app/r/generic-chat-shell

Usage

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

PropTypeNotes
messagesChatMessage[]Conversation timeline
valuestringComposer state
isStreamingbooleanStreaming UI state
sendOnEnterbooleanEnter submits, Shift+Enter adds newline
maxInputLengthnumberComposer payload guardrail
autoScrollbooleanAuto-follow latest message
onSend(value) => Promise<void> | voidSubmit handler
onRetry() => voidRetry failed answer
← Previous: AI Chat SuiteYou reached the end of the docs.