Usage
Features
- Display the session's chat history in a styled list
- Renders the
AgentChatIndicatorwhen theagentStateis "thinking" - Supports both plain text and markdown formatting
- Automatically scrolls to the latest message
- Handles message updates and deletions
Installation
pnpm dlx shadcn@latest add @agents-ui/agent-chat-transcript
Props
| Prop name | Type | Default |
|---|---|---|
autoScroll? | boolean | true |
scrollAnchor? | boolean | "user" | "other" | "any" | – |
scrollButtonRender? | any | – |
scrollButtonBehavior? | any | – |
scrollButtonDirection? | any | – |
agentState? | enum | – |
messages? | ReceivedMessage[] | [] |
className? | string | – |
ref? | Ref<HTMLDivElement> | – |
...props? | ComponentProps<'div'> , ComponentProps<typeof MessageScrollerProvider>, ComponentProps<typeof MessageScrollerViewport>, ComponentProps<typeof MessageScrollerContent> | |