
Streaming Reply
AI chat
Search by name, tag, category or type
Source and install need .
pnpm dlx shadcn@latest add @assembli/response-feedbackThe action bar under an assistant reply: a version pager after regenerating, Copy with a Markdown option, Good and Bad response, Read aloud with a live level, and Regenerate with Try again, longer, shorter, casual, formal and a Switch model submenu. Rating down opens an inline panel with reasons, a comment and a share-conversation checkbox, then settles into a thank-you.
Other props pass through to the root element.
text*
string
The reply as plain text, for Copy and Read aloud.
markdown
string
The reply's Markdown source, for Copy as Markdown. Falls back to text.
versions
number
Default 1
How many versions of this reply exist. The pager shows from 2.
version
number
Default versions
The version on screen, 1-based.
onVersionChange
(version: number) => void
models
ResponseModel[]
Default DEFAULT_MODELS
Models offered under Regenerate › Retry with.
model
string
The model that wrote this reply; it gets the check in the menu.
reasons
string[]
Default DEFAULT_REASONS
Reasons offered when the reply is rated down.
busy
boolean
Default false
True while a new version is being written: the bar locks and the regenerate arrow turns.
defaultRating
"up" | "down" | null
Default null
defaultFeedbackOpen
boolean
Default false
Start with the thumbs-down panel open (for demos and restored state).
defaultReasons
string[]
Default []
onCopy
(format: "text" | "markdown") => void
onRatingChange
(rating: "up" | "down" | null) => void
onFeedback
(feedback: ResponseFeedbackValue) => void
onRegenerate
(mode: RegenerateMode, model?: string) => void
onReadAloud
(playing: boolean) => void
Called with true when reading starts and false when it stops or ends.
| Description | |||
|---|---|---|---|
| text* | string | – | The reply as plain text, for Copy and Read aloud. |
| markdown | string | – | The reply's Markdown source, for Copy as Markdown. Falls back to |
| versions | number | 1 | How many versions of this reply exist. The pager shows from 2. |
| version | number | versions | The version on screen, 1-based. |
| onVersionChange | (version: number) => void | – | |
| models | ResponseModel[] | DEFAULT_MODELS | Models offered under Regenerate › Retry with. |
| model | string | – | The model that wrote this reply; it gets the check in the menu. |
| reasons | string[] | DEFAULT_REASONS | Reasons offered when the reply is rated down. |
| busy | boolean | false | True while a new version is being written: the bar locks and the regenerate arrow turns. |
| defaultRating | "up" | "down" | null | null | |
| defaultFeedbackOpen | boolean | false | Start with the thumbs-down panel open (for demos and restored state). |
| defaultReasons | string[] | [] | |
| onCopy | (format: "text" | "markdown") => void | – | |
| onRatingChange | (rating: "up" | "down" | null) => void | – | |
| onFeedback | (feedback: ResponseFeedbackValue) => void | – | |
| onRegenerate | (mode: RegenerateMode, model?: string) => void | – | |
| onReadAloud | (playing: boolean) => void | – | Called with true when reading starts and false when it stops or ends. |