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 { Badge } from "@/components/ui/badge"import { Separator } from "@/components/ui/separator"import { formatTokenCount } from "@/components/assistant-ui/utils/tokens"const usage = [ { label: "Prompt", tokens: 48_200 }, { label: "Completion", tokens: 912_500 },]export default function TokensDemo() { const total = usage.reduce((sum, item) => sum + item.tokens, 0) return ( <div className="flex w-full max-w-sm flex-col gap-3 text-sm"> {usage.map((item) => ( <div key={item.label} className="flex items-center justify-between"> <span>{item.label}</span> <span className="text-xs tabular-nums">{formatTokenCount(item.tokens)} tokens</span> </div> ))} <Separator /> <div className="flex items-center justify-between"> <span className="font-medium">Total</span> <Badge variant="secondary" className="tabular-nums"> {formatTokenCount(total)} tokens </Badge> </div> </div> )}