Home / Components / Chat
Chat
The chat components: turns, reasoning and tool disclosures, proposal cards, composer and history rail.
Turns & live-turn anatomy
You
Which invoices from this week still need action?
AI
thinking… 4s
Thought for 4s
Condensed reasoning trace (raw CoT, collapsed by default, max-height 260px).
⚙ 2 tool calls · ✓ search → 3 hits
✓ search {"q":"invoice folder:Finance"} → 3 hits
⏳ draft.read …
Two invoices are waiting: #1042 and #1051. Both are
drafts ready to send.
- #1042 — reply drafted
- #1051 — needs a decision
live-turn order: .status → .think → .tools → .md → .meta → proposals; user bubbles are ink and reversed
<div class="crow user"><div class="avatar you">You</div>
<div class="bubble user">…<div class="meta">09:41</div></div></div>
<div class="crow ai"><div class="avatar ai">AI</div>
<div class="bubble ai">
<details class="think"><summary>Thinking…</summary><pre>raw CoT</pre></details>
<details class="tools"><summary>⚙ 2 tool calls · ✓ search → 3 hits</summary>…</details>
<div class="md">…rendered markdown…</div>
<div class="meta"><button class="copy" data-copy="…">copy</button><span>12:01</span></div>
</div></div>Proposal cards — one visual contract for every AI action
✦ Proposed rule
Invoices from Acme (all)
from contains "acme" AND subject contains "invoice"
move → Finance/Invoices
✦ Needs your approval
Send draft · capability send
dangerous
Nothing happens until you click Approve.
addable → blue ✦ tag; gated → .warn tag + Approve/Dismiss + “nothing happens until…” note; added state renders as a dead button
<div class="proposal">
<div class="p-tag">✦ Proposed rule</div>
<div class="spread"><div><b>Name</b> <span class="sub">(all)</span></div>
<div class="row"><button class="btn small primary">Add rule</button>
<button class="btn small">Add (disabled)</button></div></div>
<div class="mono">from contains "x" AND subject contains "y"</div>
<div class="sub">move → Invoices</div>
</div>Composer
focus-within black border, auto-growing textarea, Stop appears while streaming; on phones the composer is one docked row
<div class="composer">
<textarea rows="1" placeholder="Message the chat…" enterkeyhint="send"></textarea>
<div class="comp-row"><span class="sub">Enter sends · Shift+Enter new line</span>
<span class="row" style="margin-inline-start:auto"><button class="btn danger">Stop</button>
<button class="btn primary" type="submit">Send</button></span></div>
<div class="hint">model · permissions · clear this chat</div>
</div>Empty state & history rail
Ask about your mail
The assistant can search, classify and propose rules — it acts only when you approve.
What needs a reply?
Summarise today's mail
Invoice cleanup and reply drafts2h
Why was this filed to Finance?1d
chips either prefill (data-fill) or link; history rows carry the two-step chat-delete affordance (see /components/overlays)
<div class="chat-empty"> <div class="chat-empty-icon">✦</div><div class="chat-empty-title">Ask about your mail</div> <div class="sub">…</div> <div class="chips"><span class="chip" data-fill="What needs a reply?">What needs a reply?</span></div> </div> <div class="chat-rail"><div class="arow cur"><span class="t">…</span><span class="when">2h</span></div></div>
Full chat page — live example
Engine contract. One engine (window.chatEngine) drives both the page and the docked sidebar via SSE from /assistant/stream; stored turns are server-rendered and live turns are JS-built — two renderers, one visual contract. Port both or delete one path deliberately (pitfalls §8).
Triage Design System v0.13.1-experiment — the central, app-agnostic UI design authority.
Source of truth: /tokens/tokens.json. Showcase chrome only:
site/.