dsh-ssh-tui 0.2.0 → 0.3.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/README.en.md +65 -33
- package/README.md +51 -21
- package/cordis.patch.yml +2 -0
- package/docs/screenshots/compare.png +0 -0
- package/docs/screenshots/headless-labeled.png +0 -0
- package/docs/screenshots/headless.png +0 -0
- package/docs/screenshots/workspace-labeled.png +0 -0
- package/docs/screenshots/workspace.png +0 -0
- package/lib/index.js.map +1 -1
- package/lib/reasoning.js +5 -3
- package/lib/reasoning.js.map +1 -1
- package/lib/subagent-model.js +82 -2
- package/lib/subagent-model.js.map +1 -1
- package/lib/tui.js +1062 -116
- package/lib/tui.js.map +1 -1
- package/lib/types/index.d.ts +2 -0
- package/lib/types/subagent-model.d.ts +17 -2
- package/lib/types/tui.d.ts +134 -5
- package/package.json +4 -2
package/README.en.md
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
# dsh-ssh-tui
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
session as a plain-ANSI chat transcript, streams model output, shows tool calls,
|
|
6
|
-
answers approvals and `ask_user_question` prompts from the keyboard, and lets
|
|
7
|
-
you resume persisted sessions. No browser, no mouse, no heavy terminal
|
|
8
|
-
framework — designed for slow/remote SSH links.
|
|
3
|
+
A DeepSeek Harness terminal for jump hosts, headless servers, and high-latency
|
|
4
|
+
SSH. Plain ANSI and incremental redraws. No browser, no Ink/React skin.
|
|
9
5
|
|
|
10
6
|
中文部署指南:[README.md](README.md)
|
|
11
7
|
|
|
8
|
+
Who it is for: a keyboard-only SSH session on a remote box. Who it is not for:
|
|
9
|
+
a local desktop TUI with many themes — that lane already has a clear winner.
|
|
10
|
+
|
|
11
|
+
## Official headless vs this TUI
|
|
12
|
+
|
|
13
|
+
There is no shipped TUI. The default terminal entry on a remote box is
|
|
14
|
+
`dsh --profile headless`: one task, then the **last assistant message** on
|
|
15
|
+
stdout. Reasoning, tool calls, subagents, and the plan stay in the session
|
|
16
|
+
log.
|
|
17
|
+
|
|
18
|
+
Both frames below are the **same task**. Top: official headless stdout
|
|
19
|
+
(`@deepseek-ai/dsh-headless` prints `outcome.text` only). Bottom: this plugin
|
|
20
|
+
painting the same events in an 88-column SSH window.
|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
Top: `$ dsh --profile headless "…"` then the final markdown.
|
|
25
|
+
Bottom: reasoning collapsed, full-row red/green diff, each subagent on its
|
|
26
|
+
own card, the plan strip pinned above the input.
|
|
27
|
+
|
|
28
|
+
Singles: [headless stdout](docs/screenshots/headless.png) · [dsh-ssh-tui](docs/screenshots/workspace.png)
|
|
29
|
+
|
|
12
30
|
## Requirements
|
|
13
31
|
|
|
14
32
|
- Node.js >= 22.19
|
|
@@ -127,29 +145,31 @@ The plugin runs on Linux, macOS, and Windows (Node ≥ 22.19):
|
|
|
127
145
|
|
|
128
146
|
| Key | Action |
|
|
129
147
|
| --- | --- |
|
|
130
|
-
| `Enter` | send
|
|
148
|
+
| `Enter` | send; while running, steer; with empty input, toggle the selected card |
|
|
131
149
|
| `Tab` | complete the highlighted slash command |
|
|
132
|
-
| `↑` / `↓` |
|
|
133
|
-
| `Ctrl+N` / `Ctrl+P` | move among collapsible cards |
|
|
150
|
+
| `↑` / `↓` | empty input: move among cards; otherwise history. Same as `Ctrl+N` / `Ctrl+P` |
|
|
134
151
|
| `Ctrl+R` | expand or collapse all cards |
|
|
135
|
-
| `
|
|
152
|
+
| `Ctrl+T` | fold the input box (display-only) |
|
|
153
|
+
| `Alt+1` / `2` / `3` / `4` | jump to latest thinking / plan / subagent / reply |
|
|
154
|
+
| `/find [kind] query` | search cards (`thinking` `plan` `subagent` `reply`). `Ctrl+/` or `Alt+/` opens it |
|
|
155
|
+
| `Ctrl+G` / `Alt+N` | next search hit; `Alt+P` previous |
|
|
156
|
+
| `Esc` | drop selection → scroll to bottom → cancel the running turn |
|
|
157
|
+
| `Ctrl+C` | cancel the running turn; exit when idle |
|
|
136
158
|
| `Ctrl+D` | exit |
|
|
137
159
|
| `Ctrl+L` | redraw |
|
|
138
|
-
| `Ctrl+T` | fold/unfold the input box (display-only; submission keeps the full text) |
|
|
139
|
-
| `↑` / `↓` | input history |
|
|
140
160
|
| `y` / `n` / `Esc` | answer an approval prompt |
|
|
141
161
|
| `1..9` + `Enter` | answer an `ask_user_question` dialog |
|
|
142
162
|
|
|
143
163
|
Type `/` to see slash-command suggestions — the panel merges the TUI's own
|
|
144
|
-
commands with every command the harness
|
|
145
|
-
`/compact`, `/permission`, `/feedback`, ...).
|
|
146
|
-
`/help` lists everything.
|
|
164
|
+
commands (`/find`, `/model`, `/help`, ...) with every command the harness
|
|
165
|
+
registers (`/goal`, `/plan`, `/compact`, `/permission`, `/feedback`, ...).
|
|
166
|
+
`Tab` completes, `Enter` runs. `/help` lists everything.
|
|
147
167
|
|
|
148
|
-
`/model`
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
`
|
|
168
|
+
`/model` lists models for the **current** provider first. On SuperGrok that
|
|
169
|
+
is `grok-4.6` / `grok-4.5` plus reasoning effort (`xhigh` on 4.6). Switching
|
|
170
|
+
to DeepSeek or OpenCode is an explicit “change provider” step. `/setup` is
|
|
171
|
+
only for API-key providers; SuperGrok / X Premium uses local OAuth and does
|
|
172
|
+
not need a key. `/status` and the footer show the same route.
|
|
153
173
|
|
|
154
174
|
For OpenCode and other third-party providers, `/model` queries the provider's
|
|
155
175
|
endpoint (`GET {baseURL}/models`) for a live model list, falling back to the
|
|
@@ -167,16 +187,19 @@ releases selected continuable children using the harness 0.1.1
|
|
|
167
187
|
`drainContinuableChildren` capability.
|
|
168
188
|
|
|
169
189
|
Each subagent is its own collapsible card. One or many children start collapsed,
|
|
170
|
-
so the parent transcript stays readable; `Enter`, click,
|
|
171
|
-
`Ctrl+R` expand or collapse them independently. Running cards show a spinner,
|
|
190
|
+
so the parent transcript stays readable; `Enter`, click, empty-input `↑`/`↓`,
|
|
191
|
+
and `Ctrl+R` expand or collapse them independently. Running cards show a spinner,
|
|
172
192
|
and the status/title line shows `⠋ 子代理 N` instead of mixing child output
|
|
173
193
|
into the parent stream.
|
|
174
194
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
195
|
+
The plan strip pins only the **latest incomplete plan**. When the model
|
|
196
|
+
opens a new plan in the same turn, the previous one archives into the
|
|
197
|
+
scrolling transcript and the dock shows the new one. A finished plan says
|
|
198
|
+
「计划任务已全部完成」, not 「计划模式已关闭」. The `/` menu and
|
|
199
|
+
approval/question dialogs yield that bottom space. `exit_plan_mode` is
|
|
200
|
+
markdown. `ask_user_question` still opens a dialog and leaves a collapsed
|
|
201
|
+
`提问用户` card. `/goal` is a collapsed `目标` card. `/find thinking foo`
|
|
202
|
+
or `Alt+1..4` jumps to the matching category.
|
|
180
203
|
|
|
181
204
|
Interrupted streaming output keeps the already-generated prefix and is marked
|
|
182
205
|
`⚠ interrupted`; team collaboration session events (`team/*`) are surfaced as
|
|
@@ -208,12 +231,11 @@ terminal markdown support: heading levels (H1 enlarged/underlined, H2
|
|
|
208
231
|
underlined, H3 colored), bold, italic, inline code, fenced code blocks,
|
|
209
232
|
lists, quotes, and links all get ANSI styling while remaining
|
|
210
233
|
width-wrapped for the terminal. Reasoning, tool, subagent, plan, and question cards are
|
|
211
|
-
each expandable/collapsible independently
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
also toggles it. Subagent cards start collapsed even when several run at once.
|
|
234
|
+
each expandable/collapsible independently. Empty input: `↑`/`↓` (same as
|
|
235
|
+
`Ctrl+N`/`Ctrl+P`) move the highlight, `Enter` toggles, `Ctrl+R` toggles all,
|
|
236
|
+
`Esc` drops the selection. Click a card header to toggle it. Subagent cards
|
|
237
|
+
start collapsed even when several run at once. `Alt+1..4` jumps to the latest
|
|
238
|
+
thinking / plan / subagent / reply.
|
|
217
239
|
|
|
218
240
|
The transcript is scrollable: `PgUp`/`PgDn` or the mouse wheel move back
|
|
219
241
|
through earlier reasoning blocks and tool calls, a `↑ 已回看 N 行` indicator
|
|
@@ -284,6 +306,16 @@ and resumes directly. `dsh --profile tui --new` explicitly starts fresh
|
|
|
284
306
|
without the picker. The in-app `/resume` command remains available for
|
|
285
307
|
switching while running.
|
|
286
308
|
|
|
309
|
+
## Jump-host / proxied SSH
|
|
310
|
+
|
|
311
|
+
Each paint is one `stdout.write` of dirty rows only, so a jump host or
|
|
312
|
+
corporate proxy does not see one SSH packet per line. Default cadence is
|
|
313
|
+
about 120 ms. On high-RTT paths raise it:
|
|
314
|
+
|
|
315
|
+
```sh
|
|
316
|
+
export DSH_TUI_PAINT_MS=250 # 40–1000; higher = fewer packets, choppier stream
|
|
317
|
+
```
|
|
318
|
+
|
|
287
319
|
## Development
|
|
288
320
|
|
|
289
321
|
```sh
|
package/README.md
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
# dsh-ssh-tui
|
|
2
2
|
|
|
3
|
-
DeepSeek Harness
|
|
4
|
-
|
|
5
|
-
进度与完成提示音。
|
|
3
|
+
给跳板机、无桌面服务器、高延迟 SSH 用的 DeepSeek Harness 终端。纯 ANSI、增量重绘,
|
|
4
|
+
不需要浏览器,也不需要 Ink / React 那套皮肤。
|
|
6
5
|
|
|
7
6
|
English: [README.en.md](README.en.md)
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
适合谁:SSH 直连的远程机器、慢链路、只有键盘的会话。不适合谁:本机想要多主题、
|
|
9
|
+
官网级交互的桌面终端——那条赛道已经有明确赢家。
|
|
10
|
+
|
|
11
|
+
SuperGrok / X Premium 订阅走配套插件 [dsh-llm-xai-oauth](https://github.com/cyjyyd/dsh-llm-xai-oauth),复用本机 grok-bridge token,不需要 xAI API Key。
|
|
12
|
+
|
|
13
|
+
## 官方 headless 和这个 TUI
|
|
14
|
+
|
|
15
|
+
官方没有预置 TUI。远程机器上的默认终端入口是 `dsh --profile headless`:跑完一个任务,把**最后一条助手回复**打到 stdout 就退出。思考、工具调用、子代理、计划都在会话日志里,终端上看不到。
|
|
16
|
+
|
|
17
|
+
下面两帧是**同一条任务**。上:官方 headless 的 stdout(按 `@deepseek-ai/dsh-headless` 的契约:只打印最终文本)。下:本插件把同一组事件画进 88 列 SSH 窗口。
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
上:`$ dsh --profile headless "…"` 之后只有最终 Markdown。
|
|
22
|
+
下:思考默认折叠、`edit` 整行红/绿 diff、两个子代理各自一张卡、计划条钉在输入框上方。
|
|
23
|
+
|
|
24
|
+
单独看:[headless stdout](docs/screenshots/headless.png) · [dsh-ssh-tui](docs/screenshots/workspace.png)
|
|
10
25
|
|
|
11
26
|
## 功能一览
|
|
12
27
|
|
|
@@ -112,24 +127,34 @@ dsh --profile tui --no-color
|
|
|
112
127
|
|
|
113
128
|
| 键 | 作用 |
|
|
114
129
|
| --- | --- |
|
|
115
|
-
| `Enter` |
|
|
116
|
-
| `↑` / `↓` |
|
|
117
|
-
| `Ctrl+
|
|
118
|
-
| `Ctrl+
|
|
119
|
-
| `
|
|
120
|
-
|
|
|
121
|
-
| `
|
|
122
|
-
|
|
|
123
|
-
| `
|
|
130
|
+
| `Enter` | 发送;运行中则插入指示;空输入且已选卡片时展开/收起 |
|
|
131
|
+
| `↑` / `↓` | 空输入:在卡片间移动;有输入:历史。与 `Ctrl+N` / `Ctrl+P` 相同 |
|
|
132
|
+
| `Ctrl+R` | 全部展开或全部收起 |
|
|
133
|
+
| `Ctrl+T` | 折叠输入框(只影响显示) |
|
|
134
|
+
| `Alt+1` / `2` / `3` / `4` | 跳到最新思考 / 计划 / 子代理 / 回复 |
|
|
135
|
+
| `/find [类] 关键字` | 搜索卡片。类:`思考` `计划` `子代理` `回复`。`Ctrl+/` 或 `Alt+/` 打开 |
|
|
136
|
+
| `Ctrl+G` / `Alt+N` | 下一条搜索结果;`Alt+P` 上一条 |
|
|
137
|
+
| 鼠标左键 | 点击卡片标题展开/收起 |
|
|
138
|
+
| `PgUp` / `PgDn`、滚轮 | 转录回看 |
|
|
139
|
+
| `Esc` | 取消选择 → 回底部 → 取消当前轮次 |
|
|
140
|
+
| `Ctrl+C` | 中断当前轮次;空闲退出 |
|
|
124
141
|
| `Ctrl+D` | 退出 |
|
|
125
|
-
| `Ctrl+L` |
|
|
142
|
+
| `Ctrl+L` | 重绘整个画面 |
|
|
126
143
|
|
|
127
|
-
斜杠命令:`/help`、`/model`、`/submodel`、`/subeffort`、`/mode`、`/resume`、
|
|
144
|
+
斜杠命令:`/help`、`/find`、`/model`、`/submodel`、`/subeffort`、`/mode`、`/resume`、
|
|
128
145
|
`/status`、`/subagents`、`/usage`(`/quota` 同义)、`/setup`、`/clear`,
|
|
129
146
|
以及 harness 自带命令(`/goal`、`/plan`、`/compact` 等)。harness 命令若声明
|
|
130
147
|
支持图片附件,会在命令列表和补全提示中标注“可附图”。
|
|
131
148
|
|
|
132
|
-
|
|
149
|
+
`/model` 默认列出**当前提供商**的模型。已经在 SuperGrok 时,直接选
|
|
150
|
+
`grok-4.6` / `grok-4.5` 和思考强度(`grok-4.6` 含 `xhigh`);要换 DeepSeek
|
|
151
|
+
或 OpenCode 再选「更换提供商」。`/setup` 只用于配置 API Key 提供商,
|
|
152
|
+
SuperGrok / X Premium 走本机 OAuth,不需要填 Key。`/status` 和底栏同样
|
|
153
|
+
显示这条路由。
|
|
154
|
+
|
|
155
|
+
子代理默认跟随父会话的提供方,并尽量选同一家的轻量模型:DeepSeek 用
|
|
156
|
+
`deepseek-v4-flash` / `deepseek-v4-flash-vision-exp`,xAI 用 `grok-4.5`。
|
|
157
|
+
`/model` 或 `/setup` 换提供商(OAuth / API Key 都一样)时会自动同步子代理:
|
|
133
158
|
|
|
134
159
|
- `/submodel [model-id]`:打开子代理模型选择器;带参数时直接指定模型;
|
|
135
160
|
- `/subeffort`:选择子代理思考强度,或恢复为“跟随提供商默认”;
|
|
@@ -144,11 +169,12 @@ dsh --profile tui --no-color
|
|
|
144
169
|
用户消息、工具调用和结果;`Ctrl+R` 可一次展开或收起全部卡片。运行中的卡片带旋转
|
|
145
170
|
动画,状态栏和窗口标题显示 `⠋ 子代理 N`。
|
|
146
171
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
172
|
+
计划条只钉**最新一条未完成的计划**。同一轮次里模型再开新计划时,旧计划归档进
|
|
173
|
+
工作区随转录上滚,底栏换成新计划。任务全部完成后计划条会说「计划任务已全部完成」,
|
|
174
|
+
不再误报「计划模式已关闭」。打开 `/` 命令选单或批准/提问对话框时,计划条让出底栏。
|
|
175
|
+
`exit_plan_mode` 按 markdown 渲染。`ask_user_question` 仍弹对话框,并留下折叠的
|
|
176
|
+
`提问用户` 卡片。`/goal` 是折叠的 `目标` 卡片。`/find 思考 padAnsi` 或 `Alt+1..4`
|
|
177
|
+
可跳到对应类别的最新卡片。
|
|
152
178
|
|
|
153
179
|
`/usage` 在当前提供商为 OpenCode 源时可用,并区分两种计费方式:
|
|
154
180
|
|
|
@@ -248,6 +274,10 @@ npm run build
|
|
|
248
274
|
- **标题栏或铃声不生效**:确认终端支持 OSC 0 与 BEL;铃声可用
|
|
249
275
|
`DSH_TUI_NO_BELL=1` 关闭。
|
|
250
276
|
- **滚轮误触取消**:已加入转义序列缓冲,网络拆包也不会把 `ESC` 当取消。
|
|
277
|
+
- **跳板机 / 多层代理 SSH 发画**:每一帧只发脏行,并且拼成一次 `stdout.write`,避免一行一个 SSH 包。默认约 120 ms 合一帧。穿透代理、RTT 很大时:
|
|
278
|
+
```bash
|
|
279
|
+
export DSH_TUI_PAINT_MS=250 # 40–1000;越大越省链路,流式字越顿
|
|
280
|
+
```
|
|
251
281
|
|
|
252
282
|
## License
|
|
253
283
|
|
package/cordis.patch.yml
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,qBAAqB,EAAiE,MAAM,wBAAwB,CAAA;AAG7H,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAsB,MAAM,UAAU,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAE7D,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAA;AAE7B,6EAA6E;AAC7E,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,qBAAqB,EAAiE,MAAM,wBAAwB,CAAA;AAG7H,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAsB,MAAM,UAAU,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAE7D,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAA;AAE7B,6EAA6E;AAC7E,MAAM,CAAC,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AAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACtB,CAAC,CAAC,CAAA;QAEF,OAAO,KAAK,IAAmB,EAAE;YAC/B,QAAQ,GAAG,IAAI,CAAA;YACf,WAAW,CAAC,KAAK,EAAE,CAAA;YACnB,MAAM,UAAU,EAAE,OAAO,EAAE,CAAA;YAC3B,MAAM,MAAM,EAAE,OAAO,EAAE,CAAA;QACzB,CAAC,CAAA;IACH,CAAC,EAAE,SAAS,CAAC,CAAA;AACf,CAAC"}
|
package/lib/reasoning.js
CHANGED
|
@@ -25,9 +25,11 @@ export async function defaultReasoningEffort(llm, provider, model) {
|
|
|
25
25
|
const nonOff = efforts.filter(effort => effort.id !== 'off');
|
|
26
26
|
if (nonOff.length === 0)
|
|
27
27
|
return undefined;
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const preferred = nonOff.find(effort => effort.id === 'max')
|
|
29
|
+
?? nonOff.find(effort => effort.id === 'xhigh')
|
|
30
|
+
?? nonOff.find(effort => effort.id === 'high')
|
|
31
|
+
?? nonOff[0];
|
|
32
|
+
return preferred?.id;
|
|
31
33
|
}
|
|
32
34
|
catch {
|
|
33
35
|
return undefined;
|
package/lib/reasoning.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reasoning.js","sourceRoot":"","sources":["../src/reasoning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,GAAe,EACf,QAAgB,EAChB,KAAa;IAEb,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;QACxD,MAAM,OAAO,GAAG,IAAI,EAAE,SAAS,EAAE,OAAO,IAAI,EAAE,CAAA;QAC9C,IAAI,IAAI,EAAE,SAAS,EAAE,aAAa,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC,SAA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tB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAA;IAClB,CAAC;AACH,CAAC"}
|
package/lib/subagent-model.js
CHANGED
|
@@ -4,15 +4,95 @@
|
|
|
4
4
|
*
|
|
5
5
|
* The provider is deliberately inherited from the running parent session:
|
|
6
6
|
* the subagent selection only overrides the provider when the user stored an
|
|
7
|
-
* explicit route.
|
|
7
|
+
* explicit route. When the parent provider changes, the TUI picks a
|
|
8
|
+
* same-family default (DeepSeek flash, Grok 4.5, otherwise the first listed
|
|
9
|
+
* lightweight model) unless `/submodel` stored an explicit model.
|
|
8
10
|
*/
|
|
9
11
|
import z from '@deepseek-ai/schemastery';
|
|
10
12
|
import { ReasoningEffortId } from '@deepseek-ai/dsh-llm';
|
|
11
13
|
import { installSettingsSection, settingsNamespace } from '@deepseek-ai/dsh-settings';
|
|
12
14
|
/** Settings namespace carrying the TUI's subagent model selection. */
|
|
13
15
|
export const SUBAGENT_SETTINGS_NAMESPACE = settingsNamespace('ssh-tui-subagent');
|
|
14
|
-
/** Lightweight default model used for subagent children. */
|
|
16
|
+
/** Lightweight default model used for DeepSeek-family subagent children. */
|
|
15
17
|
export const DEFAULT_SUBAGENT_MODEL = 'deepseek-v4-flash';
|
|
18
|
+
/** Preferred subagent default when the parent route is SuperGrok / xAI. */
|
|
19
|
+
export const DEFAULT_XAI_SUBAGENT_MODEL = 'grok-4.5';
|
|
20
|
+
/** Tokens that mark a DeepSeek-family model id. */
|
|
21
|
+
const DEEPSEEK_MODEL_MARKERS = ['deepseek', 'v4-flash', 'v4-pro'];
|
|
22
|
+
/** Tokens that mark a Grok / xAI model id. */
|
|
23
|
+
const GROK_MODEL_MARKERS = ['grok', 'xai'];
|
|
24
|
+
function providerFamily(provider) {
|
|
25
|
+
const id = provider.trim().toLowerCase();
|
|
26
|
+
if (id === 'deepseek-official' || id === 'deepseek' || id.startsWith('deepseek-'))
|
|
27
|
+
return 'deepseek';
|
|
28
|
+
if (id === 'xai' || id === 'grok' || id.startsWith('xai-') || id.startsWith('grok-'))
|
|
29
|
+
return 'xai';
|
|
30
|
+
return 'other';
|
|
31
|
+
}
|
|
32
|
+
function modelLooksLike(model, markers) {
|
|
33
|
+
const id = model.trim().toLowerCase();
|
|
34
|
+
return markers.some(marker => id.includes(marker));
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Rank a listed model for automatic subagent selection. Lower is better:
|
|
38
|
+
* exact preferred id, then flash/vision-lite, then other same-family ids.
|
|
39
|
+
*/
|
|
40
|
+
function scoreSubagentCandidate(model, preferred) {
|
|
41
|
+
const id = model.trim().toLowerCase();
|
|
42
|
+
const exact = preferred.findIndex(item => item.toLowerCase() === id);
|
|
43
|
+
if (exact >= 0)
|
|
44
|
+
return exact;
|
|
45
|
+
if (id.includes('flash') || id.includes('lite') || id.includes('mini') || id.includes('small'))
|
|
46
|
+
return preferred.length;
|
|
47
|
+
if (id.includes('vision'))
|
|
48
|
+
return preferred.length + 1;
|
|
49
|
+
return preferred.length + 8;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Choose the default subagent model for a parent provider, preferring a
|
|
53
|
+
* same-family listed model over a leftover DeepSeek flash id.
|
|
54
|
+
*/
|
|
55
|
+
export function defaultSubagentModelForProvider(provider, listed = []) {
|
|
56
|
+
const family = providerFamily(provider);
|
|
57
|
+
const preferred = family === 'xai'
|
|
58
|
+
? [DEFAULT_XAI_SUBAGENT_MODEL, 'grok-4.5', 'grok-4.3', 'grok-4.6']
|
|
59
|
+
: family === 'deepseek'
|
|
60
|
+
? [DEFAULT_SUBAGENT_MODEL, 'deepseek-v4-flash-vision-exp', 'deepseek-v4-flash']
|
|
61
|
+
: [];
|
|
62
|
+
const unique = [...new Set(listed.map(id => id.trim()).filter(id => id !== ''))];
|
|
63
|
+
if (unique.length > 0) {
|
|
64
|
+
const sameFamily = unique.filter(id => family === 'xai' ? modelLooksLike(id, GROK_MODEL_MARKERS)
|
|
65
|
+
: family === 'deepseek' ? modelLooksLike(id, DEEPSEEK_MODEL_MARKERS)
|
|
66
|
+
: true);
|
|
67
|
+
const pool = sameFamily.length > 0 ? sameFamily : unique;
|
|
68
|
+
return [...pool].sort((a, b) => {
|
|
69
|
+
const delta = scoreSubagentCandidate(a, preferred) - scoreSubagentCandidate(b, preferred);
|
|
70
|
+
return delta !== 0 ? delta : a.localeCompare(b);
|
|
71
|
+
})[0] ?? (preferred[0] ?? unique[0] ?? DEFAULT_SUBAGENT_MODEL);
|
|
72
|
+
}
|
|
73
|
+
return preferred[0] ?? DEFAULT_SUBAGENT_MODEL;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* True when the stored subagent model still belongs to the parent provider
|
|
77
|
+
* family. An explicit leftover DeepSeek flash id after switching to xAI is
|
|
78
|
+
* treated as stale so the TUI can pick a same-family default.
|
|
79
|
+
*/
|
|
80
|
+
export function subagentModelMatchesProvider(provider, model, listed = []) {
|
|
81
|
+
const id = model.trim();
|
|
82
|
+
if (id === '')
|
|
83
|
+
return false;
|
|
84
|
+
const family = providerFamily(provider);
|
|
85
|
+
if (listed.length > 0)
|
|
86
|
+
return listed.includes(id);
|
|
87
|
+
if (family === 'xai')
|
|
88
|
+
return modelLooksLike(id, GROK_MODEL_MARKERS);
|
|
89
|
+
if (family === 'deepseek')
|
|
90
|
+
return modelLooksLike(id, DEEPSEEK_MODEL_MARKERS);
|
|
91
|
+
// Unknown catalog: a leftover Grok id is stale on a non-xAI route.
|
|
92
|
+
if (modelLooksLike(id, GROK_MODEL_MARKERS))
|
|
93
|
+
return false;
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
16
96
|
/** Settings schema for `$DSH_HOME/settings.yaml`. */
|
|
17
97
|
export const SUBAGENT_SETTINGS_SCHEMA = z.object({
|
|
18
98
|
provider: z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-model.js","sourceRoot":"","sources":["../src/subagent-model.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,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