web: chat reasoning block and tool calls for the whole lifecycle (C6)

This commit is contained in:
2026-10-19 06:14:48 +01:00
parent f48e53d5c8
commit 7df4891f14
6 changed files with 1200 additions and 17 deletions
+130
View File
@@ -1477,6 +1477,136 @@ code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-
.chat-jump { position: absolute; right: 14px; bottom: 14px; border-color: var(--accent); color: var(--accent); }
/* The tool-call chip and its panel (C6). The panel is a fixed overlay, so it
never joins the transcript's flow and opening it cannot re-flow or scroll it. */
.chat-tool-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 3px 10px;
background: var(--surface-2);
font-size: 12px;
cursor: pointer;
}
.chat-tool-chip-failed { border-color: var(--bad); color: var(--bad); }
.chat-tool-icon { font-size: 12px; line-height: 1; }
.chat-tool-icon-failed { color: var(--bad); }
.chat-tool-long { color: var(--bad); }
.chat-tool-chevron { color: var(--muted); }
.chat-tool-spinner { width: 11px; height: 11px; border-width: 2px; }
.chat-tool-panel {
position: fixed;
z-index: 40;
display: flex;
flex-direction: column;
width: min(420px, calc(100vw - 16px));
max-height: 440px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 10px;
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
overflow: hidden;
}
.chat-tool-panel[hidden] { display: none; }
.chat-tool-panel-head {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 8px 8px 12px;
border-bottom: 1px solid var(--border);
}
.chat-tool-panel-count { flex: 1 1 auto; font-size: 13px; font-weight: 600; }
.chat-tool-close { padding: 2px 8px; font-size: 14px; line-height: 1; }
.chat-tool-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.chat-tool-row { border-bottom: 1px solid var(--border); }
.chat-tool-row:last-child { border-bottom: 0; }
.chat-tool-row-head {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
padding: 7px 12px;
background: transparent;
border: 0;
border-radius: 0;
text-align: left;
cursor: pointer;
}
.chat-tool-row-head:hover { background: var(--surface); }
.chat-tool-row-titles { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; gap: 1px; }
.chat-tool-name { font-size: 12px; }
.chat-tool-detail {
font-size: 11px;
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.chat-tool-stat { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.chat-tool-duration { font-size: 11px; color: var(--muted); }
.chat-tool-row-chevron { color: var(--muted); font-size: 11px; }
.chat-tool-body { display: grid; gap: 8px; padding: 0 12px 10px 32px; }
.chat-tool-section { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.chat-tool-section-label {
padding: 3px 10px;
font-size: 10px;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--muted);
background: var(--surface);
border-bottom: 1px solid var(--border);
}
.chat-tool-section-body {
margin: 0;
padding: 8px 10px;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px;
white-space: pre-wrap;
overflow-wrap: anywhere;
max-height: 220px;
overflow: auto;
}
.chat-tool-diff {
padding: 6px 10px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 8px;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px;
max-height: 220px;
overflow: auto;
}
.chat-tool-diff-note { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.chat-tool-diff-line { white-space: pre-wrap; overflow-wrap: anywhere; }
/* A clearly-labelled overlay for the UI smoke's page-rendered tool-row samples
(a failed row and an edit diff the live history does not carry). */
.chat-tool-sample {
position: fixed;
top: 70px;
left: 24px;
right: 24px;
z-index: 60;
max-height: calc(100vh - 140px);
overflow: auto;
padding: 10px 12px;
background: var(--surface);
border: 1px solid var(--accent);
border-radius: 10px;
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.chat-tool-sample-note {
margin-bottom: 8px;
padding-bottom: 6px;
border-bottom: 1px dashed var(--border);
font-size: 11px;
color: var(--accent);
}
/* The rendered markdown subset. Every node is created, never parsed from HTML. */
.markdown { display: grid; gap: 8px; min-width: 0; }
.markdown > * { margin: 0; }