agentic / 09

Installation

tokens.css + reasoning.css + host-chrome.css
head.html
<link rel="stylesheet" href="tokens.css">
<link rel="stylesheet" href="components/reasoning/reasoning.css">

Summary

reasoning / Summaryinteractive
Reasoningdone

Checking the order status before answering.

Code

reasoning.html + reasoning.css
reasoning
<style>
/* agent-ui / reasoning — first-class component (promoted from host extracts). */
/* Reasoning: native details chrome. Host owns open/stream text. */
.au-reasoning {
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-lg);
  color: var(--au-fg-muted);
  margin: 0 0 12px;
  min-width: 0;
}
.au-reasoning[data-au-variant="ghost"] { border-color: transparent; }
.au-reasoning[data-au-variant="muted"] {
  background: var(--au-surface-muted);
  padding: 4px 8px 8px;
}
.au-reasoning__trigger {
  align-items: center;
  color: var(--au-fg-muted);
  cursor: pointer;
  display: flex;
  font: 500 13px/1.3 var(--au-font-sans);
  gap: 8px;
  list-style: none;
  padding: 8px 12px;
  user-select: none;
}
.au-reasoning__trigger::-webkit-details-marker { display: none; }
.au-reasoning__chevron {
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  display: inline-block;
  flex: 0 0 auto;
  height: 8px;
  transform: rotate(-45deg);
  transition: transform var(--au-duration-fast) var(--au-ease);
  width: 8px;
}
.au-reasoning[open] > .au-reasoning__trigger .au-reasoning__chevron { transform: rotate(45deg); }
.au-reasoning__label { color: var(--au-fg); }
.au-reasoning__meta {
  color: var(--au-fg-subtle);
  font: 400 12px/1.3 var(--au-font-sans);
  margin-inline-start: auto;
}
.au-reasoning[data-au-state="running"] .au-reasoning__meta { color: var(--au-action); }
.au-reasoning__content { min-width: 0; padding: 0 12px 12px; }
.au-reasoning__text { color: var(--au-fg-muted); font: 400 13px/1.55 var(--au-font-sans); }
.au-reasoning__text > :first-child { margin-top: 0; }
.au-reasoning__text > :last-child { margin-bottom: 0; }
.au-reasoning .au-thinking-steps { border-top: 0; }
.au-reasoning .au-thinking-step:first-child { padding-top: 0; }

/* --- absorbed: thinking-steps (alias classes preserved) --- */
.au-thinking-steps {
  border-top: 1px solid var(--au-border-color);
  display: grid;
}

.au-thinking-step {
  align-items: center;
  border-bottom: 1px solid var(--au-border-color);
  display: grid;
  gap: 8px;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  min-height: 40px;
  padding: 8px 12px;
}

.au-thinking-step__dot {
  background: var(--au-fg-subtle);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.au-thinking-step__label {
  color: var(--au-fg-muted);
  font-size: 13px;
}

.au-thinking-step__time {
  color: var(--au-fg-subtle);
  font: 10px/1.3 var(--au-font-mono);
}

.au-thinking-step__detail {
  background: var(--au-surface-muted);
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-md);
  color: var(--au-fg-muted);
  font-size: 13px;
  font-style: italic;
  grid-column: 2 / -1;
  line-height: 1.5;
  margin: 0;
  padding: 12px;
}

.au-thinking-step[data-au-state="running"] .au-thinking-step__dot {
  background: var(--au-action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--au-action) 18%, transparent);
}

.au-thinking-step[data-au-state="success"] .au-thinking-step__dot {
  background: var(--au-success);
}

.au-thinking-step[data-au-state="error"] .au-thinking-step__dot {
  background: var(--au-danger);
}

.au-thinking-step[data-au-state="cancelled"] .au-thinking-step__dot {
  background: var(--au-warning);
}

