Skip to content
loseta

Components / Conversation

Trace

A native disclosure for agent steps, tool calls and sources.

Status stableWorks with code-block, spinner
Ran pnpm install Completed

Dependencies installed in 2.8s.

<details class="trace" open>
  <summary>
    <span data-slot="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 17 10 11 4 5"/><line x1="12" x2="20" y1="19" y2="19"/></svg></span>
    <span data-slot="title">Ran pnpm install</span>
    <span data-slot="status" data-variant="success">Completed</span>
  </summary>
  <div data-slot="body">
    <p>Dependencies installed in 2.8s.</p>
  </div>
</details>

Installation

pnpm dlx loseta add trace
npx loseta add trace

Examples

Tool calls

Ran pnpm install Failed

The frozen install failed because the lockfile is out of date.

pnpm install logs
Running pnpm build Running

Compiling the registry and the docs site.

Searched for minimumReleaseAge 8 results
Read pnpm.io settings

minimumReleaseAge delays newly published versions.

<div style="display: flex; flex-direction: column">
  <details class="trace" open>
    <summary>
      <span data-slot="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 17 10 11 4 5"/><line x1="12" x2="20" y1="19" y2="19"/></svg></span>
      <span data-slot="title">Ran pnpm install</span>
      <span data-slot="status" data-variant="error">Failed</span>
    </summary>
    <div data-slot="body">
      <p>The frozen install failed because the lockfile is out of date.</p>
      <a data-slot="source" href="#">pnpm install logs</a>
    </div>
  </details>
  <details class="trace" aria-busy="true">
    <summary>
      <span data-slot="icon"><span class="spinner" data-size="sm"></span></span>
      <span data-slot="title">Running pnpm build</span>
      <span data-slot="status">Running</span>
    </summary>
    <div data-slot="body">
      <p>Compiling the registry and the docs site.</p>
    </div>
  </details>
  <details class="trace">
    <summary>
      <span data-slot="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg></span>
      <span data-slot="title">Searched for minimumReleaseAge</span>
      <span data-slot="status" data-variant="success">8 results</span>
    </summary>
    <div data-slot="body">
      <details class="trace">
        <summary>
          <span data-slot="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></svg></span>
          <span data-slot="title">Read pnpm.io settings</span>
        </summary>
        <div data-slot="body">
          <p>minimumReleaseAge delays newly published versions.</p>
        </div>
      </details>
    </div>
  </details>
</div>

Accessibility and behavior

  • A native details disclosure. Put the line in summary with data-slot icon, title and status, and the detail in data-slot body. Use data-variant="error" or "success" on status; aria-busy="true" marks a running step. Nested traces compose inside the body.

Files

components/trace.cssbase
styles/nova/trace.cssstyle

Install contract

The CLI writes the base file under components/, the visual file for the selected style under styles/<name>/, and any primitive dependency underprimitives/. The generated index.css imports them in the right layer order.

← Back to components

loseta is MIT licensed. Built with native CSS, no runtime. Inspired byshadcn/ui.