Agent Chat
ProNewA tabbed chat workspace with per-thread drafts, pending replies, expandable sources and retry.
Installation
pnpm dlx shadcn@latest add @viewport/agent-chat
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| threads* | ChatThread[]Switchable workspace chat threads. | — |
| onReply | (threadId: string, prompt: string) => Reply | Promise<Reply>Optional reply generator when the user sends a message. | — |
| className | string | — |
Accessibility
- Thread switcher uses tablist/tab semantics with aria-selected.
- Message transcript is a polite live log; reasoning pills expose aria-expanded.
- Tab gliding and message entrances respect prefers-reduced-motion.