/* --- absorbed: chain-of-thought stack (recipe helper .au-cot) --- */
/* agent-ui / chain-of-thought — first-class component (promoted from host extracts). */
/* Chain-of-thought stack: host groups reasoning + tool-call parts. */
.au-cot {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.au-cot .au-reasoning { margin-bottom: 0; }
.au-cot .au-tool-call { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .au-reasoning__chevron { transition: none; }
}

@media (max-width: 640px) {
  .au-reasoning__trigger {
    min-height: 40px;
  }
}
</style>

<details class="au-reasoning" data-au-component="reasoning" data-au-variant="ghost" data-au-mode="summary" open><summary class="au-reasoning__trigger"><span class="au-reasoning__chevron" aria-hidden="true"></span><span class="au-reasoning__label">Reasoning</span><span class="au-reasoning__meta">done</span></summary><div class="au-reasoning__content"><div class="au-reasoning__text"><p>Checking the order status before answering.</p></div></div></details>

Steps

reasoning / Stepsinteractive
Thinking
Searched the web
Read 3 sources
Explored 6 files
  • Read accordion.tsx
  • Read icon-context.tsx
  • Read badge.tsx
  • Read use-proximity-hover.ts
  • Read components.ts
  • Read postbuild-registry.mjs
Done

Code

reasoning.html + reasoning.css
reasoning
<style>
/* agent-ui / reasoning — first-class component (promoted from host extracts). */
/* Reasoning: native details chrome. Host owns open/stream text. */
.au-reasoning {
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-lg);
  color: var(--au-fg-muted);
  margin: 0 0 12px;
  min-width: 0;
}
.au-reasoning[data-au-variant="ghost"] { border-color: transparent; }
.au-reasoning[data-au-variant="muted"] {
  background: var(--au-surface-muted);
  padding: 4px 8px 8px;
}
.au-reasoning__trigger {
  align-items: center;
  color: var(--au-fg-muted);
  cursor: pointer;
  display: flex;
  font: 500 13px/1.3 var(--au-font-sans);
  gap: 8px;
  list-style: none;
  padding: 8px 12px;
  user-select: none;
}
.au-reasoning__trigger::-webkit-details-marker { display: none; }
.au-reasoning__chevron {
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  display: inline-block;
  flex: 0 0 auto;
  height: 8px;
  transform: rotate(-45deg);
  transition: transform var(--au-duration-fast) var(--au-ease);
  width: 8px;
}
.au-reasoning[open] > .au-reasoning__trigger .au-reasoning__chevron { transform: rotate(45deg); }
.au-reasoning__label { color: var(--au-fg); }
.au-reasoning__meta {
  color: var(--au-fg-subtle);
  font: 400 12px/1.3 var(--au-font-sans);
  margin-inline-start: auto;
}
.au-reasoning[data-au-state="running"] .au-reasoning__meta { color: var(--au-action); }
.au-reasoning__content { min-width: 0; padding: 0 12px 12px; }
.au-reasoning__text { color: var(--au-fg-muted); font: 400 13px/1.55 var(--au-font-sans); }
.au-reasoning__text > :first-child { margin-top: 0; }
.au-reasoning__text > :last-child { margin-bottom: 0; }
.au-reasoning .au-thinking-steps { border-top: 0; }
.au-reasoning .au-thinking-step:first-child { padding-top: 0; }

/* --- absorbed: thinking-steps (alias classes preserved) --- */
.au-thinking-steps {
  border-top: 1px solid var(--au-border-color);
  display: grid;
}

.au-thinking-step {
  align-items: center;
  border-bottom: 1px solid var(--au-border-color);
  display: grid;
  gap: 8px;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  min-height: 40px;
  padding: 8px 12px;
}

.au-thinking-step__dot {
  background: var(--au-fg-subtle);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.au-thinking-step__label {
  color: var(--au-fg-muted);
  font-size: 13px;
}

.au-thinking-step__time {
  color: var(--au-fg-subtle);
  font: 10px/1.3 var(--au-font-mono);
}

.au-thinking-step__detail {
  background: var(--au-surface-muted);
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-md);
  color: var(--au-fg-muted);
  font-size: 13px;
  font-style: italic;
  grid-column: 2 / -1;
  line-height: 1.5;
  margin: 0;
  padding: 12px;
}

.au-thinking-step[data-au-state="running"] .au-thinking-step__dot {
  background: var(--au-action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--au-action) 18%, transparent);
}

.au-thinking-step[data-au-state="success"] .au-thinking-step__dot {
  background: var(--au-success);
}

.au-thinking-step[data-au-state="error"] .au-thinking-step__dot {
  background: var(--au-danger);
}

.au-thinking-step[data-au-state="cancelled"] .au-thinking-step__dot {
  background: var(--au-warning);
}

