mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-27 01:19:25 +08:00
feat(panel): modularize 3-tab preferences, add model context windows, and optimize telemetry
- Refactor Preferences into decoupled General, Structure, and Other tabs with unified settings schema, factory reset, and trajectory cache rebuild endpoints - Extract standalone widget, metric, and step-table column registries to customize topbar/composer slots, hover popup modules, live overview layout, and step detail columns - Add bilingual zh-CN/en-US i18n dictionaries, theme accent presets, and font scale controls across Shadow DOM overlay and sidebar views - Support per-model host-advertised context window rules across App and IDE transports - Preserve CLEARED step generation timings, memoize per-poll model resolution, optimize LOESS sorted-x fitting, and update bilingual READMEs and test suites
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
/* --- 1. 顶栏胶囊宿主容器 (Titlebar Capsule Host) --- */
|
||||
:host(.wm-capsule-host) {
|
||||
--ui-font-scale: 1;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
@@ -326,6 +327,26 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 缓存命中率槽位(固定预占宽度 44px 居中对齐) */
|
||||
.wm-seg-cache {
|
||||
width: 44px;
|
||||
}
|
||||
|
||||
.wm-cache-text {
|
||||
width: 44px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 会话总 Token 槽位(固定预占宽度 52px 居中对齐) */
|
||||
.wm-seg-tokens {
|
||||
width: 52px;
|
||||
}
|
||||
|
||||
.wm-tokens-text {
|
||||
width: 52px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wm-cap-slot.tone-warn,
|
||||
.wm-cap-slot.tone-warn .wm-slot-text {
|
||||
color: var(--metric-warn);
|
||||
@@ -423,16 +444,24 @@
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* 四级响应式迟滞折叠(基于可见槽位次序 data-vis-rank 与分隔线次序 data-sep-for-rank 动态折叠) */
|
||||
/* 四级响应式迟滞折叠(基于可见槽位次序 data-vis-rank 1..5 与分隔线次序 data-sep-for-rank 动态折叠) */
|
||||
:host(.wm-capsule-host[data-layout="compact"]) .wm-cap-slot[data-vis-rank="3"],
|
||||
:host(.wm-capsule-host[data-layout="compact"]) .wm-sep[data-sep-for-rank="3"] {
|
||||
:host(.wm-capsule-host[data-layout="compact"]) .wm-cap-slot[data-vis-rank="4"],
|
||||
:host(.wm-capsule-host[data-layout="compact"]) .wm-cap-slot[data-vis-rank="5"],
|
||||
:host(.wm-capsule-host[data-layout="compact"]) .wm-sep[data-sep-for-rank="3"],
|
||||
:host(.wm-capsule-host[data-layout="compact"]) .wm-sep[data-sep-for-rank="4"],
|
||||
:host(.wm-capsule-host[data-layout="compact"]) .wm-sep[data-sep-for-rank="5"] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
:host(.wm-capsule-host[data-layout="minimal"]) .wm-cap-slot[data-vis-rank="2"],
|
||||
:host(.wm-capsule-host[data-layout="minimal"]) .wm-cap-slot[data-vis-rank="3"],
|
||||
:host(.wm-capsule-host[data-layout="minimal"]) .wm-cap-slot[data-vis-rank="4"],
|
||||
:host(.wm-capsule-host[data-layout="minimal"]) .wm-cap-slot[data-vis-rank="5"],
|
||||
:host(.wm-capsule-host[data-layout="minimal"]) .wm-sep[data-sep-for-rank="2"],
|
||||
:host(.wm-capsule-host[data-layout="minimal"]) .wm-sep[data-sep-for-rank="3"],
|
||||
:host(.wm-capsule-host[data-layout="minimal"]) .wm-sep[data-sep-for-rank="4"],
|
||||
:host(.wm-capsule-host[data-layout="minimal"]) .wm-sep[data-sep-for-rank="5"],
|
||||
:host(.wm-capsule-host[data-layout="minimal"]) .wm-multi-label {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -444,8 +473,12 @@
|
||||
|
||||
:host(.wm-capsule-host[data-layout="ring-only"]) .wm-cap-slot[data-vis-rank="2"],
|
||||
:host(.wm-capsule-host[data-layout="ring-only"]) .wm-cap-slot[data-vis-rank="3"],
|
||||
:host(.wm-capsule-host[data-layout="ring-only"]) .wm-cap-slot[data-vis-rank="4"],
|
||||
:host(.wm-capsule-host[data-layout="ring-only"]) .wm-cap-slot[data-vis-rank="5"],
|
||||
:host(.wm-capsule-host[data-layout="ring-only"]) .wm-sep[data-sep-for-rank="2"],
|
||||
:host(.wm-capsule-host[data-layout="ring-only"]) .wm-sep[data-sep-for-rank="3"],
|
||||
:host(.wm-capsule-host[data-layout="ring-only"]) .wm-sep[data-sep-for-rank="4"],
|
||||
:host(.wm-capsule-host[data-layout="ring-only"]) .wm-sep[data-sep-for-rank="5"],
|
||||
:host(.wm-capsule-host[data-layout="ring-only"]) .wm-cap-slot[data-vis-rank="1"] .wm-ctx-pct,
|
||||
:host(.wm-capsule-host[data-layout="ring-only"]) .wm-multi-label {
|
||||
display: none !important;
|
||||
@@ -469,7 +502,7 @@
|
||||
pointer-events: none;
|
||||
z-index: 2147483000;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
|
||||
font-size: 12.5px;
|
||||
font-size: var(--fs-body);
|
||||
line-height: 1.4;
|
||||
font-variant-numeric: tabular-nums;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
@@ -609,6 +642,13 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.wm-hover-widgets {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.wm-hover-update-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -618,7 +658,7 @@
|
||||
border-radius: var(--radius-xs);
|
||||
background: var(--accent-primary-soft);
|
||||
border: 1px solid var(--accent-primary-border);
|
||||
font-size: 11.5px;
|
||||
font-size: var(--fs-base-sm);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
@@ -633,7 +673,7 @@
|
||||
|
||||
.wm-hover-update-hint {
|
||||
color: var(--text-secondary);
|
||||
font-size: 11px;
|
||||
font-size: var(--fs-md);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -646,7 +686,7 @@
|
||||
}
|
||||
|
||||
.wm-hover-quota-foot {
|
||||
font-size: 11px;
|
||||
font-size: var(--fs-md);
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
@@ -655,7 +695,7 @@
|
||||
align-items: center;
|
||||
height: 16px;
|
||||
padding: 0 5px;
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: 600;
|
||||
color: var(--accent-primary);
|
||||
background: var(--accent-primary-soft);
|
||||
@@ -668,7 +708,7 @@
|
||||
align-items: center;
|
||||
height: 16px;
|
||||
padding: 0 4px;
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
background: color-mix(in srgb, var(--text-primary) 7%, transparent);
|
||||
@@ -683,7 +723,7 @@
|
||||
}
|
||||
|
||||
.wm-task-metrics {
|
||||
font-size: 11px;
|
||||
font-size: var(--fs-md);
|
||||
color: var(--text-secondary);
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
@@ -720,7 +760,7 @@
|
||||
}
|
||||
|
||||
.wm-multi-panel .live-task-title {
|
||||
font-size: 12.5px;
|
||||
font-size: var(--fs-body);
|
||||
}
|
||||
|
||||
.wm-multi-empty {
|
||||
@@ -730,7 +770,7 @@
|
||||
gap: var(--space-3);
|
||||
min-height: 36px;
|
||||
padding: 12px 2px 4px;
|
||||
font-size: 12px;
|
||||
font-size: var(--fs-base);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user