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 type { UIMessage } from "ai"import { Conversation, ConversationContent, ConversationDownload, ConversationScrollButton,} from "@/components/ai-elements/conversation"const messages = [ { id: "1", role: "user", parts: [{ type: "text", text: "How can I make my morning routine more consistent?" }], }, { id: "2", role: "assistant", parts: [ { type: "text", text: "Start with one small habit, connect it to something you already do, and keep it easy enough to repeat every day.", }, ], }, { id: "3", role: "user", parts: [{ type: "text", text: "What is a good first habit to try?" }], }, { id: "4", role: "assistant", parts: [ { type: "text", text: "Try drinking a glass of water after you wake up. Once that feels automatic, add the next habit to it.", }, ], },] satisfies UIMessage[]export default function ConversationDemo() { return ( <Conversation className="h-80 w-full max-w-lg rounded-lg border"> <ConversationContent> {messages.map((message) => { const text = message.parts .filter((part) => part.type === "text") .map((part) => part.text) .join("") return ( <div className={`flex ${ message.role === "user" ? "justify-end" : "justify-start" }`} key={message.id} > <div className={`max-w-[85%] rounded-2xl px-4 py-2 text-sm ${ message.role === "user" ? "bg-primary text-primary-foreground" : "bg-muted" }`} > {text} </div> </div> ) })} </ConversationContent> <ConversationScrollButton /> <ConversationDownload aria-label="Download conversation" messages={messages} /> </Conversation> )}