/* --- absorbed: chain-of-thought stack (recipe helper .au-cot) --- */
/* agent-ui / chain-of-thought — first-class component (promoted from host extracts). */
/* Chain-of-thought stack: host groups reasoning + tool-call parts. */
.au-cot {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.au-cot .au-reasoning { margin-bottom: 0; }
.au-cot .au-tool-call { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .au-reasoning__chevron { transition: none; }
}

@media (max-width: 640px) {
  .au-reasoning__trigger {
    min-height: 40px;
  }
}
</style>

<details class="au-thinking-steps" open><summary>Thinking</summary><div class="au-thinking-step" data-au-state="success"><span class="au-thinking-step__dot" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m21 21-4.35-4.35M19 11a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z"/></svg></span><span class="au-thinking-step__label">Searched the web</span></div><div class="au-thinking-step" data-au-state="success"><span class="au-thinking-step__dot" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"/></svg></span><span class="au-thinking-step__label">Read 3 sources</span><details class="au-thinking-step__more"><summary>Explored 6 files</summary><ul><li>Read accordion.tsx</li><li>Read icon-context.tsx</li><li>Read badge.tsx</li><li>Read use-proximity-hover.ts</li><li>Read components.ts</li><li>Read postbuild-registry.mjs</li></ul></details></div><div class="au-thinking-step" data-au-state="success"><span class="au-thinking-step__dot" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg></span><span class="au-thinking-step__label">Done</span></div></details>

Minimal

reasoning / Minimalinteractive
Thinking
Ran a command
Done

Code

reasoning.html + reasoning.css
reasoning
<style>
/* agent-ui / reasoning — first-class component (promoted from host extracts). */
/* Reasoning: native details chrome. Host owns open/stream text. */
.au-reasoning {
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-lg);
  color: var(--au-fg-muted);
  margin: 0 0 12px;
  min-width: 0;
}
.au-reasoning[data-au-variant="ghost"] { border-color: transparent; }
.au-reasoning[data-au-variant="muted"] {
  background: var(--au-surface-muted);
  padding: 4px 8px 8px;
}
.au-reasoning__trigger {
  align-items: center;
  color: var(--au-fg-muted);
  cursor: pointer;
  display: flex;
  font: 500 13px/1.3 var(--au-font-sans);
  gap: 8px;
  list-style: none;
  padding: 8px 12px;
  user-select: none;
}
.au-reasoning__trigger::-webkit-details-marker { display: none; }
.au-reasoning__chevron {
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  display: inline-block;
  flex: 0 0 auto;
  height: 8px;
  transform: rotate(-45deg);
  transition: transform var(--au-duration-fast) var(--au-ease);
  width: 8px;
}
.au-reasoning[open] > .au-reasoning__trigger .au-reasoning__chevron { transform: rotate(45deg); }
.au-reasoning__label { color: var(--au-fg); }
.au-reasoning__meta {
  color: var(--au-fg-subtle);
  font: 400 12px/1.3 var(--au-font-sans);
  margin-inline-start: auto;
}
.au-reasoning[data-au-state="running"] .au-reasoning__meta { color: var(--au-action); }
.au-reasoning__content { min-width: 0; padding: 0 12px 12px; }
.au-reasoning__text { color: var(--au-fg-muted); font: 400 13px/1.55 var(--au-font-sans); }
.au-reasoning__text > :first-child { margin-top: 0; }
.au-reasoning__text > :last-child { margin-bottom: 0; }
.au-reasoning .au-thinking-steps { border-top: 0; }
.au-reasoning .au-thinking-step:first-child { padding-top: 0; }

/* --- absorbed: thinking-steps (alias classes preserved) --- */
.au-thinking-steps {
  border-top: 1px solid var(--au-border-color);
  display: grid;
}

.au-thinking-step {
  align-items: center;
  border-bottom: 1px solid var(--au-border-color);
  display: grid;
  gap: 8px;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  min-height: 40px;
  padding: 8px 12px;
}

.au-thinking-step__dot {
  background: var(--au-fg-subtle);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.au-thinking-step__label {
  color: var(--au-fg-muted);
  font-size: 13px;
}

.au-thinking-step__time {
  color: var(--au-fg-subtle);
  font: 10px/1.3 var(--au-font-mono);
}

.au-thinking-step__detail {
  background: var(--au-surface-muted);
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-md);
  color: var(--au-fg-muted);
  font-size: 13px;
  font-style: italic;
  grid-column: 2 / -1;
  line-height: 1.5;
  margin: 0;
  padding: 12px;
}

