dsh-subagent-default-model 2.1.14 → 2.2.0

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +212 -0
  2. package/lib/client.js +172 -24
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,217 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.2.0 (2026-11-06)
4
+
5
+ **次版本号升级**:这一版把插件的配置界面从「插件市场详情页的卡片」整体搬到**设置面板左侧导航的独立页面**,是一次用户可见的入口变更,因此走 `2.2.0` 而不是补丁号。同时撤销了 2.1.15 的详情页短简介机制。
6
+
7
+ > 2.1.16 – 2.1.21 的改动都包含在这一版里;它们只存在于 git 历史,没有单独发布到 npm。
8
+
9
+ ### Changed
10
+
11
+ **配置入口迁移到「设置 → 子代理默认模型」。** 该页面注册在宿主的 `settings.section` LIST 槽位(0.2.1-rc.5 起提供),与「账号与余额 / 通用设置 / 模型」等内置页面并列。原 `plugins.bundle.config` / `plugins.row.config` 两处注册已移除——同一份配置不应有两个编辑入口。
12
+
13
+ 页面结构(自上而下):标题 → 一句话总述 → 三条核心用途 → 配置表单 → 诊断信息(折叠)。
14
+
15
+ 三条核心用途各自成条,替代原先挤在一句里的概括:
16
+
17
+ 1. **多模型分配** —— 按轮换或随机策略,为每次子代理指派池中的一条路由。
18
+ 2. **跨供应商故障转移** —— 连接失败时自动切到另一家供应商的模型,耗尽才放行真实错误。
19
+ 3. **路由可见可查** —— 当前供应商与模型显示在轨迹和对话里,并写进子代理自己的上下文。
20
+
21
+ 导航图标使用插件自有的 LD 品牌标记(不是通用齿轮),与页面同一个 `inject` 回调注册,配对关系是结构性的。
22
+
23
+ ### Fixed
24
+
25
+ **`settings.section` 的注册曾经完全失效。** 2.1.16/2.1.17 用一个 `typeof ctx.slots.specOf === "function"` 的能力探测来保护注册,但 `specOf` 只存在于渲染器的内部 hostFace,不在 `ctx.slots` 这个公共服务上——探测恒为 false,整段注册被跳过,界面上看不到任何痕迹也不报错。
26
+
27
+ 现在无条件调用 `slots.inject()`:它本身就是探测(等待 slot 声明,未声明时什么都不做、不抛错)。教训是**探测失败必须往「能用」的方向失败**,而不是「探测不到就关闭功能」。
28
+
29
+ ### Reverted
30
+
31
+ **撤销 2.1.15 的 100 字详情文档。** `docs/DETAIL.zh.md`、`docs/DETAIL.md`、`locale/*.json` 及其守卫测试全部移除,`package.json#files` 回到 7 项。插件详情页恢复渲染完整 README。
32
+
33
+ 理由:`meta.detail` 依赖「路径正确 + 语言链命中」这类隐式约定,失败时静默回落到 README、界面看不出问题;而它唯一的作用只是缩短显示文本。README 的内容本身是有用的,只是长。
34
+
35
+ ### Changed(承接 2.1.21)
36
+
37
+ **诊断信息移到页面最后一行(保存按钮下方)。**
38
+
39
+ 2.1.20 把它折叠了,但位置仍在顶部——紧挨着简介,读起来像「关于本插件的一条警告」,而且把用户真正来配置的表单往下推。现在它是表单的最后一个块,位于保存/放弃按钮之后。
40
+
41
+ 页面的阅读顺序因此是:标题 → 一句话总述 → 三条核心用途 → 配置表单 → 诊断信息(折叠)。越往下越是元信息。
42
+
43
+ ### Tests
44
+
45
+ `180/180`(179 → 180),`skip 0`。新增位置守卫:诊断块必须在保存页脚**之后**,且是表单的最后一个块。变异验证 1/1 命中(把诊断块移回顶部,用例即失败)。
46
+
47
+ ## 2.1.20 (2026-11-06)
48
+
49
+ ### Changed
50
+
51
+ **设置页顶部改为三条核心用途,诊断信息默认折叠。**
52
+
53
+ 原文案是一句概括(「指定子代理默认使用的模型,配置连接失败时的故障转移,以及路由在轨迹与对话中的可见性」),把三件事压在一行里,读者很难对上下面那些开关各自买到什么。现在拆成三条,每个核心价值一句:
54
+
55
+ 1. **多模型分配** —— 按轮换或随机策略,为每次子代理指派池中的一条路由。
56
+ 2. **跨供应商故障转移** —— 连接失败时自动切到另一家供应商的模型,耗尽才放行真实错误。
57
+ 3. **路由可见可查** —— 当前供应商与模型显示在轨迹和对话里,并写进子代理自己的上下文。
58
+
59
+ 同时把 `[diag 2026-11-06.1] mirror=ready · view.ns=32 · …` 那一行收进折叠区(默认收起,点「诊断信息」展开)。它是排查保存问题用的,常驻在界面上会让正常用户以为出了错——尤其这页的职责正是让人放心地改配置。信息一点即达,不再占版面。
60
+
61
+ ### Tests
62
+
63
+ `179/179`(177 → 179),`skip 0`。新增两条守卫:
64
+
65
+ - 三条价值各自渲染,且确实是三个独立条目(不是一段连排文字);
66
+ - 诊断信息**首次渲染必须折叠**(`aria-expanded="false"` 且 `[data-bindings-diag]` 不在树里)。
67
+
68
+ 变异验证 2/2 命中:把诊断默认展开、删掉第三条价值,各自触发对应用例失败。
69
+
70
+ ## 2.1.19 (2026-11-06)
71
+
72
+ ### Reverted
73
+
74
+ **撤销 2.1.15 的「100 字详情文档」,插件详情页恢复渲染完整 README。**
75
+
76
+ 2.1.15 曾给插件页加了一套短简介机制(`docs/DETAIL.zh.md` / `docs/DETAIL.md` + `locale/*.json` 的 `meta.detail`),目的是避免宿主把整篇 README 塞进详情区块。现在这些全部移除:
77
+
78
+ - 删除 `docs/DETAIL.zh.md`、`docs/DETAIL.md`;
79
+ - 删除 `locale/zh.json`、`locale/en.json`;
80
+ - `package.json#files` 去掉 `locale` 与两条 `docs/` 路径,回到 7 项;
81
+ - 删除 `test/detail-docs.test.mjs`(5 条守卫随之失效,测试 182 → 177)。
82
+
83
+ 宿主的行为随之回到默认:`meta.detail` 一个都找不到 → 回落包根 README → 详情页显示完整说明。
84
+
85
+ **为什么会想做这件事、又为什么撤掉**:`meta.detail` 的取值要求「id 必须与 section 匹配」这类隐式约定,与新版宿主叠加后容易失效且失败无声(找不到就静默回落,界面上看不出问题)。与其维护一套只为缩短显示文本的机制,不如让 README 直接可见——它的内容是有用的,只是很长。
86
+
87
+ ## 2.1.18 (2026-11-06)
88
+
89
+ ### Fixed
90
+
91
+ **设置页在 2.1.16 / 2.1.17 里根本没有注册上。**
92
+
93
+ 我把「能力探测」写成了 `typeof ctx.slots.specOf === "function"`,而 `specOf` 只存在于渲染器的**内部 hostFace**(`dsh-client-ui-renderer` 的 `hostFace()`),并不在 `ctx.slots` 这个公共服务上。探测因此恒为 `false`,注册被整段跳过——页面和图标都没进 ledger,界面上看不到任何痕迹,也没有报错。
94
+
95
+ 三条教训:
96
+
97
+ 1. **`slots.inject()` 本身就是探测。** 它等待 slot 声明,未声明时什么都不做、也不抛错。在它外面再套一层探测不仅多余,而且引入了新的失败点:探测错 = 功能永不生效,且悄无声息。
98
+ 2. **探测失败必须往「能用」的方向失败。** 我写成「探测不到就不注册」,于是任何探测缺陷都会静默关闭功能。正确方向是「拿不准就注册,让宿主决定」。
99
+ 3. **我上一轮的错误推断**:2.1.16 界面里出现过那一项,我据此认为探测可用。但那一项来自**当时的旧 bundle**(重启前加载的 2.1.15 之前版本),不是新代码。我把「界面有东西」当成了「新代码生效」,这个证据链是断的。
100
+
101
+ 现在的实现:无条件 `slots.inject("settings.section", …)`,页面与图标在同一个回调里注册、disposer 成对返回。宿主没有这个槽位时,回调永不执行,插件其余功能完全不受影响。
102
+
103
+ ### Tests
104
+
105
+ `182/182`,`skip 0`。三档宿主情形逐一验证(用真实 `slots.inject` 语义模拟):
106
+
107
+ | 宿主 | 行为 |
108
+ | --- | --- |
109
+ | 声明 section + icon | 页面与图标都注册 |
110
+ | 只声明 section | 只注册页面 |
111
+ | 两样都不声明(0.1.7) | 什么都不注册,`apply()` 不抛错 |
112
+
113
+ > 夹具这次也修了:它原先**立刻调用** `inject` 回调返回的 disposer,等于注册完马上释放——宿主绝不会这样做(disposer 交给 fiber 在卸载时调用)。同时 `inject` 现在只对本宿主**声明过**的 slot 执行回调,忠实模拟「未声明则等待」。
114
+
115
+ ## 2.1.17 (2026-11-06)
116
+
117
+ ### Fixed
118
+
119
+ **设置侧边栏的导航图标没有出现,仍显示通用齿轮。**
120
+
121
+ 2.1.16 把配置页搬到 `settings.section` 后,同一次提交也注册了 `settings.section.icon`,但页面上只见到默认齿轮。原因是两处注册用了**两个独立的 `slots.inject()`**:
122
+
123
+ - 每个 `inject()` 各自等待自己的 slot 声明;
124
+ - 渲染器对 `.icon` 的取值是 `renderSlot("settings.section.icon", …, { only: row.id })`,**id 必须与 section 完全一致**才会有 occupant,否则静默回落到 `navIcon()` 的通用齿轮,页面上看不出任何错误。
125
+
126
+ 现在两处注册合并进**同一个 `inject` 回调**,disposer 成对返回、随 fiber 一起释放。配对关系因此是结构性的,而不是靠两处代码碰巧都写对。
127
+
128
+ 同时加固了图标本身:
129
+
130
+ - 按 owner 传入的 `size` 渲染(此前硬编码 16),`active` 为假时降到 75% 不透明度;
131
+ - `inline: true` 的槽位把 cell 包在 `<span>` 里,所以用 `<img>` + `display:block` 精确占位,不会破坏导航行的基线;
132
+ - `.icon` 也有自己的声明探测:宿主没有这个槽位时只打 warn,页照常渲染。
133
+
134
+ ### Tests
135
+
136
+ `182/182`(181 → 182),`skip 0`。新增「导航图标必须与页面同 id」与「按 size 渲染品牌图标」两条守卫;变异验证 2/2 命中(去掉图标注册、把尺寸硬编码回 16)。
137
+
138
+ > 夹具又一次挡在前面:`settings.section` 与 `settings.section.icon` 现在从**同一个** `inject` 出来,原先按「哪次 inject」区分注册的桩全部失效,必须改成按 `options.name` 选取。这类改动不改就只会测试变红、看不出真实原因。
139
+
140
+ ## 2.1.16 (2026-11-06)
141
+
142
+ ### Changed
143
+
144
+ **插件设置从「插件页卡片」移动到「设置 → 侧边栏」独立页面。**
145
+
146
+ 原来配置只在插件市场的 `plugins.bundle.config` / `plugins.row.config` 两个 keyed 槽位里,用户要点开插件详情页才能找到。现在改为宿主的 `settings.section` LIST 槽位——就是设置面板左侧导航里「账号与余额 / 通用设置 / 模型 / 内置插件 / OpenCode Go …」那一列,一个注册对应一个页面。
147
+
148
+ - 新增 `settings.section` 页面(`id: dsh-subagent-default-model`,`order: 30`,排在内置 section 之后);
149
+ - 新增 `settings.section.icon` 导航图标(复用插件自有品牌图标,而不是又一个通用齿轮);
150
+ - **删除了**原 `plugins.bundle.config` / `plugins.row.config` 两处注册。同一个文档不应有两个编辑入口,这也是「移动」而非「新增」的含义;
151
+ - 页面直接渲染表单(`SubagentModelRow`),**不套**可折叠卡片外壳:设置页本身就是独立界面,它收到的是 `{ t, close }` 而没有 `view`,套卡片会因 `props.view === "page"` 为假而默认折叠,把所有控件藏到二次展开之后。
152
+
153
+ ### Compatibility
154
+
155
+ `settings.section` 是 **0.2.1-rc.5** 引入的,而本插件的 peer 下限是 `0.1.7`。因此注册前先做**声明探测**(`ctx.slots.specOf("settings.section")`,即渲染器自己的 `specDynamic`);未声明时**不注册**并打一条 warn 说明原因。
156
+
157
+ > 为什么不直接 `slots.inject`:读 `dsh-client-ui-renderer` 的 `inject()` 实现可知,slot 未声明时它只是等待声明出现(`spec === undefined` 时直接 return),注册永不发生、也不报错——在旧宿主上这会表现为「配置入口凭空消失且无人知其所以然」。
158
+
159
+ ### Tests
160
+
161
+ `181/181`(178 → 181),`skip 0`。新增/改写:
162
+
163
+ - 页面注册到 `settings.section`,`id`/`order`/`locale` 正确,label 经本地化字典解析;
164
+ - **旧宿主(未声明该 slot)上不注册任何东西,并打出说明性 warn**;
165
+ - 页面渲染真实表单,且**不含**可折叠卡片的头部按钮;
166
+ - 导航图标与页面 **id 必须一致**(不一致会静默回落到通用齿轮)。
167
+
168
+ 变异验证 4/4 命中:①去掉声明探测(无条件注册)→ 旧宿主用例失败;②用折叠卡片替代表单 → 渲染用例失败;③恢复旧的两处插件页注册 → 「no Plugins-page card」用例失败;④图标 id 与页面 id 不一致 → 图标用例失败。
169
+
170
+ > 夹具也被修了:测试桩原本没有 `specOf`,新探测在测试里恒为假、永远走不到注册分支——测试会全绿但功能从不生效。现在夹具显式声明 `settings.section`(并可通过删除它来模拟旧宿主)。
171
+
172
+ ## 2.1.15 (2026-11-06)
173
+
174
+ ### Changed
175
+
176
+ **插件详情页改为一段短简介,不再整篇渲染 README。**
177
+
178
+ DSH 0.2.2 起,插件页在名称、简介、开关下方新增「详细介绍文档」区块。宿主的解析顺序是(`dsh-plugin-detail` 的 `readPackageDocument` / `localeDetail`):
179
+
180
+ 1. 按界面语言走语言链(`zh-CN` → `zh` → `en`),依次读 `locale/<language>.json`;
181
+ 2. 取**第一个声明了** `meta.detail` 的值(某个 locale 文件存在但没写 `detail` 不算命中,继续往下走);
182
+ 3. 渲染该路径指向的 Markdown;
183
+ 4. **一个都没找到,就回落到包根目录的 README**。
184
+
185
+ 本项目的 README 有数百行,于是整篇被塞进一个 560px 高的滚动框。现在补上三处:
186
+
187
+ - 新增 `docs/DETAIL.zh.md`(82 字符)与 `docs/DETAIL.md`(95 字符);
188
+ - 新增 `locale/zh.json`、`locale/en.json`,`meta` 里各有 `title` / `description` / `detail`;
189
+ - `package.json` 的 `files` 补入 `locale` 与两条 `docs/` 明确路径。
190
+
191
+ **`en.json` 必须写**:它是语言链的最终兜底,只写 `zh.json` 的话英文界面(以及所有未单独提供的语言)照样回落 README 全文。
192
+
193
+ ### Tests
194
+
195
+ `178/178`(173 → 178),`skip 0`。新增 5 条守卫(`test/detail-docs.test.mjs`),分别钉住:
196
+
197
+ - 每个 `locale/*.json` 都声明了 `meta.detail`,且 `en.json` 存在;
198
+ - `meta.detail` 指向的文件**真实存在**且非空(指向不存在的文件不会安静回落,而是显示错误信息加「重试」按钮,比长文更糟);
199
+ - 每份文档 ≤ 100 字符(按字符总数,非字数),且不低于 40 字符;
200
+ - 这些文件都在 `package.json#files` 白名单内(漏了只在发布包里缺,恰好是没人跑测试的地方);
201
+ - 路径为包根相对、已规范化、以 `.md` 结尾。
202
+
203
+ 变异验证 4/4 命中:删掉 `en.json` 的 `detail`、把 `detail` 指向不存在的文件、把文案改超长、从 `files` 移除 `locale`,各自触发对应用例失败。
204
+
205
+ **用宿主自己的代码验证**:把 asar 里 `dsh-plugin-detail` 的 `document.js` / `files.js` 取出来,直接调用 `localFiles` + `readPackageDocument` + `languageChain` 解析本包:
206
+
207
+ | 界面语言 | 结果 |
208
+ | --- | --- |
209
+ | `zh-CN` / `zh` | `docs/DETAIL.zh.md`,82 字符 |
210
+ | `en-US` | `docs/DETAIL.md`,95 字符 |
211
+ | `ja-JP` | 按语言链回落英文,95 字符 |
212
+
213
+ 四种语言都没有 `invalid` 错误。
214
+
3
215
  ## 2.1.14 (2026-11-05)
