@mars-sea/dsh-commandcode-provider 0.15.5 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +16 -3
- package/README.zh-CN.md +16 -3
- package/lib/client.js +299 -91
- package/lib/index.d.ts +17 -2
- package/lib/index.js +73 -29
- package/package.json +44 -43
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,32 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.16.1] - 2026-10-30
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **设置页开关改用宿主 `Switch` 组件(#108)。** 五个布尔设置(按套餐过滤模型、零数据保留、网页搜索、侧边栏额度、缓存图片卸载)原先是 `appearance:none` 的 checkbox 加伪元素画出的开关,现在是宿主 primitives 的 `Switch`(`<button role="switch" aria-checked>`),与宿主其他设置页开关同源,读屏读到的状态与画面不会再不一致。尺寸与颜色、圆角、焦点环、禁用态沿用宿主原语(36×20 轨道、16px 滑块),与宿主自带开关同尺寸;底色与滑块改为 160ms 同步过渡,按下时轻微缩小。点开关行的标题文字不再切换开关,需点开关本身。
|
|
12
|
+
|
|
13
|
+
## [0.16.0] - 2026-10-30
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **同步 Command Code CLI `1.88.0` → `1.88.1`(纯请求头同步)。** npm `latest` 于 `2026-10-27T23:06Z` 前进到 `1.88.1`,官方变更日志没有该版本条目(最新 CLI 条目仍是 `1.88.0`),所以结论来自产物级静态比对:请求路径、自定义请求头、环境变量与 `commandcode.ai` 地址的字符串集合(两版各 105 项)完全相同;`promptCache`(5)、`reasoning_effort`(7)、`max_tokens`(12)、`cache_control`(1)等字面量出现次数相同,`/alpha/generate` 调用点在屏蔽混淆标识符后逐字相同;订阅表与 ZDR(零数据保留)例外集(18)在审计 `cliDiff` 中为空。注册表唯一变化是新收录 `gpt-6.1-terra` 与 `moonshotai/Kimi-K3.1-Pro`——这两行快照早已按服务端目录收录,推理档位(五档/`low`、`high`、`max`)与上下文窗口(1,050,000/1,048,576)与快照一致,所以**所有快照表零变化**,`COMMAND_CODE_CLI_VERSION` 只随请求头更新,运行时行为不变。服务端目录没有再动(`?view=client` 的 `catalogVersion` 仍 `7f405e24…`,默认 94、client 106 行);审计在两条已知定价别名(`minimax/minimax-m3.1-flash`、`ornith/ornith-1.5-122b`)确认后为 `review-required`、错误 0,`candidateDiffs` 为空。官方 Desktop `0.1.58`/`0.1.59`(10-26/10-27)新增 Providers 页并把 Kimi K3.1 Pro 与 GPT-6.1 Terra 加入选择器,另有「首个回复前停滞更快切换备用 provider」「模型错误区分 provider 拒绝请求」两条说明;它们属 Desktop 行为,未验证对插件所连服务端的影响。
|
|
18
|
+
- **适配 DSH `0.2.2-alpha.2`:并行准入 `0.2.2` 通道,Node 下界抬到 `24.9`。**
|
|
19
|
+
- **准入范围**:`engines.dsh`、`dsh.compatibility.dsh` 与全部 34 个 `@deepseek-ai/dsh-*` peer/开发依赖改为 `>=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0`。两个分支并列是因为 `0.2.1` 的预发布序列是 `-rc.N`、`0.2.2` 的是 `-alpha.N`,一个区间表达不了;把上界推到 `0.3.0-0` 会连两代之间的空档一起放行。`dsh.compatibility.dshReleases` 补入 `0.2.2-alpha.2`(四条实测记录,`test:engine` 与 `test:install` 均 4/4)。
|
|
20
|
+
- **Node.js 要求从 22 提高到 24.9(不兼容旧 Node)**:`@deepseek-ai/dsh@0.2.2-alpha.2` 自己声明 `engines.node >=24.9.0`,插件既然准入它,整包下界就必须跟到同一水位。**在 Node 22/23 上安装或更新本插件会报 `EBADENGINE`**(警告,除非 npm 设了 `engine-strict=true`),且 `0.2.2` 引擎在那里确实起不来。`0.2.1` 的 RC 引擎仍能在 Node 22 运行,但 `engines.node` 是整包唯一的下界,对它们同样生效——这是同时准入两个通道的代价。执行 `nvm install 24 && nvm use 24` 或换用任意 Node 24.9+ 发行版即可。
|
|
21
|
+
- **配套版本**:`@deepseek-ai/cordis` 改为 `~4.0.5 || 4.0.6-alpha.1`、`@deepseek-ai/schemastery` 改为 `~3.18.5 || 3.18.6-alpha.1`。用精确版本而非 `~4.0.6-alpha.1` 分支,是因为后者会放行 `4.0.6-alpha.2` 这类没有任何引擎配对的版本。`0.2.2-alpha.2` 的 Cordis 把 Fiber 配置访问器拆成 `effectiveConfig`/`rawConfig`/`resolveConfig()`(`config`/`_config` 保留),`dsh-settings` 内部改读新访问器,因此它与 Cordis 必须成套升级。
|
|
22
|
+
- **CI**:三个 workflow 的 Node 从 22 升到 `24.9.0`。`publish.yml` 早已单独固定 `npm@11.21.0`,改 Node 不影响可信发布链。
|
|
23
|
+
- **插件代码无需改动**:rc.4 → alpha.2 共 7275 个变更路径、388 份包清单(采集错误为空),插件导入的 16 个宿主包无破坏性变化——`dsh-llm` 的 `LlmModelInfo.badge`、事件 `llm/models-updated`、`MessageSourceMap`/`PrincipalMap` 新成员,`dsh-web` 的 `WebSearchProvider.ready?()`、`searchReady()`/`fetchReady()`、`WebSource.summary`,`dsh-typert-protocol` 的 `TypertResourceDeclaration` 联合类型化,均为加性;插件用到的符号在 alpha.2 全部仍导出。
|
|
24
|
+
- **验证脚本两处适配**:分析历史夹具改用 `enter()` + `announce()`(`0.2.2-alpha.2` 在 `session/created` 通知完成前把会话保持只读,`enter()` 后立刻 `append()` 会抛错;`announce()` 在 rc.2 起就存在,旧引擎只是发出该事件,故不按引擎分支);新增费用投影探针,在真实 `sessionProjections` 注册表上验证 `commandCodeCost` 的注册与折叠——这条路径此前没有任何真实引擎覆盖,而 `0.2.2-alpha.2` 恰好重写了投影注册契约(`register()` 运行时值改为可调用的 thenable,同步 `ctx.effect` 写法保留兼容)。
|
|
25
|
+
- **复查(2026-10-28 晚)**:GitHub 补发了 `dsh-v0.2.1-rc.4` 与 `dsh-v0.2.2-alpha.2` 的 tag 与 release 说明。`0.2.2-alpha.2` 发布说明里 6 条与插件作者相关的迁移项(同步会话投影注册、Cordis Timer 返回值、`agent/request` 不再改路由、`tools.resolve`/`executable`、`tools.mode`/`DSH_TOOLS_MODE`、`app-boot` 导入)**逐条核对均未触及**;「未声明容量的自定义模型默认 1M/128K」只影响 `llm-pi-ai` provider,插件经 `resolveModel` 显式宣告容量,`compaction-basic` 的缺少 context 硬错误在 rc.4 与 alpha.2 两版相同。另补类型验证:在只装 alpha.2 宿主包的隔离树里对 `src`/`tests`/`tsdown.config.ts` 跑 `tsc --noEmit`,**退出码 0**——`import type` 的漂移 `test:engine` 查不到,此前是盲区。`dsh-v0.2.1-rc.4` 的源码 delta 也已可采(369 个变更路径、349 份包清单、错误为空),插件导入的 16 个包非测试源码零变更,与此前产物级结论一致。
|
|
26
|
+
- **未采纳**:`LlmModelInfo.badge` 与 `llm/models-updated` 尚未接入选择器标记,`WebSearchProvider.ready?()` 与 `WebSource.summary` 也未使用——三者都改变用户可见行为或需要新的产品决定,留待单独评估。决策与代价见 `docs/决策记录.md` 第八章第 17 条,对接口径见 `docs/对接说明.md`。
|
|
27
|
+
- **设置页卡片化重设计与交互手感(2026-10-29)。** 五个分组由扁平分隔改为 16px 圆角卡片,组头 52px、组标题 15px、页标题 22px,卡片内行间 .5px 细线;页头新增状态总览条(账户健康、月额度剩余、服务状态、模型范围),文案复用分组已有摘要与余额字符串,不新增词条;窄面板下状态条折为 2×2。动效统一走一条 ease-out 曲线:按钮、分段切换、图标按钮与「恢复默认」按下时轻微缩小(0.97/小图标 0.95),悬停底色与描边改为 150ms 渐变;保存条 48px,出现去掉回弹、出场快于入场;开关 40×24,底色与滑块同步过渡;额度进度条改用 `transform` 动画(满宽按比例 `translateX`,保留圆角端,不再触发重排);卡片首屏错峰淡入上移,提示块轻微下落淡入;图标按钮的键盘焦点环统一为品牌色描边。所有悬停效果只在有精确指针的设备上生效,触屏点击不再残留悬停色;顺带修正了输入框校验失败时悬停会盖掉红色描边。开启「减少动态效果」时去掉位移与缩放、保留淡入淡出。分组与账户卡片的展开收起保持瞬间切换。另外,「账户」分组说明文字与下方内容原本 0 间距贴在一起,现在留 12px,分组说明下直接接提示块或按模型覆盖表时同样适用。
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- **自动模式会选回用量已满的账号(#105)。** 账号卡片显示某账号「每周 100%」时,自动模式与「当前使用」徽标仍可能选它:轮转原本只认真实请求的拒绝标记,而标记只在内存里,进程重启或冷却提前到期后就没了,下一个请求要先白撞一次拒绝才换号。现在用量报告(设置页账号卡片、`/commandcode`)读到任一窗口已超限,就按账号池探测的同一口径给该账号打冷却标记,冷却到上游公布的重置时刻;报告本来就要请求这个接口,不增加任何调用。只打标记、不清标记:窗口显示未满时不会解除限流等窗口数据看不到的拒绝。
|
|
32
|
+
|
|
7
33
|
## [0.15.5] - 2026-10-27
|
|
8
34
|
|
|
9
35
|
|
package/README.md
CHANGED
|
@@ -18,7 +18,8 @@ Unofficial [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harnes
|
|
|
18
18
|
|
|
19
19
|
| | |
|
|
20
20
|
|---|---|
|
|
21
|
-
| Verified engines | dsh
|
|
21
|
+
| Verified engines | dsh `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4`, `0.2.2-alpha.2` |
|
|
22
|
+
| Node.js | **`>=24.9`** — raised from 22 in this release, see [Node.js 24.9 or newer](#nodejs-249-or-newer-is-required) |
|
|
22
23
|
| Install — web | `dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest` |
|
|
23
24
|
| Install — terminal | `dsh plugin --profile dsh-tui add @mars-sea/dsh-commandcode-provider@latest` |
|
|
24
25
|
| Config file | `$DSH_HOME/settings.yaml` → `llm-commandcode:` |
|
|
@@ -61,7 +62,19 @@ Unofficial [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harnes
|
|
|
61
62
|
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
|
|
62
63
|
```
|
|
63
64
|
|
|
64
|
-
This build admits **dsh `>=0.2.1-rc.2 <0.2.2-0`** — every RC of the `0.2.1` channel from `0.2.1-rc.2` onward. `0.2.1-rc.2` is what npm `latest` runs
|
|
65
|
+
This build admits **dsh `>=0.2.1-rc.2 <0.2.2-0`** — every RC of the `0.2.1` channel from `0.2.1-rc.2` onward — **and `>=0.2.2-alpha.2 <0.2.3-0`**, the `0.2.2` channel from its current alpha. `0.2.1-rc.2` is what npm `latest` runs, `0.2.1-rc.4` ships on `next`, and `0.2.2-alpha.2` is on `alpha`. All four are covered by the full engine matrix (`npm run test:engine`, `npm run test:install`). A later release of either channel is admitted without a plugin update, but stays unverified until a record is added to `dsh.compatibility.dshReleases`. `0.2.3` and later are deliberately excluded — the upper bounds are written `<0.2.2-0` / `<0.2.3-0` for exactly that reason. A profile on `0.2.0-rc.2`, `0.2.1-alpha.5` or older must upgrade its engine first. Compatibility details — the `engines.dsh` admission rule, package pairings, evidence — live in [engine compatibility](docs/agent-reference/engine-compatibility.md).
|
|
66
|
+
|
|
67
|
+
### Node.js 24.9 or newer is required
|
|
68
|
+
|
|
69
|
+
**This release raises the Node.js floor from 22 to 24.9. On Node 22 or 23, upgrade Node before updating this plugin.**
|
|
70
|
+
|
|
71
|
+
dsh `0.2.2-alpha.2` declares `engines.node >=24.9.0` and this plugin admits that engine, so the package-wide floor had to follow: a plugin that claims to support an engine must not be installable on a Node version that engine cannot start on. What that means in practice:
|
|
72
|
+
|
|
73
|
+
- `npm` reports `EBADENGINE` when installing or updating this plugin on Node 22/23. It is a warning, not a hard failure, unless your npm sets `engine-strict=true`.
|
|
74
|
+
- The `0.2.2` engines genuinely cannot run on Node 22/23, so a profile admitted there would fail at startup — the failure this floor exists to prevent.
|
|
75
|
+
- The `0.2.1` RC engines still run on Node 22, but `engines.node` is a single floor for the whole package, so it applies to them too. That is the cost of admitting two channels in one build.
|
|
76
|
+
|
|
77
|
+
`nvm install 24 && nvm use 24` (or any Node 24.9+ distribution) resolves it. Node 24 is a current LTS line.
|
|
65
78
|
|
|
66
79
|
**Older dsh releases** are no longer supported: the last plugin release for dsh 0.1.7 is `0.11.17`, for 0.1.2–0.1.6 it is `0.11.11`, and for the 0.5.0-era line `0.9.1` — all installed by exact version, none maintained.
|
|
67
80
|
|
|
@@ -152,7 +165,7 @@ With several Command Code subscriptions, the plugin **switches to the next accou
|
|
|
152
165
|
- **Dedicated models** — expand an account and pick its **Dedicated models** from the live catalog. Those requests serve from that account while it is usable; an exhausted account falls back to the normal rotation. A model belongs to one account at a time (stored as `modelAccountRules`).
|
|
153
166
|
- **Show only favorite models** — the **Visible models** picker in the **Models & context** card keeps only the checked models in the picker; unchecked shows all (the default).
|
|
154
167
|
|
|
155
|
-
Each account row shows its plan, status and 5-hour/weekly meters; expand it for the full report, or run `/commandcode`. The equivalent YAML is in [Configure](#configure).
|
|
168
|
+
Each account row shows its plan, status and 5-hour/weekly meters; expand it for the full report, or run `/commandcode`. When a refreshed report shows a spent window, that account also leaves automatic selection until the window resets. The equivalent YAML is in [Configure](#configure).
|
|
156
169
|
|
|
157
170
|
## Configure
|
|
158
171
|
|
package/README.zh-CN.md
CHANGED
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
| | |
|
|
20
20
|
|---|---|
|
|
21
|
-
| 已验证引擎 | dsh
|
|
21
|
+
| 已验证引擎 | dsh `0.2.1-rc.2`、`0.2.1-rc.3`、`0.2.1-rc.4`、`0.2.2-alpha.2` |
|
|
22
|
+
| Node.js | **`>=24.9`** —— 本版从 22 提高,见[需要 Node.js 24.9 或更高版本](#需要-nodejs-249-或更高版本) |
|
|
22
23
|
| 安装 —— 网页端 | `dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest` |
|
|
23
24
|
| 安装 —— 终端端 | `dsh plugin --profile dsh-tui add @mars-sea/dsh-commandcode-provider@latest` |
|
|
24
25
|
| 配置文件 | `$DSH_HOME/settings.yaml` → `llm-commandcode:` |
|
|
@@ -61,7 +62,19 @@
|
|
|
61
62
|
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
|
|
62
63
|
```
|
|
63
64
|
|
|
64
|
-
本构建准入 **dsh `>=0.2.1-rc.2 <0.2.2-0`** —— `0.2.1` 通道中 `0.2.1-rc.2` 及以后的每个 RC
|
|
65
|
+
本构建准入 **dsh `>=0.2.1-rc.2 <0.2.2-0`** —— `0.2.1` 通道中 `0.2.1-rc.2` 及以后的每个 RC —— **以及 `>=0.2.2-alpha.2 <0.2.3-0`**,即 `0.2.2` 通道从当前 alpha 起的每个版本。`0.2.1-rc.2` 是 npm `latest` 指向的版本,`0.2.1-rc.4` 挂在 `next`,`0.2.2-alpha.2` 挂在 `alpha`;这四个版本都跑过完整引擎矩阵(`npm run test:engine`、`npm run test:install`)。两个通道中更晚的版本无需更新插件即可准入,但在 `dsh.compatibility.dshReleases` 补上记录之前不算已验证。`0.2.3` 及以后被刻意排除 —— 两个区间上界分别写成 `<0.2.2-0` 与 `<0.2.3-0` 正是为了这一点。使用 `0.2.0-rc.2`、`0.2.1-alpha.5` 或更早版本的配置需先升级引擎,再安装本构建。兼容性细节 —— `engines.dsh` 准入规则、按引擎配对的包版本、验证证据 —— 见[引擎兼容](docs/agent-reference/engine-compatibility.md)。
|
|
66
|
+
|
|
67
|
+
### 需要 Node.js 24.9 或更高版本
|
|
68
|
+
|
|
69
|
+
**本版把 Node.js 下界从 22 提到 24.9。如果你在用 Node 22 或 23,请先升级 Node,再更新本插件。**
|
|
70
|
+
|
|
71
|
+
dsh `0.2.2-alpha.2` 自己声明 `engines.node >=24.9.0`,而本插件准入这个引擎,所以整包的 Node 下界必须跟着抬到同一水位:一个声称支持某引擎的插件,不该能被装到一个那个引擎根本起不来的 Node 上。实际影响:
|
|
72
|
+
|
|
73
|
+
- 在 Node 22/23 上安装或更新本插件时,`npm` 会报 `EBADENGINE`。这是警告而非硬失败 —— 除非你的 npm 设了 `engine-strict=true`。
|
|
74
|
+
- `0.2.2` 的引擎在 Node 22/23 上确实跑不起来,被准入却启动失败正是这条下界要挡的情况。
|
|
75
|
+
- `0.2.1` 的 RC 引擎仍能在 Node 22 上运行,但 `engines.node` 是整包唯一的下界,所以对它们同样生效。这是在一个构建里同时准入两个通道的代价。
|
|
76
|
+
|
|
77
|
+
执行 `nvm install 24 && nvm use 24`(或换用任意 Node 24.9+ 发行版)即可解决。Node 24 是当前 LTS 线。
|
|
65
78
|
|
|
66
79
|
**更早的 dsh 版本**已不再支持:覆盖 dsh 0.1.7 的最后一个插件版本是 `0.11.17`,0.1.2–0.1.6 线的最后一个版本是 `0.11.11`,0.5.0 时代 Harness 线的最后一个版本是 `0.9.1` —— 三者都按精确版本安装,且都不再维护。
|
|
67
80
|
|
|
@@ -152,7 +165,7 @@ cmd login # 写入 ~/.commandcode/auth.json
|
|
|
152
165
|
- **专用模型**:展开某个账户,从实时模型目录**多选**它的「专用模型」。请求这些模型且该账户可用时使用该账户;账户耗尽或密钥失效时自动回落到常规轮换。一个模型同一时间只属于一个账户,给另一个账户选择它会自动移过去(仍保存为 `modelAccountRules`)。
|
|
153
166
|
- **只显示常用模型**:在「模型与上下文」卡片的「可见模型」中勾选要保留的模型,模型选择器只列出这些;不勾选则显示全部(默认行为不变)。
|
|
154
167
|
|
|
155
|
-
每个账户行直接显示套餐、状态以及 5 小时 / 每周额度条,展开可查看完整报告,也可运行 `/commandcode
|
|
168
|
+
每个账户行直接显示套餐、状态以及 5 小时 / 每周额度条,展开可查看完整报告,也可运行 `/commandcode`。刷新到某个窗口已用满时,该账户同时退出自动选择,直到窗口重置。等价的 YAML 见[配置](#配置)一节。
|
|
156
169
|
|
|
157
170
|
## 配置
|
|
158
171
|
|
package/lib/client.js
CHANGED
|
@@ -3864,7 +3864,7 @@ window.__ModuleLoader__.load({
|
|
|
3864
3864
|
}
|
|
3865
3865
|
//#endregion
|
|
3866
3866
|
//#region package.json
|
|
3867
|
-
var version = "0.
|
|
3867
|
+
var version = "0.16.1";
|
|
3868
3868
|
var repository = {
|
|
3869
3869
|
"type": "git",
|
|
3870
3870
|
"url": "git+https://github.com/Mars-Sea/dsh-commandcode-provider.git"
|
|
@@ -4810,12 +4810,19 @@ window.__ModuleLoader__.load({
|
|
|
4810
4810
|
* One boolean field row rendered as a switch. The staged text is `'true'` /
|
|
4811
4811
|
* `'false'` / `''` (unset → `defaultChecked`); toggling stages the string the
|
|
4812
4812
|
* boolean field spec parses back into a real boolean on save.
|
|
4813
|
+
*
|
|
4814
|
+
* The control is the harness's own `Switch` primitive (issue #108), not a
|
|
4815
|
+
* restyled checkbox: a `<button role="switch" aria-checked>` whose drawing keys
|
|
4816
|
+
* off `aria-checked`, so what it shows cannot drift from what assistive tech
|
|
4817
|
+
* reads, and it matches the host's other settings switches. It takes no `id`,
|
|
4818
|
+
* so the row title is plain text and the switch carries the label as its
|
|
4819
|
+
* accessible name instead of through `<label htmlFor>`.
|
|
4813
4820
|
*/
|
|
4814
4821
|
function ToggleField({ id, label, hint, state, disabled, defaultChecked, onEdit, onReset, t }) {
|
|
4815
4822
|
const checked = state.text === "" ? defaultChecked : state.text === "true";
|
|
4816
4823
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, {
|
|
4817
4824
|
title: label,
|
|
4818
|
-
|
|
4825
|
+
titleId: id,
|
|
4819
4826
|
tag: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverrideTag, {
|
|
4820
4827
|
label,
|
|
4821
4828
|
state,
|
|
@@ -4824,15 +4831,13 @@ window.__ModuleLoader__.load({
|
|
|
4824
4831
|
onReset
|
|
4825
4832
|
}),
|
|
4826
4833
|
description: hint,
|
|
4827
|
-
control: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4828
|
-
|
|
4829
|
-
className: "cc-toggle",
|
|
4830
|
-
type: "checkbox",
|
|
4831
|
-
role: "switch",
|
|
4834
|
+
control: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
|
|
4835
|
+
className: "cc-switch",
|
|
4832
4836
|
checked,
|
|
4837
|
+
label,
|
|
4833
4838
|
disabled,
|
|
4834
|
-
onChange: (
|
|
4835
|
-
})
|
|
4839
|
+
onChange: (next) => onEdit(next ? "true" : "false")
|
|
4840
|
+
})
|
|
4836
4841
|
});
|
|
4837
4842
|
}
|
|
4838
4843
|
/** One stat tile in the account card's summary grid. */
|
|
@@ -4890,7 +4895,7 @@ window.__ModuleLoader__.load({
|
|
|
4890
4895
|
"aria-valuenow": Math.round(ratio * 100),
|
|
4891
4896
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4892
4897
|
className: exceeded ? "cc-usageBarFill cc-usageBarFillWarn" : "cc-usageBarFill",
|
|
4893
|
-
style: {
|
|
4898
|
+
style: { transform: `translateX(${(ratio - 1) * 100}%)` }
|
|
4894
4899
|
})
|
|
4895
4900
|
}),
|
|
4896
4901
|
reset !== "" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
@@ -5222,6 +5227,128 @@ window.__ModuleLoader__.load({
|
|
|
5222
5227
|
});
|
|
5223
5228
|
}
|
|
5224
5229
|
/**
|
|
5230
|
+
* The glanceable header strip: account health, monthly remainder, service
|
|
5231
|
+
* status, model scope. Every string reuses one the groups already compute
|
|
5232
|
+
* (group summaries, balance labels, the service badge), so the strip adds no
|
|
5233
|
+
* locale keys and cannot disagree with the card below it. Cells are plain
|
|
5234
|
+
* text, not links — the groups beneath are the place to act.
|
|
5235
|
+
*/
|
|
5236
|
+
function StatusStrip({ t, state, usage, snapshot, probe }) {
|
|
5237
|
+
const rows = accountRows(state, usage, t);
|
|
5238
|
+
const issues = accountIssues(rows.map((row) => row.usage));
|
|
5239
|
+
const defaultRow = rows.find((row) => row.id === "default");
|
|
5240
|
+
const credits = defaultRow?.usage?.report?.credits;
|
|
5241
|
+
const monthly = credits !== void 0 && credits.monthlyReported !== false ? credits : void 0;
|
|
5242
|
+
const depleted = monthly !== void 0 && monthly.monthlyCredits <= 0;
|
|
5243
|
+
const planName = defaultRow?.usage?.report?.plan?.name ?? "";
|
|
5244
|
+
const overridden = modelsOverriddenCount(state);
|
|
5245
|
+
const view = serviceStatusView(snapshot, probe, t, Date.now());
|
|
5246
|
+
const serviceDot = view.badge.tone === "ok" ? "cc-tabDot cc-tabDotOk" : view.badge.tone === "warn" ? "cc-tabDot cc-tabDotWarn" : view.badge.tone === "error" ? "cc-tabDot cc-tabDotError" : "cc-tabDot cc-tabDotBlank";
|
|
5247
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5248
|
+
className: "cc-statusStrip",
|
|
5249
|
+
children: [
|
|
5250
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5251
|
+
className: "cc-statusCell",
|
|
5252
|
+
children: [
|
|
5253
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
5254
|
+
className: "cc-statusHead",
|
|
5255
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5256
|
+
className: issues.severe ? "cc-tabDot cc-tabDotError" : issues.count > 0 ? "cc-tabDot cc-tabDotWarn" : "cc-tabDot cc-tabDotOk",
|
|
5257
|
+
"aria-hidden": "true"
|
|
5258
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5259
|
+
className: "cc-statusLabel",
|
|
5260
|
+
children: t("accountsTitle")
|
|
5261
|
+
})]
|
|
5262
|
+
}),
|
|
5263
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5264
|
+
className: "cc-statusStripValue",
|
|
5265
|
+
children: rows.length === 1 ? t("accountsSummaryOne") : t("accountsSummaryMany", { count: rows.length })
|
|
5266
|
+
}),
|
|
5267
|
+
issues.count > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5268
|
+
className: "cc-statusSub",
|
|
5269
|
+
children: t("accountsSummaryIssues", { count: issues.count })
|
|
5270
|
+
}) : planName !== "" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5271
|
+
className: "cc-statusSub",
|
|
5272
|
+
children: planName
|
|
5273
|
+
}) : null
|
|
5274
|
+
]
|
|
5275
|
+
}),
|
|
5276
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5277
|
+
className: "cc-statusCell",
|
|
5278
|
+
children: [
|
|
5279
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
5280
|
+
className: "cc-statusHead",
|
|
5281
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5282
|
+
className: depleted ? "cc-tabDot cc-tabDotError" : monthly !== void 0 ? "cc-tabDot cc-tabDotOk" : "cc-tabDot cc-tabDotBlank",
|
|
5283
|
+
"aria-hidden": "true"
|
|
5284
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5285
|
+
className: "cc-statusLabel",
|
|
5286
|
+
children: t("usageMonthlyLeft")
|
|
5287
|
+
})]
|
|
5288
|
+
}),
|
|
5289
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5290
|
+
className: "cc-statusStripValue",
|
|
5291
|
+
children: monthly !== void 0 ? formatMoney(Math.max(0, monthly.monthlyCredits)) : "—"
|
|
5292
|
+
}),
|
|
5293
|
+
credits !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5294
|
+
className: "cc-statusSub",
|
|
5295
|
+
children: `${t("usagePurchased")} ${credits.purchasedReported === false ? "—" : formatMoney(credits.purchasedCredits)} · ${t("usageFree")} ${credits.freeReported === false ? "—" : formatMoney(credits.freeCredits)}`
|
|
5296
|
+
}) : null
|
|
5297
|
+
]
|
|
5298
|
+
}),
|
|
5299
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5300
|
+
className: "cc-statusCell",
|
|
5301
|
+
children: [
|
|
5302
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
5303
|
+
className: "cc-statusHead",
|
|
5304
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5305
|
+
className: serviceDot,
|
|
5306
|
+
"aria-hidden": "true"
|
|
5307
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5308
|
+
className: "cc-statusLabel",
|
|
5309
|
+
children: t("serviceStatusTitle")
|
|
5310
|
+
})]
|
|
5311
|
+
}),
|
|
5312
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5313
|
+
className: "cc-statusStripValue",
|
|
5314
|
+
children: view.badge.label
|
|
5315
|
+
}),
|
|
5316
|
+
view.updated !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5317
|
+
className: "cc-statusSub",
|
|
5318
|
+
children: view.updated
|
|
5319
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5320
|
+
className: "cc-statusSub",
|
|
5321
|
+
children: view.local
|
|
5322
|
+
})
|
|
5323
|
+
]
|
|
5324
|
+
}),
|
|
5325
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5326
|
+
className: "cc-statusCell",
|
|
5327
|
+
children: [
|
|
5328
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
5329
|
+
className: "cc-statusHead",
|
|
5330
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5331
|
+
className: "cc-tabDot",
|
|
5332
|
+
"aria-hidden": "true"
|
|
5333
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5334
|
+
className: "cc-statusLabel",
|
|
5335
|
+
children: t("modelsTitle")
|
|
5336
|
+
})]
|
|
5337
|
+
}),
|
|
5338
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5339
|
+
className: "cc-statusStripValue",
|
|
5340
|
+
children: state.visibleModelsAll ? t("visibleModelsSummaryAll") : t("visibleModelsSummary", { count: state.visibleModels.length })
|
|
5341
|
+
}),
|
|
5342
|
+
overridden > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5343
|
+
className: "cc-statusSub",
|
|
5344
|
+
children: overriddenText(overridden, t)
|
|
5345
|
+
}) : null
|
|
5346
|
+
]
|
|
5347
|
+
})
|
|
5348
|
+
]
|
|
5349
|
+
});
|
|
5350
|
+
}
|
|
5351
|
+
/**
|
|
5225
5352
|
* One top-level group of the page (决策记录第十章第4条). All five groups share
|
|
5226
5353
|
* this one shape so they cannot drift apart: the heading is an `h3` wrapping a
|
|
5227
5354
|
* single full-width button — chevron first, then the title and the summary
|
|
@@ -5232,14 +5359,15 @@ window.__ModuleLoader__.load({
|
|
|
5232
5359
|
* The body stays mounted and is hidden with the `hidden` attribute rather than
|
|
5233
5360
|
* unrendered: `aria-controls` then always points at a real element, and the
|
|
5234
5361
|
* save bar's locate action can focus an invalid field right after opening its
|
|
5235
|
-
* group. Folding is presentation only
|
|
5236
|
-
*
|
|
5362
|
+
* group. Folding is presentation only and instant toggling is deliberate (it
|
|
5363
|
+
* happens too often to be worth a wait); staged drafts, validation and the
|
|
5364
|
+
* save path are untouched (第六章第1、2条).
|
|
5237
5365
|
*/
|
|
5238
|
-
function FoldableGroup({ id, title,
|
|
5366
|
+
function FoldableGroup({ id, title, expanded, onToggle, badges, action, children }) {
|
|
5239
5367
|
const titleId = `cc-group-${id}-title`;
|
|
5240
5368
|
const bodyId = `cc-group-${id}-body`;
|
|
5241
5369
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
5242
|
-
className:
|
|
5370
|
+
className: "cc-group",
|
|
5243
5371
|
"aria-labelledby": titleId,
|
|
5244
5372
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5245
5373
|
className: "cc-groupHead",
|
|
@@ -5871,7 +5999,7 @@ window.__ModuleLoader__.load({
|
|
|
5871
5999
|
"aria-hidden": "true",
|
|
5872
6000
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5873
6001
|
className: limit.exceeded ? "cc-miniMeterFill cc-usageBarFillWarn" : "cc-miniMeterFill",
|
|
5874
|
-
style: {
|
|
6002
|
+
style: { transform: `translateX(${(ratio - 1) * 100}%)` }
|
|
5875
6003
|
})
|
|
5876
6004
|
}),
|
|
5877
6005
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -6506,7 +6634,6 @@ window.__ModuleLoader__.load({
|
|
|
6506
6634
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(FoldableGroup, {
|
|
6507
6635
|
id: "accounts",
|
|
6508
6636
|
title: t("accountsTitle"),
|
|
6509
|
-
divided: false,
|
|
6510
6637
|
expanded,
|
|
6511
6638
|
onToggle,
|
|
6512
6639
|
badges: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(GroupSummary, { parts: [rows.length === 1 ? t("accountsSummaryOne") : t("accountsSummaryMany", { count: rows.length })] }), issues.count > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -6974,6 +7101,13 @@ window.__ModuleLoader__.load({
|
|
|
6974
7101
|
className: "cc-intro",
|
|
6975
7102
|
children: t("intro")
|
|
6976
7103
|
}),
|
|
7104
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusStrip, {
|
|
7105
|
+
t,
|
|
7106
|
+
state,
|
|
7107
|
+
usage,
|
|
7108
|
+
snapshot: status.snapshot,
|
|
7109
|
+
probe: status.probe
|
|
7110
|
+
}),
|
|
6977
7111
|
!state.writable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Notice, {
|
|
6978
7112
|
icon: "lock",
|
|
6979
7113
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("readOnly") })
|
|
@@ -10291,13 +10425,26 @@ window.__ModuleLoader__.load({
|
|
|
10291
10425
|
* The settings-page stylesheet.
|
|
10292
10426
|
*
|
|
10293
10427
|
* Every size is the design canvas's (the cc-kit.css of the "CommandCode 设置页
|
|
10294
|
-
* 重设计" artboards, 2026-10-21
|
|
10295
|
-
*
|
|
10296
|
-
*
|
|
10297
|
-
*
|
|
10298
|
-
*
|
|
10299
|
-
*
|
|
10300
|
-
*
|
|
10428
|
+
* 重设计" artboards, 2026-10-21, as revised by the 2026-10-29 card redesign):
|
|
10429
|
+
* a row is 14px of vertical padding with a .5px hairline between rows, title
|
|
10430
|
+
* 14/22, description 12/18, a 24px gap to the control; a group is a 16px-radius
|
|
10431
|
+
* card on the raised surface with a 1px border-l2 stroke, its heading 52px
|
|
10432
|
+
* high; the page title is 22/28 and group titles 15/22, both 600. The page
|
|
10433
|
+
* renders with grayscale antialiasing and descriptive text in label-secondary.
|
|
10434
|
+
* A status strip under the header (account health, monthly remainder, service
|
|
10435
|
+
* status, model scope) reuses the groups' own summary strings, so it adds no
|
|
10436
|
+
* locale keys and cannot disagree with the card below it.
|
|
10437
|
+
*
|
|
10438
|
+
* Motion (2026-10-29): anything pressable scales on :active (0.97, the 20–28px
|
|
10439
|
+
* icon buttons 0.95) over 160ms of one strong ease-out,
|
|
10440
|
+
* cubic-bezier(.23,1,.32,1), which the fold chevron, save bar, usage bar,
|
|
10441
|
+
* card entrance and notice entrance share; colour and border changes fade over
|
|
10442
|
+
* 150ms `ease`. Only transform, opacity and colours animate — never layout.
|
|
10443
|
+
* Every :hover rule sits in the one `(hover:hover) and (pointer:fine)` block at
|
|
10444
|
+
* the end, so a tap on a touch screen does not leave a stuck hover colour;
|
|
10445
|
+
* :active stays outside it, since a press needs feedback on touch too. Folding
|
|
10446
|
+
* a group or an account card stays instant: it happens too often to be worth a
|
|
10447
|
+
* wait, and a hidden body keeps its `aria-controls` target mounted.
|
|
10301
10448
|
*
|
|
10302
10449
|
* Shapes follow one rule — clickable things are pills, fillable things are
|
|
10303
10450
|
* 8px. Buttons are drawn here (PageButton → cc-btn: md 32px, sm 28px, lg 36px
|
|
@@ -10311,27 +10458,61 @@ window.__ModuleLoader__.load({
|
|
|
10311
10458
|
* shares cc-hint / cc-badgeMuted / cc-input and keeps their colours.
|
|
10312
10459
|
*/
|
|
10313
10460
|
const PAGE_CSS = `
|
|
10314
|
-
.cc-section{max-width:720px;color:var(--dsw-alias-label-primary);flex-direction:column;display:flex;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
|
|
10315
|
-
.cc-title{margin:0;color:var(--dsw-alias-label-primary);font-size:
|
|
10461
|
+
.cc-section{max-width:720px;color:var(--dsw-alias-label-primary);flex-direction:column;display:flex;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--cc-ease-out:cubic-bezier(.23,1,.32,1)}
|
|
10462
|
+
.cc-title{margin:0;color:var(--dsw-alias-label-primary);font-size:22px;font-weight:700;line-height:28px}
|
|
10316
10463
|
.cc-intro{margin:4px 0 0;color:var(--dsw-alias-label-secondary);font-size:14px;line-height:22px}
|
|
10464
|
+
/* The glanceable header strip: four cells (account health, monthly remainder,
|
|
10465
|
+
* service status, model scope) on one card. Labels reuse cc-statusLabel and
|
|
10466
|
+
* dots reuse cc-tabDot, so no new colour language is introduced; the strip
|
|
10467
|
+
* folds to 2 × 2 in a narrow panel. */
|
|
10468
|
+
.cc-statusStrip{grid-template-columns:repeat(4,minmax(0,1fr));gap:0;display:grid;margin-top:16px;border:1px solid var(--dsw-alias-border-l2);border-radius:16px;background:var(--dsw-alias-bg-layer-1);box-shadow:0 1px 2px rgba(0,0,0,.04)}
|
|
10469
|
+
.cc-statusCell{flex-direction:column;gap:2px;min-width:0;display:flex;padding:14px 16px}
|
|
10470
|
+
.cc-statusCell+.cc-statusCell{border-left:1px solid var(--dsw-alias-border-l2)}
|
|
10471
|
+
.cc-statusHead{align-items:center;gap:6px;display:flex}
|
|
10472
|
+
.cc-statusStripValue{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:22px}
|
|
10473
|
+
.cc-statusSub{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}
|
|
10474
|
+
@media (max-width:560px){.cc-statusStrip{grid-template-columns:repeat(2,minmax(0,1fr))}.cc-statusCell:nth-child(3){border-left:0}.cc-statusCell:nth-child(n+3){border-top:1px solid var(--dsw-alias-border-l2)}}
|
|
10317
10475
|
.cc-spacer{flex:1}
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
.
|
|
10322
|
-
.cc-
|
|
10476
|
+
/* Groups are cards now (2026-10-29 redesign): a 16px-radius raised surface
|
|
10477
|
+
* with a border-l2 stroke, 16px between cards, no divider rules. The entrance
|
|
10478
|
+
* is a @starting-style rise with a 40ms stagger per card — transitions, not
|
|
10479
|
+
* keyframes, so a re-render never replays it. */
|
|
10480
|
+
.cc-group{flex-direction:column;display:flex;margin-top:16px;border:1px solid var(--dsw-alias-border-l2);border-radius:16px;background:var(--dsw-alias-bg-layer-1);box-shadow:0 1px 2px rgba(0,0,0,.04);transition:opacity 320ms var(--cc-ease-out),transform 320ms var(--cc-ease-out)}
|
|
10481
|
+
@starting-style{.cc-group{opacity:0;transform:translateY(8px)}}
|
|
10482
|
+
.cc-section>section:nth-of-type(1){transition-delay:0ms}
|
|
10483
|
+
.cc-section>section:nth-of-type(2){transition-delay:40ms}
|
|
10484
|
+
.cc-section>section:nth-of-type(3){transition-delay:80ms}
|
|
10485
|
+
.cc-section>section:nth-of-type(4){transition-delay:120ms}
|
|
10486
|
+
.cc-section>section:nth-of-type(5){transition-delay:160ms}
|
|
10487
|
+
.cc-groupHead{align-items:center;gap:8px;display:flex;min-height:52px;padding:0 16px}
|
|
10488
|
+
.cc-groupTitle{margin:0;color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:22px}
|
|
10323
10489
|
.cc-groupDesc{margin:2px 0 0;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}
|
|
10324
|
-
.cc-rows>.cc-groupDesc{margin:0}
|
|
10490
|
+
.cc-rows>.cc-groupDesc{margin:0 16px}
|
|
10491
|
+
/* A block straight under a group's description (the account list, its
|
|
10492
|
+
* notices, the override table) keeps the same 12px as the account-mode line
|
|
10493
|
+
* and the actions row inside the card; a setting row brings its own 12px
|
|
10494
|
+
* padding instead. */
|
|
10495
|
+
.cc-rows>.cc-groupDesc+.cc-notices,.cc-rows>.cc-groupDesc+.cc-accountList,.cc-rows>.cc-groupDesc+.cc-contextTable{margin-top:12px}
|
|
10325
10496
|
.cc-groupHeading{flex:1;min-width:0;margin:0;font:inherit;display:flex}
|
|
10326
10497
|
/* The whole heading row is the fold toggle: chevron, title, summary badges. */
|
|
10327
|
-
.cc-disclosure{box-sizing:border-box;flex-wrap:wrap;flex:1;align-items:center;gap:6px 8px;min-width:0;min-height:
|
|
10328
|
-
.cc-foldChevron{color:var(--dsw-alias-label-tertiary);transition:transform .15s ease}
|
|
10498
|
+
.cc-disclosure{box-sizing:border-box;flex-wrap:wrap;flex:1;align-items:center;gap:6px 8px;min-width:0;min-height:52px;padding:0;border:0;background:0 0;color:inherit;font:inherit;text-align:left;cursor:pointer;border-radius:8px;display:flex}
|
|
10499
|
+
.cc-foldChevron{color:var(--dsw-alias-label-tertiary);transition:transform .16s var(--cc-ease-out),color .15s ease}
|
|
10329
10500
|
.cc-foldChevronClosed{transform:rotate(-90deg)}
|
|
10501
|
+
/* Folding stays instant (2026-10-29): the body stays mounted and is hidden with
|
|
10502
|
+
* the hidden attribute, so aria-controls always points at a real element
|
|
10503
|
+
* and the save bar's locate action can focus an invalid field right after
|
|
10504
|
+
* opening its group. */
|
|
10330
10505
|
.cc-groupBody{flex-direction:column;display:flex;padding-top:4px}
|
|
10331
10506
|
.cc-groupBody[hidden]{display:none}
|
|
10332
10507
|
.cc-disclosure:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}
|
|
10333
|
-
.cc-rows{flex-direction:column;display:flex}
|
|
10334
|
-
|
|
10508
|
+
.cc-rows{flex-direction:column;display:flex;padding-top:4px}
|
|
10509
|
+
/* Card inset by default: every direct body child sits 16px off the card edge,
|
|
10510
|
+
* and only rows opt out — they carry their own 16px side padding so their
|
|
10511
|
+
* hairlines run the card's full width. */
|
|
10512
|
+
.cc-rows>*{margin-left:16px;margin-right:16px}
|
|
10513
|
+
.cc-rows>.cc-row{margin-left:0;margin-right:0}
|
|
10514
|
+
.cc-row{flex-wrap:wrap;align-items:center;gap:8px 24px;display:flex;padding:14px 16px}
|
|
10515
|
+
.cc-rows>.cc-row+.cc-row{border-top:.5px solid var(--dsw-alias-border-l2)}
|
|
10335
10516
|
.cc-rowFlush{padding:0}
|
|
10336
10517
|
/* The text column starts at 200px (not 300px) so the widest controls — the
|
|
10337
10518
|
* 280px API base input, the allowlist's button + 200px selector — still sit
|
|
@@ -10350,16 +10531,14 @@ window.__ModuleLoader__.load({
|
|
|
10350
10531
|
/* The row-level field, drawn to the design canvas: 32px, 8px corners, a 1px
|
|
10351
10532
|
* border-l3 stroke on the raised surface. A number field draws its unit inside
|
|
10352
10533
|
* the same box (cc-unitBox), right of the value. */
|
|
10353
|
-
.cc-fieldInput{box-sizing:border-box;flex:none;height:32px;min-width:0;padding:0 10px;border:1px solid var(--dsw-alias-border-l3);border-radius:8px;background:var(--dsw-alias-bg-layer-1);font:inherit;color:var(--dsw-alias-label-primary);font-size:14px;line-height:22px}
|
|
10534
|
+
.cc-fieldInput{box-sizing:border-box;flex:none;height:32px;min-width:0;padding:0 10px;border:1px solid var(--dsw-alias-border-l3);border-radius:8px;background:var(--dsw-alias-bg-layer-1);font:inherit;color:var(--dsw-alias-label-primary);font-size:14px;line-height:22px;transition:border-color .15s ease}
|
|
10354
10535
|
.cc-fieldInput::placeholder{color:var(--dsw-alias-label-dimmed)}
|
|
10355
|
-
.cc-fieldInput:hover:not(:disabled){border-color:var(--dsw-alias-label-tertiary)}
|
|
10356
10536
|
.cc-fieldInput:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}
|
|
10357
10537
|
.cc-fieldInput:disabled{opacity:.5;cursor:default}
|
|
10358
|
-
.cc-fieldInputInvalid
|
|
10359
|
-
.cc-unitBox{box-sizing:border-box;flex:none;align-items:center;display:inline-flex;width:160px;height:32px;border:1px solid var(--dsw-alias-border-l3);border-radius:8px;background:var(--dsw-alias-bg-layer-1);overflow:hidden}
|
|
10360
|
-
.cc-unitBox:hover{border-color:var(--dsw-alias-label-tertiary)}
|
|
10538
|
+
.cc-fieldInputInvalid{border-color:var(--dsw-alias-state-error-primary)}
|
|
10539
|
+
.cc-unitBox{box-sizing:border-box;flex:none;align-items:center;display:inline-flex;width:160px;height:32px;border:1px solid var(--dsw-alias-border-l3);border-radius:8px;background:var(--dsw-alias-bg-layer-1);overflow:hidden;transition:border-color .15s ease}
|
|
10361
10540
|
.cc-unitBox:focus-within{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}
|
|
10362
|
-
.cc-unitBoxInvalid
|
|
10541
|
+
.cc-unitBoxInvalid{border-color:var(--dsw-alias-state-error-primary)}
|
|
10363
10542
|
.cc-unitBox:has(>.cc-fieldInput:disabled){opacity:.5}
|
|
10364
10543
|
.cc-unitBox>.cc-fieldInput{flex:1;width:auto;height:30px;border:0;border-radius:0;background:0 0;outline:none;text-align:right;font-variant-numeric:tabular-nums}
|
|
10365
10544
|
.cc-unit{flex:none;padding:0 10px 0 2px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px;white-space:nowrap}
|
|
@@ -10367,8 +10546,8 @@ window.__ModuleLoader__.load({
|
|
|
10367
10546
|
* round reset button. Reset lives here rather than after the control, so no
|
|
10368
10547
|
* row reserves a reset column and the page keeps one right edge. */
|
|
10369
10548
|
.cc-overrideTag{align-items:center;gap:4px;display:inline-flex}
|
|
10370
|
-
.cc-resetInline{flex:none;align-items:center;justify-content:center;display:inline-flex;width:20px;height:20px;padding:0;border:0;border-radius:999px;corner-shape:round;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer}
|
|
10371
|
-
.cc-resetInline:
|
|
10549
|
+
.cc-resetInline{flex:none;align-items:center;justify-content:center;display:inline-flex;width:20px;height:20px;padding:0;border:0;border-radius:999px;corner-shape:round;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer;transition:transform .16s var(--cc-ease-out),background-color .15s ease,color .15s ease}
|
|
10550
|
+
.cc-resetInline:active:not(:disabled){transform:scale(.95)}
|
|
10372
10551
|
.cc-resetInline:disabled{cursor:default;opacity:.4}
|
|
10373
10552
|
.cc-resetInline:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}
|
|
10374
10553
|
.cc-icon{flex:none;width:16px;height:16px}
|
|
@@ -10376,18 +10555,15 @@ window.__ModuleLoader__.load({
|
|
|
10376
10555
|
* shape, md 32px / 14px text / 14px icon, sm 28px / 12px text, lg 36px for
|
|
10377
10556
|
* the save bar; primary is the brand fill, secondary the quiet grey fill,
|
|
10378
10557
|
* ghost label-secondary text, danger the error fill. */
|
|
10379
|
-
.cc-btn{box-sizing:border-box;flex:none;align-items:center;justify-content:center;gap:6px;display:inline-flex;height:32px;padding:0 14px;border:0;border-radius:999px;corner-shape:round;font:inherit;font-size:14px;line-height:22px;white-space:nowrap;cursor:pointer;text-decoration:none}
|
|
10558
|
+
.cc-btn{box-sizing:border-box;flex:none;align-items:center;justify-content:center;gap:6px;display:inline-flex;height:32px;padding:0 14px;border:0;border-radius:999px;corner-shape:round;font:inherit;font-size:14px;line-height:22px;white-space:nowrap;cursor:pointer;text-decoration:none;transition:transform .16s var(--cc-ease-out),background-color .15s ease,color .15s ease}
|
|
10559
|
+
.cc-btn:active:not(:disabled){transform:scale(.97)}
|
|
10380
10560
|
.cc-btnSm{height:28px;padding:0 10px;gap:4px;font-size:12px;line-height:18px}
|
|
10381
10561
|
.cc-btnLg{height:36px;padding:0 16px}
|
|
10382
10562
|
.cc-btn .cc-btnIcon{width:14px;height:14px}
|
|
10383
10563
|
.cc-btnPrimary{background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-brand-primary));color:var(--dsw-alias-label-primary-foreground,#fff)}
|
|
10384
|
-
.cc-btnPrimary:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover,var(--dsw-alias-button-primary-fill,var(--dsw-alias-brand-primary)))}
|
|
10385
10564
|
.cc-btnSecondary{background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-primary)}
|
|
10386
|
-
.cc-btnSecondary:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}
|
|
10387
10565
|
.cc-btnGhost{background:0 0;color:var(--dsw-alias-label-secondary)}
|
|
10388
|
-
.cc-btnGhost:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
10389
10566
|
.cc-btnDanger{background:var(--dsw-alias-state-error-primary);color:#fff}
|
|
10390
|
-
.cc-btnDanger:hover:not(:disabled){background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 88%,#000)}
|
|
10391
10567
|
.cc-btn:disabled{cursor:default;opacity:.4}
|
|
10392
10568
|
.cc-btn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}
|
|
10393
10569
|
.cc-groupSummary{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:400;line-height:18px;white-space:nowrap}
|
|
@@ -10404,7 +10580,6 @@ window.__ModuleLoader__.load({
|
|
|
10404
10580
|
.cc-fieldHead{align-items:center;gap:8px;display:flex}
|
|
10405
10581
|
.cc-label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}
|
|
10406
10582
|
.cc-reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:18px}
|
|
10407
|
-
.cc-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}
|
|
10408
10583
|
.cc-reset:disabled{cursor:default;opacity:.4}
|
|
10409
10584
|
.cc-input{box-sizing:border-box;height:32px;min-width:0;padding:0 10px;border:.5px solid var(--dsw-alias-border-l4);border-radius:8px;background:var(--dsw-alias-bg-layer-1);font:inherit;color:var(--dsw-alias-label-primary);font-size:14px;line-height:22px}
|
|
10410
10585
|
.cc-input::placeholder{color:var(--dsw-alias-label-dimmed)}
|
|
@@ -10413,8 +10588,7 @@ window.__ModuleLoader__.load({
|
|
|
10413
10588
|
.cc-inputInvalid{border-color:var(--dsw-alias-state-error-primary)}
|
|
10414
10589
|
.cc-hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}
|
|
10415
10590
|
.cc-modelSelectAnchor{flex-direction:column;align-items:stretch;gap:6px;display:inline-flex;width:200px}
|
|
10416
|
-
.cc-selector{box-sizing:border-box;justify-content:space-between;align-items:center;gap:8px;display:inline-flex;height:32px;padding:0 10px;border:1px solid var(--dsw-alias-border-l3);border-radius:8px;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:14px;line-height:22px;text-align:left;cursor:pointer}
|
|
10417
|
-
.cc-selector:hover:not(:disabled){border-color:var(--dsw-alias-label-tertiary)}
|
|
10591
|
+
.cc-selector{box-sizing:border-box;justify-content:space-between;align-items:center;gap:8px;display:inline-flex;height:32px;padding:0 10px;border:1px solid var(--dsw-alias-border-l3);border-radius:8px;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:14px;line-height:22px;text-align:left;cursor:pointer;transition:border-color .15s ease}
|
|
10418
10592
|
.cc-selector:disabled{cursor:default;opacity:.4}
|
|
10419
10593
|
.cc-selector:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}
|
|
10420
10594
|
.cc-selectorText{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
@@ -10436,28 +10610,27 @@ window.__ModuleLoader__.load({
|
|
|
10436
10610
|
.cc-check:checked{background:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}
|
|
10437
10611
|
.cc-check:checked::after{content:'';position:absolute;top:3px;left:5px;width:3px;height:7px;border:solid var(--dsw-alias-label-primary-foreground,#fff);border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
|
|
10438
10612
|
.cc-checkName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
10439
|
-
/*
|
|
10440
|
-
*
|
|
10441
|
-
*
|
|
10442
|
-
*
|
|
10443
|
-
*
|
|
10444
|
-
*
|
|
10445
|
-
*
|
|
10446
|
-
*
|
|
10447
|
-
*
|
|
10448
|
-
|
|
10449
|
-
.
|
|
10450
|
-
|
|
10451
|
-
.cc-
|
|
10452
|
-
.cc-
|
|
10453
|
-
.cc-
|
|
10454
|
-
.cc-
|
|
10455
|
-
.cc-accountMode{align-items:center;gap:8px;display:flex;margin:12px 0;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}
|
|
10613
|
+
/* The settings switches are the platform's Switch primitive (issue #108); its
|
|
10614
|
+
* module CSS owns the box (36x20 track, 16px thumb, 16px travel), the colours,
|
|
10615
|
+
* capsule shape, focus ring and disabled look. This layer only joins the page's
|
|
10616
|
+
* motion: the primitive slides the thumb over 120ms ease and snaps the track
|
|
10617
|
+
* colour, so here the thumb and track share one 160ms strong ease-out and read
|
|
10618
|
+
* as one object, and the switch scales to .95 on press like the other small
|
|
10619
|
+
* pressables. The design canvas's 40x24 track is deliberately NOT re-applied
|
|
10620
|
+
* (2026-10-30: it made every switch read fatter than the host's own settings
|
|
10621
|
+
* switches, so the primitive's box is the single source of truth). The
|
|
10622
|
+
* cc-rowControl> qualifier lifts these above the module's single-class rules
|
|
10623
|
+
* whatever order the two sheets load in. The thumb is targeted as the button's
|
|
10624
|
+
* only child because its module class name is hashed. */
|
|
10625
|
+
.cc-rowControl>.cc-switch{transition:background-color .16s var(--cc-ease-out),transform .16s var(--cc-ease-out)}
|
|
10626
|
+
.cc-rowControl>.cc-switch>span{transition:transform .16s var(--cc-ease-out)}
|
|
10627
|
+
.cc-switch:active:not(:disabled){transform:scale(.95)}
|
|
10628
|
+
.cc-accountMode{align-items:center;gap:8px;display:flex;margin:12px 16px 0;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}
|
|
10456
10629
|
.cc-accountList{flex-direction:column;gap:8px;display:flex}
|
|
10457
|
-
.cc-accountList+.cc-panel{margin
|
|
10630
|
+
.cc-accountList+.cc-panel{margin:8px 16px 16px}
|
|
10458
10631
|
/* One row under the list: Add account (outline) leads, the analytics exit
|
|
10459
10632
|
* (ghost) trails; the exit's long label clamps instead of wrapping the row. */
|
|
10460
|
-
.cc-accountActions{flex-wrap:wrap;align-items:center;gap:8px;display:flex;margin
|
|
10633
|
+
.cc-accountActions{flex-wrap:wrap;align-items:center;gap:8px;display:flex;margin:12px 16px 16px}
|
|
10461
10634
|
.cc-analyticsEntry{max-width:100%;min-width:0}
|
|
10462
10635
|
.cc-analyticsEntryText{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
10463
10636
|
.cc-chevronOpen{transform:rotate(180deg)}
|
|
@@ -10468,14 +10641,14 @@ window.__ModuleLoader__.load({
|
|
|
10468
10641
|
.cc-accountToggle{flex-wrap:wrap;align-items:center;gap:6px 8px;display:flex;flex:1;min-width:0;min-height:44px;padding:0 0 0 16px;background:0 0;border:0;border-radius:12px;color:inherit;cursor:pointer;font:inherit;text-align:left}
|
|
10469
10642
|
.cc-accountToggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;border-radius:4px}
|
|
10470
10643
|
.cc-accountName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:22px}
|
|
10471
|
-
.cc-iconButton{flex-shrink:0;align-items:center;justify-content:center;display:inline-flex;width:28px;height:28px;padding:0;background:0 0;border:0;border-radius:8px;color:var(--dsw-alias-label-tertiary);cursor:pointer}
|
|
10472
|
-
.cc-iconButton:
|
|
10644
|
+
.cc-iconButton{flex-shrink:0;align-items:center;justify-content:center;display:inline-flex;width:28px;height:28px;padding:0;background:0 0;border:0;border-radius:8px;color:var(--dsw-alias-label-tertiary);cursor:pointer;transition:transform .16s var(--cc-ease-out),background-color .15s ease,color .15s ease}
|
|
10645
|
+
.cc-iconButton:active:not(:disabled){transform:scale(.95)}
|
|
10473
10646
|
.cc-iconButton:disabled{cursor:default;opacity:.4}
|
|
10474
|
-
.cc-iconButton:focus-visible{outline:
|
|
10647
|
+
.cc-iconButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}
|
|
10475
10648
|
/* Per-model context-length overrides (issue #86) as the design's small table:
|
|
10476
10649
|
* a card holding a head row over a model / value / remove grid, a line
|
|
10477
10650
|
* between rows; a row's error wraps onto its own line across the grid. */
|
|
10478
|
-
.cc-contextTable{flex-direction:column;display:flex;margin:0
|
|
10651
|
+
.cc-contextTable{flex-direction:column;display:flex;margin:0 16px 16px;border:1px solid var(--dsw-alias-border-l2);border-radius:12px}
|
|
10479
10652
|
.cc-contextItem{grid-template-columns:minmax(0,1fr) 144px 28px;align-items:center;gap:8px;display:grid;padding:8px 8px 8px 12px}
|
|
10480
10653
|
.cc-contextItem+.cc-contextItem{border-top:1px solid var(--dsw-alias-border-l2)}
|
|
10481
10654
|
.cc-contextHead{grid-template-columns:minmax(0,1fr) 144px 28px;align-items:center;gap:8px;display:grid;height:32px;padding:0 8px 0 12px;border-bottom:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}
|
|
@@ -10495,7 +10668,10 @@ window.__ModuleLoader__.load({
|
|
|
10495
10668
|
.cc-miniMeter{align-items:center;gap:8px;display:inline-flex;font-size:12px;line-height:18px}
|
|
10496
10669
|
.cc-miniMeterLabel{color:var(--dsw-alias-label-secondary)}
|
|
10497
10670
|
.cc-miniMeterTrack{overflow:hidden;background:var(--dsw-alias-bg-module-platform);border-radius:999px;width:64px;height:4px}
|
|
10498
|
-
|
|
10671
|
+
/* The fill is always full width and slides in from the left under the track's
|
|
10672
|
+
* overflow clip: animating transform skips layout, and unlike scaleX it keeps
|
|
10673
|
+
* the fill's rounded ends. */
|
|
10674
|
+
.cc-miniMeterFill{display:block;width:100%;background:var(--dsw-alias-brand-primary);border-radius:999px;height:100%;transition:transform .24s var(--cc-ease-out)}
|
|
10499
10675
|
.cc-miniMeterValue{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums}
|
|
10500
10676
|
.cc-accountDetails{container-type:inline-size;border-top:1px solid var(--dsw-alias-border-l2);flex-direction:column;gap:16px;display:flex;padding:16px}
|
|
10501
10677
|
.cc-inlineForm{flex-direction:column;gap:8px;display:flex}
|
|
@@ -10507,8 +10683,8 @@ window.__ModuleLoader__.load({
|
|
|
10507
10683
|
/* The add-account method switch, drawn as the design's segmented control: a
|
|
10508
10684
|
* pill track on the raised surface, the chosen segment in the brand fill. */
|
|
10509
10685
|
.cc-seg{align-self:flex-start;display:inline-flex;padding:2px;border-radius:999px;corner-shape:round;background:var(--dsw-alias-bg-layer-1);box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l2)}
|
|
10510
|
-
.cc-segItem{height:28px;padding:0 12px;border:0;border-radius:999px;corner-shape:round;background:0 0;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;line-height:18px;cursor:pointer}
|
|
10511
|
-
.cc-segItem:
|
|
10686
|
+
.cc-segItem{height:28px;padding:0 12px;border:0;border-radius:999px;corner-shape:round;background:0 0;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;line-height:18px;cursor:pointer;transition:transform .16s var(--cc-ease-out),background-color .15s ease,color .15s ease}
|
|
10687
|
+
.cc-segItem:active:not(:disabled):not(.cc-segOn){transform:scale(.97)}
|
|
10512
10688
|
.cc-segItem:disabled{cursor:default;opacity:.4}
|
|
10513
10689
|
.cc-segItem:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}
|
|
10514
10690
|
.cc-segOn{background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-brand-primary));color:var(--dsw-alias-label-primary-foreground,#fff)}
|
|
@@ -10544,7 +10720,10 @@ window.__ModuleLoader__.load({
|
|
|
10544
10720
|
.cc-usageWindowValue{color:var(--dsw-alias-label-primary);font-size:12px;line-height:18px;font-variant-numeric:tabular-nums}
|
|
10545
10721
|
.cc-usageExceeded{color:var(--dsw-alias-state-error-primary);font-size:12px;line-height:18px}
|
|
10546
10722
|
.cc-usageBar{overflow:hidden;background:var(--dsw-alias-bg-module-platform);border-radius:999px;height:4px}
|
|
10547
|
-
|
|
10723
|
+
/* The fill is always full width and slides in from the left under the track's
|
|
10724
|
+
* overflow clip: animating transform skips layout, and unlike scaleX it keeps
|
|
10725
|
+
* the fill's rounded ends. */
|
|
10726
|
+
.cc-usageBarFill{width:100%;background:var(--dsw-alias-brand-primary);border-radius:999px;height:100%;transition:transform .24s var(--cc-ease-out)}
|
|
10548
10727
|
.cc-usageBarFillWarn{background:var(--dsw-alias-state-error-primary)}
|
|
10549
10728
|
.cc-usageWindowReset{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:18px}
|
|
10550
10729
|
.cc-usagePartial{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:18px}
|
|
@@ -10552,8 +10731,11 @@ window.__ModuleLoader__.load({
|
|
|
10552
10731
|
.cc-section>.cc-notice{margin-top:12px}
|
|
10553
10732
|
/* One block for every result, warning and blocked state: neutral (read-only,
|
|
10554
10733
|
* in progress), warn (partly done, needs a retry) and error (failed). The
|
|
10555
|
-
* icon and title take the tone; the body stays label-secondary for contrast.
|
|
10556
|
-
|
|
10734
|
+
* icon and title take the tone; the body stays label-secondary for contrast.
|
|
10735
|
+
* A notice settles in from 4px above as it first renders, so a result never
|
|
10736
|
+
* jolts the content below it; browsers without @starting-style just show it. */
|
|
10737
|
+
.cc-notice{box-sizing:border-box;align-items:flex-start;gap:10px;display:flex;padding:10px 12px;border-radius:12px;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px;transition:opacity .2s var(--cc-ease-out),transform .2s var(--cc-ease-out)}
|
|
10738
|
+
@starting-style{.cc-notice{opacity:0;transform:translateY(-4px)}}
|
|
10557
10739
|
.cc-noticeIcon{flex:none;width:16px;height:16px;margin-top:1px;color:var(--dsw-alias-label-tertiary)}
|
|
10558
10740
|
.cc-noticeBody{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex;word-break:break-word}
|
|
10559
10741
|
.cc-noticeBody>p{margin:0}
|
|
@@ -10568,21 +10750,17 @@ window.__ModuleLoader__.load({
|
|
|
10568
10750
|
.cc-noticeError>.cc-noticeIcon,.cc-noticeError .cc-noticeTitle{color:var(--dsw-alias-state-error-primary)}
|
|
10569
10751
|
.cc-version{margin:32px 0 0;text-align:center;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}
|
|
10570
10752
|
.cc-versionLink{color:var(--dsw-alias-state-warn-label,var(--dsw-alias-label-secondary));text-decoration:none}
|
|
10571
|
-
.cc-versionLink:hover{color:var(--dsw-alias-label-primary);text-decoration:underline;text-underline-position:under}
|
|
10572
10753
|
.cc-providerCard{flex-direction:column;display:flex}
|
|
10573
10754
|
.cc-footer{justify-content:flex-end;align-items:center;gap:8px;display:flex}
|
|
10574
10755
|
.cc-failed{display:inline-block;max-width:260px;min-width:0;color:var(--dsw-alias-state-error-primary);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px}
|
|
10575
10756
|
.cc-loginLink{align-items:center;gap:4px;display:inline-flex;color:var(--dsw-alias-link,var(--dsw-alias-brand-primary));text-decoration:none;font-size:12px;line-height:18px}
|
|
10576
10757
|
.cc-loginLink>.cc-iconInline{width:12px;height:12px}
|
|
10577
|
-
.cc-loginLink:hover{text-decoration:underline;text-underline-position:under}
|
|
10578
10758
|
/* The status row's dot + verdict sit beside the row title; the primitive's own
|
|
10579
10759
|
* state tokens colour the dot, so only the neutral label and the failure note
|
|
10580
10760
|
* need styling here. */
|
|
10581
10761
|
.cc-statusBadge{align-items:center;gap:6px;display:inline-flex;white-space:nowrap}
|
|
10582
10762
|
.cc-statusLabel{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}
|
|
10583
10763
|
.cc-statusNotice{color:var(--dsw-alias-state-warn-label,var(--dsw-alias-label-tertiary));margin:0;font-size:12px;line-height:18px}
|
|
10584
|
-
/* One muted line in the status description: the local-connectivity probe and
|
|
10585
|
-
* the publication-lag note both use it, so the dot and the text stay aligned. */
|
|
10586
10764
|
/* The service-status row's two sources: a key column (Official / This device)
|
|
10587
10765
|
* beside a value line that wraps under itself, never under the key. */
|
|
10588
10766
|
.cc-statusLines{grid-template-columns:auto minmax(0,1fr);align-items:baseline;gap:4px 12px;display:grid;margin:2px 0 0;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}
|
|
@@ -10597,7 +10775,6 @@ window.__ModuleLoader__.load({
|
|
|
10597
10775
|
.cc-statusTitleLink{align-items:center;gap:4px;display:inline-flex;margin-left:auto}
|
|
10598
10776
|
.cc-statusBad{color:var(--dsw-alias-state-warn-label,var(--dsw-alias-state-warn-primary,#b45309))}
|
|
10599
10777
|
.cc-statusLink{color:var(--dsw-alias-link,var(--dsw-alias-brand-primary));text-decoration:none;font-size:12px;line-height:18px;white-space:nowrap}
|
|
10600
|
-
.cc-statusLink:hover{text-decoration:underline;text-underline-position:under}
|
|
10601
10778
|
.cc-loginDone{color:var(--dsw-alias-state-success-primary,var(--dsw-alias-label-secondary))}
|
|
10602
10779
|
.cc-loginError{color:var(--dsw-alias-state-error-primary)}
|
|
10603
10780
|
/* The floating save bar: a centered bar pinned to the bottom of the
|
|
@@ -10605,15 +10782,16 @@ window.__ModuleLoader__.load({
|
|
|
10605
10782
|
* page, so the bar overlays the scrolling content instead of taking a row of
|
|
10606
10783
|
* its own; while shown, the section reserves room at its end so the last line
|
|
10607
10784
|
* can scroll clear. Hidden, it sinks and fades, and visibility (switched after
|
|
10608
|
-
* the transition) takes its buttons out of the tab order.
|
|
10609
|
-
*
|
|
10785
|
+
* the transition) takes its buttons out of the tab order. It leaves faster than
|
|
10786
|
+
* it arrives and never overshoots: the bar shows on every edit. Its surface is
|
|
10787
|
+
* an elevated layer (bg-layer-1 over the settings panel's layer-2) with the
|
|
10610
10788
|
* platform's prominent elevation and no stroke, and its corners are concentric
|
|
10611
|
-
* with the capsule buttons inside it (36px pills inset by
|
|
10789
|
+
* with the capsule buttons inside it (36px pills inset by 6px in a 48px pill)
|
|
10612
10790
|
* so the gap around each button is even. */
|
|
10613
10791
|
.cc-sectionWithBar{padding-bottom:80px}
|
|
10614
10792
|
.cc-saveBarDock{position:sticky;bottom:0;z-index:2;height:0;pointer-events:none}
|
|
10615
|
-
.cc-saveBar{--cc-saveBar-tone:var(--dsw-alias-state-warn-primary,#d97706);position:absolute;left:50%;bottom:20px;box-sizing:border-box;width:max-content;max-width:calc(100% - 24px);align-items:center;gap:10px;display:flex;height:
|
|
10616
|
-
.cc-saveBarShown{opacity:1;visibility:visible;transform:translate(-50%,0);pointer-events:auto;transition:opacity .
|
|
10793
|
+
.cc-saveBar{--cc-saveBar-tone:var(--dsw-alias-state-warn-primary,#d97706);position:absolute;left:50%;bottom:20px;box-sizing:border-box;width:max-content;max-width:calc(100% - 24px);align-items:center;gap:10px;display:flex;height:48px;padding:6px 6px 6px 16px;border:0;border-radius:24px;corner-shape:round;background:var(--dsw-alias-bg-layer-1);box-shadow:var(--dsw-elevation-prominent,0 12px 32px -8px rgba(0,0,0,.24),0 2px 8px rgba(0,0,0,.08));opacity:0;visibility:hidden;transform:translate(-50%,12px);transition:opacity .16s var(--cc-ease-out),transform .16s var(--cc-ease-out),visibility 0s linear .16s}
|
|
10794
|
+
.cc-saveBarShown{opacity:1;visibility:visible;transform:translate(-50%,0);pointer-events:auto;transition:opacity .22s var(--cc-ease-out),transform .22s var(--cc-ease-out),visibility 0s}
|
|
10617
10795
|
.cc-saveBar-error{--cc-saveBar-tone:var(--dsw-alias-state-error-primary)}
|
|
10618
10796
|
.cc-saveBar-success{--cc-saveBar-tone:var(--dsw-alias-state-success-primary,#16a34a);padding-right:18px}
|
|
10619
10797
|
.cc-saveBarIcon{flex-shrink:0;align-items:center;justify-content:center;display:inline-flex;width:16px;height:16px;color:var(--cc-saveBar-tone)}
|
|
@@ -10621,7 +10799,37 @@ window.__ModuleLoader__.load({
|
|
|
10621
10799
|
.cc-saveBarText{min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:14px;line-height:22px}
|
|
10622
10800
|
.cc-saveBar-error .cc-saveBarText{color:var(--dsw-alias-state-error-primary)}
|
|
10623
10801
|
.cc-saveBarActions{flex-shrink:0;align-items:center;gap:4px;display:flex;margin-left:8px}
|
|
10624
|
-
|
|
10802
|
+
/* Hover only where a real pointer hovers. Order matters inside: the invalid
|
|
10803
|
+
* borders come after the plain hover borders at equal specificity, so an
|
|
10804
|
+
* invalid field keeps its error border under the pointer. */
|
|
10805
|
+
@media (hover:hover) and (pointer:fine){
|
|
10806
|
+
.cc-fieldInput:hover:not(:disabled),.cc-unitBox:hover,.cc-selector:hover:not(:disabled){border-color:var(--dsw-alias-label-tertiary)}
|
|
10807
|
+
.cc-fieldInputInvalid:hover:not(:disabled),.cc-unitBoxInvalid:hover{border-color:var(--dsw-alias-state-error-primary)}
|
|
10808
|
+
.cc-resetInline:hover:not(:disabled),.cc-iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
10809
|
+
.cc-btnPrimary:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover,var(--dsw-alias-button-primary-fill,var(--dsw-alias-brand-primary)))}
|
|
10810
|
+
.cc-btnSecondary:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}
|
|
10811
|
+
.cc-btnGhost:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
10812
|
+
.cc-btnDanger:hover:not(:disabled){background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 88%,#000)}
|
|
10813
|
+
.cc-segItem:hover:not(:disabled):not(.cc-segOn),.cc-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}
|
|
10814
|
+
/* A whole-row toggle (group heading, account card head) shows it is one
|
|
10815
|
+
* target by lifting its chevron; a fill would weigh too much across the row. */
|
|
10816
|
+
.cc-disclosure:hover .cc-foldChevron,.cc-accountToggle:hover .cc-foldChevron{color:var(--dsw-alias-label-primary)}
|
|
10817
|
+
.cc-versionLink:hover{color:var(--dsw-alias-label-primary);text-decoration:underline;text-underline-position:under}
|
|
10818
|
+
.cc-loginLink:hover,.cc-statusLink:hover{text-decoration:underline;text-underline-position:under}
|
|
10819
|
+
}
|
|
10820
|
+
/* Reduced motion drops movement and scale but keeps the fades and colour
|
|
10821
|
+
* changes, which carry meaning without motion. Card entrance keeps its fade
|
|
10822
|
+
* (the transform is neutralised), and the fold is already instant. */
|
|
10823
|
+
@media (prefers-reduced-motion:reduce){
|
|
10824
|
+
.cc-foldChevron,.cc-rowControl>.cc-switch>span,.cc-usageBarFill,.cc-miniMeterFill{transition:none}
|
|
10825
|
+
.cc-btn,.cc-iconButton,.cc-resetInline,.cc-segItem{transition:background-color .15s ease,color .15s ease}
|
|
10826
|
+
.cc-rowControl>.cc-switch{transition:background-color .15s ease}
|
|
10827
|
+
.cc-btn:active:not(:disabled),.cc-iconButton:active:not(:disabled),.cc-resetInline:active:not(:disabled),.cc-segItem:active:not(:disabled):not(.cc-segOn),.cc-switch:active:not(:disabled){transform:none}
|
|
10828
|
+
.cc-notice{transition:opacity .2s ease}
|
|
10829
|
+
.cc-group{transition:opacity .2s ease;transform:none!important}
|
|
10830
|
+
.cc-saveBar{transition:opacity .16s ease,visibility 0s linear .16s}
|
|
10831
|
+
.cc-saveBarShown{transition:opacity .2s ease,visibility 0s}
|
|
10832
|
+
}
|
|
10625
10833
|
`;
|
|
10626
10834
|
//#endregion
|
|
10627
10835
|
//#region src/client/panel-styles.ts
|
package/lib/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ type CommandCodeProtocol = 'cli' | 'openai' | 'messages';
|
|
|
61
61
|
declare const DEFAULT_MAX_OUTPUT_TOKENS = 131072;
|
|
62
62
|
//#endregion
|
|
63
63
|
//#region src/adapter.d.ts
|
|
64
|
-
declare const COMMAND_CODE_CLI_VERSION = "1.88.
|
|
64
|
+
declare const COMMAND_CODE_CLI_VERSION = "1.88.1";
|
|
65
65
|
declare const DEFAULT_API_BASE = "https://api.commandcode.ai";
|
|
66
66
|
/**
|
|
67
67
|
* The output budget this bundle asks for, and the ceiling it will never exceed.
|
|
@@ -931,6 +931,21 @@ declare class CommandCodeAccountPool {
|
|
|
931
931
|
* keeps its window unknown on purpose, so a probe can still find out.
|
|
932
932
|
*/
|
|
933
933
|
markRejected(apiKey: string, rejection: AccountRejection, resetAtMs?: number): void;
|
|
934
|
+
/**
|
|
935
|
+
* 用量报告读到的窗口结论(设置页账号卡片、`/commandcode` 拉取的
|
|
936
|
+
* `/alpha/billing/credits`):某个窗口已超限,就按探测的同一口径给这个密钥
|
|
937
|
+
* 打标记——有可信重置时刻记为到期自动恢复的 `cooldown`,否则为 `unknown`。
|
|
938
|
+
*
|
|
939
|
+
* 为什么需要(issue #105):轮转原本只认真实请求的拒绝,进程重启或冷却过早
|
|
940
|
+
* 到期后,卡片明明显示「每周 100%」,自动模式和「当前使用」徽标仍选列表第一个
|
|
941
|
+
* 账号,下一个请求白撞一次拒绝才换号。报告本来就要拉这个接口,把结论记进池里
|
|
942
|
+
* 不增加任何请求。
|
|
943
|
+
*
|
|
944
|
+
* 只加不减:窗口未超限时不清除已有标记。限流(throttle)或消费上限这类拒绝
|
|
945
|
+
* 在窗口数据里看不到(issue #54),据此清标记会让每次刷新卡片都换来一次注定
|
|
946
|
+
* 被拒的请求;清除仍只走有节流的探测路径。401 禁用的密钥不改。
|
|
947
|
+
*/
|
|
948
|
+
noteWindowReport(apiKey: string, verdict: AccountWindowProbe | undefined): void;
|
|
934
949
|
/**
|
|
935
950
|
* Record a model-scoped `unavailable` rejection (no credits, or a model
|
|
936
951
|
* outside this account's plan) as a SHORT-LIVED PREFERENCE demotion.
|
|
@@ -1217,7 +1232,7 @@ declare const KNOWN_THINKING_MODELS: ReadonlySet<string>;
|
|
|
1217
1232
|
* `/docs/plans/max` and `/docs/resources/pricing-limits`). Each plan's model
|
|
1218
1233
|
* list is a superset of the one below it: Go ⊂ GOAT ⊂ Pro ⊂ Provider/Max.
|
|
1219
1234
|
* Models absent from every plan list (Claude Opus/Fable, Fugu Ultra) are
|
|
1220
|
-
* Provider-tier. Re-verified at command-code@1.88.
|
|
1235
|
+
* Provider-tier. Re-verified at command-code@1.88.1 (2026-10-28) against the
|
|
1221
1236
|
* live `?view=client` catalog: 106 ids, still a strict superset chain. Mistral
|
|
1222
1237
|
* Large 4 (1.75.0) was the only addition at the 1.77.0 check; the 1.78.0/1.79.0 pair
|
|
1223
1238
|
* added Claude Haiku 5.5 at Pro and the free Glyph Cluster preview at Go.
|
package/lib/index.js
CHANGED
|
@@ -123,7 +123,7 @@ const PLAN_ORDER = Object.fromEntries(PLAN_TIER_ORDER.map((tier, index) => [tier
|
|
|
123
123
|
* subscription-plan labels, deals, and hourly (peak/off-peak) pricing.
|
|
124
124
|
*
|
|
125
125
|
* Everything here is synced from official sources — the command-code CLI
|
|
126
|
-
* bundle's model table (`dist/cli.mjs`, re-verified at command-code@1.88.
|
|
126
|
+
* bundle's model table (`dist/cli.mjs`, re-verified at command-code@1.88.1), the
|
|
127
127
|
* live model catalog (`GET /provider/v1/models?view=client`, the authority for
|
|
128
128
|
* capability fields since 1.82.4), and the official plan/pricing/model docs; see
|
|
129
129
|
* the dsh-commandcode-upstream skill for the extraction procedures. The
|
|
@@ -142,7 +142,10 @@ const PLAN_ORDER = Object.fromEntries(PLAN_TIER_ORDER.map((tier, index) => [tier
|
|
|
142
142
|
* as usual. The 2026-10-27 check finds the CLI still at 1.88.0 and one more
|
|
143
143
|
* catalog-only addition, GPT-6.1 Terra (`gpt-6.1-terra`): 1.05M context, text +
|
|
144
144
|
* image, the same five-level effort set, Pro tier, `$1/$5` up to a 272K context
|
|
145
|
-
* step and `$2/$7.5` beyond.
|
|
145
|
+
* step and `$2/$7.5` beyond. The 2026-10-28 check moves the constant to 1.88.1,
|
|
146
|
+
* whose registry now names both catalog-only rows (Kimi K3.1 Pro and GPT-6.1
|
|
147
|
+
* Terra) with efforts and context identical to this snapshot, so no table
|
|
148
|
+
* changes. Keeping the snapshot in its own module
|
|
146
149
|
* confines those frequent sync diffs here: src/adapter.ts holds only the stable
|
|
147
150
|
* wire/runtime logic. The read helpers live here too, for the same reason.
|
|
148
151
|
*
|
|
@@ -945,7 +948,7 @@ const MODEL_OUTPUT_TOKEN_LIMITS = /* @__PURE__ */ new Map([
|
|
|
945
948
|
* `/docs/plans/max` and `/docs/resources/pricing-limits`). Each plan's model
|
|
946
949
|
* list is a superset of the one below it: Go ⊂ GOAT ⊂ Pro ⊂ Provider/Max.
|
|
947
950
|
* Models absent from every plan list (Claude Opus/Fable, Fugu Ultra) are
|
|
948
|
-
* Provider-tier. Re-verified at command-code@1.88.
|
|
951
|
+
* Provider-tier. Re-verified at command-code@1.88.1 (2026-10-28) against the
|
|
949
952
|
* live `?view=client` catalog: 106 ids, still a strict superset chain. Mistral
|
|
950
953
|
* Large 4 (1.75.0) was the only addition at the 1.77.0 check; the 1.78.0/1.79.0 pair
|
|
951
954
|
* added Claude Haiku 5.5 at Pro and the free Glyph Cluster preview at Go.
|
|
@@ -4264,6 +4267,29 @@ var CommandCodeAccountPool = class CommandCodeAccountPool {
|
|
|
4264
4267
|
});
|
|
4265
4268
|
}
|
|
4266
4269
|
/**
|
|
4270
|
+
* 用量报告读到的窗口结论(设置页账号卡片、`/commandcode` 拉取的
|
|
4271
|
+
* `/alpha/billing/credits`):某个窗口已超限,就按探测的同一口径给这个密钥
|
|
4272
|
+
* 打标记——有可信重置时刻记为到期自动恢复的 `cooldown`,否则为 `unknown`。
|
|
4273
|
+
*
|
|
4274
|
+
* 为什么需要(issue #105):轮转原本只认真实请求的拒绝,进程重启或冷却过早
|
|
4275
|
+
* 到期后,卡片明明显示「每周 100%」,自动模式和「当前使用」徽标仍选列表第一个
|
|
4276
|
+
* 账号,下一个请求白撞一次拒绝才换号。报告本来就要拉这个接口,把结论记进池里
|
|
4277
|
+
* 不增加任何请求。
|
|
4278
|
+
*
|
|
4279
|
+
* 只加不减:窗口未超限时不清除已有标记。限流(throttle)或消费上限这类拒绝
|
|
4280
|
+
* 在窗口数据里看不到(issue #54),据此清标记会让每次刷新卡片都换来一次注定
|
|
4281
|
+
* 被拒的请求;清除仍只走有节流的探测路径。401 禁用的密钥不改。
|
|
4282
|
+
*/
|
|
4283
|
+
noteWindowReport(apiKey, verdict) {
|
|
4284
|
+
if (verdict === void 0 || !verdict.exceeded) return;
|
|
4285
|
+
const state = this.states.get(apiKey);
|
|
4286
|
+
if (state?.kind === "disabled") return;
|
|
4287
|
+
this.stampWindowMark({
|
|
4288
|
+
key: apiKey,
|
|
4289
|
+
state
|
|
4290
|
+
}, verdict);
|
|
4291
|
+
}
|
|
4292
|
+
/**
|
|
4267
4293
|
* Record a model-scoped `unavailable` rejection (no credits, or a model
|
|
4268
4294
|
* outside this account's plan) as a SHORT-LIVED PREFERENCE demotion.
|
|
4269
4295
|
*
|
|
@@ -6509,7 +6535,7 @@ var GatewayFacts = class {
|
|
|
6509
6535
|
* per-request options thunk and an API-key resolver from the plugin entry
|
|
6510
6536
|
* (src/index.ts), so a settings change reaches the very next request.
|
|
6511
6537
|
*/
|
|
6512
|
-
const COMMAND_CODE_CLI_VERSION = "1.88.
|
|
6538
|
+
const COMMAND_CODE_CLI_VERSION = "1.88.1";
|
|
6513
6539
|
const DEFAULT_API_BASE = "https://api.commandcode.ai";
|
|
6514
6540
|
/**
|
|
6515
6541
|
* The output budget this bundle asks for, and the ceiling it will never exceed.
|
|
@@ -7624,6 +7650,33 @@ function parseWindowLimit(value) {
|
|
|
7624
7650
|
};
|
|
7625
7651
|
}
|
|
7626
7652
|
/**
|
|
7653
|
+
* 把已解析的用量窗口归结为账号池能用的结论:任一窗口超限即 `exceeded`,
|
|
7654
|
+
* `resetAt` 取超限窗口里最晚的重置时刻(真正卡住账号的那个)。
|
|
7655
|
+
*
|
|
7656
|
+
* 职责:`probeWindowLimits()`(池的探测)与用量报告(设置页卡片、`/commandcode`)
|
|
7657
|
+
* 读的是同一个 `/alpha/billing/credits`,两条路径必须得出同一结论,否则卡片显示
|
|
7658
|
+
* 「每周 100%」而池仍把它当可用(issue #105)。
|
|
7659
|
+
*
|
|
7660
|
+
* 一个窗口都没报告时返回 undefined:无从判断,调用方保持原标记不动。
|
|
7661
|
+
*/
|
|
7662
|
+
function windowVerdict(windows, now = Date.now()) {
|
|
7663
|
+
let reported = false;
|
|
7664
|
+
let exceeded = false;
|
|
7665
|
+
let resetAt = 0;
|
|
7666
|
+
for (const window of windows) {
|
|
7667
|
+
if (window === void 0) continue;
|
|
7668
|
+
reported = true;
|
|
7669
|
+
if (!window.exceeded) continue;
|
|
7670
|
+
exceeded = true;
|
|
7671
|
+
if (window.resetAt > 0 && window.resetAt - now <= 2592e6) resetAt = Math.max(resetAt, window.resetAt);
|
|
7672
|
+
}
|
|
7673
|
+
if (!reported) return void 0;
|
|
7674
|
+
return {
|
|
7675
|
+
exceeded,
|
|
7676
|
+
resetAt: exceeded ? resetAt : 0
|
|
7677
|
+
};
|
|
7678
|
+
}
|
|
7679
|
+
/**
|
|
7627
7680
|
* Parse one billing/credits payload into the report's credits section.
|
|
7628
7681
|
* Returns undefined when the endpoint answered nothing usable.
|
|
7629
7682
|
*/
|
|
@@ -8735,22 +8788,7 @@ var CommandCodeAdapter = class CommandCodeAdapter extends LlmAdapter {
|
|
|
8735
8788
|
if (parsed === void 0) return void 0;
|
|
8736
8789
|
const windowLimits = isRecord(parsed.windowLimits) ? parsed.windowLimits : void 0;
|
|
8737
8790
|
if (windowLimits === void 0) return void 0;
|
|
8738
|
-
|
|
8739
|
-
let exceeded = false;
|
|
8740
|
-
let resetAt = 0;
|
|
8741
|
-
for (const raw of [windowLimits.fiveHour, windowLimits.weekly]) {
|
|
8742
|
-
const window = isRecord(raw) ? parseWindowLimit(raw) : void 0;
|
|
8743
|
-
if (window === void 0) continue;
|
|
8744
|
-
reported = true;
|
|
8745
|
-
if (!window.exceeded) continue;
|
|
8746
|
-
exceeded = true;
|
|
8747
|
-
if (window.resetAt > 0 && window.resetAt - Date.now() <= 2592e6) resetAt = Math.max(resetAt, window.resetAt);
|
|
8748
|
-
}
|
|
8749
|
-
if (!reported) return void 0;
|
|
8750
|
-
return {
|
|
8751
|
-
exceeded,
|
|
8752
|
-
resetAt: exceeded ? resetAt : 0
|
|
8753
|
-
};
|
|
8791
|
+
return windowVerdict([windowLimits.fiveHour, windowLimits.weekly].map((raw) => isRecord(raw) ? parseWindowLimit(raw) : void 0));
|
|
8754
8792
|
} catch {
|
|
8755
8793
|
return;
|
|
8756
8794
|
}
|
|
@@ -12110,18 +12148,24 @@ function apply(ctx, config) {
|
|
|
12110
12148
|
const usageReports = async () => {
|
|
12111
12149
|
const connection = options();
|
|
12112
12150
|
const accounts = scopedPool(connection);
|
|
12151
|
+
const keyed = new Map((await accounts.describeAccounts()).map((account) => [account.slot.id, account.key]));
|
|
12152
|
+
const reports = await Promise.all(connection.accountSelection.slots.map(async (slot) => {
|
|
12153
|
+
const key = keyed.get(slot.id);
|
|
12154
|
+
if (key === void 0) return { failures: [] };
|
|
12155
|
+
try {
|
|
12156
|
+
const report = await adapter.getUsage(key, connection);
|
|
12157
|
+
if (report.credits !== void 0) accounts.noteWindowReport(key, windowVerdict([report.credits.fiveHour, report.credits.weekly]));
|
|
12158
|
+
return report;
|
|
12159
|
+
} catch (error) {
|
|
12160
|
+
return { failures: [readableErrorText(error)] };
|
|
12161
|
+
}
|
|
12162
|
+
}));
|
|
12113
12163
|
const active = await accounts.activeAccount();
|
|
12114
12164
|
const described = await accounts.describeAccounts();
|
|
12115
12165
|
const byId = new Map(described.map((account) => [account.slot.id, account]));
|
|
12116
|
-
return { accounts:
|
|
12166
|
+
return { accounts: connection.accountSelection.slots.map((slot, index) => {
|
|
12117
12167
|
const account = byId.get(slot.id);
|
|
12118
|
-
|
|
12119
|
-
if (account === void 0) report = { failures: [] };
|
|
12120
|
-
else try {
|
|
12121
|
-
report = await adapter.getUsage(account.key, connection);
|
|
12122
|
-
} catch (error) {
|
|
12123
|
-
report = { failures: [readableErrorText(error)] };
|
|
12124
|
-
}
|
|
12168
|
+
const report = reports[index] ?? { failures: [] };
|
|
12125
12169
|
const state = account?.state;
|
|
12126
12170
|
const usable = accountUsable(state);
|
|
12127
12171
|
return {
|
|
@@ -12133,7 +12177,7 @@ function apply(ctx, config) {
|
|
|
12133
12177
|
cooldownUntil: !usable && state?.kind === "cooldown" ? state.until : 0,
|
|
12134
12178
|
report
|
|
12135
12179
|
};
|
|
12136
|
-
})
|
|
12180
|
+
}) };
|
|
12137
12181
|
};
|
|
12138
12182
|
const commandLocale = () => pickCommandLocale(current().lang);
|
|
12139
12183
|
ctx.inject(["commands"], (commandCtx) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mars-sea/dsh-commandcode-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Unofficial DeepSeek Harness LLM provider plugin for Command Code, ported from pi-commandcode-provider (MIT). Registers the 'commandcode' provider route with a Models-page card and live model catalog.",
|
|
5
5
|
"icon": "./icon.svg",
|
|
6
6
|
"type": "module",
|
|
@@ -25,9 +25,10 @@
|
|
|
25
25
|
"dshReleases": {
|
|
26
26
|
"0.2.1-rc.2": "compatible",
|
|
27
27
|
"0.2.1-rc.3": "compatible",
|
|
28
|
-
"0.2.1-rc.4": "compatible"
|
|
28
|
+
"0.2.1-rc.4": "compatible",
|
|
29
|
+
"0.2.2-alpha.2": "compatible"
|
|
29
30
|
},
|
|
30
|
-
"dsh": ">=0.2.1-rc.2 <0.2.2-0"
|
|
31
|
+
"dsh": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0"
|
|
31
32
|
},
|
|
32
33
|
"client": {
|
|
33
34
|
"inject": [
|
|
@@ -61,8 +62,8 @@
|
|
|
61
62
|
"test": "node --import tsx --test tests/**/*.test.ts"
|
|
62
63
|
},
|
|
63
64
|
"engines": {
|
|
64
|
-
"node": ">=
|
|
65
|
-
"dsh": ">=0.2.1-rc.2 <0.2.2-0"
|
|
65
|
+
"node": ">=24.9",
|
|
66
|
+
"dsh": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0"
|
|
66
67
|
},
|
|
67
68
|
"publishConfig": {
|
|
68
69
|
"access": "public"
|
|
@@ -88,24 +89,24 @@
|
|
|
88
89
|
],
|
|
89
90
|
"license": "MIT",
|
|
90
91
|
"peerDependencies": {
|
|
91
|
-
"@deepseek-ai/cordis": "~4.0.5",
|
|
92
|
-
"@deepseek-ai/dsh-api-remotes": ">=0.2.1-rc.2 <0.2.2-0",
|
|
93
|
-
"@deepseek-ai/dsh-attachment": ">=0.2.1-rc.2 <0.2.2-0",
|
|
94
|
-
"@deepseek-ai/dsh-client-locale": ">=0.2.1-rc.2 <0.2.2-0",
|
|
95
|
-
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.1-rc.2 <0.2.2-0",
|
|
96
|
-
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.1-rc.2 <0.2.2-0",
|
|
97
|
-
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.1-rc.2 <0.2.2-0",
|
|
98
|
-
"@deepseek-ai/dsh-client-ui-slots": ">=0.2.1-rc.2 <0.2.2-0",
|
|
99
|
-
"@deepseek-ai/dsh-commands": ">=0.2.1-rc.2 <0.2.2-0",
|
|
100
|
-
"@deepseek-ai/dsh-credentials": ">=0.2.1-rc.2 <0.2.2-0",
|
|
101
|
-
"@deepseek-ai/dsh-launch-environment": ">=0.2.1-rc.2 <0.2.2-0",
|
|
102
|
-
"@deepseek-ai/dsh-llm": ">=0.2.1-rc.2 <0.2.2-0",
|
|
103
|
-
"@deepseek-ai/dsh-settings": ">=0.2.1-rc.2 <0.2.2-0",
|
|
104
|
-
"@deepseek-ai/dsh-timeout": ">=0.2.1-rc.2 <0.2.2-0",
|
|
105
|
-
"@deepseek-ai/dsh-typert-protocol": ">=0.2.1-rc.2 <0.2.2-0",
|
|
106
|
-
"@deepseek-ai/schemastery": "~3.18.5",
|
|
92
|
+
"@deepseek-ai/cordis": "~4.0.5 || 4.0.6-alpha.1",
|
|
93
|
+
"@deepseek-ai/dsh-api-remotes": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
94
|
+
"@deepseek-ai/dsh-attachment": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
95
|
+
"@deepseek-ai/dsh-client-locale": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
96
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
97
|
+
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
98
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
99
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
100
|
+
"@deepseek-ai/dsh-commands": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
101
|
+
"@deepseek-ai/dsh-credentials": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
102
|
+
"@deepseek-ai/dsh-launch-environment": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
103
|
+
"@deepseek-ai/dsh-llm": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
104
|
+
"@deepseek-ai/dsh-settings": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
105
|
+
"@deepseek-ai/dsh-timeout": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
106
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
107
|
+
"@deepseek-ai/schemastery": "~3.18.5 || 3.18.6-alpha.1",
|
|
107
108
|
"react": "^18.2.0",
|
|
108
|
-
"@deepseek-ai/dsh-web": ">=0.2.1-rc.2 <0.2.2-0"
|
|
109
|
+
"@deepseek-ai/dsh-web": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0"
|
|
109
110
|
},
|
|
110
111
|
"peerDependenciesMeta": {
|
|
111
112
|
"@deepseek-ai/dsh-client-ui-primitives": {
|
|
@@ -119,27 +120,27 @@
|
|
|
119
120
|
}
|
|
120
121
|
},
|
|
121
122
|
"devDependencies": {
|
|
122
|
-
"@deepseek-ai/cordis": "~4.0.5",
|
|
123
|
-
"@deepseek-ai/dsh-agent": ">=0.2.1-rc.2 <0.2.2-0",
|
|
124
|
-
"@deepseek-ai/dsh-api-remotes": ">=0.2.1-rc.2 <0.2.2-0",
|
|
125
|
-
"@deepseek-ai/dsh-attachment": ">=0.2.1-rc.2 <0.2.2-0",
|
|
126
|
-
"@deepseek-ai/dsh-client-locale": ">=0.2.1-rc.2 <0.2.2-0",
|
|
127
|
-
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.1-rc.2 <0.2.2-0",
|
|
128
|
-
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.1-rc.2 <0.2.2-0",
|
|
129
|
-
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.1-rc.2 <0.2.2-0",
|
|
130
|
-
"@deepseek-ai/dsh-client-ui-slots": ">=0.2.1-rc.2 <0.2.2-0",
|
|
131
|
-
"@deepseek-ai/dsh-commands": ">=0.2.1-rc.2 <0.2.2-0",
|
|
132
|
-
"@deepseek-ai/dsh-credentials": ">=0.2.1-rc.2 <0.2.2-0",
|
|
133
|
-
"@deepseek-ai/dsh-launch-environment": ">=0.2.1-rc.2 <0.2.2-0",
|
|
134
|
-
"@deepseek-ai/dsh-llm": ">=0.2.1-rc.2 <0.2.2-0",
|
|
135
|
-
"@deepseek-ai/dsh-settings": ">=0.2.1-rc.2 <0.2.2-0",
|
|
136
|
-
"@deepseek-ai/dsh-session": ">=0.2.1-rc.2 <0.2.2-0",
|
|
137
|
-
"@deepseek-ai/dsh-scope": ">=0.2.1-rc.2 <0.2.2-0",
|
|
138
|
-
"@deepseek-ai/dsh-session-projection": ">=0.2.1-rc.2 <0.2.2-0",
|
|
139
|
-
"@deepseek-ai/dsh-timeout": ">=0.2.1-rc.2 <0.2.2-0",
|
|
140
|
-
"@deepseek-ai/dsh-typert-protocol": ">=0.2.1-rc.2 <0.2.2-0",
|
|
141
|
-
"@deepseek-ai/dsh-web": ">=0.2.1-rc.2 <0.2.2-0",
|
|
142
|
-
"@deepseek-ai/schemastery": "~3.18.5",
|
|
123
|
+
"@deepseek-ai/cordis": "~4.0.5 || 4.0.6-alpha.1",
|
|
124
|
+
"@deepseek-ai/dsh-agent": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
125
|
+
"@deepseek-ai/dsh-api-remotes": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
126
|
+
"@deepseek-ai/dsh-attachment": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
127
|
+
"@deepseek-ai/dsh-client-locale": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
128
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
129
|
+
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
130
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
131
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
132
|
+
"@deepseek-ai/dsh-commands": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
133
|
+
"@deepseek-ai/dsh-credentials": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
134
|
+
"@deepseek-ai/dsh-launch-environment": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
135
|
+
"@deepseek-ai/dsh-llm": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
136
|
+
"@deepseek-ai/dsh-settings": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
137
|
+
"@deepseek-ai/dsh-session": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
138
|
+
"@deepseek-ai/dsh-scope": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
139
|
+
"@deepseek-ai/dsh-session-projection": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
140
|
+
"@deepseek-ai/dsh-timeout": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
141
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
142
|
+
"@deepseek-ai/dsh-web": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0",
|
|
143
|
+
"@deepseek-ai/schemastery": "~3.18.5 || 3.18.6-alpha.1",
|
|
143
144
|
"@types/node": "^22.0.0",
|
|
144
145
|
"@types/react": "^18.3.1",
|
|
145
146
|
"@types/react-test-renderer": "^19.3.0",
|