.au-thinking-step[data-au-state="running"] .au-thinking-step__dot {
  background: var(--au-action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--au-action) 18%, transparent);
}

.au-thinking-step[data-au-state="success"] .au-thinking-step__dot {
  background: var(--au-success);
}

.au-thinking-step[data-au-state="error"] .au-thinking-step__dot {
  background: var(--au-danger);
}

.au-thinking-step[data-au-state="cancelled"] .au-thinking-step__dot {
  background: var(--au-warning);
}

/* --- absorbed: chain-of-thought stack (recipe helper .au-cot) --- */
/* agent-ui / chain-of-thought — first-class component (promoted from host extracts). */
/* Chain-of-thought stack: host groups reasoning + tool-call parts. */
.au-cot {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.au-cot .au-reasoning { margin-bottom: 0; }
.au-cot .au-tool-call { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .au-reasoning__chevron { transition: none; }
}

@media (max-width: 640px) {
  .au-reasoning__trigger {
    min-height: 40px;
  }
}
</style>

<details class="au-thinking-steps" open><summary>Thinking</summary><div class="au-thinking-step" data-au-state="success"><span class="au-thinking-step__dot" aria-hidden="true"></span><span class="au-thinking-step__label">Ran a command</span></div><div class="au-thinking-step" data-au-state="success"><span class="au-thinking-step__dot" aria-hidden="true"></span><span class="au-thinking-step__label">Done</span></div></details>

Streaming

reasoning / Streaminginteractive
Thinking
Read the repository
Prepare release notes

Code

reasoning.html + reasoning.css
reasoning
<style>
/* agent-ui / reasoning — first-class component (promoted from host extracts). */
/* Reasoning: native details chrome. Host owns open/stream text. */
.au-reasoning {
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-lg);
  color: var(--au-fg-muted);
  margin: 0 0 12px;
  min-width: 0;
}
.au-reasoning[data-au-variant="ghost"] { border-color: transparent; }
.au-reasoning[data-au-variant="muted"] {
  background: var(--au-surface-muted);
  padding: 4px 8px 8px;
}
.au-reasoning__trigger {
  align-items: center;
  color: var(--au-fg-muted);
  cursor: pointer;
  display: flex;
  font: 500 13px/1.3 var(--au-font-sans);
  gap: 8px;
  list-style: none;
  padding: 8px 12px;
  user-select: none;
}
.au-reasoning__trigger::-webkit-details-marker { display: none; }
.au-reasoning__chevron {
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  display: inline-block;
  flex: 0 0 auto;
  height: 8px;
  transform: rotate(-45deg);
  transition: transform var(--au-duration-fast) var(--au-ease);
  width: 8px;
}
.au-reasoning[open] > .au-reasoning__trigger .au-reasoning__chevron { transform: rotate(45deg); }
.au-reasoning__label { color: var(--au-fg); }
.au-reasoning__meta {
  color: var(--au-fg-subtle);
  font: 400 12px/1.3 var(--au-font-sans);
  margin-inline-start: auto;
}
.au-reasoning[data-au-state="running"] .au-reasoning__meta { color: var(--au-action); }
.au-reasoning__content { min-width: 0; padding: 0 12px 12px; }
.au-reasoning__text { color: var(--au-fg-muted); font: 400 13px/1.55 var(--au-font-sans); }
.au-reasoning__text > :first-child { margin-top: 0; }
.au-reasoning__text > :last-child { margin-bottom: 0; }
.au-reasoning .au-thinking-steps { border-top: 0; }
.au-reasoning .au-thinking-step:first-child { padding-top: 0; }

/* --- absorbed: thinking-steps (alias classes preserved) --- */
.au-thinking-steps {
  border-top: 1px solid var(--au-border-color);
  display: grid;
}

.au-thinking-step {
  align-items: center;
  border-bottom: 1px solid var(--au-border-color);
  display: grid;
  gap: 8px;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  min-height: 40px;
  padding: 8px 12px;
}

