feat(panel): add inline CLI statusLine capsule, step speed color toggle, and refined defaults

- Auto-provision native Antigravity CLI `statusLine` (`stack_with_default: false`) in `~/.gemini/antigravity-cli/settings.json` while strictly preserving custom third-party `statusLine.command` scripts, using zero-double-quote Windows commands compatible with Go `syscall.EscapeArg` under `cmd /c`
- Add `cli-statusline.mjs` and `cli-statusline-config.mjs` to render a single-line transparent 24-bit ANSI footer (`? for shortcuts` left, live multi-session & 1..5 capsule metrics centered, deduplicated `mode · model · effort` right) with responsive narrow-terminal fallbacks and `stdin` quota fallback
- Persist `cli-status-snapshot.json` during telemetry builds and self-heal sidecar restarts inside `executeTelemetryAction` error paths when `computeRuntimeCodeVersion()` advances
- Add `enableCliStatusLine` and `showStepSpeedColor` preferences in Settings -> Structure, rename the mount sub-tab/section label in `zh-CN` to `挂载胶囊`, set default `topbarCapsuleSlots` to `['tps', 'ttft', 'context']`, and default `showStepTurnRail` and `showStepSpeedColor` to `false`
- Add unit and end-to-end tests across `backend.test.mjs` and `window-bridge.test.mjs`, and update `README.md` / `README.zh-CN.md`
This commit is contained in:
fish
2026-11-16 14:00:05 +09:00
parent 76669d5cc7
commit cd841b55cf
23 changed files with 2478 additions and 125 deletions
+9 -3
View File
@@ -37,7 +37,7 @@ export const TOPBAR_SLOT_KEYS = Object.freeze([
'claude_weekly',
]);
export const DEFAULT_TOPBAR_SLOTS = Object.freeze(['context', 'tps', 'quota_auto']);
export const DEFAULT_TOPBAR_SLOTS = Object.freeze(['tps', 'ttft', 'context']);
export const MIN_TOPBAR_SLOTS = 1;
export const MAX_TOPBAR_SLOTS = 5;
@@ -368,14 +368,16 @@ export const DEFAULT_SETTINGS_SCHEMA = Object.freeze({
autoUpdatePlugin: false,
windowMountMode: 'dual',
enableWindowOverlay: true,
enableCliStatusLine: true,
standalonePort: 0,
showTopbarMultiSession: true,
topbarCapsuleSlots: DEFAULT_TOPBAR_SLOTS,
hoverModules: DEFAULT_HOVER_MODULES,
overviewModules: DEFAULT_OVERVIEW_MODULES,
overviewMetrics: DEFAULT_OVERVIEW_METRICS,
showStepTurnRail: true,
showStepTurnRail: false,
showStepAgentBadge: true,
showStepSpeedColor: false,
stepTableColumns: DEFAULT_STEP_TABLE_COLUMNS,
modelContextWindows: Object.freeze({}),
});
@@ -397,6 +399,7 @@ export function createDefaultSettingsObject() {
autoUpdatePlugin: DEFAULT_SETTINGS_SCHEMA.autoUpdatePlugin,
windowMountMode: DEFAULT_SETTINGS_SCHEMA.windowMountMode,
enableWindowOverlay: DEFAULT_SETTINGS_SCHEMA.enableWindowOverlay,
enableCliStatusLine: DEFAULT_SETTINGS_SCHEMA.enableCliStatusLine,
standalonePort: DEFAULT_SETTINGS_SCHEMA.standalonePort,
showTopbarMultiSession: DEFAULT_SETTINGS_SCHEMA.showTopbarMultiSession,
topbarCapsuleSlots: [...DEFAULT_TOPBAR_SLOTS],
@@ -405,6 +408,7 @@ export function createDefaultSettingsObject() {
overviewMetrics: [...DEFAULT_OVERVIEW_METRICS],
showStepTurnRail: DEFAULT_SETTINGS_SCHEMA.showStepTurnRail,
showStepAgentBadge: DEFAULT_SETTINGS_SCHEMA.showStepAgentBadge,
showStepSpeedColor: DEFAULT_SETTINGS_SCHEMA.showStepSpeedColor,
stepTableColumns: [...DEFAULT_STEP_TABLE_COLUMNS],
modelContextWindows: {},
};
@@ -444,14 +448,16 @@ export function normalizeFullSettings(rawInput) {
autoUpdatePlugin: pluginUpdateMode === 'auto',
windowMountMode,
enableWindowOverlay: windowMountMode !== 'sidebar',
enableCliStatusLine: safeRaw.enableCliStatusLine !== false,
standalonePort: normalizeStandalonePort(safeRaw.standalonePort),
showTopbarMultiSession: safeRaw.showTopbarMultiSession !== false,
topbarCapsuleSlots: normalizeTopbarCapsuleSlots(safeRaw.topbarCapsuleSlots),
hoverModules: normalizeHoverModules(safeRaw.hoverModules),
overviewModules: normalizeOverviewModules(safeRaw.overviewModules),
overviewMetrics: normalizeOverviewMetrics(safeRaw.overviewMetrics),
showStepTurnRail: safeRaw.showStepTurnRail !== false,
showStepTurnRail: safeRaw.showStepTurnRail === true,
showStepAgentBadge: safeRaw.showStepAgentBadge !== false,
showStepSpeedColor: safeRaw.showStepSpeedColor === true,
stepTableColumns: normalizeStepTableColumns(safeRaw.stepTableColumns),
modelContextWindows: normalizeModelContextWindows(safeRaw.modelContextWindows),
};