What an agent did, one line per step: an icon, a title that truncates, an optional description (a count, a duration, a diff) and a status. A step can open to show its output, link somewhere, or group the steps under it.
<.trace>
<.trace_line icon="brain" title="Thought for 5s" />
<.trace_line icon="terminal" description="0.4s">Ran <code>pnpm --version</code></.trace_line>
<.trace_step icon="terminal" title="Ran node --version" open>
<pre>v24.18.0</pre>
</.trace_step>
<.trace_line icon="terminal" status="error">Failed to run <code>pnpm install</code></.trace_line>
</.trace>trace_line/1 also draws a timing waterfall: pass bar (%{start: 18, width: 30, color: "var(--teal-400)", delay: "0.6s"}, percentages of the total), duration (at the end) and
depth (indent) to show spans.
trace_step/1 is a native <details>: the line is its summary and the block shows under it.
Summary
Functions
The list of steps.
One step: icon, title, description and status; a link with href, navigate or patch.
A step that opens: the line is the summary and the block shows under it.
Functions
The list of steps.
Attributes
spans(:list) - Lines as data, before the inner block: maps with:title(or:name) and optionally:icon,:description,:status,:duration,:depthand the bar (:start,:width,:color,:delay, percentages of the total). Defaults to[].class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block
One step: icon, title, description and status; a link with href, navigate or patch.
Attributes
icon(:string) - Ahuge-*icon name. Defaults tonil.title(:string) - The title; or pass it as the block. Defaults tonil.description(:any) - Secondary text after the title: a count, a duration, a diff. Defaults tonil.status(:string) - Defaults tonil.Must be one ofnil,"","running","error", or"pending".end_icon(:string) - Defaults tonil.href(:string) - Defaults tonil.navigate(:string) - Defaults tonil.patch(:string) - Defaults tonil.depth(:integer) - Indent level (18px each). Defaults to0.bar(:map) -%{start, width, color, delay}: a span bar (percentages). Defaults tonil.duration(:string) - Text at the end of the row (a time). Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["target", "rel", "download"].
Slots
inner_block
A step that opens: the line is the summary and the block shows under it.
Attributes
icon(:string) - Defaults tonil.title(:string) - Defaults tonil.description(:any) - Defaults tonil.status(:string) - Defaults tonil.Must be one ofnil,"","running","error", or"pending".open(:boolean) - Defaults tofalse.class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)summary- The title with markup, in place oftitle.