.au-thinking-step__dot {
  background: var(--au-fg-subtle);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.au-thinking-step__label {
  color: var(--au-fg-muted);
  font-size: 13px;
}

.au-thinking-step__time {
  color: var(--au-fg-subtle);
  font: 10px/1.3 var(--au-font-mono);
}

.au-thinking-step__detail {
  background: var(--au-surface-muted);
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-md);
  color: var(--au-fg-muted);
  font-size: 13px;
  font-style: italic;
  grid-column: 2 / -1;
  line-height: 1.5;
  margin: 0;
  padding: 12px;
}

.au-thinking-step[data-au-state="running"] .au-thinking-step__dot {
  background: var(--au-action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--au-action) 18%, transparent);
}

.au-thinking-step[data-au-state="success"] .au-thinking-step__dot {
  background: var(--au-success);
}

.au-thinking-step[data-au-state="error"] .au-thinking-step__dot {
  background: var(--au-danger);
}

.au-thinking-step[data-au-state="cancelled"] .au-thinking-step__dot {
  background: var(--au-warning);
}

/* --- absorbed: chain-of-thought stack (recipe helper .au-cot) --- */
/* agent-ui / chain-of-thought — first-class component (promoted from host extracts). */
/* Chain-of-thought stack: host groups reasoning + tool-call parts. */
.au-cot {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.au-cot .au-reasoning { margin-bottom: 0; }
.au-cot .au-tool-call { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .au-reasoning__chevron { transition: none; }
}

@media (max-width: 640px) {
  .au-reasoning__trigger {
    min-height: 40px;
  }
}
</style>

<details class="au-thinking-steps" open><summary>Thinking</summary><div class="au-thinking-step" data-au-state="success"><span class="au-thinking-step__dot" aria-hidden="true"></span><span class="au-thinking-step__label">Read the repository</span></div><div class="au-thinking-step" data-au-state="running"><span class="au-thinking-step__dot" aria-hidden="true"></span><span class="au-thinking-step__label">Prepare release notes</span></div></details>

Detail

reasoning / Detailinteractive
Thinking
Gather constraints
Draft answer

Comparing the three approaches against latency, review cost, and rollback risk…

Code

reasoning.html + reasoning.css
reasoning
<style>
/* agent-ui / reasoning — first-class component (promoted from host extracts). */
/* Reasoning: native details chrome. Host owns open/stream text. */
.au-reasoning {
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-lg);
  color: var(--au-fg-muted);
  margin: 0 0 12px;
  min-width: 0;
}
.au-reasoning[data-au-variant="ghost"] { border-color: transparent; }
.au-reasoning[data-au-variant="muted"] {
  background: var(--au-surface-muted);
  padding: 4px 8px 8px;
}
.au-reasoning__trigger {
  align-items: center;
  color: var(--au-fg-muted);
  cursor: pointer;
  display: flex;
  font: 500 13px/1.3 var(--au-font-sans);
  gap: 8px;
  list-style: none;
  padding: 8px 12px;
  user-select: none;
}
.au-reasoning__trigger::-webkit-details-marker { display: none; }
.au-reasoning__chevron {
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  display: inline-block;
  flex: 0 0 auto;
  height: 8px;
  transform: rotate(-45deg);
  transition: transform var(--au-duration-fast) var(--au-ease);
  width: 8px;
}
.au-reasoning[open] > .au-reasoning__trigger .au-reasoning__chevron { transform: rotate(45deg); }
.au-reasoning__label { color: var(--au-fg); }
.au-reasoning__meta {
  color: var(--au-fg-subtle);
  font: 400 12px/1.3 var(--au-font-sans);
  margin-inline-start: auto;
}
.au-reasoning[data-au-state="running"] .au-reasoning__meta { color: var(--au-action); }
.au-reasoning__content { min-width: 0; padding: 0 12px 12px; }
.au-reasoning__text { color: var(--au-fg-muted); font: 400 13px/1.55 var(--au-font-sans); }
.au-reasoning__text > :first-child { margin-top: 0; }
.au-reasoning__text > :last-child { margin-bottom: 0; }
.au-reasoning .au-thinking-steps { border-top: 0; }
.au-reasoning .au-thinking-step:first-child { padding-top: 0; }

/* --- absorbed: thinking-steps (alias classes preserved) --- */
.au-thinking-steps {
  border-top: 1px solid var(--au-border-color);
  display: grid;
}

