Pipeline
- Docsusage, props, keywords
- Demosrc/demo.tsx
- Buildshadcn add → vite
- Capturelight, dark, motion
- IndexBM25 + vectors
Public log. Prompts, raw model errors and costs stay on the admin side.
Log
Demo source
src/demo.tsx · from an earlier run
import { getCsat, getRatingSummary, SentimentBar, SentimentKey, StarRating } from '@/components/dashboardblocks/feedback'import { Card, CardContent } from '@/components/ui/card'const sentiment = { negative: 12, neutral: 30, positive: 58 }const sentiments = ['positive', 'neutral', 'negative'] as constexport default function FeedbackDemo() { const counts = [4, 6, 12, 38, 40] const { average, total } = getRatingSummary(counts) return ( <Card className='w-full max-w-sm'> <CardContent className='flex flex-col gap-4'> <div className='flex items-center justify-between'> <div className='flex flex-col gap-1'> <span className='text-3xl font-semibold tabular-nums'>{average.toFixed(1)}</span> <StarRating value={average} /> </div> <div className='text-right text-sm'> <p className='font-medium'>{Math.round(getCsat(counts) * 100)}% CSAT</p> <p className='text-muted-foreground'>{total} ratings</p> </div> </div> <SentimentBar counts={sentiment} /> <div className='flex flex-wrap gap-4 text-sm text-muted-foreground'> {sentiments.map((s) => ( <span key={s} className='flex items-center gap-2 capitalize'> <SentimentKey sentiment={s} /> {s} {sentiment[s]}% </span> ))} </div> </CardContent> </Card> )}