Files
openidea/src/features/agents/Session.module.css
T
826e5837b1 feat(agents): chat-style conversation view with folded tool runs, tags, jump-to-latest and retract (#2067)
* feat(agents): chat-style conversation view with folded tool runs, tags, jump-to-latest and retract (#1980)

- Lay the conversation out as chat: user messages on the right, agent replies on the left, each with an author row, a card, actions in the header and a time/duration footer.
- Fold consecutive reasoning and finished tool calls into one collapsible 'Reasoning - N tool calls' row with +added / -removed counts; running tools stay expanded.
- Render @file and /skill references in message text as distinct tags.
- Load earlier entries in batches without moving the viewport, offer 'Jump to Latest' when scrolled away, and defer loading while the scrollbar is dragged.
- Add 'Retract Message': stop the agent, drop that turn and every later one, and put the original text/images back in the composer.
- Drop the catalog entry for the replaced duration tooltip.

* fix(agents): preserve conversation scrolling and retract state

---------

Co-authored-by: SunZhiQiang <[email protected]>
Co-authored-by: l0ng-ai <[email protected]>
2026-11-08 06:57:09 +08:00

1411 lines
27 KiB
CSS

.session {
flex: 1;
min-height: 0;
min-width: 0;
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
background: var(--bg-editor);
color: var(--fg);
}
.conversation {
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
border-right: 1px solid var(--border);
}
.conversation[hidden] {
display: none;
}
.docked {
grid-template-columns: minmax(0, 1fr);
overflow: hidden;
}
.docked .conversation {
border-right: 0;
}
.docked .changes {
width: auto;
}
.header {
display: flex;
align-items: center;
gap: 6px;
height: 32px;
padding: 0 6px 0 12px;
border-bottom: 1px solid var(--border);
flex: none;
min-width: 0;
overflow: hidden;
}
.header > * {
flex: none;
}
/* Shrinks ahead of the meters. */
.title {
flex: 0 1000 auto;
min-width: 0;
font-weight: 600;
color: var(--fg-strong);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.header > .headerSpacer {
flex: 1 1 0;
}
.providerIcon {
color: var(--fg-muted);
}
/* The task's state, just above the composer; the header keeps only the actions. */
.statusBar {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
padding: 0 2px;
color: var(--fg-subtle);
font-size: var(--fs-small);
}
.statusText {
flex: 1 1 0;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.muted {
color: var(--fg-subtle);
}
/* Pending permission: an editor notification banner. A long question (AskUserQuestion) wraps,
scrolling past a third of the height; the answers follow it, wrapping too. */
.banner {
flex: none;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 4px 8px;
min-height: 36px;
padding: 9px 12px;
background: var(--bg-feedback-warning);
border-bottom: 1px solid var(--border-feedback-warning);
color: var(--fg-strong);
}
.banner > svg {
flex: none;
margin-top: 1px;
}
.bannerText {
flex: 1 1 240px;
min-width: 0;
max-height: 33vh;
overflow-y: auto;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.bannerSpacer {
flex: 1;
}
.bannerActions {
display: flex;
flex-wrap: wrap;
gap: 4px 12px;
margin-left: auto;
}
.bannerLink {
flex: none;
padding: 0;
border: 0;
background: none;
color: var(--link);
font: inherit;
white-space: nowrap;
cursor: pointer;
}
.bannerLink:hover:not(:disabled) {
color: var(--link-hover);
text-decoration: underline;
}
.bannerLink:disabled {
color: var(--fg-subtle);
cursor: default;
}
/* The conversation with its find bar. */
.streamArea {
position: relative;
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
}
.stream {
flex: 1;
min-height: 0;
overflow: auto;
overflow-anchor: none;
padding: calc(var(--space-3) * 2) var(--space-4);
display: flex;
flex-direction: column;
}
/* Actual row heights keep WebKit's scrollbar and cross-message selections anchored. */
.stream > * {
flex: none;
width: 100%;
max-width: var(--agent-conversation-width);
margin-inline: auto;
box-sizing: border-box;
}
/* Messages keep room around them; the folded reasoning/tool rows sit close together. */
.stream > * + * {
margin-top: calc(var(--space-3) * 2);
}
.stream > * + .process {
margin-top: var(--space-2);
}
.stream > .process + * {
margin-top: var(--space-2);
}
.stream > .process + .process {
margin-top: 2px;
}
.stream:focus {
outline: none;
}
/* Scrolled up: one click back to the latest message, floating over the stream's end. */
.jumpToLatest {
position: absolute;
left: 50%;
bottom: var(--space-3);
transform: translateX(-50%);
z-index: 2;
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
padding: 0;
border: 1px solid var(--border-popup);
border-radius: 50%;
background: var(--bg-popup);
color: var(--fg);
box-shadow: var(--shadow-popup);
cursor: pointer;
}
.jumpToLatest:hover {
background: var(--bg-hover);
}
/* Your message with its actions, shown on hover. */
.message {
position: relative;
display: flex;
flex-direction: column;
align-items: stretch;
}
/* The author line, with the reply actions on its right; its height is always reserved. */
.messageHead {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 8px;
min-height: 24px;
margin-bottom: 3px;
}
.messageTime {
-webkit-user-select: none;
user-select: none;
color: var(--fg-subtle);
font-size: var(--fs-small);
white-space: nowrap;
}
.messageHead > .role {
margin-bottom: 0;
}
/* Chat layout: the user's messages sit on the right, the agent's on the left. */
.userMessage {
display: flex;
flex-direction: column;
align-items: flex-end;
}
.userMessage > .messageHead {
align-self: stretch;
justify-content: flex-end;
}
.userMessage > .user {
width: fit-content;
max-width: min(80%, 720px);
}
.userMessage > .messageFooter {
align-self: flex-end;
}
/* The actions and time below a message, in flow so they never cover the next entry. */
.messageFooter {
display: flex;
align-items: center;
gap: 8px;
min-height: 24px;
max-width: 100%;
flex-wrap: wrap;
}
/* The footer's icons stay visible: the time follows them, at the message's side. */
.messageFooter .messageActions {
margin-left: 0;
opacity: 1;
pointer-events: auto;
}
/* Who wrote the message, above its card. */
.role {
display: flex;
align-items: center;
gap: 5px;
margin-bottom: 3px;
color: var(--fg-subtle);
font-size: var(--fs-small);
-webkit-user-select: none;
user-select: none;
}
.agentMessage {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.agentMessage > .messageHead,
.agentCard {
max-width: min(80%, 760px);
}
.agentCard {
box-sizing: border-box;
width: fit-content;
min-width: 0;
overflow-wrap: anywhere;
padding: var(--space-2) var(--space-3);
border: 1px solid var(--border);
border-radius: var(--radius-popup);
background: var(--bg-elev);
}
.messageActions {
display: inline-flex;
gap: 4px;
margin-left: 8px;
opacity: 0;
pointer-events: none;
-webkit-user-select: none;
user-select: none;
}
.message:hover .messageActions,
.reply:hover .messageActions,
.agentMessage:hover .messageActions,
.agentMessage:focus-within .messageActions,
.message:focus-within .messageActions,
.reply:focus-within .messageActions,
.messageActions[data-copied],
.messageActions:focus-within {
opacity: 1;
pointer-events: auto;
}
.reply {
position: relative;
}
.replyFooter {
position: absolute;
top: 100%;
left: 0;
box-sizing: border-box;
display: flex;
min-height: 24px;
padding-top: 2px;
-webkit-user-select: none;
user-select: none;
}
.replyActions {
margin-left: 0;
}
@media (hover: none) {
.messageActions {
opacity: 1;
pointer-events: auto;
}
.replyFooter {
position: static;
margin-top: 4px;
opacity: 1;
pointer-events: auto;
}
}
.findBar {
flex: none;
display: flex;
align-items: center;
gap: 2px;
padding: 4px 8px;
border-bottom: 1px solid var(--border);
}
.findField {
flex: 1;
min-width: 0;
}
.findCount {
color: var(--fg-subtle);
font-size: var(--fs-small);
white-space: nowrap;
}
::highlight(agent-find) {
background-color: var(--bg-text-search-result);
}
::highlight(agent-find-current) {
background-color: var(--bg-text-search-result-current);
}
.user {
width: 100%;
box-sizing: border-box;
padding: var(--space-2) var(--space-3);
border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
border-radius: var(--radius-popup);
background: color-mix(in srgb, var(--accent) 12%, var(--bg-app));
color: var(--fg-strong);
line-height: 1.5;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.editMessage {
width: 100%;
box-sizing: border-box;
padding: 6px 8px;
resize: vertical;
font: inherit;
color: var(--fg-strong);
background: var(--bg-input);
border: 1px solid var(--accent);
border-radius: var(--radius-control);
outline: none;
}
.editBar {
display: flex;
align-items: center;
gap: 8px;
margin-top: 6px;
font-size: var(--fs-small);
}
.editButtons {
display: flex;
gap: 6px;
margin-left: auto;
}
.markdown {
line-height: 1.55;
overflow-wrap: anywhere;
}
.markdown :global(p) {
margin: 0 0 8px;
}
.markdown :global(p:last-child) {
margin-bottom: 0;
}
.markdown :global(code) {
font-family: var(--font-mono);
font-size: var(--fs-small);
padding: 0 4px;
border-radius: 3px;
background: var(--bg-elev);
}
.markdown :global(pre) {
margin: 0 0 8px;
padding: 8px 10px;
border-radius: var(--radius-small);
background: var(--bg-elev);
overflow: auto;
}
.markdown :global(pre code) {
display: block;
padding: 0;
background: none;
}
.codeBlock {
position: relative;
margin: 0 0 8px;
}
.codeBlock > :global(pre) {
margin: 0;
}
.codeCopy {
position: absolute;
top: 4px;
right: 4px;
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
padding: 0;
border: none;
border-radius: var(--radius-small);
background: var(--bg-elev);
color: var(--fg-secondary);
cursor: pointer;
opacity: 0;
-webkit-user-select: none;
user-select: none;
}
.codeBlock:hover > .codeCopy,
.markdown :global([data-mermaid]:hover) .codeCopy,
.codeCopy:focus-visible {
opacity: 1;
}
.codeCopy:hover {
background: var(--bg-hover);
}
/* Mermaid diagrams: the source stays until the diagram is drawn (and next to an
error), and the Copy button lives on the block — the drawn diagram hides the
code block that would otherwise carry it. */
.markdown :global([data-mermaid]) {
position: relative;
margin: 0 0 8px;
}
.markdown :global([data-mermaid] > pre) {
margin: 0;
}
.markdown :global([data-mermaid-state="ok"] > pre) {
display: none;
}
.markdown :global(.mermaid-output) {
overflow: hidden;
text-align: center;
}
.markdown :global([data-mermaid-state="error"] > .mermaid-output) {
margin-top: 6px;
padding: 6px 10px;
border-left: 3px solid var(--danger);
border-radius: var(--radius-small);
background: var(--bg-elev);
color: var(--danger);
font-family: var(--font-mono);
font-size: var(--fs-small);
text-align: left;
white-space: pre-wrap;
}
.fileLink {
color: var(--link);
cursor: pointer;
}
.fileLink:hover {
text-decoration: underline;
}
.markdown :global(ul),
.markdown :global(ol) {
margin: 0 0 8px;
padding-left: 20px;
}
.markdown :global(a) {
color: var(--link);
}
.markdown :global(table) {
display: block;
margin: 0 0 8px;
overflow: auto;
border-collapse: collapse;
}
.markdown :global(th),
.markdown :global(td) {
/* `overflow-wrap: anywhere` from .markdown would otherwise squeeze a column to a few letters. */
min-width: 6em;
border: 1px solid var(--border);
padding: 4px 8px;
}
.markdown :global(h1),
.markdown :global(h2),
.markdown :global(h3),
.markdown :global(h4),
.markdown :global(h5),
.markdown :global(h6) {
margin: 12px 0 6px;
color: var(--fg-strong);
font-size: 1em;
line-height: 1.3;
}
.markdown :global(h1) {
font-size: 1.15em;
}
.markdown :global(h2) {
font-size: 1.08em;
}
.markdown :global(blockquote) {
margin: 0 0 8px;
padding: 0 10px;
border-left: 3px solid var(--border-strong);
color: var(--fg-secondary);
}
.markdown :global(hr) {
margin: 8px 0;
border: 0;
border-top: 1px solid var(--border);
}
.markdown :global(img) {
max-width: 100%;
}
.markdown :global(li:has(> input[type="checkbox"])) {
margin-left: -20px;
list-style: none;
}
.markdown > :global(:first-child) {
margin-top: 0;
}
.markdown > :global(:last-child) {
margin-bottom: 0;
}
.thought summary,
.toolDetails > summary {
cursor: pointer;
list-style: none;
}
.thought summary::-webkit-details-marker,
.toolDetails > summary::-webkit-details-marker {
display: none;
}
.thought summary {
display: flex;
align-items: center;
gap: 4px;
width: fit-content;
color: var(--fg-muted);
font-size: var(--fs-small);
-webkit-user-select: none;
user-select: none;
}
.thought summary:hover {
color: var(--fg);
}
.thoughtChevron {
flex: none;
}
.thought[open] .thoughtChevron {
transform: rotate(90deg);
}
.thoughtBody {
margin-top: var(--space-2);
color: var(--fg-secondary);
}
.thoughtText {
margin-top: 4px;
padding-left: 10px;
border-left: 2px solid var(--border-strong);
color: var(--fg-secondary);
white-space: pre-wrap;
}
.tool {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
padding: 2px 8px;
margin-left: -8px;
border-radius: var(--radius-row);
color: var(--fg-secondary);
width: fit-content;
max-width: 100%;
}
.toolDetails > summary.tool:hover {
background: var(--bg-hover);
color: var(--fg);
}
.toolTitle {
font-family: var(--font-mono);
font-size: var(--fs-small);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.toolDiff {
font: inherit;
font-size: var(--fs-small);
border: 0;
background: none;
padding: 0 4px;
border-radius: var(--radius-small);
cursor: pointer;
white-space: nowrap;
}
.toolDiff:hover {
background: var(--bg-hover);
}
/* Reasoning and tool calls between messages, folded as one block per turn. */
.processRun > summary {
cursor: pointer;
list-style: none;
}
.processRun > summary::-webkit-details-marker {
display: none;
}
.processSummary {
display: flex;
align-items: center;
gap: 6px;
width: fit-content;
max-width: 100%;
padding: 2px 8px;
margin-left: -8px;
border-radius: var(--radius-row);
color: var(--fg-muted);
font-size: var(--fs-small);
-webkit-user-select: none;
user-select: none;
}
.processSummary:hover {
background: var(--bg-hover);
color: var(--fg);
}
.processChevron {
flex: none;
transition: transform 120ms ease;
}
.processRun[open] .processChevron {
transform: rotate(90deg);
}
.processRun:not([open]) > .processBody {
display: none;
}
.processBody {
display: flex;
flex-direction: column;
gap: 2px;
margin-top: 2px;
padding-left: 10px;
border-left: 1px solid var(--border);
}
.output {
margin: 4px 0 0;
max-height: 240px;
overflow: auto;
padding: 8px 10px;
border-radius: var(--radius-small);
border: 1px solid var(--border);
background: var(--bg-elev);
font-family: var(--font-mono);
font-size: var(--fs-small);
white-space: pre-wrap;
color: var(--fg-secondary);
}
.plan {
display: grid;
gap: 2px;
}
.planTitle {
font-weight: 600;
color: var(--fg-strong);
}
.planItem {
display: flex;
align-items: center;
gap: 6px;
}
.planDone {
color: var(--fg-muted);
text-decoration: line-through;
}
.permissionLine {
box-sizing: border-box;
display: flex;
align-items: flex-start;
gap: 8px;
min-width: 0;
padding: var(--space-2) var(--space-3);
border: 1px solid var(--border);
border-radius: var(--radius-popup);
background: var(--bg-elev);
color: var(--fg-secondary);
}
/* Waiting for an answer: the card takes the warning colour of the banner above. */
.permissionAsking {
border-color: var(--border-feedback-warning);
background: var(--bg-feedback-warning);
}
.permissionDone {
opacity: 0.85;
}
/* Title, state and answers on one line when they fit; a long title takes its own line and
the state and answers go below it, in line with it. */
.permissionBody {
flex: 1;
min-width: 0;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 2px 6px;
}
/* Up to three lines; the full text is its tooltip. */
.permissionTitle {
display: -webkit-box;
flex: 0 1 auto;
color: var(--fg-strong);
font-weight: 600;
min-width: 0;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.permissionLine > svg,
.permissionBody > .muted {
flex: none;
}
.permissionAnswers {
flex: 1 1 160px;
min-width: 0;
display: flex;
flex-wrap: wrap;
gap: 2px 12px;
margin-left: 6px;
}
.error {
display: flex;
gap: 6px;
align-items: flex-start;
color: var(--danger);
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.working {
display: flex;
align-items: center;
gap: 8px;
color: var(--fg-muted);
}
.retrying {
color: var(--warning);
}
.composerArea {
flex: none;
display: flex;
flex-direction: column;
gap: 6px;
align-self: center;
width: 100%;
max-width: calc(var(--agent-conversation-width) + var(--space-4) * 2);
box-sizing: border-box;
padding: var(--space-2) var(--space-4) var(--space-4);
}
.background {
display: flex;
flex-direction: column;
gap: 2px;
}
.backgroundTask {
display: flex;
align-items: center;
gap: 6px;
min-height: 24px;
padding: 0 4px 0 8px;
border-radius: var(--radius-row);
background: var(--bg-elev);
color: var(--fg-muted);
font-size: var(--fs-small);
font-variant-numeric: tabular-nums;
}
.backgroundText {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.queue {
display: flex;
flex-direction: column;
gap: 2px;
}
.queued {
display: flex;
align-items: center;
gap: 6px;
min-height: 28px;
padding: 0 4px 0 8px;
border-radius: var(--radius-row);
background: var(--bg-elev);
}
.queuedText {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Meters that don't fit wrap onto a hidden second row instead of being cut in half. */
.meters {
flex: 0 1 auto;
min-width: 0;
height: 22px;
overflow: hidden;
display: inline-flex;
flex-wrap: wrap;
align-items: center;
align-content: flex-start;
gap: 0 10px;
color: var(--fg-subtle);
font-size: var(--fs-small);
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.meter {
display: inline-flex;
align-items: center;
height: 22px;
gap: 5px;
}
.usageBar {
width: 36px;
height: 4px;
border-radius: 2px;
background: var(--border);
overflow: hidden;
}
.usageBar > span {
display: block;
height: 100%;
background: var(--fg-muted);
}
.images {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 4px;
}
.imageItem {
position: relative;
display: inline-flex;
}
.imageButton {
padding: 0;
border: 0;
background: none;
cursor: zoom-in;
}
.image {
display: block;
max-width: 240px;
max-height: 160px;
object-fit: contain;
border: 1px solid var(--border);
border-radius: var(--radius-small);
}
.removeImage {
position: absolute;
top: 4px;
right: 4px;
display: grid;
place-items: center;
width: 16px;
height: 16px;
padding: 0;
border: 0;
border-radius: 50%;
background: var(--bg-popup);
color: var(--fg);
cursor: pointer;
}
.attachments {
display: flex;
flex-wrap: wrap;
gap: 4px 6px;
margin-top: 4px;
font-size: var(--fs-small);
}
.attachment {
display: inline-flex;
align-items: center;
gap: 4px;
}
.changes {
display: flex;
flex-direction: column;
min-height: 0;
min-width: 0;
width: 280px;
}
.changesHeader {
min-width: 0;
display: flex;
align-items: center;
gap: 6px;
height: 32px;
flex: none;
padding: 0 6px 0 10px;
border-bottom: 1px solid var(--border);
}
.changesTitle {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 600;
color: var(--fg-strong);
}
.changesSummary {
flex: none;
overflow: hidden;
text-overflow: ellipsis;
padding: 4px 10px;
color: var(--fg-subtle);
white-space: pre;
}
.changesList {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
}
.changesList > * {
flex: 1;
min-height: 0;
}
.changesEmpty {
padding: 8px 10px;
color: var(--fg-muted);
}
.change {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
gap: 4px;
}
.changeName {
flex: 0 1 auto;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.changeDir {
flex: 1 1 0;
min-width: 0;
padding-left: 4px;
color: var(--fg-subtle);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.changeStat {
flex: none;
padding-right: 8px;
font-size: var(--fs-small);
white-space: nowrap;
font-variant-numeric: tabular-nums;
}
.added {
color: var(--vcs-added);
}
.removed {
color: var(--danger);
}
/* Subagents: a card per subagent in its parent's conversation, and the way into its own. */
.subagent {
display: flex;
flex-direction: column;
gap: 4px;
padding: 6px 8px;
border: 1px solid var(--border);
border-radius: var(--radius-small);
background: var(--bg-elev);
}
.subagentHead {
display: flex;
align-items: center;
gap: 4px;
min-width: 0;
}
.subagentOpen {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
gap: 6px;
padding: 2px 4px;
margin: -2px -4px;
border: 0;
border-radius: var(--radius-row);
background: none;
color: var(--fg);
font: inherit;
text-align: left;
cursor: pointer;
}
.subagentOpen:hover {
background: var(--bg-hover);
}
.subagentTitle {
flex: none;
max-width: 50%;
font-weight: 600;
color: var(--fg-strong);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.subagentDescription {
flex: 1 1 0;
min-width: 0;
color: var(--fg-muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.subagentMeta {
flex: none;
margin-left: auto;
color: var(--fg-subtle);
font-size: var(--fs-small);
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.subagentActivity {
padding-left: 22px;
color: var(--fg-muted);
font-family: var(--font-mono);
font-size: var(--fs-small);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.subagentSection > summary {
padding-left: 22px;
color: var(--fg-muted);
font-size: var(--fs-small);
cursor: pointer;
list-style: none;
}
.subagentSection > summary::-webkit-details-marker {
display: none;
}
.subagentSection > summary:hover {
color: var(--fg);
}
.subagentSection > :not(summary) {
margin: 4px 0 2px 22px;
}
.subagentReply {
max-height: 320px;
overflow: auto;
}
.done {
color: var(--success);
}
.subagentBar {
flex: none;
display: flex;
align-items: center;
gap: 6px;
height: 30px;
padding: 0 8px 0 6px;
border-bottom: 1px solid var(--border);
min-width: 0;
}
.crumbs {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
gap: 4px;
overflow: hidden;
}
.crumb {
flex: 0 1 auto;
min-width: 0;
padding: 0;
border: 0;
background: none;
color: var(--link);
font: inherit;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
}
.crumb:hover {
color: var(--link-hover);
text-decoration: underline;
}
.crumbCurrent {
flex: 0 1 auto;
min-width: 0;
font-weight: 600;
color: var(--fg-strong);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.messageFrom {
margin-bottom: 2px;
color: var(--fg-subtle);
font-size: var(--fs-small);
}
.readOnly {
flex: none;
padding: 10px 16px 14px;
border-top: 1px solid var(--border);
color: var(--fg-muted);
}
.subagentStrip {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.subagentChip {
display: inline-flex;
align-items: center;
gap: 6px;
max-width: 240px;
height: 22px;
padding: 0 8px;
border: 1px solid var(--border);
border-radius: 11px;
background: var(--bg-elev);
color: var(--fg-secondary);
font: inherit;
font-size: var(--fs-small);
cursor: pointer;
}
.subagentChip:hover {
background: var(--bg-hover);
color: var(--fg);
}
.subagentChipTitle {
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.changesToggle {
display: inline-flex;
align-items: center;
gap: 4px;
height: var(--h-control);
padding: 0 8px;
border: 0;
border-radius: var(--radius-small);
background: transparent;
color: var(--fg-subtle);
font: inherit;
font-size: var(--fs-small);
cursor: pointer;
}
.changesToggle:hover:not(:disabled) {
background: var(--bg-hover);
color: var(--fg-strong);
}
.changesToggle[aria-pressed="true"] {
background: var(--bg-selected);
color: var(--fg-strong);
}
.changesToggle:disabled {
opacity: 0.4;
cursor: default;
}
/* An open AskUserQuestion: every question with its options, answered at once above the composer. */
.questionCard {
flex: none;
display: flex;
flex-direction: column;
gap: 12px;
max-height: 50vh;
overflow-y: auto;
/* The composer's width, so the card sits exactly over the box it belongs to. */
width: 100%;
max-width: var(--agent-conversation-width);
margin: 0 auto 8px;
padding: 12px;
border: 1px solid var(--border-strong);
border-radius: var(--radius-control);
background: var(--bg-elev);
container: question-card / inline-size;
}
.question {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
margin: 0;
padding: 0;
border: 0;
}
.questionText {
margin-bottom: 6px;
padding: 0;
color: var(--fg-strong);
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.questionTag {
margin: 0 8px 0 0;
padding: 1px 6px;
border-radius: var(--radius-small);
background: var(--bg-hover);
color: var(--fg-muted);
font-size: var(--fs-small);
}
.questionLabel .questionTag {
margin: 0 0 0 8px;
}
.question .questionOption {
display: flex;
align-items: flex-start;
padding: 8px 10px;
border-radius: var(--radius-row);
}
/* Each option is a card of its own: separate targets, not one list with hairlines. */
.questionChoices {
display: flex;
flex-direction: column;
gap: 6px;
}
.question .questionChoices > * {
border: 1px solid var(--border);
border-radius: var(--radius-row);
}
.question .questionChoices > *:hover {
border-color: var(--border-strong);
}
.question .questionChoices > *:has(input:checked) {
border-color: var(--accent);
background: var(--bg-hover);
}
.question .questionOption:hover {
background: var(--bg-hover);
}
.questionOption > :first-child {
margin-top: 1px;
}
.questionOption > :last-child {
flex: 1;
}
.questionChoice {
display: flex;
align-items: flex-start;
gap: 8px;
}
.questionOptionText {
display: flex;
flex: 1;
flex-direction: column;
min-width: 0;
}
.questionLabel {
flex: 1;
color: var(--fg);
}
.questionDescription {
color: var(--fg-muted);
font-size: var(--fs-small);
overflow-wrap: anywhere;
}
.questionKey {
flex: none;
color: var(--fg-subtle);
font-size: var(--fs-small);
}
.questionOther {
margin: 2px 0 0 30px;
}
.questionBody {
display: flex;
flex-direction: column;
gap: 6px;
}
.questionChoices {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}
@container question-card (min-width: 640px) {
.questionBodyWithPreview {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap: 12px;
align-items: start;
}
.questionBodyWithPreview .questionPreview {
margin: 0;
}
}
.questionPreview {
display: grid;
min-width: 0;
margin: 0 0 0 30px;
}
.questionPreviewItem {
display: flex;
flex-direction: column;
grid-area: 1 / 1;
gap: 4px;
min-width: 0;
visibility: hidden;
}
.questionPreviewActive {
visibility: visible;
}
.questionPreviewCaption {
color: var(--fg-muted);
font-size: var(--fs-small);
}
.questionPreviewBody {
margin: 0;
padding: 8px;
overflow-x: auto;
border: 1px solid var(--border);
border-radius: var(--radius-small);
background: var(--bg-editor);
font-family: var(--font-mono);
font-size: var(--fs-code);
}
.questionPreviewEmpty {
padding: 8px;
border: 1px dashed var(--border);
border-radius: var(--radius-small);
color: var(--fg-subtle);
font-size: var(--fs-small);
}
.questionActions {
display: flex;
justify-content: flex-end;
gap: 8px;
}