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 { useState } from 'react'import { PromptLibrary, type SavedPrompt } from '@/components/assistant-ui/elements/prompt-library'const prompts: SavedPrompt[] = [ { id: 'summarize', name: 'Summarize article', body: 'Summarize {article} in three bullet points for a {audience} audience.', variables: ['article', 'audience'], }, { id: 'translate', name: 'Translate text', body: 'Translate the following text into {language}, keeping a formal tone.', variables: ['language'], }, { id: 'email', name: 'Draft follow-up email', body: 'Write a short follow-up email to {name} about {topic}.', variables: ['name', 'topic'], }, { id: 'explain', name: 'Explain code', body: 'Explain what this function does and point out any edge cases.', variables: [], },]export default function PromptLibraryDemo() { const [query, setQuery] = useState('') const [selectedId, setSelectedId] = useState(prompts[0].id) return ( <PromptLibrary prompts={prompts} query={query} selectedId={selectedId} onQueryChange={setQuery} onSelect={setSelectedId} onInsert={(id) => console.log(id)} /> )}