Skip to content
Viewership Inquire
Astro UI

Tool Chips.

Agent run as expandable tool-call rows, then file-diff chips.

AgentComponentNo dependencies Beautiful UI, MIT

.md
Paid search drove most conversions, so it leads the summary.Two campaigns are waiting on client approval this week.
+ const rows = ga4.rows.filter((r) => r.paid)+ return report(rows, { client: "northwind" })
✓ built in 1.4s✓ 28 checks passed
1280 × 720 · bar chart, six prompts.Perplexity citations are up 2 since August.
+2 more

Install

  1. Import the foundation once

    foundation.css holds the tokens every component reads.

    Layout.astro
    ---
    // src/layouts/Layout.astro
    import "../styles/foundation.css";
    ---
  2. Copy ToolChips.astro

    Paste into src/components/viewership/tool-chips/

  3. Use it

    Page.astro
    ---
    import ToolChips from "../components/viewership/tool-chips/ToolChips.astro";
    ---
    
    <ToolChips />

Props 7

PropTypeDefaultDescription
steps { icon: "think" | "write" | "run" | "read" | "search"; label: string; chip: string; mono?: boolean; detailMono?: boolean; detail: { text: string; tone?: "add" }[] }[] · Tool calls, in order. Rows expand to detail lines.
diffs { file: string; add: number; del: number; lines?: { text: string; tone: "add" | "del" | "ctx" }[] }[] [] Diff chips after the run. Chips with `lines` preview on hover, focus or click.
header string "N tool calls" Run header label.
more string · Trailing note, e.g. "+2 more".
open boolean true Start expanded.
autoplay boolean true Reveal rows 700ms apart in view. When false or under reduced motion, the full run renders.
loop boolean false Replay after a hold. Stops once toggled.

Source 1 file

Ported from Beautiful UI, MIT. Notices.