mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
feat(panel): add worker hot-reload, sticky bridge lease, custom token combos, trimmed model IDs, and adaptive popover width
- Isolate SidecarApp /api/* backend runtime inside a hot-swappable Worker thread (sidecar-worker.mjs) with 3s disk-drift detection and queued request handoff so live plugin updates never drop the host-assigned SidecarApp port - Persist and reuse sticky loopback bridge port/token leases across bridge-daemon and worker reloads, pre-bind the bridge server on boot, allow /api/cache/rebuild on the bridge, and self-heal poisoned CDP fallback states back to HTTP - Add billing-aligned In / Out / Cache (tokens_io_cache) preset with per-segment USD hover breakdown and custom format DSL (tokens_custom + stepTokenComboFormat, e.g. context:new:cache, in:out:cache) - Add 3-way model name format (short / upstream / upstream_compact) stripping gemini-, claude-, and gpt- prefixes while protecting compaction suffixes from ellipsis truncation - Add adaptive content-fit popover width (auto up to viewport bounds on wide step tables) alongside custom fixed width (440-1080 px)
This commit is contained in:
@@ -67,8 +67,9 @@ export function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides
|
||||
agentBadge: '主',
|
||||
agentLabel: t('fmt.mainAgent'),
|
||||
modelLabel: 'Gemini 4 Carbon (High)',
|
||||
modelShort: 'gemini-4-carbon',
|
||||
modelShort: 'carbon-4-high',
|
||||
rawModel: 'MODEL_PLACEHOLDER_M37',
|
||||
modelUpstream: 'gemini-4-carbon-high',
|
||||
upstreamModel: 'gemini-4-carbon-high',
|
||||
tokPerSec: 68.4,
|
||||
ttftSec: 1.15,
|
||||
@@ -82,6 +83,9 @@ export function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides
|
||||
responseTokens: 560,
|
||||
cacheHitPct: 94.5,
|
||||
costUsd: 0.042,
|
||||
inCostUsd: 0.0156,
|
||||
cacheCostUsd: 0.0134,
|
||||
outCostUsd: 0.0142,
|
||||
createdAtMs: anchorMinMs - 14_000,
|
||||
turnIndex: 2,
|
||||
rootTurnIndex: 2,
|
||||
@@ -102,8 +106,9 @@ export function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides
|
||||
agentRole: subRole,
|
||||
agentLabel: subRole,
|
||||
modelLabel: 'Gemini 3.8 Flash',
|
||||
modelShort: 'gemini-3.8-flash',
|
||||
modelShort: 'flash-3.8',
|
||||
rawModel: 'MODEL_PLACEHOLDER_M42',
|
||||
modelUpstream: 'gemini-3.8-flash-n',
|
||||
upstreamModel: 'gemini-3.8-flash-n',
|
||||
tokPerSec: 96.2,
|
||||
ttftSec: 0.68,
|
||||
@@ -117,6 +122,9 @@ export function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides
|
||||
responseTokens: 464,
|
||||
cacheHitPct: 88.1,
|
||||
costUsd: 0.009,
|
||||
inCostUsd: 0.0065,
|
||||
cacheCostUsd: 0.0005,
|
||||
outCostUsd: 0.0026,
|
||||
createdAtMs: anchorMinMs - 42_000,
|
||||
turnIndex: 1,
|
||||
rootTurnIndex: 2,
|
||||
@@ -135,9 +143,11 @@ export function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides
|
||||
isSubagent: false,
|
||||
agentBadge: '主',
|
||||
agentLabel: t('fmt.mainAgent'),
|
||||
modelLabel: 'Gemini 4 Carbon (High)',
|
||||
modelShort: 'gemini-4-carbon',
|
||||
isCompactionStep: true,
|
||||
modelLabel: 'Gemini 4 Carbon (High) [自动压缩]',
|
||||
modelShort: 'carbon-4-high·压缩',
|
||||
rawModel: 'MODEL_PLACEHOLDER_M37',
|
||||
modelUpstream: 'gemini-4-carbon-high·压缩',
|
||||
upstreamModel: 'gemini-4-carbon-high',
|
||||
tokPerSec: 46.5,
|
||||
ttftSec: 3.4,
|
||||
@@ -151,6 +161,9 @@ export function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides
|
||||
responseTokens: 380,
|
||||
cacheHitPct: 61.4,
|
||||
costUsd: 0.068,
|
||||
inCostUsd: 0.0492,
|
||||
cacheCostUsd: 0.0078,
|
||||
outCostUsd: 0.011,
|
||||
createdAtMs: anchorMinMs - 88_000,
|
||||
turnIndex: 2,
|
||||
rootTurnIndex: 2,
|
||||
|
||||
Reference in New Issue
Block a user