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:
fish
2026-11-16 16:55:56 +09:00
parent cd841b55cf
commit 3b36ade911
33 changed files with 3124 additions and 381 deletions
+27
View File
@@ -49,6 +49,7 @@ export const I18N_MESSAGES_EN_US = Object.freeze({
'fmt.resetMins': 'Resets in {m}m',
'fmt.selectTime': 'Select time',
'fmt.unknownModel': 'Unknown model',
'fmt.compactionSuffix': '·compact',
'fmt.mainAgent': 'Main Agent',
'fmt.mainBadge': 'Main',
'fmt.subAgent': 'Subagent',
@@ -251,6 +252,21 @@ export const I18N_MESSAGES_EN_US = Object.freeze({
'steps.badgeBackAll': 'Click to return to All Agents',
'steps.badgeFilterAgent': 'Click to filter {agent} (Ctrl/Shift-click to multi-select)',
'steps.ctxTitle': 'Context {ctx} · Thinking {think} · Reply {resp}',
'steps.ioCacheTitle': 'New In {inPart} · Out {outPart} · Cache Read {cachePart}',
'steps.tokSeg.context.th': 'Ctx',
'steps.tokSeg.context.tip': 'Context',
'steps.tokSeg.in.th': 'In',
'steps.tokSeg.in.tip': 'New In',
'steps.tokSeg.out.th': 'Out',
'steps.tokSeg.out.tip': 'Output',
'steps.tokSeg.cache.th': 'Cache',
'steps.tokSeg.cache.tip': 'Cache Read',
'steps.tokSeg.think.th': 'Think',
'steps.tokSeg.think.tip': 'Thinking',
'steps.tokSeg.reply.th': 'Reply',
'steps.tokSeg.reply.tip': 'Reply',
'steps.tokSeg.total.th': 'Total',
'steps.tokSeg.total.tip': 'Total',
'steps.modelCallsShare': '{calls} calls · {pct}%',
'steps.modelCallsOnly': '{calls} calls',
'steps.modelsSummaryPrefix': '{count} models · ',
@@ -276,6 +292,9 @@ export const I18N_MESSAGES_EN_US = Object.freeze({
'stepCol.duration.opt': 'Total Duration (s)',
'stepCol.tokens_combo.th': 'Ctx / Think / Reply',
'stepCol.tokens_combo.opt': 'Ctx / Think / Reply (Combo)',
'stepCol.tokens_io_cache.th': 'In / Out / Cache',
'stepCol.tokens_io_cache.opt': 'In / Out / Cache (Combo)',
'stepCol.tokens_custom.opt': 'Custom Combo ({fmt})',
'stepCol.input_tokens.th': 'Input',
'stepCol.input_tokens.opt': 'New Input Tokens',
'stepCol.cache_tokens.th': 'CacheTok',
@@ -412,6 +431,10 @@ export const I18N_MESSAGES_EN_US = Object.freeze({
'settings.str.mountDual': 'Dual Mount (Titlebar + Sidebar)',
'settings.str.mountComposer': 'Composer Mount (Input Box + Sidebar)',
'settings.str.mountSidebar': 'Sidebar Only',
'settings.str.popoverWidthLabel': 'Popover Width',
'settings.str.popoverWidthAuto': 'Auto Fit',
'settings.str.popoverWidthCustom': 'Custom',
'settings.str.popoverWidthHint': 'Auto Fit widens wide tables like Step Records to avoid horizontal scroll; Custom accepts 440–1080 px',
'settings.str.multiToggle': 'Active Sessions Pill',
'settings.str.cliCapsuleToggle': 'CLI Bottom Capsule',
'settings.str.show': 'Show',
@@ -438,6 +461,9 @@ export const I18N_MESSAGES_EN_US = Object.freeze({
'settings.str.stepTurnRailToggle': 'Turn Rail & Preview',
'settings.str.stepAgentBadgeToggle': 'Main/Sub Agent Badge',
'settings.str.stepSpeedColorToggle': 'Speed Multi-Color',
'settings.str.stepTokenComboLabel': 'Custom Token Combo Format',
'settings.str.stepTokenComboPlaceholder': 'e.g. context:new:cache or in:out:cache',
'settings.str.stepTokenComboHint': 'Tokens: context, in/new, out, cache, think, reply, total — separated by : or / (1–4 items)',
'settings.str.stepsColsLabel': '"Steps" Visible Columns (Left → Right, min 2, draggable)',
'settings.str.addStepCol': 'Add Column ({count}/{max})',
'settings.slot.dragHint': 'Drag up or down to reorder',
@@ -456,6 +482,7 @@ export const I18N_MESSAGES_EN_US = Object.freeze({
'settings.oth.modelFormat': 'Model Name Format',
'settings.oth.modelShort': 'Short Alias (e.g. argon-4-high)',
'settings.oth.modelUpstream': 'Raw Upstream ID (e.g. gemini-3.8-flash-n)',
'settings.oth.modelUpstreamCompact': 'Trimmed Raw ID (hide gemini- / claude- / gpt-)',
'settings.oth.orchFormat': 'Orchestrator Series ID',
'settings.oth.orchCompact': 'Compact Alias (e.g. orchestrator-argon)',
'settings.oth.orchFull': 'Full Upstream ID (e.g. gemini-pro-orchestrator)',
+27
View File
@@ -49,6 +49,7 @@ export const I18N_MESSAGES_ZH_CN = Object.freeze({
'fmt.resetMins': '{m}分钟后重置',
'fmt.selectTime': '选择时间',
'fmt.unknownModel': '模型未知',
'fmt.compactionSuffix': '·压缩',
'fmt.mainAgent': '主代理',
'fmt.mainBadge': '主',
'fmt.subAgent': '子代理',
@@ -251,6 +252,21 @@ export const I18N_MESSAGES_ZH_CN = Object.freeze({
'steps.badgeBackAll': '点击切回全部汇总',
'steps.badgeFilterAgent': '点击仅过滤查看 {agent}(按住 Ctrl/Shift 可加减多选)',
'steps.ctxTitle': '上下文 {ctx} · 思考 {think} · 正文 {resp}',
'steps.ioCacheTitle': '新输入 {inPart} · 输出 {outPart} · 缓存读 {cachePart}',
'steps.tokSeg.context.th': '上下文',
'steps.tokSeg.context.tip': '上下文',
'steps.tokSeg.in.th': '输入',
'steps.tokSeg.in.tip': '新输入',
'steps.tokSeg.out.th': '输出',
'steps.tokSeg.out.tip': '输出',
'steps.tokSeg.cache.th': '缓存',
'steps.tokSeg.cache.tip': '缓存读',
'steps.tokSeg.think.th': '思考',
'steps.tokSeg.think.tip': '思考',
'steps.tokSeg.reply.th': '正文',
'steps.tokSeg.reply.tip': '正文',
'steps.tokSeg.total.th': '总计',
'steps.tokSeg.total.tip': '总计',
'steps.modelCallsShare': '{calls}次 · {pct}%',
'steps.modelCallsOnly': '{calls}次',
'steps.modelsSummaryPrefix': '{count} 模型 · ',
@@ -276,6 +292,9 @@ export const I18N_MESSAGES_ZH_CN = Object.freeze({
'stepCol.duration.opt': '端到端耗时 (s)',
'stepCol.tokens_combo.th': '上下文 / 思考 / 正文',
'stepCol.tokens_combo.opt': '上下文 / 思考 / 正文 (组合)',
'stepCol.tokens_io_cache.th': '输入 / 输出 / 缓存',
'stepCol.tokens_io_cache.opt': '输入 / 输出 / 缓存 (组合)',
'stepCol.tokens_custom.opt': '自定义组合 ({fmt})',
'stepCol.input_tokens.th': '新输入',
'stepCol.input_tokens.opt': '新输入 Token',
'stepCol.cache_tokens.th': '缓存读',
@@ -412,6 +431,10 @@ export const I18N_MESSAGES_ZH_CN = Object.freeze({
'settings.str.mountDual': '双栖挂载 (顶部栏 + 侧边栏)',
'settings.str.mountComposer': '输入框挂载 (输入框 + 侧边栏)',
'settings.str.mountSidebar': '仅侧边栏',
'settings.str.popoverWidthLabel': '悬浮面板宽度',
'settings.str.popoverWidthAuto': '自适应',
'settings.str.popoverWidthCustom': '指定宽度',
'settings.str.popoverWidthHint': '自适应模式下在调用明细等宽表格视图自动撑宽免水平滚动;指定宽度范围 440~1080 px',
'settings.str.multiToggle': '实时运行会话入口',
'settings.str.cliCapsuleToggle': 'CLI 底部状态胶囊',
'settings.str.show': '显示',
@@ -438,6 +461,9 @@ export const I18N_MESSAGES_ZH_CN = Object.freeze({
'settings.str.stepTurnRailToggle': '对话轮次导轨',
'settings.str.stepAgentBadgeToggle': '主/子代理标识',
'settings.str.stepSpeedColorToggle': '输出速度多色分级',
'settings.str.stepTokenComboLabel': '自定义 Token 组合格式',
'settings.str.stepTokenComboPlaceholder': '例如 context:new:cache 或 in:out:cache',
'settings.str.stepTokenComboHint': '可用字段:context(上下文)、in/new(新输入)、out(输出)、cache(缓存)、think(思考)、reply(正文)、total(总计),以 : 或 / 分隔(1~4 项)',
'settings.str.stepsColsLabel': '「按步查看」显示列 (左 → 右,至少 2 列,可拖拽)',
'settings.str.addStepCol': '添加字段 ({count}/{max})',
'settings.slot.dragHint': '按住上下拖动调整顺序',
@@ -456,6 +482,7 @@ export const I18N_MESSAGES_ZH_CN = Object.freeze({
'settings.oth.modelFormat': '模型名称格式',
'settings.oth.modelShort': '精简代号 (如 argon-4-high)',
'settings.oth.modelUpstream': '原始模型 ID (如 gemini-3.8-flash-n)',
'settings.oth.modelUpstreamCompact': '去前缀原始 ID (如 3.8-flash-n / sonnet-4-6 / 5.4-mini)',
'settings.oth.orchFormat': 'Orchestrator 系列 ID',
'settings.oth.orchCompact': '精简代号 (如 orchestrator-argon)',
'settings.oth.orchFull': '原始完整 ID (如 gemini-pro-orchestrator)',