dsh-subagent-default-model 0.3.0 → 0.3.2

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.2 (2026-08-24)
4
+
5
+ ### Changed
6
+
7
+ - **设置面板迁移到「插件配置」**: 设置行从 `settings.general.item`(通用设置)迁移到 `settings.plugin.item`(插件配置),key 为 `subagent-default-model`。新增 `SubagentModelCard` 折叠卡片外壳,默认收起、点击展开,样式与其它可配置插件一致;卡片标题带插件名括号(如「子代理默认模型(dsh-subagent-default-model)」)。
8
+ - 文档同步:`README.md`、`plugin/README.md`、`PLUGIN_REQUIREMENTS.md`、`DEVELOPMENT.md` 中的「设置 → 通用设置 → 子代理默认模型」更新为「设置 → 插件配置 → 子代理默认模型」。
9
+
10
+ ## 0.3.1 (2026-08-24)
11
+
12
+ ### Docs
13
+
14
+ - **README 中英双语双文件**: `README.md` 重写为纯简体中文,新增 `README.en.md` 英文翻译,顶部加语言切换链接;`package.json` 的 `files` 加入 `README.en.md`
15
+
3
16
  ## 0.3.0 (2026-08-23)
4
17
 
5
18
  ### Features
@@ -24,7 +37,7 @@
24
37
 
25
38
  ### Features
26
39
 
27
- - Web 设置面板(通用设置 → 子代理默认模型)
40
+ - Web 设置面板(插件配置 → 子代理默认模型)
28
41
  - 保存成功 Toast 通知
29
42
 
30
43
  ## 0.1.0 (2026-08-16)
