Usage
import { AgentChat, AgentChatDemo, AgentChatProps, AgentChatSection } from "@desk/ui/components/agent-chat";Best practices
Keep the conversation region height-stable so the shell doesn't jump while sections stream in.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | ||
| tabs | string[] | Header tab labels. | |
| activeTab | string | Active tab. | |
| onTabChange | (tab: string) => void | ||
| userMessage | string | Latest user message (hidden until present). | |
| showUserMessage | boolean | Whether the user message should be visible. | |
| sections | AgentChatSection[] | Assistant sections currently visible. | |
| draft | string | Composer draft value. | |
| onDraftChange | (value: string) => void | ||
| onSend | () => void | ||
| placeholder | string | Composer placeholder. | |
| headerActions | ReactNode | Optional header action icons. |
Also exports
- component
AgentChatDemo - interface
AgentChatProps - interface
AgentChatSection
Composition
Builds on