Skip to content
Documentation navigation
Setup

AI

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/ai

When 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.

API for Feedback Bar.
PropTypeBehavior
onCopy / copyTextcallback / stringClipboard helpers.
onRegenerate / onFeedbackcallbacksRetry and rating.