.au-thinking-step {
  align-items: center;
  border-bottom: 1px solid var(--au-border-color);
  display: grid;
  gap: 8px;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  min-height: 40px;
  padding: 8px 12px;
}

.au-thinking-step__dot {
  background: var(--au-fg-subtle);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.au-thinking-step__label {
  color: var(--au-fg-muted);
  font-size: 13px;
}

.au-thinking-step__time {
  color: var(--au-fg-subtle);
  font: 10px/1.3 var(--au-font-mono);
}

.au-thinking-step__detail {
  background: var(--au-surface-muted);
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-md);
  color: var(--au-fg-muted);
  font-size: 13px;
  font-style: italic;
  grid-column: 2 / -1;
  line-height: 1.5;
  margin: 0;
  padding: 12px;
}

.au-thinking-step[data-au-state="running"] .au-thinking-step__dot {
  background: var(--au-action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--au-action) 18%, transparent);
}

.au-thinking-step[data-au-state="success"] .au-thinking-step__dot {
  background: var(--au-success);
}

.au-thinking-step[data-au-state="error"] .au-thinking-step__dot {
  background: var(--au-danger);
}

.au-thinking-step[data-au-state="cancelled"] .au-thinking-step__dot {
  background: var(--au-warning);
}

/* --- absorbed: chain-of-thought stack (recipe helper .au-cot) --- */
/* agent-ui / chain-of-thought — first-class component (promoted from host extracts). */
/* Chain-of-thought stack: host groups reasoning + tool-call parts. */
.au-cot {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.au-cot .au-reasoning { margin-bottom: 0; }
.au-cot .au-tool-call { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .au-reasoning__chevron { transition: none; }
}

@media (max-width: 640px) {
  .au-reasoning__trigger {
    min-height: 40px;
  }
}
</style>

<details class="au-thinking-steps" open><summary>Thinking</summary><div class="au-thinking-step" data-au-state="success"><span class="au-thinking-step__dot" aria-hidden="true"></span><span class="au-thinking-step__label">Gather constraints</span></div><div class="au-thinking-step" data-au-state="running"><span class="au-thinking-step__dot" aria-hidden="true"></span><span class="au-thinking-step__label">Draft answer</span><p class="au-thinking-step__detail">Comparing the three approaches against latency, review cost, and rollback risk…</p></div></details>

List

reasoning / Listinteractive
Read the repository
Prepare release notes

Drafting the public channel summary from the latest commits…

Publish draft

Code

reasoning.html + reasoning.css
reasoning
<style>
/* agent-ui / reasoning — first-class component (promoted from host extracts). */
/* Reasoning: native details chrome. Host owns open/stream text. */
.au-reasoning {
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-lg);
  color: var(--au-fg-muted);
  margin: 0 0 12px;
  min-width: 0;
}
.au-reasoning[data-au-variant="ghost"] { border-color: transparent; }
.au-reasoning[data-au-variant="muted"] {
  background: var(--au-surface-muted);
  padding: 4px 8px 8px;
}
.au-reasoning__trigger {
  align-items: center;
  color: var(--au-fg-muted);
  cursor: pointer;
  display: flex;
  font: 500 13px/1.3 var(--au-font-sans);
  gap: 8px;
  list-style: none;
  padding: 8px 12px;
  user-select: none;
}
.au-reasoning__trigger::-webkit-details-marker { display: none; }
.au-reasoning__chevron {
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  display: inline-block;
  flex: 0 0 auto;
  height: 8px;
  transform: rotate(-45deg);
  transition: transform var(--au-duration-fast) var(--au-ease);
  width: 8px;
}
.au-reasoning[open] > .au-reasoning__trigger .au-reasoning__chevron { transform: rotate(45deg); }
.au-reasoning__label { color: var(--au-fg); }
.au-reasoning__meta {
  color: var(--au-fg-subtle);
  font: 400 12px/1.3 var(--au-font-sans);
  margin-inline-start: auto;
}
.au-reasoning[data-au-state="running"] .au-reasoning__meta { color: var(--au-action); }
.au-reasoning__content { min-width: 0; padding: 0 12px 12px; }
.au-reasoning__text { color: var(--au-fg-muted); font: 400 13px/1.55 var(--au-font-sans); }
.au-reasoning__text > :first-child { margin-top: 0; }
.au-reasoning__text > :last-child { margin-bottom: 0; }
.au-reasoning .au-thinking-steps { border-top: 0; }
.au-reasoning .au-thinking-step:first-child { padding-top: 0; }

