Feedback Bar
Copy, regenerate, and thumbs actions for assistant turns.
Installation
Every AI component page installs the same aggregate @constructive/ai entry. Examples use the default @/components/ui alias; use your configured ui alias if it differs.
components.json
{
"registries": {
"@constructive": "https://constructive-io.github.io/blocks/r/{name}.json"
}
}Install aggregate
pnpm dlx shadcn@latest add @constructive/aiWhen to use
- Use FeedbackBar under settled MessageContent.
- Pass copyText when the clipboard should receive the full answer.
Usage
example.tsx
tsx
import { FeedbackBar } from '@/components/ui/ai';
<FeedbackBar copyText={text} onRegenerate={regen} onFeedback={rate} />API
Primary props for this surface. The installed source types are the full contract.
| Prop | Type | Behavior |
|---|---|---|
| onCopy / copyText | callback / string | Clipboard helpers. |
| onRegenerate / onFeedback | callbacks | Retry and rating. |