AI chat
An assistant panel that streams replies.
Installation
Run the CLI
Run
pnpm dlx asta-ui@latest initonce, then this. The file lands incomponents/astabyte/and the colour tokens go into your CSS.$ pnpm dlx asta-ui@latest add ai-chatOr install the package
Don’t want the file? Import from
asta-ui/ai-chatand update withpnpm update asta-ui. Add the stylesheet once. More.$ pnpm add asta-uiimport { AiChat } from "asta-ui/ai-chat";Or copy it by hand
Copy this file. Keep the paths, or fix the
@/imports. Then add the tokens fromglobals.css."use client"; import { memo, useCallback, useEffect, useId, useLayoutEffect, useRef, useState, type ReactNode } from "react"; const cx = (...c: (string | false | null | undefined)[]) => c.filter(Boolean).join(" "); const CURVE = "cubic-bezier(.16,1,.3,1)"; export interface AiChatMessage { id: string; role: "user" | "assistant"; content: string; /** The reply was stopped before it finished. */ stopped?: boolean; /** The reply failed. `content` holds whatever arrived before the error. */ failed?: boolean; } export interface AiChatProps { /** * Produces the reply to the latest prompt. Return an async iterable of text chunks to stream it, or a * promise of the whole text. Stop the work when `signal` aborts. */ onSend: (input: { prompt: string; messages: AiChatMessage[]; signal: AbortSignal }) => AsyncIterable<string> | Promise<string>; defaultMessages?: AiChatMessage[]; /** Called whenever a message is added or a reply finishes. */ onMessagesChange?: (messages: AiChatMessage[]) => void; /** Prompt chips shown while the conversation is empty. */ suggestions?: string[]; title?: string; /** Shown above the suggestions while the conversation is empty. */ greeting?: string; placeholder?: string; className?: string; } const KEYFRAMES = `@keyframes kit-ac-tok { from { opacity: 0 } } @keyframes kit-ac-in { from { opacity: 0; transform: translateY(8px) } } @keyframes kit-ac-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0) } 40% { opacity: 1; transform: translateY(-2px) } } @keyframes kit-ac-pop { from { opacity: 0; transform: scale(.6) } } @media (prefers-reduced-motion: reduce) { .kit-ac, .kit-ac * { animation: none !important; transition-duration: 0s !important; } }`; let seq = 0; const uid = () => `m${Date.now().toString(36)}${(seq++).toString(36)}`; function Mark() { return ( <span aria-hidden className="grid h-7 w-7 shrink-0 place-items-center rounded-lg bg-[color-mix(in_srgb,var(--color-brand)_10%,transparent)] text-brand"> <svg viewBox="0 0 24 24" className="h-3.5 w-3.5" fill="currentColor"> <path d="M12 3.5c.7 4.6 2.4 6.3 7 7-4.6.7-6.3 2.4-7 7-.7-4.6-2.4-6.3-7-7 4.6-.7 6.3-2.4 7-7Z" /> <path d="M19 16.5c.25 1.6.9 2.25 2.5 2.5-1.6.25-2.25.9-2.5 2.5-.25-1.6-.9-2.25-2.5-2.5 1.6-.25 2.25-.9 2.5-2.5Z" opacity=".55" /> </svg> </span> ); } function IconButton({ label, onClick, children }: { label: string; onClick: () => void; children: ReactNode }) { return ( <button type="button" aria-label={label} title={label} onClick={onClick} className="grid h-7 w-7 place-items-center rounded-md text-mute outline-none transition-colors duration-200 hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50" > {children} </button> ); } const svg = { viewBox: "0 0 24 24", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: 2.25, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true } as const; /** The tokens that arrived in one frame. Batches never change once added, so old ones skip re-rendering. */ const Batch = memo(function Batch({ tokens }: { tokens: string[] }) { return tokens.map((t, i) => ( <span key={i} style={{ animation: `kit-ac-tok .5s ${CURVE}` }}> {t} </span> )); }); interface MessageProps { m: AiChatMessage; live: boolean; waiting: boolean; parts?: string[][]; isLast: boolean; copied: boolean; onCopy: (m: AiChatMessage) => void; onRegenerate: () => void; } /** One message. Memoised, so a streamed token re-renders only the reply it belongs to. */ const Message = memo(function Message({ m, live, waiting, parts, isLast, copied, onCopy, onRegenerate }: MessageProps) { if (m.role === "user") { return ( <li className="flex justify-end" style={{ animation: `kit-ac-in .4s ${CURVE}` }}> <p className="max-w-[80%] whitespace-pre-wrap rounded-xl bg-paper-2 px-3.5 py-2.5 text-[14px] leading-relaxed text-ink">{m.content}</p> </li> ); } return ( <li className="group flex gap-3"> <Mark /> <div className="min-w-0 flex-1 pt-0.5"> {live && waiting ? ( <span role="img" className="inline-flex h-6 items-center gap-1" aria-label="Thinking"> {[0, 1, 2].map((i) => ( <span key={i} className="h-1.5 w-1.5 rounded-full bg-mute" style={{ animation: `kit-ac-dot 1.1s ${CURVE} ${i * 140}ms infinite` }} /> ))} </span> ) : ( <p className="whitespace-pre-wrap text-[14px] leading-relaxed text-ink"> {parts && parts.length ? parts.map((b, i) => <Batch key={i} tokens={b} />) : m.content} </p> )} {!live && (m.stopped || m.failed) && <p className="mt-1.5 text-[12.5px] text-mute">{m.failed ? "Something went wrong. Try again." : "Stopped."}</p>} {!live && ( <div className={cx( "mt-1.5 -ml-1.5 flex items-center gap-0.5 transition-opacity duration-300", isLast ? "opacity-100" : "opacity-0 group-hover:opacity-100 focus-within:opacity-100", )} > {m.content && ( <IconButton label={copied ? "Copied" : "Copy"} onClick={() => onCopy(m)}> {copied ? ( <svg {...svg} key="ok" style={{ animation: `kit-ac-pop .3s ${CURVE}` }}> <path d="m5 12.5 4.5 4.5L19 7.5" /> </svg> ) : ( <svg {...svg} key="copy"> <rect x="8.5" y="8.5" width="11" height="11" rx="2" /> <path d="M15.5 8.5V6.5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h2" /> </svg> )} </IconButton> )} {isLast && ( <IconButton label="Regenerate" onClick={onRegenerate}> <svg {...svg}> <path d="M19.5 12a7.5 7.5 0 1 1-2.2-5.3" /> <path d="M19.5 4.5v3.5H16" /> </svg> </IconButton> )} </div> )} </div> </li> ); }); /** * An assistant chat panel. Replies stream in token by token and each token fades in. Suggested prompts * fill the empty state. Enter sends, Shift + Enter adds a line, and the send button turns into Stop * while a reply streams. Assistant messages can be copied, and the last one regenerated. */ export function AiChat({ onSend, defaultMessages = [], onMessagesChange, suggestions = [], title = "Assistant", greeting = "How can I help?", placeholder = "Ask anything…", className, }: AiChatProps) { const [messages, setMessages] = useState(defaultMessages); // Chunks of the latest streamed reply, so each token can fade in on its own. The next run drops them. // Tokens are grouped per animation frame, so a fast stream costs one render per frame, not per token. const [chunks, setChunks] = useState<Record<string, string[][]>>({}); const [streaming, setStreaming] = useState<string | null>(null); const [waiting, setWaiting] = useState(false); const [text, setText] = useState(""); const [copied, setCopied] = useState<string | null>(null); const [status, setStatus] = useState(""); const inputId = useId(); const ctrl = useRef<AbortController | null>(null); const list = useRef<HTMLDivElement>(null); const area = useRef<HTMLTextAreaElement>(null); const pinned = useRef(true); const copyTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined); // Tokens waiting for the next frame, and the full text of the reply so far. const pending = useRef<{ id: string; tokens: string[]; frame: number; text: string }>({ id: "", tokens: [], frame: 0, text: "" }); const notify = useRef(onMessagesChange); useEffect(() => { notify.current = onMessagesChange; }, [onMessagesChange]); // Stop any reply and timers when the panel goes away. useEffect( () => () => { ctrl.current?.abort(); ctrl.current = null; clearTimeout(copyTimer.current); cancelAnimationFrame(pending.current.frame); }, [], ); // Move the tokens that arrived since the last frame into state in one go. const flush = () => { const p = pending.current; cancelAnimationFrame(p.frame); p.frame = 0; if (!p.tokens.length) return; const batch = p.tokens; const id = p.id; p.tokens = []; setWaiting(false); setChunks((all) => ({ ...all, [id]: [...(all[id] ?? []), batch] })); }; // Follow the reply as it grows, unless the reader scrolled up. useLayoutEffect(() => { const el = list.current; if (el && pinned.current) el.scrollTop = el.scrollHeight; }, [messages, chunks, waiting]); const commit = (next: AiChatMessage[]) => { setMessages(next); notify.current?.(next); }; const run = async (history: AiChatMessage[]) => { const prompt = [...history].reverse().find((m) => m.role === "user")?.content ?? ""; ctrl.current?.abort(); const c = new AbortController(); ctrl.current = c; const id = uid(); let reply = ""; let failed = false; pinned.current = true; commit(history); setStreaming(id); setWaiting(true); // Only the newest reply keeps its chunks (its last tokens may still be fading). Older ones render from content. setChunks({ [id]: [] }); setStatus("Assistant is replying."); cancelAnimationFrame(pending.current.frame); pending.current = { id, tokens: [], frame: 0, text: "" }; const push = (t: string) => { if (!t || ctrl.current !== c) return; reply += t; const p = pending.current; p.text = reply; p.tokens.push(t); if (!p.frame) p.frame = requestAnimationFrame(flush); }; try { const out = onSend({ prompt, messages: history, signal: c.signal }); if (typeof (out as AsyncIterable<string>)[Symbol.asyncIterator] === "function") { for await (const t of out as AsyncIterable<string>) { if (c.signal.aborted) break; push(t); } } else { const whole = await (out as Promise<string>); if (!c.signal.aborted) push(whole); } } catch { if (!c.signal.aborted) failed = true; } // Stopped (stop() already settled), unmounted, or a newer reply took over: leave state alone. if (ctrl.current !== c) return; ctrl.current = null; flush(); const msg: AiChatMessage = { id, role: "assistant", content: reply, ...(failed && { failed: true }) }; commit([...history, msg]); setStreaming(null); setWaiting(false); setStatus(failed ? "The reply failed." : "Reply finished."); }; const send = (raw: string) => { const prompt = raw.trim(); if (!prompt || streaming) return; setText(""); run([...messages, { id: uid(), role: "user", content: prompt }]); area.current?.focus(); }; const stop = () => { const c = ctrl.current; if (!c) return; c.abort(); // Settle right away even if the producer ignores the signal. ctrl.current = null; const id = streaming!; flush(); const reply = pending.current.id === id ? pending.current.text : ""; commit([...messages, { id, role: "assistant", content: reply, stopped: true }]); setStreaming(null); setWaiting(false); setStatus("Stopped."); area.current?.focus(); }; const regenerate = () => { const last = messages.length - 1; if (streaming || last < 0 || messages[last].role !== "assistant") return; run(messages.slice(0, last)); }; const copy = async (m: AiChatMessage) => { try { await navigator.clipboard.writeText(m.content); setCopied(m.id); setStatus("Copied."); clearTimeout(copyTimer.current); copyTimer.current = setTimeout(() => setCopied(null), 1600); } catch { setStatus("Couldn't copy."); } }; // Stable handlers for the memoised messages; they call the latest copy/regenerate. const actions = useRef({ copy, regenerate }); useLayoutEffect(() => { actions.current = { copy, regenerate }; }); const onCopy = useCallback((m: AiChatMessage) => actions.current.copy(m), []); const onRegenerate = useCallback(() => actions.current.regenerate(), []); const shown: AiChatMessage[] = streaming ? [...messages, { id: streaming, role: "assistant", content: "" }] : messages; const empty = shown.length === 0; const lastId = shown[shown.length - 1]?.id; return ( <div className={cx( "kit-ac flex h-[540px] w-full flex-col overflow-hidden rounded-[14px] bg-paper shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--color-ink)_9%,transparent),0_1px_2px_rgb(0_0_0/0.04)]", className, )} > <style href="asta-ai-chat" precedence="asta">{KEYFRAMES}</style> <p className="sr-only" aria-live="polite"> {status} </p> <header className="flex items-center gap-2.5 px-5 pb-3 pt-4"> <Mark /> <h3 className="text-[14px] font-medium tracking-[-0.01em] text-ink">{title}</h3> </header> <div ref={list} role="log" aria-live="off" aria-busy={!!streaming} aria-label="Conversation" onScroll={(e) => { const el = e.currentTarget; pinned.current = el.scrollHeight - el.scrollTop - el.clientHeight < 40; }} className="min-h-0 flex-1 overflow-y-auto px-5 [scrollbar-width:thin]" > {empty ? ( <div className="flex h-full flex-col items-center justify-center pb-6 text-center" style={{ animation: `kit-ac-in .5s ${CURVE}` }}> <p className="text-[22px] font-medium tracking-[-0.03em] text-ink">{greeting}</p> {suggestions.length > 0 && ( <div className="mt-6 flex max-w-[440px] flex-wrap justify-center gap-2"> {suggestions.map((s, i) => ( <button key={s} type="button" onClick={() => send(s)} className="rounded-lg bg-paper-2 px-3 py-2 text-left text-[13px] leading-snug text-ink-2 outline-none transition-[color,background-color,transform] duration-300 hover:-translate-y-px hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50" style={{ animation: `kit-ac-in .5s ${CURVE} ${80 + i * 50}ms both` }} > {s} </button> ))} </div> )} </div> ) : ( <ol className="flex flex-col gap-6 py-2"> {shown.map((m) => ( <Message key={m.id} m={m} live={m.id === streaming} waiting={m.id === streaming && waiting} parts={chunks[m.id]} isLast={m.id === lastId} copied={copied === m.id} onCopy={onCopy} onRegenerate={onRegenerate} /> ))} </ol> )} </div> <form className="px-4 pb-4 pt-2" onSubmit={(e) => { e.preventDefault(); send(text); }} > <div className="flex items-end gap-2 rounded-xl bg-paper p-1.5 pl-3.5 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--color-ink)_12%,transparent)] transition-shadow duration-200 focus-within:shadow-[inset_0_0_0_1px_var(--color-brand),0_0_0_3px_color-mix(in_srgb,var(--color-brand)_14%,transparent)]"> <label htmlFor={inputId} className="sr-only"> Message </label> <textarea ref={area} id={inputId} name="prompt" rows={1} enterKeyHint="send" value={text} placeholder={placeholder} onChange={(e) => setText(e.target.value)} onKeyDown={(e) => { if (e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing) { e.preventDefault(); send(text); } else if (e.key === "Escape" && streaming) { e.preventDefault(); stop(); } }} className="block max-h-36 min-h-[36px] flex-1 resize-none bg-transparent py-2 text-[16px] sm:text-[14px] leading-relaxed text-ink outline-none [field-sizing:content] placeholder:text-mute" /> {streaming ? ( <button key="stop" type="button" onClick={stop} aria-label="Stop" className="grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-ink text-paper outline-none transition-transform duration-200 active:scale-95 focus-visible:ring-2 focus-visible:ring-brand/50" style={{ animation: `kit-ac-pop .3s ${CURVE}` }} > <span className="h-2.5 w-2.5 rounded-[2px] bg-current" /> </button> ) : ( <button key="send" type="submit" aria-label="Send" disabled={!text.trim()} className="grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-brand text-on-brand outline-none transition-[opacity,transform] duration-200 active:scale-95 disabled:opacity-35 focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper" style={{ animation: `kit-ac-pop .3s ${CURVE}` }} > <svg viewBox="0 0 24 24" className="h-4 w-4" fill="none" stroke="currentColor" strokeWidth="2.55" strokeLinecap="round" strokeLinejoin="round" aria-hidden> <path d="M12 20V5" /> <path d="m6 11 6-6 6 6" /> </svg> </button> )} </div> <p className="mt-2 text-center text-[11.5px] text-mute">Replies can be wrong. Check anything important.</p> </form> </div> ); } export default AiChat;Or ask your AI agent
Paste this into Claude Code, Cursor, Codex, v0 or Lovable. Fill in the last line. More in Prompts.
Add the Astabyte UI AI chat component to my project. An assistant panel that streams replies. It includes: streaming, suggestions, stop, copy, regenerate. Install it: ```sh pnpm dlx asta-ui@latest add ai-chat --radix ``` Or with the shadcn CLI: ```sh pnpm dlx shadcn@latest add https://ui.astabyte.com/r/ai-chat.json ``` If the project isn't set up yet, run `pnpm dlx asta-ui@latest init --radix` first: it runs `shadcn init` when needed and adds the @astabyte registry (Next.js, Vite, React Router, Astro, TanStack Start; Tailwind CSS v4). Import it like this: ```tsx import { AiChat } from "@/components/astabyte/ai-chat"; ``` Usage example and props: https://ui.astabyte.com/ai-chat Full catalogue for context: https://ui.astabyte.com/llms.txt Rules: - Keep the colour tokens (paper, paper-2, ink, ink-2, mute, brand). Don't restyle with hard-coded colours; rebrand by changing the token values in the CSS. - Keep the motion as it is: transform and opacity only, and the prefers-reduced-motion fallback. - Keep keyboard, focus and ARIA behaviour. - Use fake data and fake brand names in examples. Use it to: [describe where it goes and what it should do]Or use plain HTML + CSS
Not on React? Use it from Django, Rails, Laravel, Go
html/template, htmx or a static page. Loadasta.cssandasta.jsonce (thehead.htmltab), then paste the markup. Theui.astabyte.com/cdnlink is temporary: pin a version from jsDelivr for production. More in HTML + CSS.<!-- Needs asta.js and a server: the form posts via htmx to /chat, which streams the reply into [data-asta-chat-list]. --> <div style="max-width:720px"> <div id="chat" data-asta-chat class="asta-ai-chat"> <p class="asta-sr-only" aria-live="polite" data-asta-chat-status></p> <header class="asta-ai-chat-header"><span aria-hidden="true" class="asta-ai-chat-mark"><svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 1.5c.4 2.9 1.6 4.1 4.5 4.5-2.9.4-4.1 1.6-4.5 4.5-.4-2.9-1.6-4.1-4.5-4.5C6.4 5.6 7.6 4.4 8 1.5Z"/><path d="M12.5 10c.2 1.4.8 2 2.2 2.2-1.4.2-2 .8-2.2 2.2-.2-1.4-.8-2-2.2-2.2 1.4-.2 2-.8 2.2-2.2Z" opacity=".55"/></svg></span><h3 class="asta-ai-chat-title">Astabyte assistant</h3></header> <div data-asta-chat-log role="log" aria-label="Conversation" class="asta-ai-chat-log"> <div data-asta-chat-empty class="asta-ai-chat-empty"><p class="asta-ai-chat-greeting">How can I help?</p> <div class="asta-ai-chat-suggestions"><button type="button" data-asta-chat-suggest="Summarise this week" class="asta-ai-chat-suggest">Summarise this week</button><button type="button" data-asta-chat-suggest="Draft a welcome email" class="asta-ai-chat-suggest">Draft a welcome email</button><button type="button" data-asta-chat-suggest="Explain how this chat works" class="asta-ai-chat-suggest">Explain how this chat works</button></div></div> <ol id="chat-list" data-asta-chat-list class="asta-ai-chat-list"></ol> </div> <template data-asta-chat-pending> <li data-role="user" class="asta-ai-chat-user asta-ai-chat-in"><p class="asta-ai-chat-bubble"></p></li> <li data-role="assistant" class="asta-ai-chat-reply asta-ai-chat-in" data-asta-chat-stream="pending" aria-busy="true"><span aria-hidden="true" class="asta-ai-chat-mark"><svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 1.5c.4 2.9 1.6 4.1 4.5 4.5-2.9.4-4.1 1.6-4.5 4.5-.4-2.9-1.6-4.1-4.5-4.5C6.4 5.6 7.6 4.4 8 1.5Z"/><path d="M12.5 10c.2 1.4.8 2 2.2 2.2-1.4.2-2 .8-2.2 2.2-.2-1.4-.8-2-2.2-2.2 1.4-.2 2-.8 2.2-2.2Z" opacity=".55"/></svg></span><div class="asta-ai-chat-body"><span role="img" data-asta-chat-dots class="asta-ai-chat-dots" aria-label="Thinking"><span></span><span></span><span></span></span><p data-asta-chat-text class="asta-ai-chat-text hidden"></p></div></li> </template> <form action="/chat" method="post" hx-post="/chat" hx-target="#chat-list" hx-swap="beforeend" hx-indicator="find [data-asta-chat-send]" data-asta-chat-form class="asta-ai-chat-form"> <div class="asta-ai-chat-composer"><label for="chat-input" class="asta-sr-only">Message</label> <textarea id="chat-input" name="prompt" rows="1" enterkeyhint="send" placeholder="Ask anything…" data-asta-chat-input class="asta-ai-chat-input"></textarea> <button type="submit" aria-label="Send" data-asta-chat-send class="asta-ai-chat-send"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 13V3M3.5 7.5 8 3l4.5 4.5"/></svg><span aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" aria-hidden="true"><circle cx="8" cy="8" r="6" stroke="currentColor" stroke-opacity="0.25" stroke-width="2"/><path d="M14 8a6 6 0 0 0-6-6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></span></button></div> <p class="asta-ai-chat-note">Replies can be wrong. Check anything important.</p> </form></div> </div>
Usage
The demo above, as code.
"use client";
import { AiChat } from "@/components/astabyte/ai-chat";
const ANSWERS: Record<string, string> = {
"Summarise last week's sign-ups":
"Sign-ups grew 18% week over week, to 1,284.\n\nMost came from the pricing page after Tuesday's update. Mobile now makes up 41% of new accounts, up from 33%.\n\nOne thing to watch: activation slipped to 52%. People sign up, then stall on the workspace step.",
"Draft a reply to a late invoice":
"Hi Rani,\n\nThanks for the reminder. The invoice for October went to the wrong inbox on our side. I've sent it to finance today, so you should see the payment by Friday.\n\nSorry for the wait, and thanks for your patience.",
"Explain churn in one paragraph":
"Churn is the share of customers who leave in a given period. If you start the month with 200 customers and 10 cancel, monthly churn is 5%. It matters because every lost customer has to be replaced before you can grow, so even a small drop in churn compounds over a year.",
};
const FALLBACK =
"Here's a short take.\n\nStart with the one number that moved the most, then explain why in a sentence. Add a single next step. Anything longer usually belongs in a doc, not a chat.";
const wait = (ms: number, signal: AbortSignal) =>
new Promise<void>((resolve) => {
const t = setTimeout(resolve, ms);
signal.addEventListener("abort", () => (clearTimeout(t), resolve()), { once: true });
});
/** A canned reply streamed word by word. No network. */
async function* reply({ prompt, signal }: { prompt: string; signal: AbortSignal }) {
await wait(650, signal);
const text = ANSWERS[prompt] ?? FALLBACK;
for (const token of text.match(/\S+\s*/g) ?? []) {
if (signal.aborted) return;
yield token;
await wait(28 + Math.random() * 46, signal);
}
}
export default function AiChatDemo() {
return (
<div className="flex min-h-[420px] w-full flex-col items-center justify-center gap-3 p-4 sm:p-8">
<div className="w-full max-w-[560px]">
<AiChat title="Workspace assistant" greeting="What should we look at?" suggestions={Object.keys(ANSWERS)} onSend={reply} />
</div>
<p className="text-[12.5px] text-mute">Pick a prompt or type your own. Press Escape or Stop to cut a reply short.</p>
</div>
);
}