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, PromptLibraryTrigger, PromptLibraryContent, PromptLibrarySearch, PromptLibraryList, PromptLibraryEmpty, PromptLibraryGroup, PromptLibraryItem, PromptLibraryFooter, PromptLibraryCreateTrigger, PromptLibraryCreateDialog, type Prompt,} from "@/components/ui/prompt-library"const prompts: Prompt[] = [ { id: "review", title: "Code Review", description: "Review code for bugs and style issues", prompt: "Review the following code for bugs and style issues.", category: "Development", }, { id: "tests", title: "Write Tests", description: "Generate unit tests for a function", prompt: "Write unit tests covering the edge cases of this function.", category: "Development", }, { id: "summarize", title: "Summarize", description: "Condense an article into key points", prompt: "Summarize the following text into five concise bullet points.", category: "Writing", },]export default function PromptLibraryDemo() { const [open, setOpen] = useState(true) return ( <PromptLibrary prompts={prompts} open={open} onOpenChange={setOpen}> <PromptLibraryTrigger /> <PromptLibraryContent> <PromptLibrarySearch /> <PromptLibraryList> <PromptLibraryEmpty /> <PromptLibraryGroup heading="Prompts"> {prompts.map((p) => ( <PromptLibraryItem key={p.id} prompt={p} /> ))} </PromptLibraryGroup> </PromptLibraryList> <PromptLibraryFooter> <PromptLibraryCreateTrigger /> </PromptLibraryFooter> </PromptLibraryContent> <PromptLibraryCreateDialog /> </PromptLibrary> )}