/* --- absorbed: thinking-steps (alias classes preserved) --- */
.au-thinking-steps {
  border-top: 1px solid var(--au-border-color);
  display: grid;
}

.au-thinking-step {
  align-items: center;
  border-bottom: 1px solid var(--au-border-color);
  display: grid;
  gap: 8px;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  min-height: 40px;
  padding: 8px 12px;
}

.au-thinking-step__dot {
  background: var(--au-fg-subtle);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.au-thinking-step__label {
  color: var(--au-fg-muted);
  font-size: 13px;
}

.au-thinking-step__time {
  color: var(--au-fg-subtle);
  font: 10px/1.3 var(--au-font-mono);
}

.au-thinking-step__detail {
  background: var(--au-surface-muted);
  border: 1px solid var(--au-border-color);
  border-radius: var(--au-radius-md);
  color: var(--au-fg-muted);
  font-size: 13px;
  font-style: italic;
  grid-column: 2 / -1;
  line-height: 1.5;
  margin: 0;
  padding: 12px;
}

.au-thinking-step[data-au-state="running"] .au-thinking-step__dot {
  background: var(--au-action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--au-action) 18%, transparent);
}

.au-thinking-step[data-au-state="success"] .au-thinking-step__dot {
  background: var(--au-success);
}

.au-thinking-step[data-au-state="error"] .au-thinking-step__dot {
  background: var(--au-danger);
}

.au-thinking-step[data-au-state="cancelled"] .au-thinking-step__dot {
  background: var(--au-warning);
}

/* --- absorbed: chain-of-thought stack (recipe helper .au-cot) --- */
/* agent-ui / chain-of-thought — first-class component (promoted from host extracts). */
/* Chain-of-thought stack: host groups reasoning + tool-call parts. */
.au-cot {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.au-cot .au-reasoning { margin-bottom: 0; }
.au-cot .au-tool-call { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .au-reasoning__chevron { transition: none; }
}

@media (max-width: 640px) {
  .au-reasoning__trigger {
    min-height: 40px;
  }
}
</style>

<div class="au-thinking-steps" aria-label="Agent steps"><div class="au-thinking-step" data-au-state="success"><span class="au-thinking-step__dot" aria-hidden="true"></span><span class="au-thinking-step__label">Read the repository</span><time class="au-thinking-step__time">0.4s</time></div><div class="au-thinking-step" data-au-state="running"><span class="au-thinking-step__dot" aria-hidden="true"></span><span class="au-thinking-step__label">Prepare release notes</span><time class="au-thinking-step__time">running</time><p class="au-thinking-step__detail">Drafting the public channel summary from the latest commits…</p></div><div class="au-thinking-step" data-au-state="error"><span class="au-thinking-step__dot" aria-hidden="true"></span><span class="au-thinking-step__label">Publish draft</span><time class="au-thinking-step__time">failed</time></div></div>

Component contract

Install
tokens.css · reasoning.css · host-chrome.css
States
Each step supports idle, running, success, error, cancelled
Host
step order, streaming append, and collapse
For agents
reasoning.contract
# agent-ui / reasoning
component: reasoning
selector: .au-reasoning
data_au_component: reasoning
purpose: Collapsible reasoning with summary | steps | detail modes (absorbs thinking-steps).

install:
  - tokens.css
  - reasoning.css
  - host-chrome.css for running-label shine

states: Each step supports idle, running, success, error, cancelled.
css_variables: No component-specific variables.
events: native form, focus, and click only — no custom events or runtime required
no_javascript: Native details and pre-rendered steps remain usable.
host_owns: The host owns step order, streaming append, and collapse.
accessibility: Name the group; expose times as text.
security: Escape step labels, times, and detail text.

rules:
  - Host owns execution, authorization, persistence, validation, and state transitions.
  - Components render host-provided state; they never execute tools or imply approval.
  - Escape untrusted model output, tool args, and tool output before insertion.
  - Use only documented data-au-* attributes and data-au-state values.
  - Keep the no-JS path usable. Do not add React, Tailwind, bundlers, or remote assets.
source: components/reasoning/reasoning.{html,css} + README.md + fixture.html