4
216
 
5
217
  ### Fixed
package/lib/client.js CHANGED
@@ -26,11 +26,11 @@ window.__ModuleLoader__.load({
26
26
  // 跑的是哪一个 client bundle」——宿主在启动时快照 bundle,页面可能仍
27
27
  // 持有旧版本;一眼对出构建号即可排除/坐实这一点。每次改 client.js
28
28
  // 排查时必须递增它。
29
- var DSM_CLIENT_BUILD = "2026-10-26.1";
29
+ var DSM_CLIENT_BUILD = "2026-11-06.1";
30
30
 
31
31
  // ── plugin icon (LD brand logo, 64px) ────────────────────────────────
32
32
  var DSM_ICON = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAXGUlEQVR4nH1bC7BdVXn+1tr7nHPvzb3JvUloSAQp0JHWoAMttKOCFrWU8irQSbCTQYG21IahnTJUUTsM0FJhZCzCSIcKImOpDkhrhQ5YC7ROB3lUBU3EyCuBFBIIedzcx3ntvTr/a621TwIns3PO3mfvddf/+v7v/9c6DvYKoYBz1cZNYfJpVBcNBm7dcIhj3TBM15VzqAE6XAWEGggVADroOl0byDW+PtRr9E732rl9r2PxOMNsrCogVE7PA0Kge4Lcz5/TGI6v00UaK+h98u4QUA9quIDg4Pe2i2LTsknc++mzZu9cv37VHNaFAveSJICj/9aFUNzrXHXSTwdnznl/Y+X9MaEP1D0A/ToKaUdDASoAK0YVYcLad/G88S6C1aQcOkI2Nj9HylBFBRMYqPUeFp6EDXQfKcIUoud6LQQP59rwrsBEOdhy9KGDK/7j9mUPmBKcCf++Z4YbF6eKLw+6QFioKl/DoYILlXMsHE2KPCCzwlsqoNb3oUw4Kq+2a0k4G4MtXOX3J4HNyulzUkC0eqYI8ZAaQZQSAh9080Qx1m7jHStnL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Qub7EvY9gxc9yW1vW+HgME3KkwSkNDs0EVnXqWqARIG3X1y3XDq0xbPbTS4q7vVcCN7qwGWM73/HV3P0t7iwImoOhlMZpe0rc8q7tblaE9vxzJaTCJa3nC/iZp6QFTgNGi/0mC9TvOTukUNLUG8Y6hZte7e/2l52Iu8ar6qXalR6hrhq5P0+LI7/DaYBgrHnMve1HEhYu6RkWgq2bvKDJ3cVGOfhZLOdYkaq8xPIYX2zVV72uyPBEN01XnTDuy2WLL33w+rG7/PpT3NyvrQ4bx9tww8qT1ejHNHFPQEJ6Ke0E1LJd2FmhR90g04xpP+tfKCjmYKaWIU/ImhcpTpXi2q7UfLeH9fXVqSVsTNiMD+Rh4uraDT2mlpXu8BNaG1etcnN+3T2huPcvWg8dubS6dHJJUfD6bFVXrq5rrw3+tCaXOuGmBENzAzHpu0tvL63uNj8bykdeoCkt8QHL+SqAkRxz60wJcQ9BFh6p7CX8CYEQLtShKocTfmbpRLHs3d1LT7u+9dA99tNZ+yHxBTcNztz0mr9x74I/hnZXhD7F/PCAn6bJz+U0vrPr7K5VJUJZf5/v040NDcG02LGGJVmfOsuxdifg03U9vUZHrPz0fl7p5caGjNkiEmTFUXBooUDbjWGs5TE+Pdyy6vjqijO+MPYACb+efjwdiYsqIewMk+d8tbro1b1uXXehPrYahmn+hZmGgtefqsalNFvU1BpAhM8QXhUlCmgCmihAUnBUQixk6J2eSYqwvM9Iz5sfrApM7LDF7W651oILbef3Tky0Nk2vcfeed0dxp3Nu7h6EYr2sgOL/Aa5OuMdnE5sWAAAAAElFTkSuQmCC";
33
- var SETTINGS_CSS = ".dsm-model-settings{display:flex;flex-direction:column;gap:14px;margin:0;padding:0}.dsm-model-settings-list{display:flex;flex-direction:column;gap:10px}.dsm-model-settings-route{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto;gap:8px;align-items:end;padding:10px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:10px;background:var(--dsw-alias-bg-layer-3,#202126)}.dsm-model-settings-field{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-model-settings-select{width:100%;max-width:220px;height:32px;padding:0 28px 0 10px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:8px;background:var(--dsw-alias-bg-layer-2,#232529);color:var(--dsw-alias-label-primary,#e6e6e6);font:inherit;font-size:13px;line-height:1.5}.dsm-model-settings-select:focus{outline:2px solid var(--dsw-alias-state-business-primary,#5686fe);outline-offset:1px}.dsm-model-settings-select:disabled{color:var(--dsw-alias-label-tertiary,#999);cursor:default}.dsm-model-settings-remove{height:32px;min-width:32px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer;font-size:16px;line-height:1}.dsm-model-settings-remove:hover{color:var(--dsw-alias-state-error-primary,#ef4444);background:var(--dsw-alias-interactive-bg-hover-danger,rgba(242,90,90,.15))}.dsm-model-settings-options{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.dsm-model-settings-strategy{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-model-settings-strategy .dsm-model-settings-select{max-width:150px}.dsm-model-settings-failover{display:flex;align-items:center;gap:6px;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer}.dsm-model-settings-failover input[type=checkbox]{cursor:pointer}.dsm-failover-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary,#999);white-space:nowrap}.dsm-model-settings-inject-route{display:flex;align-items:center;gap:6px;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer}.dsm-model-settings-inject-route input[type=checkbox]{cursor:pointer}.dsm-inject-route-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary,#999)}.dsm-model-settings-apply-fork{display:flex;align-items:center;gap:6px;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer}.dsm-model-settings-apply-fork input[type=checkbox]{cursor:pointer}.dsm-apply-fork-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary,#999)}.dsm-model-settings-footer{border-top:1px solid var(--dsw-alias-border-l2,#36373b);display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 0 4px}.dsm-model-settings-footer-left{display:flex;align-items:center;gap:10px;flex:1;min-width:0}.dsm-model-settings-footer-status{flex:1;min-width:0;color:var(--dsw-alias-label-secondary,#b8b8b8);font-size:12px;line-height:1.5}.dsm-model-settings-footer-error{flex:1;min-width:0;color:var(--dsw-alias-label-error,#ef4444);font-size:12px;line-height:1.5}.dsm-btn{appearance:none;font:inherit;cursor:pointer;border:1px solid transparent;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5}.dsm-btn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:1px}.dsm-btn:disabled{opacity:.4;cursor:default}.dsm-btn-outline{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:transparent;font-weight:500}.dsm-btn-outline:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed);background:rgba(255,255,255,.04)}.dsm-btn-primary{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}.dsm-btn-primary:hover:not(:disabled){opacity:.9}.dsm-model-settings-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-plugin-card{border:1px solid var(--dsw-alias-border-l2,#36373b);background:var(--dsw-alias-bg-layer-3,#202126);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.dsm-plugin-card:hover{border-color:var(--dsw-alias-label-dimmed,#777)}.dsm-plugin-card-open{background:var(--dsw-alias-bg-layer-2,#25262b);border-color:var(--dsw-alias-label-dimmed,#777)}.dsm-plugin-card-header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:transparent;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.dsm-plugin-card-header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:-2px}.dsm-plugin-card-head{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.dsm-plugin-card-title{color:var(--dsw-alias-label-primary,#e6e6e6);font-size:15px;font-weight:600;line-height:1.4}.dsm-plugin-card-description{color:var(--dsw-alias-label-tertiary,#999);font-size:13px;line-height:1.5}.dsm-plugin-card-chevron{color:var(--dsw-alias-label-tertiary,#999);flex:none;display:inline-flex;transition:transform .16s}.dsm-plugin-card-chevron-open{transform:rotate(180deg)}.dsm-plugin-card-caret{color:inherit;font-size:12px;line-height:1;display:inline-flex}.dsm-plugin-card-body{border-top:1px solid var(--dsw-alias-border-l2,#36373b);margin:0 16px;padding:0 0 8px}.dsm-plugin-card-body .dsm-model-settings{margin:0;padding:12px 0 0;background:transparent;border:0;border-radius:0}.dsm-plugin-card-body .dsm-model-settings-head{display:none}.dsm-plugin-card-icon{width:32px;height:32px;flex:none;border-radius:7px}.dsm-model-settings-cheer{display:inline-flex;align-items:center;gap:4px;flex:none;text-decoration:underline;text-underline-offset:2px;color:var(--dsw-alias-label-tertiary,#999);font-size:13px;line-height:1.5;transition:color .16s}.dsm-model-settings-cheer-star{font-size:12px;line-height:1;display:inline-flex}.dsm-model-settings-cheer:hover{color:var(--dsw-alias-label-primary,#e6e6e6)}.dsm-model-settings-cheer:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:2px}.dsm-model-settings-warn{grid-column:1/-1;color:var(--dsw-alias-label-error,#ef4444);font-size:12px;line-height:18px}.dsm-model-settings-warn-list{display:flex;flex-direction:column;gap:4px;color:var(--dsw-alias-label-error,#ef4444);font-size:12px;line-height:18px}.dsm-notice-row{display:flex;flex-direction:column;gap:4px;margin:6px 0;font-size:12px}.dsm-notice-toggle{appearance:none;font:inherit;cursor:pointer;background:transparent;border:0;padding:2px 0;display:flex;align-items:center;gap:6px;color:var(--dsw-alias-label-tertiary,#9a9a9a);text-align:left;min-width:0}.dsm-notice-toggle:hover{color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-notice-toggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:1px;border-radius:3px}.dsm-notice-dot{flex:none;width:5px;height:5px;border-radius:50%;background:var(--dsw-alias-label-caption,#777)}.dsm-notice-label{flex:none;font-weight:500}.dsm-notice-summary{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-notice-summary:before{content:'·';margin-right:6px;color:var(--dsw-alias-label-caption,#777)}.dsm-notice-body{margin:0;padding:8px 10px;border-left:2px solid var(--dsw-alias-border-l2,#36373b);background:var(--dsw-alias-bg-layer-1,#1b1b1d);color:var(--dsw-alias-label-secondary,#b8b8b8);font-size:12px;line-height:18px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:420px;overflow:auto}";
33
+ var SETTINGS_CSS = ".dsm-model-settings{display:flex;flex-direction:column;gap:14px;margin:0;padding:0}.dsm-model-settings-list{display:flex;flex-direction:column;gap:10px}.dsm-model-settings-route{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto;gap:8px;align-items:end;padding:10px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:10px;background:var(--dsw-alias-bg-layer-3,#202126)}.dsm-model-settings-field{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-model-settings-select{width:100%;max-width:220px;height:32px;padding:0 28px 0 10px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:8px;background:var(--dsw-alias-bg-layer-2,#232529);color:var(--dsw-alias-label-primary,#e6e6e6);font:inherit;font-size:13px;line-height:1.5}.dsm-model-settings-select:focus{outline:2px solid var(--dsw-alias-state-business-primary,#5686fe);outline-offset:1px}.dsm-model-settings-select:disabled{color:var(--dsw-alias-label-tertiary,#999);cursor:default}.dsm-model-settings-remove{height:32px;min-width:32px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer;font-size:16px;line-height:1}.dsm-model-settings-remove:hover{color:var(--dsw-alias-state-error-primary,#ef4444);background:var(--dsw-alias-interactive-bg-hover-danger,rgba(242,90,90,.15))}.dsm-model-settings-options{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.dsm-model-settings-strategy{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-model-settings-strategy .dsm-model-settings-select{max-width:150px}.dsm-model-settings-failover{display:flex;align-items:center;gap:6px;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer}.dsm-model-settings-failover input[type=checkbox]{cursor:pointer}.dsm-failover-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary,#999);white-space:nowrap}.dsm-model-settings-inject-route{display:flex;align-items:center;gap:6px;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer}.dsm-model-settings-inject-route input[type=checkbox]{cursor:pointer}.dsm-inject-route-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary,#999)}.dsm-model-settings-apply-fork{display:flex;align-items:center;gap:6px;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer}.dsm-model-settings-apply-fork input[type=checkbox]{cursor:pointer}.dsm-apply-fork-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary,#999)}.dsm-model-settings-footer{border-top:1px solid var(--dsw-alias-border-l2,#36373b);display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 0 4px}.dsm-model-settings-footer-left{display:flex;align-items:center;gap:10px;flex:1;min-width:0}.dsm-model-settings-footer-status{flex:1;min-width:0;color:var(--dsw-alias-label-secondary,#b8b8b8);font-size:12px;line-height:1.5}.dsm-model-settings-footer-error{flex:1;min-width:0;color:var(--dsw-alias-label-error,#ef4444);font-size:12px;line-height:1.5}.dsm-btn{appearance:none;font:inherit;cursor:pointer;border:1px solid transparent;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5}.dsm-btn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:1px}.dsm-btn:disabled{opacity:.4;cursor:default}.dsm-btn-outline{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:transparent;font-weight:500}.dsm-btn-outline:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed);background:rgba(255,255,255,.04)}.dsm-btn-primary{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}.dsm-btn-primary:hover:not(:disabled){opacity:.9}.dsm-model-settings-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-plugin-card{border:1px solid var(--dsw-alias-border-l2,#36373b);background:var(--dsw-alias-bg-layer-3,#202126);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.dsm-plugin-card:hover{border-color:var(--dsw-alias-label-dimmed,#777)}.dsm-plugin-card-open{background:var(--dsw-alias-bg-layer-2,#25262b);border-color:var(--dsw-alias-label-dimmed,#777)}.dsm-plugin-card-header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:transparent;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.dsm-plugin-card-header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:-2px}.dsm-plugin-card-head{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.dsm-plugin-card-title{color:var(--dsw-alias-label-primary,#e6e6e6);font-size:15px;font-weight:600;line-height:1.4}.dsm-plugin-card-description{color:var(--dsw-alias-label-tertiary,#999);font-size:13px;line-height:1.5}.dsm-plugin-card-chevron{color:var(--dsw-alias-label-tertiary,#999);flex:none;display:inline-flex;transition:transform .16s}.dsm-plugin-card-chevron-open{transform:rotate(180deg)}.dsm-plugin-card-caret{color:inherit;font-size:12px;line-height:1;display:inline-flex}.dsm-plugin-card-body{border-top:1px solid var(--dsw-alias-border-l2,#36373b);margin:0 16px;padding:0 0 8px}.dsm-plugin-card-body .dsm-model-settings{margin:0;padding:12px 0 0;background:transparent;border:0;border-radius:0}.dsm-plugin-card-body .dsm-model-settings-head{display:none}.dsm-plugin-card-icon{width:32px;height:32px;flex:none;border-radius:7px}.dsm-model-settings-cheer{display:inline-flex;align-items:center;gap:4px;flex:none;text-decoration:underline;text-underline-offset:2px;color:var(--dsw-alias-label-tertiary,#999);font-size:13px;line-height:1.5;transition:color .16s}.dsm-model-settings-cheer-star{font-size:12px;line-height:1;display:inline-flex}.dsm-model-settings-cheer:hover{color:var(--dsw-alias-label-primary,#e6e6e6)}.dsm-model-settings-cheer:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:2px}.dsm-model-settings-warn{grid-column:1/-1;color:var(--dsw-alias-label-error,#ef4444);font-size:12px;line-height:18px}.dsm-model-settings-warn-list{display:flex;flex-direction:column;gap:4px;color:var(--dsw-alias-label-error,#ef4444);font-size:12px;line-height:18px}.dsm-notice-row{display:flex;flex-direction:column;gap:4px;margin:6px 0;font-size:12px}.dsm-notice-toggle{appearance:none;font:inherit;cursor:pointer;background:transparent;border:0;padding:2px 0;display:flex;align-items:center;gap:6px;color:var(--dsw-alias-label-tertiary,#9a9a9a);text-align:left;min-width:0}.dsm-notice-toggle:hover{color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-notice-toggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:1px;border-radius:3px}.dsm-notice-dot{flex:none;width:5px;height:5px;border-radius:50%;background:var(--dsw-alias-label-caption,#777)}.dsm-notice-label{flex:none;font-weight:500}.dsm-notice-summary{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-notice-summary:before{content:'·';margin-right:6px;color:var(--dsw-alias-label-caption,#777)}.dsm-model-settings-section{display:flex;flex-direction:column;gap:14px}.dsm-settings-heading{margin:0;font-size:16px;font-weight:600;line-height:24px;color:var(--dsw-alias-label-primary,#e6e6e6)}.dsm-settings-intro{margin:0;font-size:13px;line-height:20px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-model-settings-section .dsm-model-settings{margin:0;padding:0;background:transparent;border:0;border-radius:0}.dsm-settings-values{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:4px;font-size:13px;line-height:20px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-settings-values li::marker{color:var(--dsw-alias-label-tertiary,#999)}.dsm-model-settings-diag{display:flex;flex-direction:column;gap:4px}.dsm-model-settings-diag-toggle{appearance:none;font:inherit;cursor:pointer;background:transparent;border:0;padding:2px 0;display:flex;align-items:center;gap:6px;color:var(--dsw-alias-label-tertiary,#999);font-size:12px;line-height:18px;text-align:left;min-width:0}.dsm-model-settings-diag-toggle:hover{color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-model-settings-diag-toggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:1px;border-radius:3px}.dsm-model-settings-diag-caret{flex:none;font-size:10px;line-height:1;display:inline-flex}.dsm-model-settings-diag-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-caption,#777)}.dsm-notice-body{margin:0;padding:8px 10px;border-left:2px solid var(--dsw-alias-border-l2,#36373b);background:var(--dsw-alias-bg-layer-1,#1b1b1d);color:var(--dsw-alias-label-secondary,#b8b8b8);font-size:12px;line-height:18px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:420px;overflow:auto}";
34
34
 
35
35
  if (typeof document !== "undefined") {
36
36
  var cssId = "dsh-subagent-default-model/client.css";
@@ -65,6 +65,13 @@ window.__ModuleLoader__.load({
65
65
  var SUBAGENT_ROW_ZH = {
66
66
  "row.title": "子代理默认模型(dsh-subagent-default-model)",
67
67
  "row.desc": "为 subagent / subagent_fork 选择一个或多个默认路由;清空后子代理继承父会话路由。",
68
+ "section.title": "子代理默认模型",
69
+ "section.intro": "三个核心用途:",
70
+ "section.value1": "多模型分配:按轮换或随机策略,为每次子代理指派池中的一条路由。",
71
+ "section.value2": "跨供应商故障转移:连接失败时自动切到另一家供应商的模型,耗尽才放行真实错误。",
72
+ "section.value3": "路由可见可查:当前供应商与模型显示在轨迹和对话里,并写进子代理自己的上下文。",
73
+ "section.diagToggle": "诊断信息",
74
+ "section.diagHint": "排查保存问题时展开",
68
75
  "row.provider": "Provider",
69
76
  "row.model": "Model",
70
77
  "row.effort": "推理强度",
@@ -105,6 +112,13 @@ window.__ModuleLoader__.load({
105
112
  var SUBAGENT_ROW_EN = {
106
113
  "row.title": "Subagent default model (dsh-subagent-default-model)",
107
114
  "row.desc": "Choose one or more default routes for subagent / subagent_fork; clear them to inherit the parent session route.",
115
+ "section.title": "Subagent default model",
116
+ "section.intro": "Three things this plugin does:",
117
+ "section.value1": "Multi-model assignment: hand each subagent one route from the pool, by rotation or at random.",
118
+ "section.value2": "Cross-provider failover: switch to another vendor's model when a connection fails, surfacing the real error only once the pool is spent.",
119
+ "section.value3": "Visible route: the live provider and model show in the trajectory and conversation, and are written into the subagent's own context.",
120
+ "section.diagToggle": "Diagnostics",
121
+ "section.diagHint": "expand when triaging a save problem",
108
122
  "row.provider": "Provider",
109
123
  "row.model": "Model",
110
124
  "row.effort": "Reasoning strength",
@@ -860,11 +874,14 @@ window.__ModuleLoader__.load({
860
874
  + " · writable=" + String(diagnostics.writable)
861
875
  + " · rev=" + (diagnostics.revision === null || diagnostics.revision === void 0 ? "?" : String(diagnostics.revision));
862
876
  }
877
+ // The binding diagnostics are a triage aid, not part of the form: a
878
+ // permanently visible `[diag …]` line reads as an error to anyone who is
879
+ // not debugging. It stays COLLAPSED, one click away, and LAST on the page
880
+ // — the bottom edge is where meta information belongs, so it never pushes
881
+ // the configuration the user came for down the screen.
882
+ var diagOpenState = React.useState(false);
883
+ var diagOpen = diagOpenState[0];
863
884
  return React.createElement("section", { className: "dsm-model-settings" },
864
- diagnosticText ? React.createElement("div", {
865
- className: "dsm-model-settings-hint",
866
- "data-bindings-diag": diagnosticText
867
- }, diagnosticText) : null,
868
885
  // An empty catalog is the cause of "the model cannot be selected": the
869
886
  // Provider select then offers only "inherit" and the Model select is
870
887
  // disabled behind `!route.provider`. Say so instead of showing a select
@@ -965,6 +982,22 @@ window.__ModuleLoader__.load({
965
982
  React.createElement("button", { type: "button", className: "dsm-btn dsm-btn-outline", disabled: discardDisabled, onClick: discard }, t("row.discard")),
966
983
  React.createElement("button", { type: "button", className: "dsm-btn dsm-btn-primary", disabled: saveDisabled, onClick: save }, busyState[0] ? t("row.saving") : t("row.save"))
967
984
  ),
985
+ diagnosticText ? React.createElement("div", { className: "dsm-model-settings-diag" },
986
+ React.createElement("button", {
987
+ type: "button",
988
+ className: "dsm-model-settings-diag-toggle",
989
+ "aria-expanded": diagOpen ? "true" : "false",
990
+ onClick: function () { diagOpenState[1](!diagOpen); }
991
+ },
992
+ React.createElement("span", { className: "dsm-model-settings-diag-caret" }, diagOpen ? "\u25BE" : "\u25B8"),
993
+ t("section.diagToggle"),
994
+ diagOpen ? null : React.createElement("span", { className: "dsm-model-settings-diag-hint" }, "\u00B7 " + t("section.diagHint"))
995
+ ),
996
+ diagOpen ? React.createElement("div", {
997
+ className: "dsm-model-settings-hint",
998
+ "data-bindings-diag": diagnosticText
999
+ }, diagnosticText) : null
1000
+ ) : null,
968
1001
  toastState[0] ? React.createElement(Toast, { key: toastState[0].seq, text: toastState[0].text, onDone: function () { toastState[1](null); } }) : null
969
1002
  );
970
1003
  }
@@ -1004,6 +1037,41 @@ window.__ModuleLoader__.load({
1004
1037
  );
1005
1038
  }
1006
1039
 
1040
+ // ── SubagentModelSection: the MAIN Settings sidebar page ─────────────
1041
+ //
1042
+ // Since 0.2.1-rc.5 the general Settings panel exposes a `settings.section`
1043
+ // LIST slot: each registration becomes one item in the left-hand nav rail
1044
+ // (id / order / label) and one page in the right-hand pane. Third-party
1045
+ // plugins use it too (e.g. `dsh-opencode-go` registers `id: "opencode-go"`,
1046
+ // `order: 20`), which is exactly the "OpenCode Go" row in the Settings UI.
1047
+ //
1048
+ // Why a wrapper instead of registering `SubagentModelCard` directly:
1049
+ // - the section component receives `{ t, close }`, NOT `view`, so the
1050
+ // collapsible card would render CLOSED (its open state is seeded from
1051
+ // `props.view === "page"`);
1052
+ // - a Settings page is already a dedicated surface, so a second
1053
+ // collapsible shell around the form is redundant chrome.
1054
+ //
1055
+ // So the section renders the real form (`SubagentModelRow`) directly, with
1056
+ // the same heading + intro the shipped sections use, and a small block of
1057
+ // CSS so the form reads as a page rather than a card.
1058
+ function SubagentModelSection(props) {
1059
+ var t = props.t;
1060
+ // The page's one-line intro names the plugin's three values, one sentence
1061
+ // each, so a user landing here can tell what the switches below actually
1062
+ // buy them. A prose paragraph buried that; three bullets carry it.
1063
+ return React.createElement("div", { className: "dsm-model-settings-section" },
1064
+ React.createElement("h2", { className: "dsm-settings-heading" }, t("section.title")),
1065
+ React.createElement("p", { className: "dsm-settings-intro" }, t("section.intro")),
1066
+ React.createElement("ul", { className: "dsm-settings-values" },
1067
+ React.createElement("li", null, t("section.value1")),
1068
+ React.createElement("li", null, t("section.value2")),
1069
+ React.createElement("li", null, t("section.value3"))
1070
+ ),
1071
+ React.createElement(SubagentModelRow, props)
1072
+ );
1073
+ }
1074
+
1007
1075
  // ── 对话流注入行的渲染器(自有节点 kind)─────────────────────────────
1008
1076
  //
1009
1077
  // 宿主按 `entryKey = node.kind` 在 `conversation.chat.node` 槽位**运行时分派**
@@ -1557,30 +1625,110 @@ window.__ModuleLoader__.load({
1557
1625
  };
1558
1626
  };
1559
1627
 
1560
- // Cards register ONCE, unconditionally, exactly like the local siblings
1561
- // (`dsh-connect-workbuddy` / `dsh-connect-trae`). They deliberately do NOT
1562
- // follow the namespace: the forwarding scope above re-routes itself, so a
1563
- // late mirror answer cannot leave a card pinned to a namespace the Host
1564
- // does not serve, and the card needs no re-registration to recover.
1565
- var registerCard = function (slotName, key) {
1628
+ // ── Main Settings sidebar page (`settings.section`) ──────────────
1629
+ //
1630
+ // The plugin's configuration used to live ONLY in the Plugins page's
1631
+ // `plugins.bundle.config` / `plugins.row.config` keyed slots. Starting
1632
+ // with 0.2.1-rc.5 the general Settings panel exposes a `settings.section`
1633
+ // LIST slot, and third-party plugins (e.g. dsh-opencode-go) use it to
1634
+ // put their own page in the left-hand nav rail. The request is to MOVE
1635
+ // the settings there, so those two registrations are gone and the form
1636
+ // is now a first-class Settings section.
1637
+ //
1638
+ // Capability probe: `settings.section` does not exist on hosts before
1639
+ // 0.2.1-rc.5, and this plugin still supports 0.1.7. `slots.inject()`
1640
+ // on an undeclared slot waits forever rather than throwing, so a
1641
+ // registration there would simply never appear — but probing first
1642
+ // makes the intent explicit and keeps the diagnostics honest. We use
1643
+ // `getVersion`, the same API the shipped settings shell uses to rebuild
1644
+ // its nav rows, and fall back to a no-op when it is unavailable.
1645
+ // A DECLARATION probe, not a version compare: `specOf` is the renderer's
1646
+ // own `specDynamic` accessor and answers `undefined` for a slot the host
1647
+ // never declared (`slots.inject()` would then wait forever and the page
1648
+ // would simply never appear). Probing keeps the console honest instead
1649
+ // of leaving a silent no-op.
1650
+ //
1651
+ // NO declaration probe. `slots.inject()` already IS the probe: it waits
1652
+ // for the declaration and runs the callback only once the slot exists,
1653
+ // doing nothing at all on a host that never declares it. A probe built
1654
+ // on an accessor the service may not expose turns "not supported here"
1655
+ // into "never registers anywhere" — which is exactly how 2.1.16/2.1.17
1656
+ // shipped a page nobody could see. Let the host answer.
1657
+ {
1566
1658
  try {
1567
- ctx.slots.inject(slotName, function () {
1568
- return ctx.slots.register({
1569
- name: slotName,
1570
- key: key,
1571
- priority: 30,
1659
+ ctx.slots.inject("settings.section", function () {
1660
+ // The page and its nav glyph are registered together, in ONE
1661
+ // `inject` callback, and both disposers are returned as a pair.
1662
+ //
1663
+ // Two separate `slots.inject()` calls look equivalent but are not:
1664
+ // each waits on its own declaration, and the glyph's cell is only
1665
+ // meaningful while the page's id exists. Registering them from the
1666
+ // same callback makes the pairing structural instead of a
1667
+ // convention, and Cordis disposes both with this fiber.
1668
+ var disposers = [];
1669
+ disposers.push(ctx.slots.register({
1670
+ name: "settings.section",
1671
+ id: "dsh-subagent-default-model",
1672
+ // After the shipped sections (account -10, general 0, models 10,
1673
+ // plugins 15, agent-presets 20) and alongside other third-party
1674
+ // pages; 30 keeps us last without colliding with a built-in.
1675
+ order: 30,
1676
+ label: function () { return ctx.locale.bind(SUBAGENT_ROW_LOCALE)("section.title"); },
1572
1677
  locale: SUBAGENT_ROW_LOCALE,
1573
1678
  inject: subagentRowInjected
1574
- }, SubagentModelCard);
1679
+ }, SubagentModelSection));
1680
+ // Nav-rail glyph, addressed by the SAME id as the page: the shell
1681
+ // renders `renderSlot("settings.section.icon", …, { only: row.id })`,
1682
+ // so an unmatched id simply never appears and the default gear
1683
+ // stays. `inline: true` on this slot wraps the cell in a <span>,
1684
+ // hence an <img> sized to the owner's requested edge.
1685
+ // Same reasoning as the page: `inject` waits for the declaration,
1686
+ // so an unconditional call is safe and a probe is not.
1687
+ {
1688
+ var iconInject = null;
1689
+ try {
1690
+ iconInject = ctx.slots.inject("settings.section.icon", function () {
1691
+ var iconDisposer = ctx.slots.register({
1692
+ name: "settings.section.icon",
1693
+ id: "dsh-subagent-default-model",
1694
+ locale: SUBAGENT_ROW_LOCALE
1695
+ }, function (iconProps) {
1696
+ var edge = iconProps && typeof iconProps.size === "number" ? iconProps.size : 16;
1697
+ return React.createElement("img", {
1698
+ src: DSM_ICON,
1699
+ alt: "",
1700
+ width: edge,
1701
+ height: edge,
1702
+ style: {
1703
+ width: edge + "px",
1704
+ height: edge + "px",
1705
+ borderRadius: "3px",
1706
+ display: "block",
1707
+ objectFit: "contain",
1708
+ opacity: iconProps && iconProps.active === false ? 0.75 : 1
1709
+ }
1710
+ });
1711
+ });
1712
+ disposers.push(iconDisposer);
1713
+ return iconDisposer;
1714
+ });
1715
+ } catch (_iconInjectError) {
1716
+ iconInject = null;
1717
+ }
1718
+ if (typeof iconInject === "function") disposers.push(iconInject);
1719
+ }
1720
+
1721
+ return function () {
1722
+ for (var index = 0; index < disposers.length; index += 1) {
1723
+ var dispose = disposers[index];
1724
+ if (typeof dispose === "function") dispose();
1725
+ }
1726
+ };
1575
1727
  });
1576
1728
  } catch (error) {
1577
- console.error('[dsh-subagent-default-model] settings card slot "' + slotName + '" failed to register (host provider unaffected):', error);
1729
+ console.error('[dsh-subagent-default-model] settings.section page failed to register (host provider unaffected):', error);
1578
1730
  }
1579
- };
1580
- // 0.1.7 placement: register under Plugins config surfaces (the old
1581
- // `settings.plugin.item` slot was removed in 0.1.7).
1582
- registerCard("plugins.bundle.config", "dsh-subagent-default-model");
1583
- registerCard("plugins.row.config", "dsh-subagent-default-model#dsh-subagent-default-model");
1731
+ }
1584
1732
  });
1585
1733
  }
1586
1734
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-subagent-default-model",
3
- "version": "2.1.14",
3
+ "version": "2.2.0",
4
4
  "description": "为 DeepSeek Harness 子代理配置默认模型:多模型顺序/随机分配、跨供应商连接失败故障转移,并在轨迹/对话视图显示当前供应商与模型,同时以一行真实提示词把当前路由注入子代理上下文。",
5
5
  "keywords": [
6
6
  "deepseek-harness",