package/README.en.md ADDED
@@ -0,0 +1,132 @@
1
+ # dsh-subagent-default-model
2
+
3
+ English | [中文](README.md)
4
+
5
+ Pick the default model for subagent delegations in [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness), configurable via `~/.dsh/settings.yaml`.
6
+
7
+ When a subagent is created without an explicit `model`, this plugin injects the configured default — so every `subagent`, `subagent_fork`, and any tool that omits `agentOptions` routes through it. Explicit per-call overrides always win; an absent or incomplete settings section keeps the historical behavior (children inherit the parent route).
8
+
9
+ ## Features
10
+
11
+ - **Single model** — all subagents run on one configured model.
12
+ - **Multi-model** — a `models` list with `round-robin` or `random` strategy spreads parallel subagents across models.
13
+ - **Reasoning strength** — optionally specify `reasoningEffort` per model entry (e.g. `high`, `medium`, `low`); the Web UI loads available efforts from the model catalog.
14
+ - **Hot-reload** — settings changes apply to the very next delegation.
15
+ - **Clean teardown** — Cordis disposal restores the original service methods.
16
+
17
+ ## Screenshots
18
+
19
+ **Settings panel** (`Settings → General → Subagent default model`): configure one or more model routes with `round-robin` / `random` strategy and per-route reasoning effort.
20
+
21
+ ![Subagent default model settings panel](https://raw.githubusercontent.com/dingminhua/dsh-subagent-default-model/main/assets/pic_01.png)
22
+
23
+ **Effect verification**: 10 subagents split 5/5 between `deepseek-v4-flash` and `Kimi-k3` (round-robin).
24
+
25
+ ![Subagent default model distribution](https://raw.githubusercontent.com/dingminhua/dsh-subagent-default-model/main/assets/pic_02.png)
26
+
27
+ ## Marketplace
28
+
29
+ [![dshfind plugin](https://dshfind.com/api/badge/dingminhua/dsh-subagent-default-model)](https://dshfind.com/plugins/dingminhua/dsh-subagent-default-model)
30
+
31
+ ## Install
32
+
33
+ Install from the npm registry:
34
+
35
+ ```sh
36
+ npm install dsh-subagent-default-model
37
+ ```
38
+
39
+ Or via the DSH plugin command (equivalent; it goes through npm internally):
40
+
41
+ ```sh
42
+ dsh plugin --profile desktop add dsh-subagent-default-model
43
+ ```
44
+
45
+ ## Release / Publish
46
+
47
+ Publish to the npm registry. **The full authoritative flow lives in [`RELEASING.md`](../../RELEASING.md)** (2FA confirmation, tag fix, proxy, verification).
48
+
49
+ Quick reference:
50
+
51
+ ```sh
52
+ # 1. Test: npm --prefix plugin test
53
+ # 2. Bump version (plugin/package.json `version`) and update CHANGELOG.md
54
+ # 3. Commit and tag
55
+ git add plugin/package.json plugin/CHANGELOG.md
56
+ git commit -m "chore: bump version to X.Y.Z"
57
+ git tag -a vX.Y.Z -m "vX.Y.Z: <summary>"
58
+ git push origin main
59
+ git push origin vX.Y.Z
60
+
61
+ # 4. Publish to npm (if the account has 2FA, confirm in the browser)
62
+ cd plugin
63
+ npm publish
64
+ ```
65
+
66
+ > ⚠️ Run the tests first: `npm --prefix plugin test`.
67
+ > The `files` field in `package.json` limits publishing to `lib/`, `cordis.patch.yml`, `LICENSE`, `README.md`, `README.en.md`, `CHANGELOG.md` — `test/` and `node_modules/` are never packed.
68
+
69
+ Local install (DSH Desktop / desktop profile):
70
+
71
+ ```sh
72
+ # Run under ~/.dsh/profiles/desktop (or use the dsh plugin command)
73
+ npm install dsh-subagent-default-model
74
+ # Or local dev: dsh plugin --profile desktop add /path/plugin (link: install, changes apply immediately)
75
+ ```
76
+
77
+ Notes:
78
+
79
+ - Local dev uses a `link:` install: `dsh plugin --profile desktop add /Users/dmh2002/DshProject/dsh-subagent-default-model/plugin` — `node_modules` holds a source symlink, so **restart DSH Desktop** after changing code.
80
+ - Production / other machines use the npm registry version (see Install above).
81
+
82
+ ## Configuration
83
+
84
+ Add to `~/.dsh/settings.yaml`:
85
+
86
+ ```yaml
87
+ # Single model
88
+ subagent-default-model:
89
+ provider: deepseek-official
90
+ model: deepseek-v4-pro
91
+
92
+ # Or multiple models
93
+ subagent-default-model:
94
+ provider: deepseek-official
95
+ models:
96
+ - deepseek-v4-pro
97
+ - deepseek-v4-flash
98
+ strategy: round-robin # round-robin | random
99
+
100
+ # With reasoning strength
101
+ subagent-default-model:
102
+ provider: deepseek-official
103
+ models:
104
+ - model: deepseek-v4-reasoner
105
+ reasoningEffort: high
106
+ - provider: other-provider
107
+ model: gpt-5.6
108
+ reasoningEffort: max
109
+ strategy: round-robin # round-robin | random
110
+ ```
111
+
112
+ | Field | Type | Default | Description |
113
+ | --- | --- | --- | --- |
114
+ | `provider` | string | — | Provider for string-type model entries. |
115
+ | `model` | string | — | Single model id (backward compatible). |
116
+ | `models` | array | `[]` | List of model entries (string or `{provider, model, reasoningEffort?}` pair). |
117
+ | `strategy` | string | `round-robin` | Selection strategy: `round-robin` or `random`. |
118
+ | `reasoningEffort` | string | — | Optional reasoning strength for a model entry (e.g. `high`, `max`). |
119
+
120
+ ## How it works
121
+
122
+ ```text
123
+ Explicit agentOptions on the request
124
+ → subagent-default-model settings
125
+ → inherit parent session route
126
+ ```
127
+
128
+ The plugin wraps the host `ctx.subagents` service (`start` / `startContinuable`), so it covers every delegation path — built-in `subagent` / `subagent_fork` tools and any custom tool that calls the service without providing `agentOptions`.
129
+
130
+ ## License
131
+
132
+ [MIT](LICENSE)
package/README.md CHANGED
@@ -1,32 +1,34 @@
1
1
  # dsh-subagent-default-model
2
2
 
3
- Default model for subagent delegations in [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness), configurable via `~/.dsh/settings.yaml`.
3
+ [English](README.en.md) | 中文
4
4
 
5
- When a subagent is created without an explicit `model`, this plugin injects the configured default — so every `subagent`, `subagent_fork`, and any tool that omits `agentOptions` routes through it. Explicit per-call overrides always win; an absent or incomplete settings section keeps the historical behavior (children inherit the parent route).
5
+ 为 [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness) 中的子代理(subagent)派发选择默认模型,可通过 `~/.dsh/settings.yaml` 配置。
6
6
 
7
- ## Features
7
+ 当创建子代理时未显式指定 `model`,本插件注入配置的默认模型 —— 因此所有 `subagent`、`subagent_fork` 以及任何省略 `agentOptions` 的工具调用都会经过它。显式传参的覆盖始终生效;配置段缺失或不完整时保持原有行为(子代理继承父会话路由)。
8
8
 
9
- - **Single model** — all subagents run on one configured model.
10
- - **Multi-model** — a `models` list with `round-robin` or `random` strategy spreads parallel subagents across models.
11
- - **Reasoning strength** — optionally specify `reasoningEffort` per model entry (e.g. `high`, `medium`, `low`); the Web UI loads available efforts from the model catalog.
12
- - **Hot-reload** — settings changes apply to the very next delegation.
13
- - **Clean teardown** — Cordis disposal restores the original service methods.
9
+ ## 功能特性
14
10
 
15
- ## Screenshots
11
+ - **单模型** —— 所有子代理运行在同一个配置模型上。
12
+ - **多模型** —— `models` 列表配合 `round-robin` / `random` 策略,让并行子代理分散到多个模型。
13
+ - **推理强度** —— 可为每个模型条目指定 `reasoningEffort`(如 `high`、`medium`、`low`);Web 界面从模型目录加载可用的强度。
14
+ - **热重载** —— 设置变更立即作用于下一次派发。
15
+ - **干净卸载** —— Cordis 销毁时还原原始服务方法。
16
16
 
17
- **Settings panel** (`Settings → General → Subagent default model`): configure one or more model routes with `round-robin` / `random` strategy and per-route reasoning effort.
17
+ ## 截图
18
18
 
19
- ![Subagent default model settings panel](https://raw.githubusercontent.com/dingminhua/dsh-subagent-default-model/main/assets/pic_01.png)
19
+ **设置面板**(`设置 → 插件配置 → 子代理默认模型`):配置一个或多个模型路由,支持 `round-robin` / `random` 分配策略与每路由推理强度。
20
20
 
21
- **Effect verification**: 10 subagents split 5/5 between `deepseek-v4-flash` and `Kimi-k3` (round-robin).
21
+ ![子代理默认模型设置面板](https://raw.githubusercontent.com/dingminhua/dsh-subagent-default-model/main/assets/pic_01.png)
22
22
 
23
- ![Subagent default model distribution](https://raw.githubusercontent.com/dingminhua/dsh-subagent-default-model/main/assets/pic_02.png)
23
+ **效果验证**:10 个子代理在 `deepseek-v4-flash` 与 `Kimi-k3` 之间 5/5 均衡分配(round-robin 实测)。
24
24
 
25
- ## Marketplace
25
+ ![子代理默认模型分配统计](https://raw.githubusercontent.com/dingminhua/dsh-subagent-default-model/main/assets/pic_02.png)
26
26
 
27
- [![dshfind plugin](https://dshfind.com/api/badge/dingminhua/dsh-subagent-default-model)](https://dshfind.com/plugins/dingminhua/dsh-subagent-default-model)
27
+ ## 市场
28
28
 
29
- ## Install
29
+ [![dshfind 插件](https://dshfind.com/api/badge/dingminhua/dsh-subagent-default-model)](https://dshfind.com/plugins/dingminhua/dsh-subagent-default-model)
30
+
31
+ ## 安装
30
32
 
31
33
  从 npm registry 安装:
32
34
 
@@ -40,26 +42,29 @@ npm install dsh-subagent-default-model
40
42
  dsh plugin --profile desktop add dsh-subagent-default-model
41
43
  ```
42
44
 
43
- ## Release / Publish
45
+ ## 发布(Release / Publish)
46
+
47
+ 发布到 npm registry。**完整权威流程见仓库根目录 [`RELEASING.md`](../../RELEASING.md)**(含 2FA 确认、tag 修正、代理、验证步骤)。
44
48
 
45
- 发布到 npm registry:
49
+ 要点速览:
46
50
 
47
51
  ```sh
48
- # 1. 更新版本号(plugin/package.json 的 version 字段)和 CHANGELOG.md
49
- # 2. 提交并打标签
50
- git add -A
51
- git commit -m "feat: ..."
52
- git tag v0.3.1
53
- git push origin main --tags
54
-
55
- # 3. 发布到 npm
52
+ # 1. 测试:npm --prefix plugin test
53
+ # 2. 更新版本号(plugin/package.json 的 version 字段)和 CHANGELOG.md
54
+ # 3. 提交并打标签
55
+ git add plugin/package.json plugin/CHANGELOG.md
56
+ git commit -m "chore: 版本升级至 X.Y.Z"
57
+ git tag -a vX.Y.Z -m "vX.Y.Z: <说明>"
58
+ git push origin main
59
+ git push origin vX.Y.Z
60
+
61
+ # 4. 发布到 npm(账号若开启 2FA,需在浏览器确认一步)
56
62
  cd plugin
57
- npm login # 首次发布前登录一次
58
63
  npm publish
59
64
  ```
60
65
 
61
66
  > ⚠️ 发布前先跑一遍测试:`npm --prefix plugin test`。
62
- > `package.json` 的 `files` 字段已限定只发布 `lib/`、`cordis.patch.yml`、`LICENSE`、`README.md`、`CHANGELOG.md`,`test/` 和 `node_modules/` 不会进入发布包。
67
+ > `package.json` 的 `files` 字段已限定只发布 `lib/`、`cordis.patch.yml`、`LICENSE`、`README.md`、`README.en.md`、`CHANGELOG.md`,`test/` 和 `node_modules/` 不会进入发布包。
63
68
 
64
69
  本地安装(DSH Desktop / desktop profile):
65
70
 
@@ -74,17 +79,17 @@ npm install dsh-subagent-default-model
74
79
  - 本地开发用 `link:` 安装:`dsh plugin --profile desktop add /Users/dmh2002/DshProject/dsh-subagent-default-model/plugin`,node_modules 里是源码软链,改代码后**重启 DSH Desktop** 生效
75
80
  - 正式安装 / 他机安装使用 npm registry 版本(见上方 Install)
76
81
 
77
- ## Configuration
82
+ ## 配置
78
83
 
79
- Add to `~/.dsh/settings.yaml`:
84
+ 在 `~/.dsh/settings.yaml` 中添加:
80
85
 
81
86
  ```yaml
82
- # Single model
87
+ # 单模型
83
88
  subagent-default-model:
84
89
  provider: deepseek-official
85
90
  model: deepseek-v4-pro
86
91
 
87
- # Or multiple models
92
+ # 或多模型
88
93
  subagent-default-model:
89
94
  provider: deepseek-official
90
95
  models:
@@ -92,7 +97,7 @@ subagent-default-model:
92
97
  - deepseek-v4-flash
93
98
  strategy: round-robin # round-robin | random
94
99
 
95
- # With reasoning strength
100
+ # 带推理强度
96
101
  subagent-default-model:
97
102
  provider: deepseek-official
98
103
  models:
@@ -104,24 +109,24 @@ subagent-default-model:
104
109
  strategy: round-robin # round-robin | random
105
110
  ```
106
111
 
107
- | Field | Type | Default | Description |
112
+ | 字段 | 类型 | 默认值 | 说明 |
108
113
  | --- | --- | --- | --- |
109
- | `provider` | string | — | Provider for string-type model entries. |
110
- | `model` | string | — | Single model id (backward compatible). |
111
- | `models` | array | `[]` | List of model entries (string or `{provider, model, reasoningEffort?}` pair). |
112
- | `strategy` | string | `round-robin` | Selection strategy: `round-robin` or `random`. |
113
- | `reasoningEffort` | string | — | Optional reasoning strength for a model entry (e.g. `high`, `max`). |
114
+ | `provider` | string | — | 字符串类型模型条目的 provider。 |
115
+ | `model` | string | — | 单模型 id(向后兼容)。 |
116
+ | `models` | array | `[]` | 模型条目列表(string 或 `{provider, model, reasoningEffort?}` 对)。 |
117
+ | `strategy` | string | `round-robin` | 分配策略:`round-robin` 或 `random`。 |
118
+ | `reasoningEffort` | string | — | 可选推理强度(如 `high`、`max`)。 |
114
119
 
115
- ## How it works
120
+ ## 工作原理
116
121
 
117
122
  ```text
118
- Explicit agentOptions on the request
119
- → subagent-default-model settings
120
- → inherit parent session route
123
+ 请求携带显式 agentOptions
124
+ → subagent-default-model 设置
125
+ → 继承父会话路由
121
126
  ```
122
127
 
123
- The plugin wraps the host `ctx.subagents` service (`start` / `startContinuable`), so it covers every delegation path — built-in `subagent` / `subagent_fork` tools and any custom tool that calls the service without providing `agentOptions`.
128
+ 插件包装宿主 `ctx.subagents` 服务(`start` / `startContinuable`),覆盖所有派发路径 —— 内置的 `subagent` / `subagent_fork` 工具,以及任何调用该服务但未提供 `agentOptions` 的自定义工具。
124
129
 
125
- ## License
130
+ ## 许可证
126
131
 
127
132
  [MIT](LICENSE)
package/lib/client.js CHANGED
@@ -11,7 +11,7 @@ window.__ModuleLoader__.load({
11
11
  var Toast = primitives.Toast;
12
12
 
13
13
  // ── CSS ──────────────────────────────────────────────────────────────
14
- var SETTINGS_CSS = ".dsm-model-settings{display:flex;flex-direction:column;gap:14px;margin:20px 0;padding:14px 16px;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-1,#1c1d21));border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:12px}.dsm-model-settings-head{display:flex;flex-direction:column;gap:4px}.dsm-model-settings-title{font-size:14px;line-height:20px;font-weight:600;color:var(--dsw-alias-label-primary,#e6e6e6)}.dsm-model-settings-desc{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-model-settings-list{display:flex;flex-direction:column;gap:8px}.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:8px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:8px}.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%;height:32px;padding:0 28px 0 9px;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}.dsm-model-settings-select:focus{outline:2px solid var(--dsw-alias-state-business-primary,#5686fe);outline-offset:1px}.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}.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:end;justify-content:space-between;gap:12px;flex-wrap:wrap}.dsm-model-settings-strategy{min-width:180px}.dsm-model-settings-actions{display:flex;align-items:center;gap:8px}.dsm-model-settings-status{font-size:12px;line-height:18px;color:var(--dsw-alias-state-success-primary,#22c55e)}.dsm-model-settings-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}";
14
+ var SETTINGS_CSS = ".dsm-model-settings{display:flex;flex-direction:column;gap:14px;margin:20px 0;padding:14px 16px;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-1,#1c1d21));border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:12px}.dsm-model-settings-head{display:flex;flex-direction:column;gap:4px}.dsm-model-settings-title{font-size:14px;line-height:20px;font-weight:600;color:var(--dsw-alias-label-primary,#e6e6e6)}.dsm-model-settings-desc{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}.dsm-model-settings-list{display:flex;flex-direction:column;gap:8px}.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:8px;border:1px solid var(--dsw-alias-border-l2,#36373b);border-radius:8px}.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%;height:32px;padding:0 28px 0 9px;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}.dsm-model-settings-select:focus{outline:2px solid var(--dsw-alias-state-business-primary,#5686fe);outline-offset:1px}.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}.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:end;justify-content:space-between;gap:12px;flex-wrap:wrap}.dsm-model-settings-strategy{min-width:180px}.dsm-model-settings-actions{display:flex;align-items:center;gap:8px}.dsm-model-settings-status{font-size:12px;line-height:18px;color:var(--dsw-alias-state-success-primary,#22c55e)}.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;transition:transform .16s}.dsm-plugin-card-chevron-open{transform:rotate(180deg)}.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-model-settings-hint{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#b8b8b8)}";
15
15
 
16
16
  if (typeof document !== "undefined") {
17
17
  var cssId = "dsh-subagent-default-model/client.css";
@@ -27,7 +27,7 @@ window.__ModuleLoader__.load({
27
27
  // ── locale ───────────────────────────────────────────────────────────
28
28
  var SUBAGENT_ROW_LOCALE = "settings.subagentModel";
29
29
  var SUBAGENT_ROW_ZH = {
30
- "row.title": "子代理默认模型",
30
+ "row.title": "子代理默认模型(dsh-subagent-default-model)",
31
31
  "row.desc": "为 subagent / subagent_fork 选择一个或多个默认路由;清空后子代理继承父会话路由。",
32
32
  "row.provider": "Provider",
33
33
  "row.model": "Model",
@@ -47,7 +47,7 @@ window.__ModuleLoader__.load({
47
47
  "row.toastSaved": "子代理默认模型设置已保存。"
48
48
  };
49
49
  var SUBAGENT_ROW_EN = {
50
- "row.title": "Subagent default model",
50
+ "row.title": "Subagent default model (dsh-subagent-default-model)",
51
51
  "row.desc": "Choose one or more default routes for subagent / subagent_fork; clear them to inherit the parent session route.",
52
52
  "row.provider": "Provider",
53
53
  "row.model": "Model",
@@ -327,6 +327,34 @@ window.__ModuleLoader__.load({
327
327
  );
328
328
  }
329
329
 
330
+ // ── SubagentModelCard: collapsible card shell (default collapsed) ─────
331
+ function SubagentModelCard(props) {
332
+ var openState = React.useState(false);
333
+ var open = openState[0];
334
+ var setOpen = openState[1];
335
+ var t = props.t;
336
+ var title = t("row.title");
337
+ var description = t("row.desc");
338
+ return React.createElement("li", { className: "dsm-plugin-card" + (open ? " dsm-plugin-card-open" : "") },
339
+ React.createElement("button", {
340
+ type: "button",
341
+ className: "dsm-plugin-card-header",
342
+ "aria-expanded": open,
343
+ "aria-label": title,
344
+ onClick: function () { setOpen(!open); }
345
+ },
346
+ React.createElement("span", { className: "dsm-plugin-card-head" },
347
+ React.createElement("span", { className: "dsm-plugin-card-title" }, title),
348
+ React.createElement("span", { className: "dsm-plugin-card-description" }, description)
349
+ ),
350
+ React.createElement("span", { className: "dsm-plugin-card-chevron" + (open ? " dsm-plugin-card-chevron-open" : "") }, "\u25be")
351
+ ),
352
+ React.createElement("div", { className: "dsm-plugin-card-body", hidden: !open },
353
+ React.createElement(SubagentModelRow, props)
354
+ )
355
+ );
356
+ }
357
+
330
358
  // ── apply: inject settings row ───────────────────────────────────────
331
359
  var inject = ["sessions", "connection", "slots", "locale", "settingsScope", "remote"];
332
360
 
@@ -353,14 +381,13 @@ window.__ModuleLoader__.load({
353
381
  };
354
382
  };
355
383
 
356
- ctx.slots.inject("settings.general.item", function () {
384
+ ctx.slots.inject("settings.plugin.item", function () {
357
385
  return ctx.slots.register({
358
- name: "settings.general.item",
359
- id: "subagent-model",
360
- order: 5,
386
+ name: "settings.plugin.item",
387
+ key: "subagent-default-model",
361
388
  locale: SUBAGENT_ROW_LOCALE,
362
389
  inject: subagentRowInjected
363
- }, SubagentModelRow);
390
+ }, SubagentModelCard);
364
391
  });
365
392
  }
366
393
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-subagent-default-model",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Default model for subagent delegations, configurable via the `subagent-default-model` settings section (no explicit per-call model keeps inheriting the parent route).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,6 +20,7 @@
20
20
  "cordis.patch.yml",
21
21
  "LICENSE",
22
22
  "README.md",
23
+ "README.en.md",
23
24
  "CHANGELOG.md"
24
25
  ],
25
26
  "scripts": {