diff --git a/README.md b/README.md index 8341ce5..372a781 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ The dashboard is organized into four tabs, with a top header to switch conversat - **Preferences** - **Mount Mode**: Dual-mount (Top Bar + Sidebar) or Sidebar only. - **Top-Bar Customization**: Independently toggle the live running-sessions indicator, and customize the content and left-to-right order of the three metric slots in the capsule. - - **Model Name Format**: Compact short alias (e.g. `argon-4-high`) or raw upstream model ID (e.g. `gemini-3.8-flash-n`). + - **Model Name Format**: Compact short alias (e.g. `argon-4-high`) or raw upstream model ID (e.g. `gemini-3.8-flash-n`), plus an independent Orchestrator series ID selector (`orchestrator-argon` / `worker-agy-hydrogen` compact mode by default, or full annotated IDs). - **Version Updates & Pricing Sync**: Dynamically sync [`pricing-catalog.json`](pricing-catalog.json) from GitHub, with three update modes: *Notify only, manual update* (default), *Auto update*, and *Off*. ## Model Identification & Cost Accounting @@ -98,8 +98,10 @@ Expand-Archive -Path "$env:TEMP\usage-monitor.zip" -DestinationPath $pluginsDir ## Enabling & Opening the Panel 1. Open **Customizations** in the left sidebar, switch to the **Installed** tab, locate `usage-monitor`, and toggle it on. -2. **Top-Bar Floating Capsule (enabled by default)**: Once enabled, the background sidecar mounts a live status & metric capsule in the top-right bar of the main chat window (hover for quick overview, left-click to expand the full 4-tab panel, right-click to force refresh) without modifying `app.asar`. To disable the top-bar capsule, switch **Mount Mode** to *Sidebar only* in Preferences. -3. **Right-Hand Sidebar Panel**: Click `⋮` in the top-right corner of the chat pane -> **Extensions** -> **Usage & Speed Monitor** (or **用量监控**) to dock the panel in the auxiliary sidebar. +2. **Top-Bar Floating Capsule (enabled by default on both Antigravity 2.0 & Antigravity IDE)**: + - **Antigravity 2.0 App**: Immediately mounts a live status & metric capsule in the top-right bar of the main chat window (hover for quick overview, left-click to expand the full 4-tab panel, right-click to force refresh) without modifying `app.asar`. + - **Antigravity IDE**: On first enable, the background sidecar automatically adds `"remote-debugging-port": "0"` to `~/.antigravity-ide/argv.json` (preserving comments and existing settings). **Restart Antigravity IDE once**, and the capsule will dock into the top-right IDE window titlebar on every launch. Because Antigravity IDE does not currently expose the right-hand UI Sidecar auxiliary pane, keep **Mount Mode** set to *Dual-mount* in IDE and click the top-bar capsule to open the 4-tab dashboard. +3. **Right-Hand Sidebar Panel (Antigravity 2.0)**: Open the auxiliary sidebar menu in the chat window to dock **Usage & Speed Monitor** on the right, or switch **Mount Mode** between *Top Bar + Sidebar* and *Sidebar only* in Preferences. ## Updating diff --git a/README.zh-CN.md b/README.zh-CN.md index c184a83..0bae98e 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -51,7 +51,7 @@ - **偏好设置** - 选择面板挂载方式:双栖挂载(顶部栏 + 侧边栏)或仅侧边栏。 - 顶部栏定制:独立开关实时运行会话入口,并自由定义右侧三个指标槽位的显示内容与排列顺序。 - - 选择模型名称格式:精简代号或原始模型 ID。 + - 选择模型名称格式:精简代号或原始模型 ID,并可独立设置 Orchestrator 系列显示精简代号(如 `orchestrator-argon`、`worker-agy-hydrogen`)或原始完整 ID。 - 版本更新与价格表同步:支持从云端 [`pricing-catalog.json`](pricing-catalog.json) 动态同步最新模型价格表,并提供「仅提示新版本,手动更新」(默认)、「自动更新」与「关闭更新」三档更新方式。 ## 模型识别与费用口径 @@ -98,8 +98,10 @@ Expand-Archive -Path "$env:TEMP\usage-monitor.zip" -DestinationPath $pluginsDir ## 启用与打开面板 1. 打开左侧边栏的 **Customizations**,进入 **Installed** 标签页,找到 `usage-monitor` 并开启。 -2. **顶部栏胶囊悬浮面板(默认双栖开启)**:开启插件后,后台 Sidecar 会自动在主对话窗口右上角顶部栏挂载实时状态与指标胶囊(悬停查看速览,左键展开完整四标签面板,右键强制刷新),全程不修改宿主 `app.asar`。如需关闭顶部栏胶囊,可在 **偏好设置 -> 面板挂载方式** 中切换为「仅侧边栏」。 -3. **右侧辅助栏面板**:点击对话窗口右上角 `⋮` -> **Extensions** -> **用量监控**,在右侧辅助栏展开面板;或在对话中输入「打开用量监控面板」通过快捷入口唤起。 +2. **顶部栏胶囊悬浮面板(默认开启,兼容 Antigravity 2.0 与 Antigravity IDE)**: + - **Antigravity 2.0 桌面端**:开启插件后即自动在主对话窗口右上角顶部栏挂载实时状态与指标胶囊(悬停查看速览,左键展开完整四标签面板,右键强制刷新),全程不修改宿主 `app.asar`。 + - **Antigravity IDE**:首次启用插件时,后台 Sidecar 会自动在 `~/.antigravity-ide/argv.json` 中补齐 `"remote-debugging-port": "0"`(保留原有注释与配置)。**完整重启一次 Antigravity IDE** 后,胶囊会自动停靠在 IDE 窗口最上方标题栏右侧。由于 Antigravity IDE 宿主暂未开放右侧 UI Sidecar 辅助栏,在 IDE 中请保持「双栖挂载」并直接点击顶部栏胶囊打开四标签面板。 +3. **右侧辅助栏面板(Antigravity 2.0)**:在 Antigravity 2.0 对话窗口点击右上角菜单打开右侧辅助栏中的 **用量监控**,或在 **偏好设置 -> 面板挂载方式** 中按需切换「顶部栏 + 侧边栏」与「仅侧边栏」。 ## 更新 diff --git a/mcp_config.json b/mcp_config.json new file mode 100644 index 0000000..56bac70 --- /dev/null +++ b/mcp_config.json @@ -0,0 +1,13 @@ +{ + "mcpServers": { + "host": { + "command": "node", + "args": [ + "${PLUGIN_ROOT}/sidecars/panel/mcp-entry.mjs" + ], + "env": { + "USAGE_MONITOR_PLUGIN_DATA": "${PLUGIN_DATA}" + } + } + } +} diff --git a/pricing-catalog.json b/pricing-catalog.json index dda1f5c..2f0a691 100644 --- a/pricing-catalog.json +++ b/pricing-catalog.json @@ -1,12 +1,16 @@ { "schemaVersion": 1, - "catalogVersion": "2026.11.11.4", - "updatedAt": "2026-11-11T23:20:00+09:00", + "catalogVersion": "2026.11.14.1", + "updatedAt": "2026-11-14T16:40:00+09:00", "latestPluginVersion": "1.4.4", "releaseUrl": "https://github.com/yuhuan2498281558/antigravity-usage-monitor/releases/latest", "downloadUrl": "https://github.com/yuhuan2498281558/antigravity-usage-monitor/releases/latest/download/usage-monitor.zip", "archiveFallbackUrl": "https://codeload.github.com/yuhuan2498281558/antigravity-usage-monitor/zip/refs/heads/main", "pricing": { + "gemini-pro-orchestrator": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "orch-carbon", "family": "Gemini" }, + "orchestrator-carbon": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "orch-carbon", "family": "Gemini" }, + "gemini-pro-orchestrator-argon": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "orch-argon", "family": "Gemini" }, + "orchestrator-argon": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "orch-argon", "family": "Gemini" }, "gemini-4-carbon-high": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "carbon-4-high", "family": "Gemini" }, "gemini-4-carbon-medium": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "carbon-4", "family": "Gemini" }, "gemini-4-carbon-low": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "carbon-4-low", "family": "Gemini" }, @@ -14,17 +18,22 @@ "gemini-4-argon-high": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "argon-4-high", "family": "Gemini" }, "gemini-4-argon-medium": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "argon-4", "family": "Gemini" }, "gemini-4-argon-low": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "argon-4-low", "family": "Gemini" }, + "gemini-4-argon-f": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "argon-4", "family": "Gemini" }, + "gemini-4-argon-disabled": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "argon-4", "family": "Gemini" }, "gemini-4-argon": { "input": 2.00, "cache": 0.10, "output": 10.0, "short": "argon-4", "family": "Gemini" }, - "gemini-4-hydrogen-high": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "hydrogen-4-high", "family": "Gemini" }, - "gemini-4-hydrogen-medium": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "hydrogen-4", "family": "Gemini" }, - "gemini-4-hydrogen-low": { "input": 0.30, "cache": 0.03, "output": 2.50, "short": "hydrogen-4-low", "family": "Gemini" }, - "gemini-4-hydrogen-tiered": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "hydrogen-4", "family": "Gemini" }, - "gemini-4-hydrogen": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "hydrogen-4", "family": "Gemini" }, - "gemini-hydrogen-high": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "hydrogen-high", "family": "Gemini" }, - "gemini-hydrogen-medium": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "hydrogen", "family": "Gemini" }, - "gemini-hydrogen-low": { "input": 0.30, "cache": 0.03, "output": 2.50, "short": "hydrogen-low", "family": "Gemini" }, - "gemini-hydrogen-tiered": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "hydrogen", "family": "Gemini" }, - "gemini-hydrogen": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "hydrogen", "family": "Gemini" }, + "gemini-4-hydrogen-xhigh": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen-4-xhigh", "family": "Gemini" }, + "gemini-4-hydrogen-high": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen-4-high", "family": "Gemini" }, + "gemini-4-hydrogen-medium": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen-4", "family": "Gemini" }, + "gemini-4-hydrogen-low": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen-4-low", "family": "Gemini" }, + "gemini-4-hydrogen-tiered": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen-4", "family": "Gemini" }, + "gemini-4-hydrogen": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen-4", "family": "Gemini" }, + "gemini-flash-worker-agy": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen-4", "family": "Gemini" }, + "gemini-hydrogen-xhigh": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen-xhigh", "family": "Gemini" }, + "gemini-hydrogen-high": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen-high", "family": "Gemini" }, + "gemini-hydrogen-medium": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen", "family": "Gemini" }, + "gemini-hydrogen-low": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen-low", "family": "Gemini" }, + "gemini-hydrogen-tiered": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen", "family": "Gemini" }, + "gemini-hydrogen": { "input": 1.50, "cache": 0.15, "output": 7.50, "short": "hydrogen", "family": "Gemini" }, "gemini-4-helix-high": { "input": 0.30, "cache": 0.03, "output": 2.50, "short": "helix-4-high", "family": "Gemini" }, "gemini-4-helix-medium": { "input": 0.30, "cache": 0.03, "output": 2.50, "short": "helix-4", "family": "Gemini" }, "gemini-4-helix-low": { "input": 0.30, "cache": 0.03, "output": 2.50, "short": "helix-4-low", "family": "Gemini" }, @@ -37,11 +46,13 @@ "gemini-3.8-flash-medium": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "flash-3.8", "family": "Gemini" }, "gemini-3.8-flash-low": { "input": 0.30, "cache": 0.03, "output": 2.50, "short": "flash-3.8-low", "family": "Gemini" }, "gemini-3.8-flash-tiered": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "flash-3.8", "family": "Gemini" }, + "gemini-3.8-flash-n": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "flash-3.8", "family": "Gemini" }, "gemini-3.8-flash": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "flash-3.8", "family": "Gemini" }, "gemini-3.7-flash-high": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "flash-3.7-high", "family": "Gemini" }, "gemini-3.7-flash-medium": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "flash-3.7", "family": "Gemini" }, "gemini-3.7-flash-low": { "input": 0.30, "cache": 0.03, "output": 2.50, "short": "flash-3.7-low", "family": "Gemini" }, "gemini-3.7-flash-tiered": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "flash-3.7", "family": "Gemini" }, + "gemini-3.7-flash-safety-le": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "flash-3.7", "family": "Gemini" }, "gemini-3.7-flash": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "flash-3.7", "family": "Gemini" }, "gemini-3.6-flash-high": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "flash-3.6-high", "family": "Gemini" }, "gemini-3.6-flash-medium": { "input": 0.75, "cache": 0.075, "output": 3.75, "short": "flash-3.6", "family": "Gemini" }, @@ -52,6 +63,10 @@ "gemini-3.5-flash-low": { "input": 1.50, "cache": 0.15, "output": 9.00, "short": "flash-3.5-low", "family": "Gemini" }, "gemini-3.5-flash-extra-low": { "input": 0.30, "cache": 0.03, "output": 2.50, "short": "flash-3.5-xlow", "family": "Gemini" }, "gemini-3.5-flash": { "input": 1.50, "cache": 0.15, "output": 9.00, "short": "flash-3.5", "family": "Gemini" }, + "gemini-3-flash-a": { "input": 1.50, "cache": 0.15, "output": 9.00, "short": "flash-3.5", "family": "Gemini" }, + "gemini-3-flash-b": { "input": 1.50, "cache": 0.15, "output": 9.00, "short": "flash-3.5", "family": "Gemini" }, + "gemini-3-flash-d": { "input": 1.50, "cache": 0.15, "output": 9.00, "short": "flash-3.5", "family": "Gemini" }, + "gemini-3-flash-agent": { "input": 1.50, "cache": 0.15, "output": 9.00, "short": "flash-3.5", "family": "Gemini" }, "gemini-3.5-flash-lite": { "input": 0.30, "cache": 0.03, "output": 2.50, "short": "flash-3.5-lite", "family": "Gemini" }, "gemini-3.1-pro-high": { "input": 2.00, "cache": 0.20, "output": 12.0, "short": "pro-3.1-high", "family": "Gemini" }, "gemini-3.1-pro-low": { "input": 2.00, "cache": 0.20, "output": 12.0, "short": "pro-3.1-low", "family": "Gemini" }, @@ -59,11 +74,15 @@ "gemini-3.1-pro-preview": { "input": 2.00, "cache": 0.20, "output": 12.0, "short": "pro-3.1", "family": "Gemini" }, "gemini-3.1-pro-preview-customtools": { "input": 2.00, "cache": 0.20, "output": 12.0, "short": "pro-3.1", "family": "Gemini" }, "gemini-3.1-pro": { "input": 2.00, "cache": 0.20, "output": 12.0, "short": "pro-3.1", "family": "Gemini" }, + "gemini-pro-default": { "input": 2.00, "cache": 0.20, "output": 12.0, "short": "pro-3.1", "family": "Gemini" }, + "gemini-pro-agent": { "input": 2.00, "cache": 0.20, "output": 12.0, "short": "pro-3.1", "family": "Gemini" }, + "gemini-pro-b": { "input": 2.00, "cache": 0.20, "output": 12.0, "short": "pro-3.1", "family": "Gemini" }, "gemini-3.1-flash-lite-preview": { "input": 0.25, "cache": 0.025, "output": 1.50, "short": "flash-3.1-lite", "family": "Gemini" }, "gemini-3.1-flash-lite": { "input": 0.25, "cache": 0.025, "output": 1.50, "short": "flash-3.1-lite", "family": "Gemini" }, "gemini-for-google-3.1-flash": { "input": 0.50, "cache": 0.05, "output": 3.00, "short": "flash-3.1", "family": "Gemini" }, "gemini-3.1-flash-image": { "input": 0.50, "cache": 0.05, "output": 3.00, "short": "flash-3.1-img", "family": "Gemini" }, "gemini-3-flash-preview": { "input": 0.50, "cache": 0.05, "output": 3.00, "short": "flash-3", "family": "Gemini" }, + "gemini-3-flash-c": { "input": 0.50, "cache": 0.05, "output": 3.00, "short": "flash-3", "family": "Gemini" }, "gemini-3-flash": { "input": 0.50, "cache": 0.05, "output": 3.00, "short": "flash-3", "family": "Gemini" }, "gemini-3-pro-image": { "input": 2.00, "cache": 0.20, "output": 12.0, "short": "pro-3-img", "family": "Gemini" }, "gemini-2.5-pro": { "input": 1.25, "cache": 0.125, "output": 10.0, "short": "pro-2.5", "family": "Gemini" }, @@ -128,7 +147,17 @@ "gpt-oss-120b-medium": { "input": 0.80, "cache": 0.10, "output": 2.40, "short": "gpt-oss", "family": "GPT" } }, "placeholders": { + "MODEL_PLACEHOLDER_M667": { "modelId": "gemini-pro-orchestrator", "label": "Orchestrator (Carbon)" }, + "MODEL_PLACEHOLDER_M681": { "modelId": "gemini-pro-orchestrator-argon", "label": "Orchestrator (Argon)" }, + "MODEL_PLACEHOLDER_M669": { "modelId": "gemini-flash-worker-agy", "label": "Orchestrator Worker (Hydrogen)" }, "MODEL_PLACEHOLDER_M429": { "modelId": "gemini-4-carbon-high", "label": "Gemini 4 Carbon (High)" }, + "MODEL_PLACEHOLDER_M427": { "modelId": "gemini-4-carbon-high", "label": "Gemini 4 Carbon (High)" }, + "MODEL_PLACEHOLDER_M437": { "modelId": "gemini-4-carbon-medium", "label": "Gemini 4 Carbon (Medium)" }, + "MODEL_PLACEHOLDER_M438": { "modelId": "gemini-4-carbon-low", "label": "Gemini 4 Carbon (Low)" }, + "MODEL_PLACEHOLDER_M528": { "modelId": "gemini-4-hydrogen-xhigh", "label": "Gemini 4 Hydrogen (XHigh)" }, + "MODEL_PLACEHOLDER_M525": { "modelId": "gemini-4-hydrogen-high", "label": "Gemini 4 Hydrogen (High)" }, + "MODEL_PLACEHOLDER_M526": { "modelId": "gemini-4-hydrogen-medium", "label": "Gemini 4 Hydrogen (Medium)" }, + "MODEL_PLACEHOLDER_M527": { "modelId": "gemini-4-hydrogen-low", "label": "Gemini 4 Hydrogen (Low)" }, "MODEL_PLACEHOLDER_M417": { "modelId": "gemini-4-argon-high", "label": "Gemini 4 Argon (High)" }, "MODEL_PLACEHOLDER_M418": { "modelId": "gemini-4-argon-medium", "label": "Gemini 4 Argon (Medium)" }, "MODEL_PLACEHOLDER_M419": { "modelId": "gemini-4-argon-low", "label": "Gemini 4 Argon (Low)" }, @@ -140,24 +169,32 @@ "MODEL_PLACEHOLDER_M299": { "modelId": "gemini-3.7-flash-medium", "label": "Gemini 3.7 Flash (Medium)" }, "MODEL_PLACEHOLDER_M300": { "modelId": "gemini-3.7-flash-low", "label": "Gemini 3.7 Flash (Low)" }, "MODEL_PLACEHOLDER_M301": { "modelId": "gemini-3.7-flash-tiered", "label": "Gemini 3.7 Flash (Tiered)" }, + "MODEL_PLACEHOLDER_M264": { "modelId": "gemini-3.6-flash-high", "label": "Gemini 3.6 Flash (High)" }, "MODEL_PLACEHOLDER_M71": { "modelId": "gemini-3.6-flash-high", "label": "Gemini 3.6 Flash (High)" }, "MODEL_PLACEHOLDER_M72": { "modelId": "gemini-3.6-flash-medium", "label": "Gemini 3.6 Flash (Medium)" }, "MODEL_PLACEHOLDER_M73": { "modelId": "gemini-3.6-flash-low", "label": "Gemini 3.6 Flash (Low)" }, "MODEL_PLACEHOLDER_M196": { "modelId": "gemini-3.6-flash", "label": "Gemini 3.6 Flash" }, "MODEL_PLACEHOLDER_M149": { "modelId": "gemini-3.5-flash-high", "label": "Gemini 3.5 Flash (High)" }, + "MODEL_PLACEHOLDER_M132": { "modelId": "gemini-3.5-flash-high", "label": "Gemini 3.5 Flash (High)" }, + "MODEL_PLACEHOLDER_M84": { "modelId": "gemini-3.5-flash-high", "label": "Gemini 3.5 Flash (High)" }, + "MODEL_PLACEHOLDER_M15": { "modelId": "gemini-3.5-flash-high", "label": "Gemini 3.5 Flash (High)" }, + "MODEL_PLACEHOLDER_M133": { "modelId": "gemini-3.5-flash", "label": "Gemini 3.5 Flash" }, "MODEL_PLACEHOLDER_M20": { "modelId": "gemini-3.5-flash", "label": "Gemini 3.5 Flash" }, "MODEL_PLACEHOLDER_M187": { "modelId": "gemini-3.5-flash-extra-low", "label": "Gemini 3.5 Flash (Extra Low)" }, "MODEL_PLACEHOLDER_M198": { "modelId": "gemini-3.5-flash-lite", "label": "Gemini 3.5 Flash Lite" }, "MODEL_PLACEHOLDER_M37": { "modelId": "gemini-3.1-pro-high", "label": "Gemini 3.1 Pro (High)" }, + "MODEL_PLACEHOLDER_M16": { "modelId": "gemini-3.1-pro-high", "label": "Gemini 3.1 Pro (High)" }, "MODEL_PLACEHOLDER_M36": { "modelId": "gemini-3.1-pro-low", "label": "Gemini 3.1 Pro (Low)" }, "MODEL_PLACEHOLDER_M50": { "modelId": "gemini-3.1-flash-lite", "label": "Gemini 3.1 Flash Lite" }, "MODEL_PLACEHOLDER_M59": { "modelId": "gemini-for-google-3.1-flash", "label": "Gemini for Google 3.1 Flash" }, "MODEL_PLACEHOLDER_M21": { "modelId": "gemini-3.1-flash-image", "label": "Gemini 3.1 Flash Image" }, + "MODEL_PLACEHOLDER_M47": { "modelId": "gemini-3-flash", "label": "Gemini 3 Flash" }, "MODEL_PLACEHOLDER_M18": { "modelId": "gemini-3-flash", "label": "Gemini 3 Flash" }, "MODEL_PLACEHOLDER_M9": { "modelId": "gemini-3-pro-image", "label": "Gemini 3 Pro Image" }, "MODEL_GOOGLE_GEMINI_2_5_PRO": { "modelId": "gemini-2.5-pro", "label": "Gemini 2.5 Pro" }, "MODEL_GOOGLE_GEMINI_2_5_FLASH": { "modelId": "gemini-2.5-flash", "label": "Gemini 2.5 Flash" }, "MODEL_GOOGLE_GEMINI_2_5_FLASH_THINKING": { "modelId": "gemini-2.5-flash", "label": "Gemini 2.5 Flash (Thinking)" }, + "MODEL_PLACEHOLDER_M330": { "modelId": "gemini-2.5-flash-lite", "label": "Gemini 2.5 Flash Lite" }, "MODEL_GOOGLE_GEMINI_2_5_FLASH_LITE": { "modelId": "gemini-2.5-flash-lite", "label": "Gemini 2.5 Flash Lite" }, "MODEL_PLACEHOLDER_M406": { "modelId": "claude-opus-5-5-max", "label": "Claude Opus 5.5 (Max)" }, "MODEL_PLACEHOLDER_M402": { "modelId": "claude-opus-5-5-high", "label": "Claude Opus 5.5 (High)" }, diff --git a/sidecars/panel/app.js b/sidecars/panel/app.js index 3b92f8b..a63914a 100644 --- a/sidecars/panel/app.js +++ b/sidecars/panel/app.js @@ -565,6 +565,9 @@ function formatCnyApprox(usdAmount, rate = 7.2) { function formatDateSpanBadge(startMs, endMs) { const s = startMs && Number.isFinite(startMs) ? new Date(startMs) : new Date(); const e = endMs && Number.isFinite(endMs) ? new Date(endMs) : new Date(); + if (s.getFullYear() !== e.getFullYear()) { + return `${s.getFullYear()}年${s.getMonth() + 1}月${s.getDate()}日 ~ ${e.getFullYear()}年${e.getMonth() + 1}月${e.getDate()}日`; + } return `${s.getMonth() + 1}月${s.getDate()}日 ~ ${e.getMonth() + 1}月${e.getDate()}日`; } @@ -632,6 +635,270 @@ function formatElapsedSec(seconds) { return `${h}h ${remM}m`; } +/** + * 归一化 Orchestrator 系列 ID 显示格式枚举(`'compact'` 精简代号 vs `'full'` 原始完整 ID,默认 `'compact'`)。 + * + * @param {unknown} mode + * @returns {'compact'|'full'} + */ +function normalizeOrchestratorIdDisplayMode(mode) { + return String(mode ?? '').trim().toLowerCase() === 'full' ? 'full' : 'compact'; +} + +/** + * 统一解析步骤、会话摘要或模型汇总行面向用户的模型显示文本与悬停提示。 + * + * 规则: + * - Orchestrator 系列(`Orchestrator (Carbon)`、`Orchestrator (Argon)`、`gemini-flash-worker-agy` / `M669`) + * 独立遵循 `orchestratorIdMode`(`'compact'` 显示 `orchestrator-carbon` / `orchestrator-argon` / `worker-agy-hydrogen`; + * `'full'` 显示带括号标注的完整上游 ID),不受普通模型“精简代号 / 原始模型 ID”切换影响; + * - 其余普通模型继续按 `showUpstreamModel` 与视图选项切换。 + * + * @param {object|null|undefined} target + * @param {{ showUpstreamModel?: boolean, orchestratorIdMode?: string }|boolean} [settings] + * @param {{ preferLabelInShort?: boolean, fallback?: string }} [options] + * @returns {{ text: string, title: string, isOrchestratorSeries: boolean }} + */ +function resolveModelDisplayInfo(target, settings = {}, options = {}) { + const showUpstream = + typeof settings === 'boolean' ? settings : Boolean(settings?.showUpstreamModel); + const orchestratorMode = normalizeOrchestratorIdDisplayMode( + typeof settings === 'object' && settings ? settings.orchestratorIdMode : 'compact' + ); + const preferLabelInShort = Boolean(options?.preferLabelInShort); + const fallback = options?.fallback ?? '模型未知'; + + if (!target || typeof target !== 'object') { + return { text: fallback, title: fallback, isOrchestratorSeries: false }; + } + + const shortText = String( + target.activeModelShort ?? target.modelShort ?? target.shortName ?? '' + ).trim(); + const labelText = String( + target.activeModelLabel ?? target.modelLabel ?? target.label ?? '' + ).trim(); + const upstreamText = String( + target.activeModelUpstream ?? target.modelUpstream ?? target.upstreamName ?? '' + ).trim(); + const responseText = String(target.responseModel ?? '').trim(); + const modelKeyText = String(target.modelKey ?? '').trim(); + + const isCompaction = + Boolean(target.isCompactionStep) || + /·压缩\s*$/.test(shortText) || + /·压缩\s*$/.test(upstreamText) || + /·压缩\s*$/.test(labelText); + + const combined = `${modelKeyText} ${shortText} ${labelText} ${upstreamText} ${responseText}`; + const isOrchWorker = + /\bMODEL_PLACEHOLDER_M669\b|\b[a-z0-9.-]*worker-agy\b|\bworker-agy-hydrogen\b|\bOrchestrator\s+Worker\b/i.test( + combined + ); + const isOrchSeries = + isOrchWorker || + /\bgemini-pro-orchestrator(?:-argon)?\b|\borchestrator-(?:carbon|argon)\b|\borch-(?:carbon|argon)(?:·压缩)?(?=\s|$)|Orchestrator\s*\((?:Carbon|Argon)\)|\bMODEL_PLACEHOLDER_M(?:667|681)\b/i.test( + combined + ); + + if (isOrchSeries) { + let compactId = 'orchestrator-carbon'; + let fullId = 'gemini-pro-orchestrator (carbon-4)'; + if (isOrchWorker) { + compactId = 'worker-agy-hydrogen'; + fullId = 'gemini-flash-worker-agy (hydrogen-4)'; + } else if (/\bargon\b|\bMODEL_PLACEHOLDER_M681\b|\borch-argon\b/i.test(combined)) { + compactId = 'orchestrator-argon'; + fullId = 'gemini-pro-orchestrator-argon (argon-4)'; + } + const suffix = isCompaction ? '·压缩' : ''; + const text = `${orchestratorMode === 'full' ? fullId : compactId}${suffix}`; + const multiUpstream = + Array.isArray(target.upstreamModels) && target.upstreamModels.length > 1 + ? target.upstreamModels.join(' / ') + : ''; + const title = multiUpstream || `${fullId}${suffix}`; + return { text, title, isOrchestratorSeries: true }; + } + + const standardText = + (showUpstream + ? upstreamText || responseText || shortText || labelText + : preferLabelInShort + ? labelText || shortText + : shortText || labelText) || fallback; + const standardTitle = + showUpstream && Array.isArray(target.upstreamModels) && target.upstreamModels.length > 1 + ? target.upstreamModels.join(' / ') + : standardText; + return { text: standardText, title: standardTitle, isOrchestratorSeries: false }; +} + +/** + * 按当前显示策略 (`resolveModelDisplayInfo`) 解析出的最终展示名称对模型统计列表执行二次去重归并, + * 确保当多个外层模型槽位映射到同一展示名(例如切换至“原始模型 ID”后共享同一 `upstreamName`)时, + * 不会在排行榜或总览中出现重复同名行,同时完整累加 Token、调用次数、未定价计数与速度/首字加权均值。 + * + * @param {object[]} [models=[]] + * @param {object|boolean} [settings={}] + * @param {{ preferLabelInShort?: boolean, fallback?: string }} [options={}] + * @returns {object[]} + */ +function mergeModelsByDisplayName(models = [], settings = {}, options = {}) { + if (!Array.isArray(models) || models.length === 0) return []; + const showUpstream = + typeof settings === 'boolean' ? settings : Boolean(settings?.showUpstreamModel); + const byDisplay = new Map(); + + for (const m of models) { + if (!m || typeof m !== 'object') continue; + const disp = resolveModelDisplayInfo(m, settings, options); + const key = String(disp.text || options?.fallback || '—').trim() || '—'; + + const calls = Math.max(0, Number(m.calls || 0)); + const inTok = Math.max(0, Number(m.inputTokens || 0)); + const cacheTok = Math.max(0, Number(m.cacheReadTokens || 0)); + const outTok = Math.max(0, Number(m.outputTokens || 0)); + const thinkTok = Math.max(0, Number(m.thinkingTokens || 0)); + const respTok = + m.responseTokens != null + ? Math.max(0, Number(m.responseTokens)) + : Math.max(0, outTok - thinkTok); + const totTok = Math.max(0, Number(m.totalTokens ?? inTok + cacheTok + outTok)); + const costUsd = Number.isFinite(Number(m.costUsd)) ? Math.max(0, Number(m.costUsd)) : 0; + const unpricedCalls = Math.max(0, Number(m.unpricedCalls || 0)); + + const speedSampleCount = Math.max(0, Number(m.speedSummary?.sampleCount || 0)); + const speedExcludedCount = Math.max(0, Number(m.speedSummary?.excludedCount || 0)); + const speedWeight = speedSampleCount > 0 ? speedSampleCount : Math.max(1, outTok || calls || 1); + const hasSpeed = m.avgTokPerSec != null && Number.isFinite(Number(m.avgTokPerSec)) && Number(m.avgTokPerSec) > 0; + + const ttftSampleCount = Math.max(0, Number(m.ttftSampleCount || 0)); + const ttftWeight = ttftSampleCount > 0 ? ttftSampleCount : Math.max(1, calls || 1); + const hasTtft = m.avgTtftSec != null && Number.isFinite(Number(m.avgTtftSec)) && Number(m.avgTtftSec) >= 0; + + let acc = byDisplay.get(key); + if (!acc) { + acc = { + baseItem: m, + mergedCount: 1, + displayText: key, + firstTitle: disp.title || key, + titleSet: new Set(disp.title ? [disp.title] : []), + upstreamSet: new Set( + Array.isArray(m.upstreamModels) ? m.upstreamModels.filter(Boolean) : [] + ), + sourceLabels: m.label ? [m.label] : [], + calls, + inputTokens: inTok, + cacheReadTokens: cacheTok, + outputTokens: outTok, + thinkingTokens: thinkTok, + responseTokens: respTok, + totalTokens: totTok, + costUsd, + unpricedCalls, + speedWeightedSum: hasSpeed ? Number(m.avgTokPerSec) * speedWeight : 0, + speedWeight: hasSpeed ? speedWeight : 0, + speedSampleCount, + speedExcludedCount, + ttftWeightedSum: hasTtft ? Number(m.avgTtftSec) * ttftWeight : 0, + ttftWeight: hasTtft ? ttftWeight : 0, + ttftSampleCount, + }; + if (m.upstreamName) acc.upstreamSet.add(m.upstreamName); + byDisplay.set(key, acc); + continue; + } + + acc.mergedCount += 1; + if (disp.title) acc.titleSet.add(disp.title); + if (Array.isArray(m.upstreamModels)) { + for (const u of m.upstreamModels) { + if (u) acc.upstreamSet.add(u); + } + } + if (m.upstreamName) acc.upstreamSet.add(m.upstreamName); + if (m.label && !acc.sourceLabels.includes(m.label)) { + acc.sourceLabels.push(m.label); + } + + acc.calls += calls; + acc.inputTokens += inTok; + acc.cacheReadTokens += cacheTok; + acc.outputTokens += outTok; + acc.thinkingTokens += thinkTok; + acc.responseTokens += respTok; + acc.totalTokens += totTok; + acc.costUsd += costUsd; + acc.unpricedCalls += unpricedCalls; + + if (hasSpeed) { + acc.speedWeightedSum += Number(m.avgTokPerSec) * speedWeight; + acc.speedWeight += speedWeight; + } + acc.speedSampleCount += speedSampleCount; + acc.speedExcludedCount += speedExcludedCount; + + if (hasTtft) { + acc.ttftWeightedSum += Number(m.avgTtftSec) * ttftWeight; + acc.ttftWeight += ttftWeight; + } + acc.ttftSampleCount += ttftSampleCount; + } + + return Array.from(byDisplay.values()).map((acc) => { + if (acc.mergedCount === 1) { + return { + ...acc.baseItem, + displayText: acc.displayText, + displayTitle: acc.firstTitle, + sourceLabels: acc.sourceLabels, + }; + } + const promptTok = acc.inputTokens + acc.cacheReadTokens; + const cacheHitPct = promptTok > 0 ? +((acc.cacheReadTokens / promptTok) * 100).toFixed(1) : 0; + const avgTokPerSec = + acc.speedWeight > 0 ? +(acc.speedWeightedSum / acc.speedWeight).toFixed(1) : null; + const avgTtftSec = + acc.ttftWeight > 0 ? +(acc.ttftWeightedSum / acc.ttftWeight).toFixed(1) : null; + const upstreamModels = Array.from(acc.upstreamSet); + const displayTitle = + showUpstream && upstreamModels.length > 1 + ? upstreamModels.join(' / ') + : Array.from(acc.titleSet).join(' / ') || acc.displayText; + + return { + ...acc.baseItem, + calls: acc.calls, + inputTokens: acc.inputTokens, + cacheReadTokens: acc.cacheReadTokens, + outputTokens: acc.outputTokens, + thinkingTokens: acc.thinkingTokens, + responseTokens: acc.responseTokens, + totalTokens: acc.totalTokens, + costUsd: +acc.costUsd.toFixed(6), + unpricedCalls: acc.unpricedCalls, + cacheHitPct, + avgTokPerSec, + avgTtftSec, + ttftSampleCount: acc.ttftSampleCount, + speedSummary: acc.baseItem.speedSummary + ? { + ...acc.baseItem.speedSummary, + sampleCount: acc.speedSampleCount, + excludedCount: acc.speedExcludedCount, + avgTokPerSec, + } + : undefined, + upstreamModels, + displayText: acc.displayText, + displayTitle, + sourceLabels: acc.sourceLabels, + }; + }); +} + // --- src/core/httpClient.js --- /** * @fileoverview Async HTTP client with AbortController cancellation for stale @@ -869,8 +1136,13 @@ const uiStore = createReactiveStore({ */ +const CASCADE_UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; + /** - * 在主窗口双栖模式下,从宿主页面路径 `/c/` 提取当前正在浏览的会话 ID。 + * 在主窗口双栖模式下,提取当前正在浏览的会话 ID: + * 1. 优先解析 Antigravity 2.0 路由路径 `/c/`; + * 2. 在 Antigravity IDE (`workbench.html`) 无路径路由时,回退读取活跃对话视图 + * `[data-testid="conversation-view"][data-cascade-id]` 或侧栏选中项。 * * @returns {string} */ @@ -878,7 +1150,63 @@ function extractHostRouteCascadeId() { if (typeof window === 'undefined' || !isWindowOverlayMode()) return ''; const pathname = String(window.location?.pathname || ''); const m = pathname.match(/^\/c\/([a-f0-9-]{36})(?:\/|$)/i); - return m ? m[1] : ''; + if (m && CASCADE_UUID_RE.test(m[1])) { + return m[1]; + } + const extBridgeRouteId = String(window.__AGUsageMonitorBridge?.hostRouteCascadeId || '').trim(); + if (extBridgeRouteId && CASCADE_UUID_RE.test(extBridgeRouteId)) { + return extBridgeRouteId; + } + try { + if (typeof document === 'undefined' || typeof document.querySelector !== 'function') { + return ''; + } + const selectedRow = document.querySelector( + '[data-testid^="conversation-row-"][data-selected="true"][data-cascade-id]' + ); + const selectedRowId = String(selectedRow?.getAttribute?.('data-cascade-id') || '').trim(); + + if (typeof document.querySelectorAll === 'function') { + const views = document.querySelectorAll('[data-testid="conversation-view"][data-cascade-id]'); + const visibleIds = []; + let focusedId = ''; + const activeEl = document.activeElement || null; + for (const viewEl of views) { + const cid = String(viewEl?.getAttribute?.('data-cascade-id') || '').trim(); + if (!CASCADE_UUID_RE.test(cid)) continue; + if (viewEl.hasAttribute?.('hidden')) continue; + if (viewEl.getBoundingClientRect) { + const r = viewEl.getBoundingClientRect(); + if (r.width <= 0 && r.height <= 0) continue; + } + visibleIds.push(cid); + if (activeEl && viewEl.contains?.(activeEl)) { + focusedId = cid; + } + } + if (focusedId) return focusedId; + if ( + selectedRowId && + CASCADE_UUID_RE.test(selectedRowId) && + visibleIds.some((id) => id.toLowerCase() === selectedRowId.toLowerCase()) + ) { + return selectedRowId; + } + if (visibleIds.length > 0) return visibleIds[0]; + } + + const singleView = document.querySelector('[data-testid="conversation-view"][data-cascade-id]'); + const singleViewId = String(singleView?.getAttribute?.('data-cascade-id') || '').trim(); + if (CASCADE_UUID_RE.test(singleViewId)) { + return singleViewId; + } + if (CASCADE_UUID_RE.test(selectedRowId)) { + return selectedRowId; + } + } catch { + // 忽略宿主 DOM 查询异常 + } + return ''; } const initialConversationId = @@ -951,19 +1279,67 @@ function normalizeClientUpdateMode(mode, legacyAutoUpdate) { return 'manual'; } +function normalizeClientOrchestratorIdMode(mode) { + return String(mode ?? '').trim().toLowerCase() === 'full' ? 'full' : 'compact'; +} + +/** + * 归一化前端面板挂载方式(`'dual'` | `'composer'` | `'sidebar'`),兼容旧版 `enableWindowOverlay` 布尔字段。 + * + * @param {unknown} mode + * @param {unknown} [legacyEnableOverlay] + * @returns {'dual'|'composer'|'sidebar'} + */ +function normalizeClientWindowMountMode(mode, legacyEnableOverlay) { + const m = String(mode ?? '').trim().toLowerCase(); + if (m === 'composer' || m === 'input') return 'composer'; + if (m === 'sidebar' || m === 'off') return 'sidebar'; + if (m === 'dual' || m === 'topbar') return 'dual'; + if (legacyEnableOverlay === false) return 'sidebar'; + return 'dual'; +} + function isEquivalentTelemetry(prev, next) { if (!prev || !next) return false; if (prev === next) return true; - // 1. 比对系统设置项(模型显示策略、周预算模式与额度、插件更新策略、双栖与顶栏槽位配置) + // 1. 比对系统设置项(模型显示策略、Orchestrator ID 显示风格、周预算模式与额度、插件更新策略、双栖与顶栏槽位配置) const pAct = prev.activeConversation; const nAct = next.activeConversation; if (prev.settings?.showUpstreamModel !== next.settings?.showUpstreamModel) return false; + const prevOrchIdMode = String(prev.settings?.orchestratorIdMode ?? 'compact').trim().toLowerCase() === 'full' ? 'full' : 'compact'; + const nextOrchIdMode = String(next.settings?.orchestratorIdMode ?? 'compact').trim().toLowerCase() === 'full' ? 'full' : 'compact'; + if (prevOrchIdMode !== nextOrchIdMode) { + return false; + } if (prev.settings?.weeklyLimitMode !== next.settings?.weeklyLimitMode) return false; if (prev.settings?.weeklyTokenBudget !== next.settings?.weeklyTokenBudget) return false; if (prev.settings?.weeklyCostBudget !== next.settings?.weeklyCostBudget) return false; if ((prev.settings?.pluginUpdateMode ?? '') !== (next.settings?.pluginUpdateMode ?? '')) return false; if (prev.settings?.autoUpdatePlugin !== next.settings?.autoUpdatePlugin) return false; + const rawPrevMount = String(prev.settings?.windowMountMode ?? '').trim().toLowerCase(); + const prevMountMode = + rawPrevMount === 'composer' || rawPrevMount === 'input' + ? 'composer' + : rawPrevMount === 'sidebar' || rawPrevMount === 'off' + ? 'sidebar' + : rawPrevMount === 'dual' || rawPrevMount === 'topbar' + ? 'dual' + : prev.settings?.enableWindowOverlay === false + ? 'sidebar' + : 'dual'; + const rawNextMount = String(next.settings?.windowMountMode ?? '').trim().toLowerCase(); + const nextMountMode = + rawNextMount === 'composer' || rawNextMount === 'input' + ? 'composer' + : rawNextMount === 'sidebar' || rawNextMount === 'off' + ? 'sidebar' + : rawNextMount === 'dual' || rawNextMount === 'topbar' + ? 'dual' + : next.settings?.enableWindowOverlay === false + ? 'sidebar' + : 'dual'; + if (prevMountMode !== nextMountMode) return false; if (prev.settings?.enableWindowOverlay !== next.settings?.enableWindowOverlay) return false; if ((prev.settings?.showTopbarMultiSession !== false) !== (next.settings?.showTopbarMultiSession !== false)) { return false; @@ -1113,8 +1489,12 @@ function isEquivalentTelemetry(prev, next) { bs?.tokPerSec !== as?.tokPerSec || bs?.ttftSec !== as?.ttftSec || bs?.outputTokens !== as?.outputTokens || + bs?.thinkingTokens !== as?.thinkingTokens || + bs?.responseTokens !== as?.responseTokens || bs?.inputTokens !== as?.inputTokens || bs?.cacheReadTokens !== as?.cacheReadTokens || + bs?.contextTokens !== as?.contextTokens || + bs?.cacheHitPct !== as?.cacheHitPct || bs?.selectedSpeedReason !== as?.selectedSpeedReason ) { return false; @@ -1153,8 +1533,12 @@ function isEquivalentTelemetry(prev, next) { before.tokPerSec !== after.tokPerSec || before.ttftSec !== after.ttftSec || before.outputTokens !== after.outputTokens || + before.thinkingTokens !== after.thinkingTokens || + before.responseTokens !== after.responseTokens || before.inputTokens !== after.inputTokens || before.cacheReadTokens !== after.cacheReadTokens || + before.contextTokens !== after.contextTokens || + before.cacheHitPct !== after.cacheHitPct || before.selectedSpeedReason !== after.selectedSpeedReason ) { return false; @@ -1291,7 +1675,13 @@ function isEquivalentTelemetry(prev, next) { pPools[i]?.resetTime !== nPools[i]?.resetTime || pPools[i]?.weeklyUsedPct !== nPools[i]?.weeklyUsedPct || pPools[i]?.weeklyRemainingPct !== nPools[i]?.weeklyRemainingPct || - pPools[i]?.weeklyResetTime !== nPools[i]?.weeklyResetTime + pPools[i]?.weeklyResetTime !== nPools[i]?.weeklyResetTime || + pPools[i]?.cycle5h?.tokens !== nPools[i]?.cycle5h?.tokens || + pPools[i]?.cycle5h?.costUsd !== nPools[i]?.cycle5h?.costUsd || + pPools[i]?.cycle5h?.calls !== nPools[i]?.cycle5h?.calls || + pPools[i]?.cycleWeekly?.tokens !== nPools[i]?.cycleWeekly?.tokens || + pPools[i]?.cycleWeekly?.costUsd !== nPools[i]?.cycleWeekly?.costUsd || + pPools[i]?.cycleWeekly?.calls !== nPools[i]?.cycleWeekly?.calls ) { return false; } @@ -1476,6 +1866,20 @@ async function saveSettingsPatch(patch) { if (Object.prototype.hasOwnProperty.call(safePatch, 'topbarCapsuleSlots')) { safePatch.topbarCapsuleSlots = normalizeClientTopbarSlots(safePatch.topbarCapsuleSlots); } + if (Object.prototype.hasOwnProperty.call(safePatch, 'orchestratorIdMode')) { + safePatch.orchestratorIdMode = normalizeClientOrchestratorIdMode(safePatch.orchestratorIdMode); + } + if (Object.prototype.hasOwnProperty.call(safePatch, 'windowMountMode')) { + const normMount = normalizeClientWindowMountMode( + safePatch.windowMountMode, + safePatch.enableWindowOverlay + ); + safePatch.windowMountMode = normMount; + safePatch.enableWindowOverlay = normMount !== 'sidebar'; + } else if (Object.prototype.hasOwnProperty.call(safePatch, 'enableWindowOverlay')) { + safePatch.enableWindowOverlay = Boolean(safePatch.enableWindowOverlay); + safePatch.windowMountMode = safePatch.enableWindowOverlay ? 'dual' : 'sidebar'; + } const prevTelemetry = telemetryStore.getState().telemetry; if (prevTelemetry?.settings) { telemetryStore.setState({ @@ -1806,10 +2210,45 @@ const TopLongPillNav = defineComponent({ // --- src/components/ui/CustomSelect.js --- /** * @fileoverview Bespoke CustomSelect dropdown component replacing native /