feat(panel): live task cards, interactive usage trend chart, and Gemini 4 Carbon support (v1.4.2)

This commit is contained in:
fish
2026-11-11 01:06:31 +09:00
parent c6f512413f
commit 8ac5da8d11
39 changed files with 4857 additions and 1099 deletions
+389 -130
View File
@@ -69,8 +69,8 @@
--ctx-output: hsl(190 80% 38%);
/* Elevation & Shadows */
--shadow-popover: 0 6px 20px color-mix(in srgb, var(--text-primary) 14%, transparent);
--shadow-glider: 0 1px 2px color-mix(in srgb, var(--text-primary) 10%, transparent);
--shadow-popover: 0 4px 12px rgb(0 0 0 / 0.22);
--shadow-glider: 0 1px 2px rgb(0 0 0 / 0.14);
/* Fast Hardware-Accelerated Motion Tokens */
--ease-fast: cubic-bezier(0.22, 1, 0.36, 1);
@@ -280,93 +280,11 @@ input {
border-radius: var(--radius-sm);
}
.agent-scope-bar {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-2);
padding: 4px var(--space-3);
background: var(--surface-panel);
border: 1px solid var(--border-hairline);
border-radius: var(--radius-sm);
}
.agent-scope-left {
display: flex;
align-items: center;
gap: 4px;
flex: 1;
min-width: 0;
}
.scope-pill-btn {
display: inline-flex;
align-items: center;
gap: 3px;
height: 22px;
padding: 0 7px;
border: 1px solid transparent;
background: transparent;
color: var(--text-secondary);
font-size: 11.5px;
border-radius: var(--radius-xs);
cursor: pointer;
white-space: nowrap;
flex-shrink: 0;
transition:
background-color var(--dur-instant) var(--ease-fast),
color var(--dur-instant) var(--ease-fast),
border-color var(--dur-instant) var(--ease-fast);
}
.scope-pill-btn:hover {
background: var(--surface-hover);
color: var(--text-primary);
}
.scope-pill-btn.is-active {
background: var(--accent-primary-soft);
color: var(--accent-primary);
border-color: var(--accent-primary-border);
font-weight: 600;
}
.scope-subagent-select {
flex: 1 1 115px;
min-width: 105px;
}
.scope-subagent-select .select-trigger {
height: 22px;
padding: 0 6px;
font-size: 11.5px;
border: 1px solid var(--border-hairline);
background: var(--surface-subtle);
}
.scope-subagent-select.is-active-sub .select-trigger {
background: var(--accent-primary-soft);
color: var(--accent-primary);
border-color: var(--accent-primary-border);
font-weight: 600;
}
.scope-subagent-select .select-menu,
.steps-inline-scope-select .select-menu {
left: auto;
right: 0;
}
.agent-scope-right {
display: inline-flex;
align-items: center;
gap: 5px;
font-size: 11px;
color: var(--text-secondary);
white-space: nowrap;
flex-shrink: 0;
}
.session-left {
display: flex;
align-items: center;
@@ -444,12 +362,6 @@ input {
transform: scale(0.95);
}
.icon-btn.is-active {
background: var(--accent-primary-soft);
color: var(--accent-primary);
border-color: var(--accent-primary-border);
}
/* --- 2. 顶部药丸导航栏 (Top Long-Pill Navigation Bar) --- */
.long-pill-nav {
position: relative;
@@ -595,7 +507,7 @@ input {
box-shadow: var(--shadow-popover);
padding: 4px;
z-index: 60;
animation: popover-in var(--dur-fast) var(--ease-fast);
animation: anim-popover-in var(--dur-fast) var(--ease-fast);
}
.select-option {
@@ -725,7 +637,7 @@ input {
display: flex;
flex-direction: column;
gap: var(--space-2);
animation: popover-in var(--dur-fast) var(--ease-fast);
animation: anim-popover-in var(--dur-fast) var(--ease-fast);
}
.dt-nav {
@@ -1085,7 +997,239 @@ input {
white-space: nowrap;
}
/* --- 2. 4 格实时测速指标矩阵 (4-Cell Telemetry Matrix) --- */
/* --- 2. 多任务实时运行卡片列表与 4 格测速指标矩阵 (Live Running Tasks List & 4-Cell Telemetry Matrix) --- */
.live-activity-list {
display: flex;
flex-direction: column;
gap: 6px;
flex-shrink: 0;
min-width: 0;
}
.live-activity-list[hidden] {
display: none !important;
}
.live-task-card {
display: flex;
flex-direction: column;
gap: 5px;
padding: 7px 10px;
border: 1px solid var(--accent-primary-border);
border-radius: var(--radius-xs);
background: color-mix(in srgb, var(--accent-primary) 5%, var(--surface-panel));
min-width: 0;
}
.live-task-card.is-waiting {
border-color: color-mix(in srgb, var(--metric-warn) 42%, var(--border-hairline));
background: color-mix(in srgb, var(--metric-warn) 7%, var(--surface-panel));
}
.live-task-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-2);
min-width: 0;
}
.live-task-title-wrap {
display: flex;
align-items: center;
gap: 5px;
min-width: 0;
flex: 1;
}
.live-task-title {
font-size: 11.5px;
font-weight: 600;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
cursor: pointer;
}
.live-task-title:hover {
color: var(--accent-primary);
}
.live-task-header-right {
display: inline-flex;
align-items: center;
gap: 6px;
flex-shrink: 0;
}
.live-sub-toggle {
display: inline-flex;
align-items: center;
gap: 3px;
height: 18px;
padding: 0 6px;
font-size: 10.5px;
font-weight: 600;
color: var(--text-secondary);
background: var(--surface-panel);
border: 1px solid var(--border-hairline);
border-radius: var(--radius-xs);
cursor: pointer;
white-space: nowrap;
transition:
border-color var(--dur-instant) var(--ease-fast),
color var(--dur-instant) var(--ease-fast),
background-color var(--dur-instant) var(--ease-fast);
}
.live-sub-toggle:hover {
border-color: var(--border-strong);
color: var(--text-primary);
}
.live-sub-toggle.is-expanded {
color: var(--accent-primary);
border-color: var(--accent-primary-border);
background: var(--accent-primary-soft);
}
.live-sub-toggle[hidden] {
display: none !important;
}
.live-task-main-row {
display: flex;
align-items: center;
gap: 5px;
min-width: 0;
padding-left: 1px;
}
.live-activity-dot {
color: var(--accent-primary);
display: inline-flex;
align-items: center;
flex-shrink: 0;
}
.live-task-card.is-waiting .live-activity-dot {
color: var(--metric-warn);
}
.live-activity-phase {
font-size: 11px;
font-weight: 600;
color: var(--text-primary);
white-space: nowrap;
flex-shrink: 0;
}
.live-task-card.is-waiting .live-activity-phase {
color: var(--metric-warn);
}
.live-activity-progress {
font-size: 10px;
font-weight: 600;
color: var(--accent-primary);
background: var(--accent-primary-soft);
padding: 0 4px;
border-radius: var(--radius-xs);
white-space: nowrap;
flex-shrink: 0;
}
.live-activity-sep {
font-size: 11px;
color: var(--text-muted);
flex-shrink: 0;
}
.live-activity-detail {
font-size: 11px;
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
flex: 1;
}
.live-activity-elapsed {
font-size: 11px;
font-weight: 600;
color: var(--accent-primary);
white-space: nowrap;
flex-shrink: 0;
}
.live-task-card.is-waiting .live-activity-elapsed {
color: var(--metric-warn);
}
.live-sub-list {
display: flex;
flex-direction: column;
gap: 4px;
padding-top: 5px;
margin-top: 1px;
border-top: 1px dashed var(--border-hairline);
min-width: 0;
}
.live-sub-list[hidden] {
display: none !important;
}
.live-sub-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-2);
min-width: 0;
font-size: 10.5px;
}
.live-sub-row.is-done {
opacity: 0.72;
}
.live-sub-left {
display: flex;
align-items: center;
gap: 5px;
min-width: 0;
flex: 1;
}
.live-sub-role {
font-weight: 600;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 110px;
flex-shrink: 0;
}
.live-sub-summary {
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
flex: 1;
}
.live-sub-elapsed {
font-size: 10.5px;
color: var(--text-secondary);
white-space: nowrap;
flex-shrink: 0;
}
.telemetry-matrix {
display: grid;
grid-template-columns: repeat(4, 1fr);
@@ -1152,53 +1296,58 @@ input {
.progress-seg {
height: 100%;
width: var(--seg-w, 0%);
transition: width var(--dur-normal) var(--ease-fast);
transition:
background-color 0.05s ease,
width var(--dur-normal) var(--ease-fast);
}
.progress-seg.seg-messages {
background: var(--ctx-messages);
.progress-track.is-reordering .progress-seg {
transition:
background-color 0.05s ease,
width var(--dur-normal) var(--ease-fast) 0.05s;
}
.progress-seg.seg-assistant {
background: var(--ctx-assistant);
background-color: var(--ctx-assistant);
}
.progress-seg.seg-tool-results {
background: var(--ctx-tool-results);
background-color: var(--ctx-tool-results);
}
.progress-seg.seg-user-input {
background: var(--ctx-user-input);
background-color: var(--ctx-user-input);
}
.progress-seg.seg-subagent-msg {
background: var(--ctx-subagent-msg);
background-color: var(--ctx-subagent-msg);
}
.progress-seg.seg-checkpoint {
background: var(--ctx-checkpoint);
background-color: var(--ctx-checkpoint);
}
.progress-seg.seg-system-tools {
background: var(--ctx-system-tools);
background-color: var(--ctx-system-tools);
}
.progress-seg.seg-mcp-tools {
background: var(--ctx-mcp-tools);
background-color: var(--ctx-mcp-tools);
}
.progress-seg.seg-skills {
background: var(--ctx-skills);
background-color: var(--ctx-skills);
}
.progress-seg.seg-system-prompt {
background: var(--ctx-system-prompt);
background-color: var(--ctx-system-prompt);
}
.progress-seg.seg-user-rules {
background: var(--ctx-user-rules);
background-color: var(--ctx-user-rules);
}
.progress-seg.seg-cached {
background: var(--ctx-cached);
background-color: var(--ctx-cached);
}
.progress-seg.seg-input {
background: var(--ctx-input);
background-color: var(--ctx-input);
}
.progress-seg.seg-thinking {
background: var(--ctx-thinking);
background-color: var(--ctx-thinking);
}
.progress-seg.seg-output {
background: var(--ctx-output);
background-color: var(--ctx-output);
}
.progress-fill {
@@ -1216,7 +1365,7 @@ input {
background: var(--metric-danger);
}
/* --- 4. 上下文双列图例网格 (Context 6-Channel Legend Grid) --- */
/* --- 4. 上下文双列图例网格 (Context 10-Channel Legend Grid) --- */
.ctx-legend-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
@@ -1248,7 +1397,6 @@ input {
display: inline-block;
}
.swatch.seg-messages { background: var(--ctx-messages); }
.swatch.seg-assistant { background: var(--ctx-assistant); }
.swatch.seg-tool-results { background: var(--ctx-tool-results); }
.swatch.seg-user-input { background: var(--ctx-user-input); }
@@ -1471,8 +1619,7 @@ input {
padding-right: 0;
}
.cons-col.is-bordered-col,
.cons-col.is-right-col {
.cons-col.is-bordered-col {
border-left: 1px solid var(--border-hairline);
}
@@ -1582,16 +1729,25 @@ input {
height: 5px;
}
/* --- 4. 历史趋势 SVG 平滑曲线图 (Historical Trend SVG Chart) --- */
/* --- 4. 历史趋势交互式 SVG 平滑曲线图 (Interactive Historical Trend SVG Chart) --- */
.trend-chart-wrap {
position: relative;
width: 100%;
padding-top: 8px;
display: flex;
flex-direction: column;
gap: 2px;
}
.trend-plot-stage {
position: relative;
width: 100%;
padding-top: 6px;
cursor: crosshair;
}
.trend-svg {
width: 100%;
height: 112px;
height: 118px;
display: block;
overflow: visible;
}
@@ -1608,12 +1764,33 @@ input {
stroke-linecap: round;
}
.trend-node-dot {
fill: var(--surface-panel);
stroke: var(--ctx-cached);
stroke-width: 1.4;
}
.trend-peak-dot {
fill: var(--ctx-cached);
stroke: var(--surface-panel);
stroke-width: 1.5;
}
.trend-hover-line {
stroke: var(--accent-primary);
stroke-width: 1;
stroke-dasharray: 2 2;
opacity: 0.75;
pointer-events: none;
}
.trend-hover-dot {
fill: var(--accent-primary);
stroke: var(--surface-panel);
stroke-width: 1.8;
pointer-events: none;
}
.trend-peak-pill {
position: absolute;
top: 2px;
@@ -1624,31 +1801,113 @@ input {
padding: 1px 6px;
color: var(--text-primary);
background: color-mix(in srgb, var(--ctx-cached) 16%, var(--surface-panel));
border: none;
border: 1px solid color-mix(in srgb, var(--ctx-cached) 30%, var(--border-hairline));
border-radius: var(--radius-xs);
pointer-events: none;
white-space: nowrap;
z-index: 2;
}
.trend-anchors {
display: grid;
grid-template-columns: repeat(3, 1fr);
padding-top: 2px;
font-size: 11px;
}
.trend-anchor-col {
.trend-tooltip {
position: absolute;
top: 0;
left: var(--tip-x, 50%);
transform: translateX(var(--tip-shift, -50%));
min-width: 148px;
max-width: 240px;
padding: 5px 8px;
background: var(--surface-panel);
border: 1px solid var(--border-strong);
border-radius: var(--radius-sm);
box-shadow: none;
pointer-events: none;
z-index: 15;
display: flex;
flex-direction: column;
gap: 1px;
gap: 2px;
}
.trend-anchor-col.is-center {
.trend-tip-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
font-size: 10.5px;
color: var(--text-secondary);
}
.trend-anchor-col.is-end {
align-items: flex-end;
.trend-tip-time {
font-weight: 600;
color: var(--text-primary);
white-space: nowrap;
}
.trend-tip-calls {
font-size: 10px;
color: var(--text-muted);
white-space: nowrap;
}
.trend-tip-main {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 8px;
}
.trend-tip-tokens {
font-size: 12px;
font-weight: 700;
color: var(--accent-primary);
}
.trend-tip-cost {
font-size: 11px;
font-weight: 600;
color: var(--text-primary);
}
.trend-tip-sub {
font-size: 10px;
color: var(--text-secondary);
white-space: nowrap;
border-top: 1px solid var(--border-hairline);
padding-top: 2px;
margin-top: 1px;
}
.trend-x-axis {
position: relative;
width: 100%;
height: 18px;
user-select: none;
}
.trend-x-tick {
position: absolute;
top: 0;
left: var(--tick-x, 0%);
transform: translateX(-50%);
font-size: 10px;
color: var(--text-muted);
white-space: nowrap;
line-height: 16px;
cursor: pointer;
transition: color var(--dur-instant) var(--ease-fast);
}
.trend-x-tick.is-start {
transform: translateX(0);
}
.trend-x-tick.is-end {
transform: translateX(-100%);
}
.trend-x-tick:hover,
.trend-x-tick.is-hovered {
color: var(--accent-primary);
font-weight: 600;
}
/* --- 5. 模型与数据来源明细行容器 (Popular Models & Sources Item Rows) --- */