Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
/*
Transcript messages — user/assistant rows, bubbles, edit and revision states,
hover action toolbars, permission cards, error notices, and the Codex-style
tool activity/tool row disclosures.
*/
.message-row {
display: flex;
gap: 12px;
padding: 12px 0;
/* Skip layout/paint for far-offscreen rows in long transcripts. */
content-visibility: auto;
contain-intrinsic-size: auto 140px;
/* Paint containment clips descendants to the padding box, which squared off
the deliberate bleed of the disclosure row chrome: both disclosure headers
pull their hover fill 4px past the column edge, and the two collapse-rail
controls occupy separate 14px lanes in the gutter. 34px covers the outer
lane. .tool-activity-group keeps its own clip for the subagent card
chrome. */
overflow-clip-margin: 34px;
}
.message-row.user {
justify-content: flex-end;
}
.message-col {
display: flex;
min-width: 0;
width: 100%;
flex-direction: column;
gap: 4px;
}
.message-row.user .message-col {
/* `min(max-content, …)` is a definite shrink-wrap. `fit-content` includes
the stretch size, so a descendant with `max-width: 100%` (file chips)
inflated the plate to the 82%/600px cap after a paste. */
width: min(max-content, 82%, 600px);
max-width: min(82%, 600px);
align-items: flex-end;
}
/* Composer chips use `max-width: min(100%, 240px)` so they shrink in a
definite composer. Inside this shrink-to-fit plate the percentage
containing block is the available thread width, which stretches the
bubble. A definite 240px cap keeps short chip+text prompts compact. */
.message-row.user .composer-chip {
max-width: 240px;
}
/* A chip inside a message belongs to that message: it borrows the message's own
face, size and leading and only keeps the tile surface. The composer's fixed
11.5px/20px box is a draft-only metric, and as a message chip it clipped the
message's own line box. Sized by the inherited leading and aligned to the
line, the tile covers exactly one line of message text, so the label sits on
that line's baseline and the chip reads as a run of it. */
.message-row .composer-chip {
height: auto;
padding: 0 6px;
font: inherit;
line-height: inherit;
vertical-align: top;
}
/* A conversation reference is the message chip whose label can be as long as a
conversation title. An atomic chip that does not fit is pushed whole onto the
next line and leaves the rest of its line blank, so this one is an inline run
instead: it breaks with the text, its first line still reaches the right edge
of the line it started on, and the tile continues over the break. */
.message-row .composer-chip[data-action="open-session-reference"] {
display: inline;
/* An inline box is as tall as the font (about 1.18em here), so half of the
leading has to come back as padding for the tile to cover the line box. */
padding: 0.186em 6px;
vertical-align: baseline;
white-space: normal;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
/* `gap` only spaces flex items: an inline run needs the icon's own gap. */
.message-row .composer-chip[data-action="open-session-reference"] .composer-chip-icon {
margin-right: 4px;
}
/* Break the label where the line needs it instead of ellipsising it: on a full
line the label is the only part long enough to reach the right edge. */
.message-row .composer-chip[data-action="open-session-reference"] .composer-chip-name {
overflow: visible;
overflow-wrap: anywhere;
text-overflow: clip;
white-space: normal;
}
.message-row.assistant .message-col,
.message-row.system .message-col,
.message-row.tool .message-col {
width: min(100%, var(--chat-prose-max-width, 720px));
align-items: flex-start;
}
/* Decision cards are soft tiles (D297): risk rides in the tint and the risk
pill rather than a coloured rail. */
.permission-card {
width: min(100%, var(--chat-prose-max-width, 720px));
margin: 10px 0;
padding: 14px 16px;
border-radius: var(--radius-md);
background: color-mix(in oklab, var(--ds-warning) 7%, transparent);
}
.asktool-card {
width: min(100%, var(--chat-prose-max-width, 720px));
margin: 8px 0;
padding: 10px 12px;
border-radius: var(--radius-md);
background: var(--ds-tile);
}
.asktool-card-header,
.asktool-card-header-actions {
display: flex;
align-items: center;
}
.asktool-card-header {
justify-content: space-between;
gap: 8px;
flex-wrap: wrap;
}
.asktool-card-header-actions {
flex: none;
gap: 6px;
margin-left: auto;
}
.asktool-card-header-main {
display: flex;
min-width: 0;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.asktool-card-title {
color: var(--ds-text-muted);
font-size: var(--text-xs);
font-weight: var(--font-weight-medium);
letter-spacing: var(--tracking-wide);
text-transform: uppercase;
white-space: nowrap;
}
.asktool-card-progress {
color: var(--ds-text-faint);
font-size: var(--text-2xs);
white-space: nowrap;
}
.asktool-question-number {
color: var(--ds-text-muted);
font-size: var(--text-xs);
font-weight: var(--font-weight-medium);
letter-spacing: var(--tracking-wide);
}
.asktool-decline {
flex: none;
border: 0;
background: transparent;
color: var(--ds-text-muted);
cursor: pointer;
font: inherit;
font-size: var(--text-xs);
}
.asktool-decline:hover {
color: var(--ds-text-primary);
}
.asktool-indicators {
display: flex;
align-items: center;
gap: 4px;
margin: 0;
}
.asktool-indicator {
width: 6px;
height: 6px;
padding: 0;
border-radius: var(--radius-full);
background: var(--ds-tile-deep);
cursor: pointer;
}
.asktool-indicator.current {
outline: 2px solid color-mix(in oklab, var(--ds-accent) 30%, transparent);
outline-offset: 1px;
}
.asktool-indicator.answered {
background: var(--ds-success);
}
.asktool-indicator.skipped {
background: var(--ds-text-muted);
}
.asktool-question {
display: grid;
grid-template-columns: max-content minmax(0, 1fr);
align-items: baseline;
column-gap: 8px;
margin: 8px 0 0;
color: var(--ds-text-primary);
font-size: var(--text-sm);
font-weight: var(--font-weight-medium);
line-height: var(--leading-snug);
}
.asktool-question-body {
display: block;
min-width: 0;
/* Long prompts scroll here so header actions stay on screen (#1531).
Do not reserve a scrollbar gutter. */
max-height: min(208px, 24vh);
max-height: min(208px, 24dvh);
overflow-x: hidden;
overflow-y: auto;
overflow-wrap: anywhere;
overscroll-behavior-y: contain;
}
.asktool-question-body:focus-visible {
outline: 2px solid var(--ds-accent);
outline-offset: 2px;
}
.asktool-options {
display: grid;
gap: 6px;
max-height: min(208px, 24vh);
max-height: min(208px, 24dvh);
margin-top: 8px;
padding: 2px 4px 2px 0;
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior-y: contain;
scrollbar-gutter: stable;
scroll-padding-block: 2px;
}
/* The card rides the composer plate below, so its option rows are inlaid fills
on that plate rather than the raised layer of an in-flow surface (D297). */
.asktool-option {
display: flex;
width: 100%;
align-items: flex-start;
gap: 8px;
min-height: 28px;
padding: 5px 8px;
border-radius: var(--radius-sm);
background: var(--ds-tile-deep);
color: var(--ds-text-secondary);
cursor: pointer;
font: inherit;
font-size: var(--text-sm);
line-height: var(--leading-snug);
text-align: start;
transition: background-color var(--motion-duration-fast) var(--motion-ease-out);
}
.asktool-option-copy {
display: grid;
min-width: 0;
gap: 2px;
}
.asktool-rich-paragraph,
.asktool-rich-heading,
.asktool-rich-list,
.asktool-rich-list-item,
.asktool-rich-quote,
.asktool-rich-pre,
.asktool-rich-table,
.asktool-rich-table-row,
.asktool-rich-table-cell {
display: block;
margin: 0;
}
.asktool-rich-heading {
font-weight: var(--font-weight-semibold);
}
.asktool-rich-list {
padding-inline-start: 4px;
}
.asktool-rich-list-ordered {
counter-reset: asktool-option-item;
}
.asktool-rich-list-item + .asktool-rich-list-item {
margin-top: 2px;
}
.asktool-rich-list-ordered > .asktool-rich-list-item {
counter-increment: asktool-option-item;
}
.asktool-rich-list-ordered > .asktool-rich-list-item > .asktool-rich-list-marker::before {
content: counter(asktool-option-item) ". ";
}
.asktool-rich-list-unordered > .asktool-rich-list-item > .asktool-rich-list-marker {
margin-inline-end: 5px;
color: var(--ds-text-muted);
}
.asktool-rich-quote {
padding-inline-start: 6px;
color: var(--ds-text-muted);
}
.asktool-rich-pre {
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.asktool-rich-task-marker,
.asktool-rich-image-alt {
color: var(--ds-text-muted);
}
.asktool-rich-image-alt {
font-style: italic;
}
.asktool-rich-rule {
display: block;
height: 1px;
margin: 4px 0;
background: var(--ds-text-faint);
}
.asktool-rich-table-row {
display: flex;
gap: 6px;
}
.asktool-rich-table-cell {
min-width: 0;
overflow-wrap: anywhere;
}
.asktool-rich-code {
border-radius: var(--radius-2xs);
background: var(--ds-tile-deep);
padding: 1px 3px;
font-family: var(--font-mono);
font-size: var(--text-sm);
overflow-wrap: anywhere;
}
.asktool-option-description {
color: var(--ds-text-muted);
font-size: var(--text-xs);
line-height: var(--leading-snug);
overflow-wrap: anywhere;
}
.asktool-option:hover,
.asktool-option.selected {
background: color-mix(in oklab, var(--ds-accent) 10%, var(--ds-tile-deep));
color: var(--ds-text-primary);
}
.asktool-option-mark {
display: grid;
width: 15px;
height: 15px;
flex: none;
place-items: center;
border-radius: var(--radius-2xs);
background: var(--ds-tile-deep);
color: var(--ds-accent);
font-size: var(--text-xs);
line-height: var(--leading-none);
margin-top: 2px;
}
.asktool-option[role="radio"] .asktool-option-mark {
border-radius: var(--radius-full);
}
.asktool-option.selected .asktool-option-mark {
background: color-mix(in oklab, var(--ds-accent) 18%, transparent);
}
.asktool-custom-input {
box-sizing: border-box;
width: 100%;
margin-top: 8px;
padding: 6px 8px;
border: 0;
border-radius: var(--radius-sm);
background: var(--ds-tile-deep);
color: var(--ds-text-primary);
font: inherit;
font-size: var(--text-sm);
}
.asktool-custom-input:focus-visible {
outline: none;
box-shadow: 0 0 0 2px color-mix(in oklab, var(--ds-accent) 30%, transparent);
}
.asktool-card-header-actions .btn {
padding: 2px 10px;
font-size: var(--text-xs);
}
@media (max-width: 560px) {
.asktool-card-header {
align-items: flex-start;
}
.asktool-card-header-actions .btn {
flex: 1 1 auto;
}
}
/* Compact pre-stream feedback: visible immediately after send without
competing with the assistant rail, tool rows, or permission card. */
.working-indicator {
box-sizing: border-box;
display: flex;
width: min(100%, var(--chat-prose-max-width, 720px));
align-items: center;
gap: 7px;
margin: 2px 0 8px;
padding: 8px 0 4px 16px;
color: var(--ds-text-secondary);
font-size: var(--text-sm-plus);
}
/* Runtime-owned quiet phases explain why no new transcript row is arriving.
Keep them as the same lightweight status row, not a second progress card. */
.run-activity-indicator[data-phase="waiting-model"],
.run-activity-indicator[data-phase="starting"],
.run-activity-indicator[data-phase="preparing"],
.run-activity-indicator[data-phase="compacting"] {
color: var(--ds-info);
}
.run-activity-indicator[data-phase="waiting-model"]
.working-indicator-mark > span,
.run-activity-indicator[data-phase="starting"]
.working-indicator-mark > span,
.run-activity-indicator[data-phase="preparing"]
.working-indicator-mark > span,
.run-activity-indicator[data-phase="compacting"]
.working-indicator-mark > span {
background: var(--ds-info);
}
.run-activity-indicator[data-phase="retrying"],
.run-activity-indicator[data-phase="recovering"] {
color: var(--ds-warning);
}
.run-activity-indicator[data-phase="retrying"] .working-indicator-mark > span,
.run-activity-indicator[data-phase="recovering"]
.working-indicator-mark > span {
background: var(--ds-warning);
}
.run-activity-indicator[data-phase="waiting-subagents"] {
color: var(--ds-purple);
}
.run-activity-indicator[data-phase="waiting-subagents"]
.working-indicator-mark > span {
background: var(--ds-purple);
}
.run-activity-indicator {
min-width: 0;
}
.run-activity-indicator .working-indicator-label {
min-width: 0;
overflow: hidden;
color: inherit;
text-overflow: ellipsis;
white-space: nowrap;
}
.run-activity-retry-reason {
position: relative;
/* The plate hangs this far above the trigger; the bridge below covers it. */
--run-activity-error-gap: 8px;
display: inline-flex;
min-width: 0;
align-items: center;
cursor: help;
outline: none;
}
/* The pointer has to cross the gap between the trigger and the plate to reach
the plate's scrollbar. That band belongs to the indicator row, not to the
trigger, so `:hover` dropped there and the plate closed mid-reach. The bridge
is part of the trigger, which keeps the path hovered. */
.run-activity-retry-reason::before {
content: "";
position: absolute;
top: calc(-1 * var(--run-activity-error-gap));
left: 0;
right: 0;
height: var(--run-activity-error-gap);
}
.run-activity-retry-reason:focus-visible {
border-radius: var(--radius-2xs);
box-shadow: 0 0 0 2px color-mix(in oklab, var(--ds-accent) 80%, transparent);
}
/* The retry reason borrows the assistant error card's hierarchy without
adding a second transcript row. It is hover/focus-only so the active row
remains compact at rest. The in-flow `.message-error` wash is transparent;
this floating tooltip mixes the same tint over an opaque elevated plate.
The plate hangs above the tail status row inside `.thread-scroll`, whose
`overflow: auto` clips it at the scrollport edge, and the conversation bar
paints over the same band one stacking level higher, so an unbounded plate
lost the first lines of a long provider message (ADR 0196) - the part a
reader needs. Cap it to the room the tail row leaves: the window minus the
conversation bar, minus the composer reserve `.thread-content` already
holds (16px above `--composer-dock-height`), minus the 46px status row and
this plate's own 8px gap. The remainder scrolls, the way
`.message-error-details pre` already handles long error text. */
.run-activity-error-popover.message-error {
position: absolute;
bottom: calc(100% + var(--run-activity-error-gap));
left: 0;
z-index: 8;
display: block;
width: min(360px, calc(100vw - 32px));
padding: 10px 12px;
max-height: calc(100vh - var(--ds-toolbar-height, 46px) - var(--composer-dock-height, 228px) - 70px);
/* RunActivityIndicator measures the room the tail row actually leaves and
publishes it here; the calc is only the first-paint fallback. */
max-height: var(--run-activity-error-max-height, calc(100dvh - var(--ds-toolbar-height, 46px) - var(--composer-dock-height, 228px) - 70px));
/* The plate itself does not scroll: Chromium paints a scrollbar outside a
rounded corner, so the bar crossed the radius. The body below the heading
owns the scrolling instead. */
overflow: hidden;
background: color-mix(in oklab, var(--ds-error) 10%, var(--ds-bg-elevated-opaque));
box-shadow: var(--ds-shadow-dialog);
opacity: 0;
pointer-events: none;
transform: translateY(4px);
visibility: hidden;
/* Leaving the trigger keeps the plate for one short beat, so a reader
reaching for the scrollbar is not punished for the trip. */
transition:
opacity var(--motion-duration-fast) var(--motion-ease-out) 240ms,
transform var(--motion-duration-fast) var(--motion-ease-out) 240ms,
visibility 0s linear calc(var(--motion-duration-fast) + 240ms);
}
.run-activity-retry-reason:hover .run-activity-error-popover,
.run-activity-retry-reason:focus-visible .run-activity-error-popover {
opacity: 1;
/* The capped plate is scrollable, so the revealed state has to take the
pointer. Hovering the plate keeps this trigger's `:hover` alive - the
plate is its child - so a long provider message can be scrolled and
selected instead of losing its first lines above the scrollport. */
pointer-events: auto;
transform: translateY(0);
visibility: visible;
transition-delay: 0s;
}
.run-activity-error-message {
display: block;
margin: 9px 0 0 24px;
color: var(--ds-text-secondary);
font-family: var(--font-mono);
font-size: var(--text-xs);
line-height: var(--leading-normal);
overflow-wrap: anywhere;
/* Body-only scrolling (measured by RunActivityIndicator): the heading above
stays put while a long provider message scrolls inside the plate. */
max-height: var(--run-activity-error-body-max-height, none);
overflow-y: auto;
overscroll-behavior-y: contain;
}
@media (prefers-reduced-motion: reduce) {
.run-activity-error-popover.message-error {
transition: none;
}
}
@media (max-width: 560px) {
.run-activity-error-popover.message-error {
left: auto;
right: 0;
}
}
.working-indicator-mark {
display: inline-flex;
width: 18px;
height: 8px;
flex: 0 0 auto;
align-items: center;
gap: 3px;
}
.working-indicator-mark > span {
width: 4px;
height: 4px;
flex: 0 0 auto;
border-radius: var(--radius-round);
background: var(--ds-text-secondary);
opacity: 0.35;
animation: working-indicator-dot 1s var(--motion-ease-standard) infinite;
}
.working-indicator-mark > span:nth-child(2) {
animation-delay: 120ms;
}
.working-indicator-mark > span:nth-child(3) {
animation-delay: 240ms;
}
.working-indicator-label {
color: var(--ds-text-secondary);
}
.working-elapsed {
color: var(--ds-text-muted);
font-size: var(--text-xs-plus);
font-variant-numeric: tabular-nums;
}
.planning-state-indicator {
box-sizing: border-box;
display: flex;
width: min(100%, var(--chat-prose-max-width, 720px));
align-items: center;
gap: 7px;
margin: 2px 0 8px;
padding: 8px 0 4px 16px;
color: var(--ds-info);
font-size: var(--text-sm-plus);
animation: planning-state-in var(--motion-duration-fast) var(--motion-ease-out)
both;
}
.planning-state-indicator .working-indicator-mark > span {
background: var(--ds-purple);
}
@keyframes working-indicator-dot {
0%,
60%,
100% {
opacity: 0.35;
transform: scale(0.8);
}
30% {
opacity: 1;
transform: scale(1);
}
}
/* Running labels stay readable; the small marker carries the live feedback
so long tool names never flash between two text colours. */
.tool-activity-label.running,
.tool-row-name.running {
color: var(--ds-text-secondary);
}
/* The live marker is a real flex sibling of the label. A generated inline box
had to be aligned by hand and drifted off the row centre inside the label's
ellipsis box; as a flex item it is centred by the header's own alignment and
spaced by its gap. */
.activity-marker {
flex: none;
width: 4px;
height: 4px;
border-radius: var(--radius-round);
background: var(--ds-text-secondary);
animation: activity-marker-pulse 1s var(--motion-ease-standard) infinite;
}
@keyframes activity-marker-pulse {
0%,
100% {
opacity: 0.35;
}
50% {
opacity: 1;
}
}
.text-shimmer {
display: inline-grid;
min-width: 0;
vertical-align: baseline;
white-space: nowrap;
}
.text-shimmer > span {
grid-area: 1 / 1;
white-space: pre;
}
.text-shimmer-base {
color: inherit;
opacity: 1;
transition: opacity 220ms ease-out;
}
.text-shimmer-peak {
color: transparent;
background-image:
linear-gradient(
90deg,
transparent calc(50% - 5.2ch),
var(--ds-text-primary) 50%,
transparent calc(50% + 5.2ch)
),
linear-gradient(var(--ds-text-secondary), var(--ds-text-secondary));
background-size: 360% 100%, 100% 100%;
background-position: 100% 0, 0 0;
background-repeat: no-repeat;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
animation: text-shimmer-sweep 1.2s linear infinite;
opacity: 1;
transition: opacity 220ms ease-out;
will-change: background-position;
}
.text-shimmer[data-active="true"] .text-shimmer-base {
opacity: 0;
}
.text-shimmer[data-active="false"] .text-shimmer-peak {
animation: none;
opacity: 0;
}
@keyframes text-shimmer-sweep {
from { background-position: 100% 0, 0 0; }
to { background-position: 0 0, 0 0; }
}
@media (prefers-reduced-motion: reduce) {
.text-shimmer-peak {
animation: none !important;
opacity: 0 !important;
}
.text-shimmer-base {
opacity: 1 !important;
}
}
@keyframes planning-state-in {
from {
opacity: 0;
transform: translateY(4px);
}
to {
opacity: 1;
transform: none;
}
}
@media (prefers-reduced-motion: reduce) {
.working-indicator-mark > span,
.planning-state-indicator {
animation: none;
}
}
/* A recorded change is a list row, not a card: it borrows `.tool-row`'s
metrics so a Write/Edit row and its change read as one rhythm. `--review-
change-rail` survives as the per-status accent for the mark and focus ring. */
.review-change-card {
--review-change-rail: var(--ds-text-muted);
position: relative;
box-sizing: border-box;
width: min(calc(100% - 24px), var(--chat-prose-max-width, 720px));
margin: 0 0 2px 24px;
}
.review-change-card[data-status="added"] {
--review-change-rail: var(--ds-success);
}
.review-change-card[data-status="deleted"] {
--review-change-rail: var(--ds-error);
}
.review-change-card[data-state="rolledBack"] {
--review-change-rail: var(--ds-text-faint);
}
.review-change-card.is-compact {
width: 100%;
margin: 0;
}
/* In the transcript the review card is the tool row itself: it claims the full
band, drops the transcript inset, and puts the diff body directly beneath the
only header. Header order follows the file-ledger row: mark, path, counts,
caret. The panel keeps its existing caret-first order. */
.review-change-card.is-tool-row {
width: 100%;
margin: 3px 0;
}
.review-change-card.is-tool-row .review-change-card-mark {
order: 0;
}
.review-change-card.is-tool-row .review-change-card-path {
order: 1;
}
.review-change-card.is-tool-row .review-change-card-counts {
order: 2;
}
.review-change-card.is-tool-row .review-change-card-caret {
order: 3;
/* This is now the row's only disclosure affordance, so it keeps the
tool-row caret's resting visibility instead of the old card's hidden one. */
opacity: 0.65;
}
.review-change-card.is-tool-row .review-change-card-body {
margin-left: 0;
}
.review-change-card-header {
display: flex;
width: 100%;
min-width: 0;
min-height: 24px;
align-items: center;
gap: 6px;
margin: 0 -4px;
padding: 2px 4px;
border-radius: var(--radius-sm);
color: var(--ds-text-secondary);
text-align: left;
transition:
background var(--motion-duration-fast) var(--motion-ease-out),
color var(--motion-duration-fast) var(--motion-ease-out);
}
.review-change-card-header:hover {
background: var(--ds-bg-hover);
color: var(--ds-text-primary);
}
.review-change-card-header:focus-visible {
position: relative;
z-index: 1;
outline: 1.5px solid color-mix(in oklab, var(--review-change-rail) 78%, transparent);
outline-offset: -2px;
}
/* In the transcript the caret stays out of the way until the row is engaged
(as tool rows do); in the panel list it is the row's main affordance. */
.review-change-card-caret {
display: inline-flex;
width: 12px;
flex: 0 0 auto;
align-items: center;
justify-content: center;
color: var(--ds-text-muted);
opacity: 0;
transition: transform var(--motion-duration-fast) var(--motion-ease-out);
}
.review-change-card:hover .review-change-card-caret,
.review-change-card-header:focus-visible .review-change-card-caret,
.review-change-card.is-compact .review-change-card-caret,
.review-change-card.open .review-change-card-caret {
opacity: 1;
}
.review-change-card.open .review-change-card-caret {
transform: rotate(90deg);
}
.review-change-card-mark {
width: 10px;
flex: 0 0 auto;
color: var(--review-change-rail);
font-family: var(--font-mono);
font-size: var(--text-2xs);
font-weight: var(--font-weight-medium);
line-height: var(--leading-compact);
text-align: center;
}
.review-change-card-path {
min-width: 0;
flex: 1;
overflow: hidden;
color: var(--ds-text-secondary);
font-family: var(--font-mono);
font-size: var(--text-xs-plus);
line-height: var(--leading-compact-plus);
text-overflow: ellipsis;
white-space: nowrap;
direction: rtl;
text-align: left;
}
/* Keep the explicit outside-workspace prefix before the filename, even when
the normal path row uses RTL to preserve its basename on overflow. */
.review-change-card-path[data-outside-path],
.turn-changes-path[data-outside-path] {
direction: ltr;
unicode-bidi: isolate;
}
.review-change-card-header:hover .review-change-card-path {
color: var(--ds-text-primary);
}
.review-change-card-counts {
margin-left: auto;
gap: 5px;
font-size: var(--text-2xs);
line-height: var(--leading-compact);
}
.review-change-card[data-state="rolledBack"] .review-change-card-path {
color: var(--ds-text-faint);
text-decoration: line-through;
}
.review-change-card[data-state="rolledBack"] .review-change-card-counts {
opacity: 0.55;
}
/* The expanded diff sits in a soft tile indented to the path text (D297). */
.review-change-card-body {
max-height: min(360px, 42vh);
margin: 2px 0 6px 18px;
overflow: auto;
border-radius: var(--radius-sm);
background: var(--ds-tile);
animation: review-change-reveal var(--motion-duration-normal) var(--motion-ease-out) both;
}
.review-change-card-body-content {
display: flex;
min-width: 0;
flex-direction: column;
}
.review-change-card-actions {
display: flex;
min-height: 26px;
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
gap: 8px;
padding: 4px 6px 2px;
}
.review-change-card-actions.is-compact {
padding-inline: 4px;
}
.review-change-rollback,
.review-change-copy {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 2px 5px;
border-radius: var(--radius-sm);
color: var(--ds-text-muted);
font-size: var(--text-xs-plus);
white-space: nowrap;
transition:
background var(--motion-duration-fast) var(--motion-ease-out),
color var(--motion-duration-fast) var(--motion-ease-out);
}
.review-change-rollback:hover:not(:disabled),
.review-change-copy:hover:not(:disabled) {
background: var(--ds-bg-hover);
color: var(--ds-text-primary);
}
.review-change-rollback:disabled {
cursor: wait;
opacity: 0.65;
}
.review-change-copy:disabled {
cursor: default;
opacity: 0.65;
}
.review-change-copy.copied {
color: var(--ds-success);
}
.review-change-state {
display: inline-flex;
align-items: center;
gap: 5px;
color: var(--ds-success);
font-size: var(--text-xs-plus);
}
.review-change-rollback-note {
min-width: 0;
flex: 1 1 180px;
color: var(--ds-text-muted);
font-size: var(--text-xs-plus);
line-height: var(--leading-compact-plus);
}
.review-change-diff .diff-line-sign {
width: 24px;
padding-block: 3px;
font-weight: var(--font-weight-medium);
}
.review-change-diff .diff-line-text {
padding: 3px 10px 3px 4px;
}
.review-change-diff .diff-line.add {
background: color-mix(in oklab, var(--ds-success) 14%, transparent);
}
.review-change-diff .diff-line.del {
background: color-mix(in oklab, var(--ds-error) 14%, transparent);
}
.review-change-diff .diff-line.hunk {
padding: 4px 10px;
color: var(--ds-text-faint);
}
.review-change-note {
padding: 6px 10px;
color: var(--ds-text-muted);
font-size: var(--text-xs-plus);
line-height: var(--leading-body);
}
@keyframes review-change-reveal {
from {
opacity: 0;
transform: translateY(-3px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.turn-outcome-card {
width: min(100%, var(--chat-prose-max-width, 720px));
margin: 12px 0 8px;
border-radius: var(--radius-md);
background: var(--ds-tile);
padding: 12px 14px;
}
.turn-outcome-card.failed {
background: color-mix(in oklab, var(--ds-error) 7%, transparent);
}
.turn-outcome-heading {
display: flex;
min-width: 0;
align-items: flex-start;
gap: 8px;
}
.turn-outcome-icon {
display: inline-flex;
flex: 0 0 auto;
color: var(--ds-accent);
}
.turn-outcome-card.failed .turn-outcome-icon {
color: var(--ds-error);
}
.turn-outcome-copy {
display: flex;
min-width: 0;
flex: 1;
flex-direction: column;
gap: 3px;
}
.turn-outcome-copy strong {
color: var(--ds-text-primary);
font-size: var(--text-md);
font-weight: var(--font-weight-semibold);
}
.turn-outcome-copy span {
color: var(--ds-text-secondary);
font-size: var(--text-sm);
line-height: var(--leading-body);
}
.turn-outcome-stats {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin: 10px 0 0 24px;
color: var(--ds-text-muted);
font-size: var(--text-xs-plus);
}
.turn-outcome-stats span {
border-radius: var(--radius-full);
background: color-mix(in oklab, var(--ds-text-primary) 5%, transparent);
padding: 2px 7px;
}
.turn-outcome-actions {
display: flex;
flex-wrap: wrap;
gap: 5px;
margin: 10px 0 0 24px;
}
.permission-card.risk-high {
background: color-mix(in oklab, var(--ds-error) 7%, transparent);
}
.permission-card.risk-low {
background: var(--ds-tile);
}
.permission-card-header,
.permission-card-meta,
.permission-card-actions {
display: flex;
align-items: center;
}
.permission-card-header {
justify-content: space-between;
gap: 12px;
}
.permission-card-title {
/* Keeps the risk pill hard right once the queue count joins the header. */
margin-inline-end: auto;
color: var(--ds-text-primary);
font-size: var(--text-md);
font-weight: var(--font-weight-semibold);
}
.permission-card-queued {
flex: none;
color: var(--ds-text-muted);
font-size: var(--text-2xs);
}
.permission-card-agent {
margin-top: 4px;
color: var(--ds-text-muted);
font-size: var(--text-sm);
}
.permission-risk {
flex: none;
padding: 2px 7px;
border-radius: var(--radius-full);
background: var(--ds-tile-deep);
color: var(--ds-text-muted);
font-size: var(--text-2xs);
text-transform: uppercase;
}
.permission-risk.risk-high {
background: color-mix(in oklab, var(--ds-error) 14%, transparent);
color: var(--ds-error);
}
.permission-risk.risk-medium {
background: color-mix(in oklab, var(--ds-warning) 14%, transparent);
color: var(--ds-warning);
}
.permission-card-prompt {
margin-top: 6px;
color: var(--ds-text-secondary);
font-size: var(--text-md);
}
.permission-card-reason {
margin-top: 4px;
color: var(--ds-text-muted);
font-size: var(--text-sm);
}
.permission-card-args {
max-height: 240px;
margin-top: 12px;
overflow: auto;
}
.permission-card-meta {
justify-content: space-between;
gap: 12px;
margin-top: 10px;
color: var(--ds-text-muted);
font-size: var(--text-xs);
}
.permission-card-meta > span:first-child {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.permission-card-meta > span:last-child {
flex: none;
}
.permission-card-actions {
flex-wrap: wrap;
justify-content: flex-end;
gap: 8px;
margin-top: 12px;
}
@media (max-width: 560px) {
.permission-card-meta {
align-items: flex-start;
flex-direction: column;
gap: 4px;
}
.permission-card-actions .btn {
flex: 1 1 auto;
}
}
/* Hover actions under a message: quiet icon chips, WorkBuddy/Codex density. */
.message-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 2px;
min-height: 24px;
padding-top: 2px;
opacity: 0;
transition: opacity var(--motion-duration-fast) var(--motion-ease-out);
}
.message-row.user .message-actions {
justify-content: flex-end;
}
.message-row:hover .message-actions,
.message-row:focus-within .message-actions,
.message-actions:focus-within {
opacity: 1;
}
.message-timestamp {
font-size: var(--text-xs);
color: var(--ds-text-muted);
line-height: var(--leading-compact);
white-space: nowrap;
user-select: none;
padding: 0 4px;
align-self: center;
}
.icon-btn:active:not(:disabled),
.title-nav-btn:active:not(:disabled),
.nav-item:active:not(:disabled),
.copy-btn:active:not(:disabled),
.sidebar-toolbar-button:active:not(:disabled),
.sidebar-session-group-add:active:not(:disabled) {
transform: scale(0.96);
}
.copy-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 5px;
min-height: 24px;
padding: 3px 8px;
border-radius: var(--radius-sm);
color: var(--ds-text-muted);
font-size: var(--text-xs-plus);
line-height: var(--leading-compact);
transition: background var(--motion-duration-fast) var(--motion-ease-out),
color var(--motion-duration-fast) var(--motion-ease-out),
transform var(--motion-duration-fast) var(--motion-ease-out);
}
.copy-btn:hover {
background: var(--ds-bg-hover);
color: var(--ds-text-primary);
}
.copy-btn.copied {
color: var(--ds-text-secondary);
}
.copy-btn.primary {
background: var(--ds-accent);
color: var(--ds-bg-primary);
}
.copy-btn.primary:hover {
background: var(--ds-accent-hover);
color: var(--ds-bg-primary);
}
.copy-btn.danger:hover {
background: color-mix(in oklab, var(--ds-error) 10%, transparent);
color: var(--ds-error);
}
/* Message toolbars stay glyphs-only: the label rides in a hover/focus tooltip
so a row of actions reads as icons instead of a sentence of chips. */
.copy-btn.icon {
position: relative;
min-width: 26px;
padding-inline: 5px;
}
.message-meta {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
min-height: 20px;
color: var(--ds-text-muted);
font-size: var(--text-xs);
line-height: var(--leading-compact);
}
.message-meta-chip {
display: inline-flex;
max-width: 100%;
min-height: 20px;
align-items: center;
gap: 4px;
border-radius: var(--radius-full);
background: color-mix(in oklab, var(--ds-text-primary) 5%, transparent);
padding: 1px 8px;
color: var(--ds-text-secondary);
font-size: var(--text-xs);
line-height: var(--leading-compact);
white-space: nowrap;
}
.message-meta-chip.model {
overflow: hidden;
text-overflow: ellipsis;
}
/* Turn usage capsule: the completed turn's speed and total stay visible; the
composition and exact counts live in the hover/focus popover. */
.turn-usage-capsule {
display: inline-flex;
min-height: 20px;
max-width: 100%;
align-items: center;
gap: 6px;
border: 0;
border-radius: var(--radius-full);
background: var(--ds-tile);
padding: 0 8px;
color: var(--ds-text-secondary);
cursor: pointer;
font: inherit;
font-size: var(--text-xs);
line-height: var(--leading-compact);
font-variant-numeric: tabular-nums;
white-space: nowrap;
transition:
background var(--motion-duration-fast) var(--motion-ease-out),
color var(--motion-duration-fast) var(--motion-ease-out),
box-shadow var(--motion-duration-fast) var(--motion-ease-out);
}
.turn-usage-capsule:hover,
.turn-usage-capsule[data-open="true"] {
background: var(--ds-tile-hover);
color: var(--ds-text-primary);
box-shadow: inset 0 0 0 1px var(--ds-border-subtle);
}
.turn-usage-capsule:focus-visible {
outline: 2px solid color-mix(in oklab, var(--ds-text-primary) 44%, transparent);
outline-offset: 2px;
}
/* The bar is a flex row of proportional segments. Segment order matches the
popover rows: cache read, input, output, then cache write when present. */
.turn-usage-bar {
display: flex;
width: 36px;
height: 4px;
flex: 0 0 36px;
gap: 1px;
overflow: hidden;
border-radius: var(--radius-full);
background: color-mix(in oklab, var(--ds-text-primary) 7%, transparent);
}
.turn-usage-seg {
min-width: 1px;
flex-basis: 0;
border-radius: var(--radius-full);
}
.turn-usage-seg.cache {
background: color-mix(in oklab, var(--ds-text-primary) 24%, transparent);
}
.turn-usage-seg.input {
background: color-mix(in oklab, var(--ds-text-primary) 51%, transparent);
}
.turn-usage-seg.output {
background: color-mix(in oklab, var(--ds-text-primary) 86%, transparent);
}
.turn-usage-seg.write {
background: color-mix(in oklab, var(--ds-text-primary) 36%, transparent);
}
.turn-usage-separator {
color: var(--ds-text-faint);
}
.turn-usage-total {
color: var(--ds-text-muted);
font-variant-numeric: tabular-nums;
}
.turn-usage-capsule:hover .turn-usage-total,
.turn-usage-capsule[data-open="true"] .turn-usage-total {
color: var(--ds-text-secondary);
}
.turn-usage-popover {
position: fixed;
z-index: 60;
display: flex;
width: min(268px, calc(100vw - 32px));
flex-direction: column;
border: 1px solid var(--ds-border-default);
border-radius: var(--radius-md-plus);
background: var(--ds-bg-elevated-opaque);
padding: 12px;
color: var(--ds-text-primary);
box-shadow: var(--ds-shadow-dialog);
font-size: var(--text-xs);
line-height: var(--leading-body);
text-align: left;
white-space: normal;
opacity: 0;
pointer-events: none;
transform: translateY(4px);
visibility: hidden;
transition:
opacity var(--motion-duration-fast) var(--motion-ease-out),
transform var(--motion-duration-fast) var(--motion-ease-out),
visibility 0s linear var(--motion-duration-fast);
}
.turn-usage-popover.is-open {
opacity: 1;
pointer-events: auto;
transform: translateY(0);
visibility: visible;
transition-delay: 0s;
}
.turn-usage-popover-head {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
}
.turn-usage-popover-title {
color: var(--ds-text-muted);
font-size: var(--text-2xs);
line-height: var(--leading-compact);
}
.turn-usage-popover-total {
color: var(--ds-text-primary);
font-size: var(--text-md);
font-weight: var(--font-weight-strong);
line-height: var(--leading-compact);
font-variant-numeric: tabular-nums;
}
.turn-usage-popover .turn-usage-bar {
width: 100%;
flex: 0 0 auto;
height: 4px;
gap: 2px;
margin: 11px 0 8px;
}
.turn-usage-rows {
display: flex;
flex-direction: column;
gap: 1px;
margin: 0;
}
.turn-usage-row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 14px;
padding: 2px 0;
font-size: var(--text-xs);
line-height: var(--leading-body);
}
.turn-usage-row dt {
margin: 0;
color: var(--ds-text-muted);
font-weight: var(--font-weight-normal);
}
.turn-usage-row dd {
margin: 0;
color: var(--ds-text-secondary);
font-weight: var(--font-weight-medium);
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.turn-usage-popover-footer {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
margin-top: 8px;
color: var(--ds-text-muted);
font-size: var(--text-sm);
line-height: var(--leading-compact);
}
.turn-usage-popover-footer strong {
color: var(--ds-text-primary);
font-weight: var(--font-weight-medium);
font-variant-numeric: tabular-nums;
}
.turn-usage-cost-value {
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.turn-usage-cost-help {
margin: 4px 0 0;
color: var(--ds-text-muted);
font-size: var(--text-2xs);
line-height: var(--leading-compact);
}
@media (prefers-reduced-motion: reduce) {
.turn-usage-capsule,
.turn-usage-popover {
transition: none;
}
}
.context-inspector {
position: relative;
display: inline-flex;
align-items: center;
color: var(--ds-accent);
}
.context-inspector[data-level="warning"] {
color: var(--ds-warning);
}
.context-inspector[data-level="critical"] {
color: var(--ds-error);
}
.context-inspector-trigger {
display: inline-flex;
min-height: 24px;
align-items: center;
gap: 6px;
border: 0;
border-radius: var(--radius-full);
background: transparent;
padding: 3px 8px 3px 5px;
color: currentColor;
cursor: pointer;
font: inherit;
line-height: var(--leading-compact);
transition:
background var(--motion-duration-fast) var(--motion-ease-out),
color var(--motion-duration-fast) var(--motion-ease-out);
}
.context-inspector-trigger:hover {
background: color-mix(in oklab, currentColor 8%, transparent);
}
.context-inspector[data-open="true"] .context-inspector-trigger {
background: color-mix(in oklab, currentColor 12%, transparent);
}
.context-inspector-trigger:focus-visible {
outline: 2px solid color-mix(in oklab, currentColor 54%, transparent);
outline-offset: 2px;
}
.context-inspector-ring {
width: 17px;
height: 17px;
overflow: visible;
transform: rotate(-90deg);
}
.context-inspector-ring-track,
.context-inspector-ring-progress {
fill: none;
stroke-width: 2.5;
}
.context-inspector-ring-track {
stroke: color-mix(in oklab, var(--ds-text-primary) 14%, transparent);
}
.context-inspector-ring-progress {
stroke: currentColor;
stroke-linecap: round;
transition: stroke-dashoffset var(--motion-duration-normal) var(--motion-ease-out);
}
.context-inspector-ring-value {
color: currentColor;
font-size: var(--text-xs);
font-weight: var(--font-weight-semibold);
line-height: var(--leading-compact);
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.context-inspector-popover {
position: fixed;
z-index: 60;
display: flex;
width: min(376px, calc(100vw - 32px));
max-height: min(560px, calc(100vh - 32px));
flex-direction: column;
gap: 0;
overflow-y: auto;
border: 1px solid var(--ds-border-default);
border-radius: var(--radius-md-plus);
background: var(--ds-bg-elevated-opaque);
padding: 16px;
color: var(--ds-text-primary);
box-shadow: var(--ds-shadow-dialog);
font-size: var(--text-xs);
line-height: var(--leading-body);
text-align: left;
white-space: normal;
opacity: 0;
pointer-events: none;
transform: translateY(4px);
visibility: hidden;
transition:
opacity var(--motion-duration-fast) var(--motion-ease-out),
transform var(--motion-duration-fast) var(--motion-ease-out),
visibility 0s linear var(--motion-duration-fast);
}
.context-inspector-popover.is-open {
opacity: 1;
pointer-events: auto;
transform: translateY(0);
visibility: visible;
transition-delay: 0s;
}
.context-inspector-heading {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
}
.context-inspector-heading-value {
min-width: 0;
color: var(--ds-text-primary);
font-size: var(--text-lg);
font-weight: var(--font-weight-strong);
line-height: var(--leading-none);
font-variant-numeric: tabular-nums;
}
.context-inspector-heading-percent {
flex: 0 0 auto;
color: currentColor;
font-size: var(--text-lg);
font-weight: var(--font-weight-semibold);
line-height: var(--leading-none);
font-variant-numeric: tabular-nums;
}
/* Sections inside the popover are set apart by space alone (D297). */
.context-inspector-window,
.context-inspector-kpis,
.context-inspector-summary,
.context-inspector-compaction {
margin-top: 14px;
}
.context-inspector-window {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
color: var(--ds-text-secondary);
font-size: var(--text-xs);
font-variant-numeric: tabular-nums;
}
.context-inspector-window > span:first-child {
color: var(--ds-text-muted);
font-size: var(--text-2xs);
}
.context-inspector-window strong {
margin-left: auto;
color: var(--ds-text-primary);
font-weight: var(--font-weight-medium);
white-space: nowrap;
}
.context-inspector-window-percent {
color: var(--ds-text-muted);
white-space: nowrap;
}
.context-inspector-kpis {
display: flex;
flex-direction: column;
}
.context-inspector-kpis > div {
display: flex;
min-width: 0;
align-items: baseline;
justify-content: space-between;
gap: 12px;
padding: 2px 0;
}
.context-inspector-kpis span {
min-width: 0;
color: var(--ds-text-muted);
font-size: var(--text-2xs);
white-space: nowrap;
}
.context-inspector-kpis strong {
color: var(--ds-text-primary);
font-size: var(--text-xs);
font-weight: var(--font-weight-medium);
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.context-inspector-summary {
display: flex;
flex-direction: column;
}
.context-inspector-summary-row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
padding: 2px 0;
}
.context-inspector-summary-row > strong {
color: var(--ds-text-muted);
font-size: var(--text-2xs);
font-weight: var(--font-weight-normal);
white-space: nowrap;
}
.context-inspector-summary-values {
display: flex;
min-width: 0;
flex-wrap: wrap;
justify-content: flex-end;
gap: 2px 10px;
color: var(--ds-text-primary);
font-size: var(--text-xs);
font-variant-numeric: tabular-nums;
text-align: right;
}
.context-inspector-summary-values > span {
white-space: nowrap;
}
.context-inspector-compaction {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
color: var(--ds-text-muted);
font-size: var(--text-2xs);
font-variant-numeric: tabular-nums;
}
.context-inspector-compaction strong {
color: var(--ds-text-secondary);
font-weight: var(--font-weight-medium);
}
/* One transcript row per compaction: a quiet centred label the eye can skip.
* The flanking pseudo-elements only centre it — no rule is drawn (D297). */
.transcript-compaction-row {
display: flex;
align-items: center;
gap: 8px;
margin: 14px 0;
color: var(--ds-text-muted);
font-size: var(--text-2xs);
font-variant-numeric: tabular-nums;
}
.transcript-compaction-row::before,
.transcript-compaction-row::after {
flex: 1;
content: "";
}
.transcript-compaction-detail {
color: var(--ds-text-secondary);
}
@media (prefers-reduced-motion: reduce) {
.context-inspector-ring-progress,
.context-inspector-trigger,
.context-inspector-popover {
transition: none;
}
}
.message-revision-pager {
display: inline-flex;
align-items: center;
gap: 2px;
margin-right: 4px;
color: var(--ds-text-muted);
font-size: var(--text-xs);
line-height: var(--leading-compact);
font-variant-numeric: tabular-nums;
}
/* Compact in-flow editor. Outer composer shadow clips: the row uses
content-visibility (paint containment) and has no horizontal padding, and
the transcript scroller clips overflow. Separate from the pane with the
same 8% mix as a user bubble (`--ds-tile-deep`); focus uses an inset ring
so it stays inside the plate. The textarea is unboxed; actions sit in a
28px footer. */
.message-edit {
display: flex;
width: min(100%, var(--chat-prose-max-width, 720px));
margin: 0;
flex-direction: column;
border: 0;
border-radius: var(--ds-composer-radius, var(--radius-xl));
background: var(--ds-tile-deep);
box-shadow: none;
isolation: isolate;
}
.message-edit:focus-within {
box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--ds-focus) 28%, transparent);
}
/* A prompt being edited needs typing room, so the user column drops its
narrow chat-plate clamp for as long as the editor is open. */
.message-row.user .message-col:has(.message-edit) {
width: 100%;
max-width: min(100%, var(--chat-prose-max-width, 720px));
}
.message-row.user .message-bubble:has(.message-edit) {
width: 100%;
max-width: 100%;
border-radius: 0;
background: transparent;
padding: 0;
}
.message-edit-input {
display: block;
width: 100%;
min-height: 3lh;
max-height: min(12lh, 50vh);
resize: none;
overflow-y: auto;
border: 0;
background: transparent;
padding: 12px 14px 8px;
color: var(--ds-text-primary);
font: inherit;
font-size: var(--text-base);
line-height: var(--leading-chat);
outline: none;
white-space: pre-wrap;
overflow-wrap: break-word;
}
.message-edit-input:focus,
.message-edit-input:focus-visible {
outline: none;
box-shadow: none;
}
.message-edit-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 4px;
padding: 4px 8px 8px;
}
.message-edit-cancel {
height: 28px;
min-height: 28px;
padding: 0 10px;
color: var(--ds-text-secondary);
font-size: var(--text-sm);
font-weight: var(--font-weight-medium);
line-height: var(--leading-compact);
white-space: nowrap;
}
.send-btn.message-edit-submit {
width: auto;
min-width: 28px;
flex: 0 0 auto;
padding: 0 12px;
font-size: var(--text-sm);
font-weight: var(--font-weight-medium);
line-height: var(--leading-compact);
white-space: nowrap;
}
.message-revision-label {
min-width: 34px;
text-align: center;
color: var(--ds-text-secondary);
}
.copy-btn.revision-nav {
min-width: 24px;
padding-inline: 4px;
}
.message-bubble {
max-width: min(100%, var(--chat-prose-max-width, 720px));
border-radius: var(--radius-lg-plus);
padding: 10px 14px;
line-height: var(--leading-chat);
}
.message-user-text {
/* Preserve hard newlines; wrap long tokens without splitting every CJK glyph. */
white-space: pre-wrap;
overflow-wrap: break-word;
word-break: normal;
min-width: 0;
line-height: inherit;
}
.user-text-disclosure {
--user-message-preview-height: 6lh;
}
.user-text-preview {
position: relative;
}
.user-text-preview-limit {
position: absolute;
inset-block-start: 0;
block-size: var(--user-message-preview-height);
inline-size: 0;
pointer-events: none;
}
.user-text-disclosure[data-collapsed="true"] .user-text-preview {
max-block-size: var(--user-message-preview-height);
overflow: clip;
mask-image: linear-gradient(to bottom, #000 calc(100% - 1lh), transparent);
}
.user-text-toggle {
display: flex;
width: max-content;
max-width: 100%;
margin: 2px auto 0;
}
/* #2388: inline chips and links inside a message are isolated runs — the
surrounding RTL/LTR punctuation must not migrate across them. */
.message-user-text .chat-command-chip,
.message-user-text .chat-text-link,
.prose-chat a,
.prose-chat code,
.prose-chat strong,
.prose-chat em {
unicode-bidi: isolate;
}
/* #2388: typed composer paragraphs follow the first strong character of the
paragraph itself (per-paragraph auto direction), the standard editor
behavior for mixed RTL/LTR drafts. */
.composer-input,
.message-edit-input {
unicode-bidi: plaintext;
}
.message-row.session-message .message-col {
width: min(100%, var(--chat-prose-max-width, 720px));
max-width: 100%;
align-items: stretch;
}
.message-row.session-message .message-bubble {
background: var(--ds-bg-hover);
border-radius: var(--radius-md-plus);
color: var(--ds-text-primary);
}
.session-message-origin {
display: flex;
min-width: 0;
flex-wrap: wrap;
align-items: center;
gap: 4px 8px;
margin-bottom: 6px;
color: var(--ds-text-secondary);
font-size: var(--text-sm);
}
.session-message-kind {
display: inline-flex;
align-items: center;
gap: 5px;
font-weight: var(--font-weight-medium);
}
.session-message-source {
padding: 2px 0;
min-width: 0;
background: transparent;
border: 0;
color: var(--ds-accent);
font: inherit;
text-align: start;
overflow-wrap: anywhere;
cursor: pointer;
}
.session-message-source:hover {
text-decoration: underline;
text-underline-offset: 3px;
}
.session-message-source:focus-visible {
outline: 2px solid var(--ds-accent);
outline-offset: 3px;
border-radius: var(--radius-sm);
}
.session-message-session-id {
flex-basis: 100%;
color: var(--ds-text-muted);
font-family: var(--font-mono);
font-size: var(--text-xs);
line-height: var(--leading-compact);
overflow-wrap: anywhere;
}
.message-attachments {
display: inline-flex;
max-width: 100%;
flex-wrap: wrap;
gap: 5px;
/* The chips continue the body line instead of heading it. */
margin-left: 4px;
vertical-align: middle;
}
.message-row.user .message-attachments {
/* Percentage max-width inflates the shrink-to-fit user plate. */
max-width: none;
}
.message-attachment {
display: inline-flex;
min-width: 0;
align-items: center;
gap: 5px;
border-radius: var(--radius-md);
background: var(--ds-tile-deep);
padding: 4px 7px;
color: var(--ds-text-secondary);
font-size: var(--text-sm-plus);
line-height: var(--leading-compact);
}
.message-attachment span {
max-width: 260px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* A user-message image is a chip like any other attachment; its preview card
appears on hover or focus and is rendered outside the message row. */
.message-attachment-image-chip {
display: inline-flex;
min-width: 0;
align-items: center;
}
.message-row.assistant .message-bubble,
.message-row.system .message-bubble,
.message-row.tool .message-bubble {
width: 100%;
max-width: 100%;
padding: 0;
border: 0;
background: transparent;
box-shadow: none;
}
/* Live parent turns stay transparent like completed prose (D323). The
`--ds-tile` card belongs only to `.tool-activity-group.has-subagents`
(D319) and the nested `.subagent-run`. */
.message-output-notice {
margin: 12px 0 0;
color: var(--ds-warning);
font-size: var(--text-sm);
line-height: var(--leading-normal);
}
.message-error {
/* The message column owns the dynamic chat width; do not add a second cap. */
width: 100%;
border-radius: var(--radius-md);
background: color-mix(in oklab, var(--ds-error) 7%, transparent);
padding: 10px 12px;
color: var(--ds-text-primary);
}
.message-error-heading,
.message-error-actions {
display: flex;
align-items: center;
gap: 8px;
}
.message-error-heading {
min-width: 0;
}
.message-error-icon {
display: inline-flex;
flex: 0 0 auto;
color: var(--ds-error);
}
.message-error-copy {
display: flex;
min-width: 0;
flex: 1;
flex-wrap: wrap;
align-items: baseline;
gap: 3px 8px;
}
.message-error-copy strong {
font-size: var(--text-sm-plus);
line-height: var(--leading-compact);
}
.message-error-copy code {
width: fit-content;
border-radius: var(--radius-full);
background: color-mix(in oklab, var(--ds-error) 8%, transparent);
padding: 2px 6px;
color: var(--ds-error);
font-size: var(--text-2xs);
line-height: var(--leading-compact);
}
.message-error-actions {
flex: 0 0 auto;
justify-content: flex-end;
}
.message-error-dismiss {
display: inline-flex;
width: 26px;
height: 26px;
flex: 0 0 auto;
align-items: center;
justify-content: center;
border-radius: var(--radius-sm);
color: var(--ds-text-muted);
}
.message-error-dismiss:hover {
background: var(--ds-bg-hover);
color: var(--ds-text-primary);
}
.message-error-dismiss:focus-visible {
outline: 2px solid var(--ds-accent);
outline-offset: 2px;
}
.message-error-toggle {
display: inline-flex;
min-height: 24px;
align-items: center;
gap: 4px;
padding: 3px 4px;
border-radius: var(--radius-sm);
color: var(--ds-text-muted);
font-size: var(--text-xs-plus);
}
.message-error-toggle:hover {
background: var(--ds-bg-hover);
color: var(--ds-text-primary);
}
.message-error-toggle[aria-expanded="true"] svg {
transform: rotate(90deg);
}
.message-error-details {
margin-top: 12px;
}
.message-error-details dl {
display: grid;
grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);
gap: 3px 10px;
margin: 0 0 8px;
color: var(--ds-text-secondary);
font-size: var(--text-xs);
}
.message-error-details dd {
min-width: 0;
overflow-wrap: anywhere;
color: var(--ds-text-primary);
}
.message-error-raw {
position: relative;
min-width: 0;
}
.message-error-details pre {
max-height: 180px;
overflow: auto;
margin: 0;
border-radius: var(--radius-sm);
background: var(--ds-bg-inset);
padding: 8px 40px 8px 10px;
color: var(--ds-text-secondary);
font-family: var(--font-mono);
font-size: var(--text-xs);
line-height: var(--leading-normal);
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.message-error-raw .copy-btn {
position: absolute;
top: 4px;
inset-inline-end: 4px;
}
@media (max-width: 560px) {
.message-error-heading {
align-items: flex-start;
flex-wrap: wrap;
}
.message-error-actions {
width: calc(100% - 24px);
flex-basis: calc(100% - 24px);
margin-inline-start: 24px;
justify-content: flex-start;
}
.message-error-details dl {
grid-template-columns: max-content minmax(0, 1fr);
}
}
/* Thinking prose base tokens — detailed rules live with .prose-chat. */
/* Codex-style tool activity: lightweight disclosure rows, not boxed cards */
.tool-activity-group {
/* The assistant column aligns children to flex-start, so the group has to
claim the full width itself — otherwise expanded detail blocks shrink to
their content and short payloads render as tiny chips. */
width: 100%;
min-width: 0;
margin: 7px 0;
/* Skip layout/paint for collapsed groups far offscreen (D247). */
content-visibility: auto;
contain-intrinsic-size: auto 40px;
/* Clips the same disclosure chrome as .message-row — at the column's left
edge, and at its right for a run row's head — so it relaxes its clip by
the same amount; with either one left tight the fill is squared off. */
overflow-clip-margin: 8px;
}
/*
* A disclosure header is a row, not a chip. A content-sized `inline-flex`
* header (the whole process, an ordinary group, a subagent card) stopped at
* its own label, so the tool call never used the conversation width: it stayed
* narrow next to full-width prose and did not change when the band was dragged
* wider, and a long label overran the chip because only the level-specific
* overrides below carried an ellipsis. The row claims the band like every
* other transcript row; the label ellipsizes and the caret trails it.
*/
.tool-activity-header {
display: flex;
width: 100%;
min-width: 0;
min-height: 26px;
align-items: center;
gap: 5px;
border-radius: var(--radius-sm);
/* Same inline geometry as a tool row's header: the icon and label sit on the
prose edge, while the hover fill bleeds 4px into the gutter. */
margin: 0 -4px;
padding: 2px 4px;
color: var(--ds-text-secondary);
font-size: var(--text-sm-plus);
text-align: left;
}
.tool-activity-header:hover {
background: var(--ds-bg-hover);
color: var(--ds-text-primary);
}
.tool-activity-icon {
display: inline-flex;
flex: none;
color: var(--ds-text-muted);
}
/* Long labels ellipsize inside the band-wide header instead of overrunning it. */
.tool-activity-label {
min-width: 0;
flex: 0 1 auto;
overflow: hidden;
font-weight: var(--font-weight-medium);
text-overflow: ellipsis;
white-space: nowrap;
}
.tool-activity-count {
min-width: 0;
overflow: hidden;
color: var(--ds-text-muted);
font-size: var(--text-xs-plus);
text-overflow: ellipsis;
white-space: nowrap;
}
/*
* The operation count beside a group label never truncates: the composition
* phrase ellipsizes first, because "12 次操作" is the part that has to survive a
* narrow band (see `.tool-activity-label`).
*/
.tool-activity-count.tool-activity-ops {
flex: none;
}
/* The caret closes the row, so a short label keeps it at the trailing edge. */
.tool-activity-caret {
display: inline-flex;
flex: none;
margin-inline-start: auto;
color: var(--ds-text-muted);
opacity: 0.65;
transition: transform var(--motion-duration-fast) var(--motion-ease-out);
}
.tool-activity-group.open > .tool-activity-header > .tool-activity-caret {
transform: rotate(90deg);
}
.tool-activity-collapse {
display: grid;
grid-template-rows: 0fr;
opacity: 0;
transition: grid-template-rows var(--motion-duration-normal) var(--motion-ease-out),
opacity var(--motion-duration-fast) var(--motion-ease-out);
}
.tool-activity-group.open > .tool-activity-collapse {
grid-template-rows: 1fr;
opacity: 1;
}
.tool-activity-collapse-inner {
min-height: 0;
overflow: hidden;
/* This scroller's padding box is the clip edge, and overflow-clip-margin
does not apply to scroll containers, so a run row's 4px hover-fill
overhang is given layout room instead. The negative margin keeps the
content box — and therefore every row inside — the size it was. */
padding-right: 8px;
margin-right: -8px;
}
.tool-activity-body {
position: relative;
margin: 3px 0 6px 7px;
padding: 2px 0 2px 12px;
}
/*
* Parallel Task calls become one compact, truthful topology. The runtime only
* supports one delegation level, so the canvas connects the main agent to a
* flat list instead of implying dependencies between delegates (ADR 0062).
*/
.tool-activity-group.has-subagents {
container: subagent-activity / inline-size;
overflow: hidden;
border-radius: var(--radius-md-plus);
background: var(--ds-tile);
}
/* The subagent card only re-dresses the shared header row: its material is the
card itself, so the row loses the radius and the bleed. */
.tool-activity-group.has-subagents .tool-activity-header {
min-height: 42px;
margin: 0;
border-radius: 0;
padding: 10px 16px;
}
.subagent-activity-metrics {
min-width: 0;
overflow: hidden;
color: var(--ds-text-muted);
font-family: var(--font-mono);
font-size: var(--text-xs);
line-height: var(--leading-normal);
overflow-wrap: anywhere;
text-overflow: clip;
white-space: normal;
}
.tool-activity-group.has-subagents .tool-activity-body {
margin: 0;
border-left: 0;
padding: 0;
}
/*
* Parent thinking/tool rows must not sit on the tile's edge if they still share
* this card (D319 splits them out; this is the remaining inset).
*/
.tool-activity-group.has-subagents .tool-activity-body > .tool-row {
margin-right: 16px;
margin-left: 16px;
}
.tool-activity-group.has-subagents .tool-activity-body > .tool-row:last-child {
margin-bottom: 12px;
}
/* Nodes are raised tiles on the group's tile; connectors are tinted 2px bars
rather than hairlines, and the dotted canvas is gone (D297). */
.subagent-topology {
--subagent-node-gap: 10px;
display: grid;
min-width: 0;
grid-template-columns: minmax(138px, 0.58fr) 34px minmax(248px, 1.42fr);
align-items: center;
padding: 8px 16px 16px;
}
.subagent-topology-root {
display: flex;
min-width: 0;
min-height: 72px;
align-items: flex-start;
gap: 9px;
border-radius: var(--radius-md);
background: var(--ds-raised);
padding: 11px;
box-shadow: var(--ds-raised-shadow);
}
.subagent-topology-root-icon,
.subagent-topology-avatar {
position: relative;
display: inline-flex;
width: 28px;
height: 28px;
flex: none;
align-items: center;
justify-content: center;
border-radius: var(--radius-round);
background: var(--ds-bg-active);
color: var(--ds-text-secondary);
}
.subagent-topology-root-copy,
.subagent-topology-node-copy {
display: flex;
min-width: 0;
flex: 1;
flex-direction: column;
}
.subagent-topology-root-copy strong {
overflow: hidden;
color: var(--ds-text-primary);
font-size: var(--text-sm-plus);
font-weight: var(--font-weight-semibold);
text-overflow: ellipsis;
white-space: nowrap;
}
.subagent-topology-root-copy > span {
margin-top: 4px;
color: var(--ds-text-muted);
font-size: var(--text-xs);
line-height: var(--leading-normal);
}
.subagent-topology-connector {
height: 2px;
border-radius: var(--radius-full);
background: var(--ds-tile-deep);
}
.subagent-topology-agents {
position: relative;
display: grid;
min-width: 0;
gap: var(--subagent-node-gap);
padding-left: 14px;
}
.subagent-topology-node {
position: relative;
min-width: 0;
margin: 0;
border-radius: var(--radius-md);
background: var(--ds-raised);
box-shadow: var(--ds-raised-shadow);
}
.subagent-topology-node::before {
position: absolute;
top: calc(50% - 1px);
right: 100%;
width: 14px;
height: 2px;
background: var(--ds-tile-deep);
content: "";
}
.subagent-topology-agents > .subagent-topology-node {
margin: 0;
}
/* Each card contributes a stem segment; only the outer ends stop at centers. */
.subagent-topology-node::after {
position: absolute;
top: calc(var(--subagent-node-gap) / -2);
bottom: calc(var(--subagent-node-gap) / -2);
left: -14px;
width: 2px;
background: var(--ds-tile-deep);
content: "";
}
.subagent-topology-node:first-child::after {
top: 50%;
}
.subagent-topology-node:last-child::after {
bottom: 50%;
}
.subagent-stop-button {
display: inline-flex;
flex: none;
align-items: center;
gap: 5px;
white-space: nowrap;
}
.subagent-activity-header {
display: flex;
align-items: center;
padding-right: 10px;
}
.subagent-activity-header > .tool-activity-header {
flex: 1;
}
.tool-activity-group.open > .subagent-activity-header > .tool-activity-header > .tool-activity-caret {
transform: rotate(90deg);
}
.subagent-topology-node-actions {
position: relative;
}
.subagent-topology-node-actions > .subagent-stop-button {
position: absolute;
right: 10px;
bottom: 10px;
}
.subagent-topology-node-actions:has(> .subagent-stop-button) .subagent-topology-node-header {
min-height: 88px;
}
.subagent-topology-node-actions:has(> .subagent-stop-button) :is(.subagent-topology-node-summary, .subagent-topology-node-steps) {
padding-right: 100px;
}
.subagent-topology-node-header {
display: flex;
width: 100%;
min-width: 0;
min-height: 70px;
align-items: flex-start;
gap: 9px;
border-radius: inherit;
padding: 10px;
color: var(--ds-text-secondary);
text-align: left;
}
.subagent-topology-node-header:hover {
background: var(--ds-bg-hover);
}
.subagent-topology-node-header:disabled {
cursor: default;
}
.subagent-topology-node-header:focus-visible {
outline: 2px solid color-mix(in oklab, var(--ds-accent) 58%, transparent);
outline-offset: -2px;
}
.subagent-topology-status-icon {
position: absolute;
right: -3px;
bottom: -2px;
display: inline-flex;
width: 13px;
height: 13px;
align-items: center;
justify-content: center;
/* Knockout ring in the node's own surface colour, not a divider. */
border: 2px solid var(--ds-raised);
border-radius: var(--radius-round);
background: var(--ds-text-muted);
color: var(--ds-bg-primary);
}
.subagent-topology-status-icon > span {
width: 5px;
height: 5px;
border-radius: var(--radius-round);
background: currentColor;
}
.subagent-topology-node.outcome-completed .subagent-topology-status-icon {
background: var(--ds-success);
}
.subagent-topology-node.outcome-truncated .subagent-topology-status-icon {
background: var(--ds-warning);
}
.subagent-topology-node.outcome-timed-out .subagent-topology-status-icon {
background: var(--ds-warning);
}
.subagent-topology-node.outcome-failed .subagent-topology-status-icon {
background: var(--ds-error);
}
.subagent-topology-node.outcome-aborted .subagent-topology-status-icon,
.subagent-topology-node.outcome-denied .subagent-topology-status-icon {
background: var(--ds-text-muted);
}
.subagent-topology-node.outcome-creating .subagent-topology-status-icon {
background: var(--ds-purple);
animation: subagent-creating-pulse 1.4s var(--motion-ease-standard) infinite;
}
.subagent-topology-node.outcome-creating .subagent-topology-node-status {
color: var(--ds-purple);
}
@keyframes subagent-creating-pulse {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.4;
}
}
@media (prefers-reduced-motion: reduce) {
.subagent-topology-node.outcome-creating .subagent-topology-status-icon {
animation: none;
}
}
.subagent-topology-node-title-row {
display: flex;
min-width: 0;
flex-wrap: wrap;
align-items: baseline;
gap: 3px 8px;
}
.subagent-topology-node-title {
min-width: 0;
flex: 1 1 12ch;
overflow: hidden;
color: var(--ds-text-primary);
display: -webkit-box;
font-size: var(--text-sm-plus);
font-weight: var(--font-weight-semibold);
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow-wrap: anywhere;
text-overflow: clip;
white-space: normal;
word-break: break-word;
}
.subagent-topology-node-model {
display: inline-flex;
min-width: 0;
max-width: 100%;
flex: 0 1 auto;
color: var(--ds-text-muted);
font-family: var(--font-mono);
font-size: var(--text-2xs);
white-space: nowrap;
}
.subagent-topology-node-model-name {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.subagent-topology-node-thinking {
flex: none;
white-space: pre;
}
.subagent-topology-node-status {
flex: none;
color: var(--ds-text-muted);
font-family: var(--font-mono);
font-size: var(--text-2xs);
white-space: nowrap;
}
.subagent-topology-node-summary {
display: -webkit-box;
min-width: 0;
overflow: hidden;
color: var(--ds-text-muted);
font-size: var(--text-xs);
line-height: var(--leading-normal);
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow-wrap: anywhere;
text-overflow: clip;
white-space: normal;
word-break: break-word;
}
.subagent-topology-node-summary {
margin-top: 4px;
}
.subagent-topology-node-steps {
min-width: 0;
overflow-wrap: anywhere;
white-space: normal;
word-break: break-word;
margin-top: 3px;
font-family: var(--font-mono);
font-size: var(--text-2xs);
line-height: var(--leading-normal);
}
.subagent-topology-node > .tool-row-body,
.subagent-topology-node > .subagent-run {
margin-right: 10px;
margin-left: 38px;
}
.subagent-topology-node.open {
box-shadow:
var(--ds-raised-shadow),
0 0 0 2px color-mix(in oklab, var(--ds-accent) 22%, transparent);
}
@container subagent-activity (max-width: 520px) {
.tool-activity-group.has-subagents .tool-activity-header {
flex-wrap: wrap;
}
.subagent-activity-metrics {
order: 3;
width: calc(100% - 24px);
margin-left: 20px;
}
.subagent-topology {
grid-template-columns: minmax(0, 1fr);
}
.subagent-topology-connector {
width: 2px;
height: 18px;
margin-left: 14px;
}
.subagent-topology-agents {
padding-left: 28px;
}
.subagent-topology-node:first-child::after {
top: 0;
}
.subagent-topology-node::before {
width: 14px;
}
}
/* A tool row claims the conversation column whatever its parent displays as:
the disclosure header is the row's only width-bearing box. */
.tool-row {
width: 100%;
min-width: 0;
margin: 3px 0;
}
.tool-row-header {
display: flex;
width: 100%;
min-width: 0;
align-items: center;
min-height: 24px;
gap: 4px;
margin: 0 -4px;
padding: 2px 4px;
border-radius: var(--radius-sm);
color: var(--ds-text-secondary);
font-size: var(--text-sm-plus);
text-align: left;
}
.tool-row-header:disabled {
cursor: default;
}
/*
* A run row's head carries three controls: the disclosure, a copy of the
* command the body no longer repeats, and the caret (D226). The hover fill
* belongs to the head so it does not stop short under those controls.
*/
.tool-row-head.is-run {
display: flex;
min-width: 0;
align-items: center;
gap: 2px;
margin: 0 -4px;
padding: 0 4px;
border-radius: var(--radius-sm);
}
.tool-row-head.is-run .tool-row-header {
width: auto;
flex: 1;
margin: 0;
padding: 2px 0;
}
/* Leaf commands sit one step below the turn and group titles. */
.tool-row-head.is-run .tool-row-name {
font-size: var(--text-sm);
}
.tool-row-head.is-run .tool-row-header:hover {
background: transparent;
}
.tool-row-head.is-run:has(.tool-row-header:not(:disabled)):hover {
background: var(--ds-bg-hover);
}
.tool-row-head.is-run:has(.tool-row-header:not(:disabled)):hover
.tool-row-name {
color: var(--ds-text-primary);
}
.tool-row-head-copy {
display: inline-flex;
width: 20px;
height: 20px;
flex: none;
align-items: center;
justify-content: center;
border-radius: var(--radius-xs);
color: var(--ds-text-muted);
opacity: 0;
transition: opacity var(--motion-duration-fast) var(--motion-ease-out);
}
/* Focus reveals it too: a control that can be tabbed to must be visible. */
.tool-row:hover .tool-row-head-copy,
.tool-row.open .tool-row-head-copy,
.tool-row-head-copy:focus-visible,
.tool-row-head-copy.copied {
opacity: 1;
}
.tool-row-head-copy:hover,
.tool-row-head-copy.copied {
background: var(--ds-bg-hover);
color: var(--ds-text-primary);
}
.tool-row-head-copy.copied {
color: var(--ds-success);
}
.tool-row-caret.is-toggle {
display: inline-flex;
width: 20px;
height: 20px;
align-items: center;
justify-content: center;
margin-left: 0;
border-radius: var(--radius-xs);
}
.tool-row-caret.is-toggle:hover {
background: var(--ds-bg-hover);
color: var(--ds-text-primary);
}
/* A run row states its outcome next to the caret, success included. */
.tool-row-state {
display: inline-flex;
flex: none;
align-items: center;
gap: 5px;
margin-left: auto;
padding-left: 4px;
color: var(--ds-text-muted);
font-size: var(--text-xs);
white-space: nowrap;
}
.tool-row-state.is-error {
color: var(--ds-error);
}
.tool-row-state-dot {
width: 6px;
height: 6px;
flex: none;
border-radius: var(--radius-round);
background: var(--ds-text-faint);
}
.tool-row-state.is-done .tool-row-state-dot {
background: var(--ds-success);
}
.tool-row-state.is-error .tool-row-state-dot {
background: var(--ds-error);
}
.tool-row-state.is-running .tool-row-state-dot {
background: var(--ds-text-secondary);
animation: tool-row-state-pulse 1.1s ease-in-out infinite;
}
@keyframes tool-row-state-pulse {
0%,
100% {
opacity: 0.35;
}
50% {
opacity: 1;
}
}
@media (prefers-reduced-motion: reduce) {
.tool-row-state.is-running .tool-row-state-dot {
animation: none;
}
.tool-row-head-copy {
transition: none;
}
}
.tool-row-header:hover {
background: var(--ds-bg-hover);
color: var(--ds-text-primary);
}
.tool-row-header:disabled:hover {
background: transparent;
}
.tool-row-icon {
display: inline-flex;
flex: none;
color: var(--ds-text-muted);
}
/* A lifecycle row is a subagent row (D268): it carries the same accent the
topology node's avatar uses, so scanning the transcript groups it with the
Task card it reports on rather than with the file tools around it. */
.tool-row-icon.is-subagent {
color: var(--ds-accent);
}
.tool-row-caret {
display: inline-flex;
flex: none;
margin-left: 2px;
color: var(--ds-text-muted);
opacity: 0.65;
transition: transform var(--motion-duration-fast) var(--motion-ease-out);
}
.tool-row:hover .tool-row-caret,
.tool-row-header:focus-visible .tool-row-caret,
/* A run row's caret is a sibling of its header, not a child of it. */
.tool-row-header:focus-visible ~ .tool-row-caret,
.tool-row.open .tool-row-caret {
opacity: 1;
}
.tool-row.open > .tool-row-header > .tool-row-caret,
.tool-row.open > .tool-row-head > .tool-row-header > .tool-row-caret,
.tool-row.open > .tool-row-head > .tool-row-caret {
transform: rotate(90deg);
}
.tool-row-name {
flex: none;
font-weight: var(--font-weight-medium);
color: var(--ds-text-secondary);
}
.tool-row-header:hover .tool-row-name {
color: var(--ds-text-primary);
}
/* Which delegate a `Task` row handed the work to (ADR 0060). */
.tool-row-agent {
flex: none;
border-radius: var(--radius-xs);
padding: 0 5px;
background: var(--ds-tile-deep);
color: var(--ds-text-secondary);
font-size: var(--text-2xs);
line-height: var(--leading-row);
white-space: nowrap;
}
/* A fan-out count is lighter than a named delegate. */
.tool-row-agent.is-count {
background: var(--ds-tile);
}
.tool-row-summary {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: var(--font-mono);
font-size: var(--text-xs-plus);
color: var(--ds-text-muted);
}
.tool-row-status {
display: inline-flex;
flex: none;
align-items: center;
gap: 4px;
margin-left: auto;
font-size: var(--text-xs);
color: var(--ds-text-muted);
}
.tool-row-status.error {
color: var(--ds-error);
}
.tool-spinner {
flex: none;
width: 11px;
height: 11px;
margin-left: auto;
border-radius: var(--radius-round);
border: 1.5px solid var(--ds-border-default);
border-top-color: var(--ds-text-secondary);
animation: spin 0.8s linear infinite;
}
.tool-row-body {
position: relative;
margin: 4px 0 6px 24px;
padding: 4px 0 8px 12px;
color: var(--ds-text-secondary);
}
/* Tool details stay in the tool row's level rather than adding a second inset. */
.tool-row:not(.thinking):not(.subagent-topology-node) > .tool-row-body {
margin-left: 0;
padding-left: 0;
}
.disclosure-collapse-rail {
position: absolute;
inset-block: 0;
left: -8px;
width: 16px;
min-width: 16px;
border: 0;
border-radius: var(--radius-xs);
background: transparent;
padding: 0;
cursor: pointer;
}
/* The collapse rail draws nothing at rest (D297): indentation alone marks the
body. Hovering or focusing the strip reveals a 2px bar as the affordance. */
.disclosure-collapse-rail::before {
position: absolute;
inset-block: 0;
left: calc(50% - 1px);
width: 2px;
border-radius: var(--radius-full);
background: transparent;
content: "";
transition: background-color var(--motion-duration-fast) var(--motion-ease-out);
}
.disclosure-collapse-rail:hover::before,
.disclosure-collapse-rail:focus-visible::before {
background: var(--ds-text-muted);
}
.disclosure-collapse-rail:focus-visible {
outline: 2px solid color-mix(in oklab, var(--ds-accent) 58%, transparent);
outline-offset: -2px;
}
/* The turn body carries no content indent, so its rail keeps the outer lane.
A grouped body indents its child rows by 12px, and its rail sits in that
gutter; expanding a group never puts two hit targets on the same pixels.
Tool-row detail rails keep their tighter inset. */
.turn-process-body > .disclosure-collapse-rail {
left: -32px;
width: 14px;
min-width: 14px;
}
.process-activity-body > .disclosure-collapse-rail {
left: -12px;
width: 14px;
min-width: 14px;
}
/* Keep the visible bar next to the content while the hit target extends into
the gutter. */
.turn-process-body > .disclosure-collapse-rail::before,
.process-activity-body > .disclosure-collapse-rail::before {
right: 0;
left: auto;
}
/*
* What a delegate did, one level inside its `Task` row. The tile marks the
* boundary: everything inside it happened in the delegate's own context.
*/
.subagent-run {
position: relative;
min-width: 0;
margin: 2px 0 8px 24px;
border-radius: var(--radius-md);
background: var(--ds-tile);
padding: 6px 10px 8px 12px;
}
/*
* Positions the nested jump-to-latest control over the bounded scroller
* without putting overflow on `.subagent-run` (that would clip the collapse
* rail; D271).
*/
.subagent-run-follow {
position: relative;
min-width: 0;
}
/*
* A delegate's whole run is nested inside the parent's transcript, so an
* `explorer` that made forty tool calls would otherwise add forty rows to the
* page the moment its node is expanded — the reader loses their place and the
* parent's own next row is pushed out of view. The rows scroll in place
* instead, tall enough to read several at once and capped against the viewport
* so a short window does not turn the run into a slit.
*
* The scroll sits on this wrapper rather than on `.subagent-run` because the
* collapse rail is absolutely positioned at `left: -8px`, outside the padding
* box: an `overflow` on the parent would clip the rail away. Pinned-follow
* (D302) drives the scroll position; native anchoring would fight it.
*/
.subagent-run-rows {
max-height: min(420px, 48vh);
max-height: min(420px, 48dvh);
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior-y: contain;
scrollbar-gutter: stable;
overflow-anchor: none;
}
.subagent-run-follow > .jump-latest-btn {
bottom: 8px;
z-index: 1;
}
.subagent-run-rows.is-panel-flow {
max-height: none;
overflow: visible;
overscroll-behavior: auto;
scrollbar-gutter: auto;
overflow-anchor: auto;
}
.subagent-run-rows:focus-visible {
outline: 2px solid color-mix(in oklab, var(--ds-accent) 58%, transparent);
outline-offset: 2px;
border-radius: var(--radius-sm);
}
/* The heading sits outside the scroll area, so it already stays with the run
and needs no sticky positioning: the attribution can never scroll away from
the rows it labels. */
.subagent-run-heading {
display: flex;
min-height: 22px;
align-items: center;
gap: 5px;
color: var(--ds-text-muted);
font-size: var(--text-xs);
font-weight: var(--font-weight-medium);
}
.subagent-run-count {
margin-inline-start: auto;
font-family: var(--font-mono);
font-size: var(--text-2xs);
font-weight: var(--font-weight-normal);
}
/* The delegate's own prose, including the report it hands back. */
.subagent-answer {
margin: 4px 0;
color: var(--ds-text-secondary);
font-size: var(--text-sm-plus);
}
/* Collapsed-row outcome badges: exit code, hit counts, truncation. */
.tool-row-chips {
display: inline-flex;
flex: none;
align-items: center;
gap: 4px;
}
.tool-chip {
display: inline-flex;
align-items: center;
border-radius: var(--radius-xs);
padding: 0 5px;
background: var(--ds-tile-deep);
color: var(--ds-text-muted);
font-family: var(--font-mono);
font-size: var(--text-2xs);
line-height: var(--leading-row);
white-space: nowrap;
}
.tool-chip.is-error {
background: color-mix(in oklab, var(--ds-error) 12%, transparent);
color: var(--ds-error);
}
.tool-block + .tool-block {
margin-top: 10px;
}
.tool-row-section-head {
display: flex;
min-height: 22px;
align-items: center;
justify-content: space-between;
padding: 0 2px 4px;
color: var(--ds-text-muted);
font-size: var(--text-xs);
font-weight: var(--font-weight-medium);
}
.tool-row-copy {
display: inline-flex;
width: 22px;
height: 22px;
align-items: center;
justify-content: center;
border-radius: var(--radius-xs);
color: var(--ds-text-muted);
}
.tool-row-copy:hover,
.tool-row-copy.copied {
background: var(--ds-bg-hover);
color: var(--ds-text-primary);
}
.tool-row-content {
max-height: 260px;
margin: 0;
overflow: auto;
border-radius: var(--radius-md);
background: var(--ds-tool-row-bg);
padding: 10px 12px;
color: var(--ds-text-secondary);
font-family: var(--font-mono);
font-size: var(--text-sm);
line-height: var(--leading-relaxed);
white-space: pre-wrap;
word-break: break-word;
}
.large-text-preview-controls {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 6px;
margin-bottom: 4px;
}
.large-text-preview-status {
color: var(--ds-text-muted);
font-size: var(--text-xs);
font-variant-numeric: tabular-nums;
}
.tool-row-content.is-error {
background: color-mix(in oklab, var(--ds-error) 7%, transparent);
color: color-mix(in oklab, var(--ds-error) 72%, var(--ds-text-primary));
}
/*
* A run row's body is the output itself (D227): the heading, the frame and the
* fill are gone, so what is left reads like the terminal it came from. The
* height cap stays — a thousand-line build must not push the rest of the
* transcript out of reach — and stderr keeps its tint, with the channel name
* carried for screen readers instead of by a visible heading.
*/
.tool-block.is-plain + .tool-block.is-plain {
margin-top: 6px;
}
.tool-block.is-plain .tool-row-content {
border: 0;
border-radius: 0;
background: transparent;
padding: 0;
}
/* Edit diffs: a soft tile inside the tool body; add/del read from the line
tints alone, with no gutter bars (D297). */
.tool-diff {
overflow: hidden;
border-radius: var(--radius-md);
background: var(--ds-tile);
}
.tool-diff .diff-line {
font-size: var(--text-sm);
}
.tool-diff .diff-line.add {
background: color-mix(in oklab, var(--ds-success) 14%, transparent);
}
.tool-diff .diff-line.del {
background: color-mix(in oklab, var(--ds-error) 14%, transparent);
}
.tool-diff .diff-line-text {
padding-block: 2px;
}
.tool-file-list,
.tool-match-list {
display: flex;
max-height: 260px;
flex-direction: column;
overflow: auto;
border-radius: var(--radius-md);
background: var(--ds-tile);
padding: 6px 4px;
gap: 1px;
}
/*
* Linked paths are <button>s stretched by the column flex list. Chromium's
* anonymous button box then justifies the label glyphs across the row
* unless the control is a block box, same as `.tool-match-path`.
*/
.tool-file-item {
display: block;
flex: none;
width: 100%;
min-width: 0;
overflow: hidden;
appearance: none;
-webkit-appearance: none;
border-radius: var(--radius-3xs);
padding: 2px 8px;
color: var(--ds-text-secondary);
font-family: var(--font-mono);
font-size: var(--text-sm);
line-height: var(--leading-relaxed);
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
}
.tool-file-item.is-linked:hover,
.tool-match-path.is-linked:hover {
background: var(--ds-bg-hover);
color: var(--ds-text-primary);
text-decoration: underline;
}
.tool-match-group + .tool-match-group {
margin-top: 6px;
}
.tool-match-path {
display: block;
width: 100%;
overflow: hidden;
border-radius: var(--radius-3xs);
padding: 2px 8px;
color: var(--ds-text-muted);
font-family: var(--font-mono);
font-size: var(--text-xs-plus);
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
}
.tool-match-line {
display: flex;
min-width: 0;
align-items: baseline;
gap: 8px;
padding: 1px 8px;
}
.tool-match-line-no {
flex: none;
min-width: 28px;
color: var(--ds-text-muted);
font-family: var(--font-mono);
font-size: var(--text-xs);
text-align: right;
user-select: none;
}
.tool-match-line-text {
min-width: 0;
color: var(--ds-text-secondary);
font-family: var(--font-mono);
font-size: var(--text-sm);
line-height: var(--leading-relaxed);
overflow-wrap: anywhere;
white-space: pre-wrap;
}
.tool-asktool-results {
display: grid;
max-height: 260px;
margin: 0;
overflow: auto;
overscroll-behavior-y: contain;
border-radius: var(--radius-md);
background: var(--ds-tile);
padding: 10px 12px;
gap: 10px;
scrollbar-gutter: stable;
}
.tool-asktool-entry + .tool-asktool-entry {
border-top: 1px solid var(--ds-border-subtle);
padding-top: 10px;
}
.tool-asktool-question {
display: flex;
flex-direction: column;
gap: 4px;
margin: 0;
}
.tool-asktool-question-number,
.tool-asktool-answer-label {
color: var(--ds-text-muted);
font-size: var(--text-xs);
font-weight: var(--font-weight-medium);
}
.tool-asktool-question-copy {
color: var(--ds-text-primary);
font-size: var(--text-sm);
font-weight: var(--font-weight-medium);
line-height: var(--leading-normal);
overflow-wrap: anywhere;
}
.tool-asktool-answer {
display: flex;
align-items: baseline;
gap: 8px;
margin: 6px 0 0;
}
.tool-asktool-answer-label {
flex: none;
}
.tool-asktool-answer-values {
display: flex;
min-width: 0;
flex-wrap: wrap;
align-items: baseline;
gap: 4px 6px;
}
.tool-asktool-answer-value {
display: inline-flex;
max-width: 100%;
border-radius: var(--radius-sm);
background: var(--ds-tile-deep);
padding: 3px 7px;
color: var(--ds-text-secondary);
overflow-wrap: anywhere;
}
.tool-asktool-skipped {
color: var(--ds-text-muted);
font-style: italic;
}
/* Scalar payload entries (plugin tools, argument previews). Bounded like every
other detail block (`.tool-row-content`, `.tool-file-list`): a roster of ten
delegates or a payload with thirty fields must not push the reading position
down the page. */
.tool-fields {
display: grid;
max-height: 260px;
margin: 0;
overflow: auto;
overscroll-behavior-y: contain;
border-radius: var(--radius-md);
background: var(--ds-tile);
padding: 6px 10px;
gap: 2px;
scrollbar-gutter: stable;
}
.tool-field {
display: flex;
min-width: 0;
align-items: baseline;
gap: 10px;
}
.tool-field-label {
flex: none;
max-width: 40%;
overflow: hidden;
color: var(--ds-text-muted);
font-size: var(--text-xs-plus);
text-overflow: ellipsis;
white-space: nowrap;
}
.tool-field-value {
min-width: 0;
flex: 1;
margin: 0;
color: var(--ds-text-secondary);
font-family: var(--font-mono);
font-size: var(--text-sm);
line-height: var(--leading-relaxed);
overflow-wrap: anywhere;
}
.tool-note {
display: flex;
align-items: baseline;
gap: 6px;
border-radius: var(--radius-md);
background: var(--ds-tile);
padding: 8px 10px;
color: var(--ds-text-secondary);
font-size: var(--text-sm);
line-height: var(--leading-relaxed);
}
.tool-note.is-error {
background: color-mix(in oklab, var(--ds-error) 7%, transparent);
color: var(--ds-error);
}
.tool-note-text {
min-width: 0;
overflow-wrap: anywhere;
}
.tool-block-more {
padding: 4px 2px 0;
color: var(--ds-text-muted);
font-size: var(--text-xs);
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Search navigation uses the original message tree and its rendered text. */
.message-row.transcript-search-target {
content-visibility: visible;
}
::highlight(transcript-search) {
color: var(--ds-text-primary);
background-color: color-mix(in srgb, var(--ds-accent) 35%, transparent);
}
.transcript-search-source-match {
background-color: color-mix(in srgb, var(--ds-accent) 25%, transparent);
outline: 2px solid color-mix(in srgb, var(--ds-accent) 65%, transparent);
outline-offset: 2px;
}
.transcript-load-later {
display: block;
margin: 16px auto;
padding: 8px 12px;
color: var(--ds-text-muted);
border-radius: var(--radius-md);
background: var(--ds-bg-elevated-opaque);
}
.transcript-navigation-loading {
position: absolute;
top: 12px;
left: 50%;
transform: translateX(-50%);
padding: 6px 12px;
border-radius: var(--radius-md);
background: var(--ds-bg-elevated-opaque);
color: var(--ds-text-muted);
font-size: var(--text-xs);
}
/* Process, activity groups and item details own independent disclosure levels. */
.turn-process {
width: 100%;
margin: 0 0 8px;
min-width: 0;
}
/*
* The top-level fold is a hairline row, not a hover chip. Status, duration,
* tool count and the caret form one left-aligned run, so the disclosure
* indicator trails the metadata instead of being pushed to the far edge of the
* band. Hover only strengthens the ink; no background fill is involved.
*/
.turn-process > .tool-activity-header {
margin: 0;
border-radius: 0;
border-bottom: 1px solid var(--ds-border-subtle);
padding: 4px 0 8px;
}
.turn-process > .tool-activity-header:hover {
background: transparent;
color: var(--ds-text-primary);
}
.turn-process > .tool-activity-header:hover .tool-activity-icon,
.turn-process > .tool-activity-header:hover .tool-activity-label,
.turn-process > .tool-activity-header:hover .turn-duration,
.turn-process > .tool-activity-header:hover .tool-activity-count,
.turn-process > .tool-activity-header:hover .tool-activity-caret {
color: var(--ds-text-primary);
}
.turn-process > .tool-activity-header:hover .turn-sep {
color: var(--ds-text-secondary);
}
.turn-process > .tool-activity-header > .tool-activity-caret {
margin-inline-start: 0;
opacity: 0.8;
}
.turn-duration {
flex: none;
color: var(--ds-text-muted);
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.turn-sep {
flex: none;
color: var(--ds-text-faint);
}
.turn-process.open > .tool-activity-header > .tool-activity-caret,
.process-activity-group.open > .tool-activity-header > .tool-activity-caret {
transform: rotate(90deg);
}
.turn-process-body {
position: relative;
/* The turn's process and its group headers share one left edge. A nested
group restores the released v0.20.1 hierarchy below that header: its body
indents child rows by 12px and keeps the group's collapse rail in the
gutter, so the transcript never becomes an indenting staircase. */
padding-left: 0;
}
.turn-process-body[hidden],
.process-activity-body[hidden] {
display: none;
}
.turn-process-body > .assistant-turn-fragment {
color: var(--ds-text-secondary);
margin-block: 8px;
}
.process-activity-group {
width: 100%;
min-width: 0;
margin-block: 6px;
}
/* The turn's own title is the strongest level; a nested group is smaller and
quieter, while leaf run rows keep tool-row secondary text. Its body adds the
released 12px indent below the group header. */
.process-activity-group > .tool-activity-header {
color: var(--ds-text-muted);
font-size: var(--text-sm);
}
.process-activity-group > .tool-activity-header:hover {
color: var(--ds-text-primary);
}
.process-activity-body {
position: relative;
min-width: 0;
}
.process-activity-group.grouped > .process-activity-body {
margin-block: 3px 6px;
/* Child tool rows sit one 12px step inside the group header; the group's
collapse rail lives in that gutter. No further nesting level is added. */
padding-inline-start: 12px;
}
/* The nested process levels share the base header row: no level-specific
width, label or caret overrides are needed now that the row claims the
band itself (see `.tool-activity-header`). */
.thinking-compact {
display: flex;
align-items: center;
gap: 8px;
padding-block: 6px;
}
/* Provider-hosted web search round. The row reuses the tool-row idiom; only
* the body payload needs its own rules. */
.hosted-search-query {
margin: 2px 0 6px;
color: var(--ds-text-secondary);
font-size: var(--text-sm);
white-space: pre-wrap;
word-break: break-word;
}
.hosted-search-sources {
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-direction: column;
gap: 4px;
}
.hosted-search-sources a {
display: inline-flex;
align-items: baseline;
gap: 6px;
max-width: 100%;
min-width: 0;
color: var(--ds-text-primary);
font-size: var(--text-sm);
text-decoration: none;
}
.hosted-search-sources a:hover {
text-decoration: underline;
}
/* The title ellipsizes inside the row: an inline-flex anchor would otherwise
let a long source name push the host label past the band. */
.hosted-search-source-title {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hosted-search-source-host {
color: var(--ds-text-tertiary);
flex: none;
}
.hosted-search-more {
display: inline-block;
margin-top: 4px;
color: var(--ds-text-tertiary);
font-size: var(--text-sm);
}
/* ── Smooth streaming cursor and layout stabilization ── */
@keyframes smooth-stream-blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
.assistant-turn-fragment.streaming .prose-chat {
text-wrap: wrap;
}
.assistant-turn-fragment.smooth-cursor .prose-chat > :last-child:not(ul):not(ol):not(blockquote):not(pre):not(table):not(.table-wrap)::after,
.assistant-turn-fragment.smooth-cursor .prose-chat > :is(ul, ol):last-child li:last-child:not(:has(ul, ol)):not(:has(p))::after,
.assistant-turn-fragment.smooth-cursor .prose-chat > :is(ul, ol):last-child li:last-child > p:last-child::after,
.assistant-turn-fragment.smooth-cursor .prose-chat > blockquote:last-child > p:last-child::after,
.assistant-turn-fragment.smooth-cursor .prose-chat > pre:last-child > code::after {
content: "";
display: inline-block;
width: 2px;
height: 1.1em;
margin-left: 2px;
vertical-align: text-bottom;
background: var(--ds-text-primary);
animation: smooth-stream-blink 1s step-end infinite;
}
@media (prefers-reduced-motion: reduce) {
.assistant-turn-fragment.smooth-cursor .prose-chat > :last-child:not(ul):not(ol):not(blockquote):not(pre):not(table):not(.table-wrap)::after,
.assistant-turn-fragment.smooth-cursor .prose-chat > :is(ul, ol):last-child li:last-child:not(:has(ul, ol)):not(:has(p))::after,
.assistant-turn-fragment.smooth-cursor .prose-chat > :is(ul, ol):last-child li:last-child > p:last-child::after,
.assistant-turn-fragment.smooth-cursor .prose-chat > blockquote:last-child > p:last-child::after,
.assistant-turn-fragment.smooth-cursor .prose-chat > pre:last-child > code::after {
animation: none;
opacity: 0.7;
}
}
/* File-type identity is shared by native Review and the transcript summary. */
.review-file-type { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 14px; width: 14px; height: 14px; color: var(--ds-text-muted); }
.review-file-type > svg { display: block; width: 14px; height: 14px; }
.review-file-type.is-markdown { color: var(--ds-success); }
.review-file-type.is-json { color: var(--ds-warning); }
.review-file-type.is-code, .review-file-type.is-python { color: var(--ds-text-secondary); }
.turn-changes-row[data-rolled-back] .review-file-type { color: var(--ds-text-faint); }