@xiangyixie/dsh-superagent 0.16.3 → 0.16.4

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
@@ -8,6 +8,23 @@ along with the next code release. A doc-only version leaves `lib/` and `bin/`
8
8
  byte-identical to the version before it, and the pinned install line in the
9
9
  README is updated to the version being released.
10
10
 
11
+ ## 0.16.4 — 2026-11-17
12
+
13
+ ### 变化
14
+
15
+ - **默认布局回到单列。** 打开时只有正文,没有常驻右栏;会话/任务线列表默认
16
+ 收起,和普通会话一致。
17
+ - **右栏改成可展开的抽屉。** 头栏放宿主 `IconPanelLeft` 图标按钮展开/收起,
18
+ 快捷键 `Ctrl/Cmd+Shift+B`,`Esc` 关闭;状态存 `localStorage`
19
+ (`dsh-superagent.rail-open`),下次打开保持上次选择。
20
+ - **展开不挤压正文。** 抽屉用绝对定位浮在正文右侧(`z-index` 30、
21
+ `shadow lv2`、最大宽度 `min(84vw, 320px)`),正文列宽仍按宿主
22
+ `--dsh-chat-user-width` 公式计算,窄窗口下也是浮层而不是横向挤压。
23
+ - **收起时保留最小信息。** 按钮上显示运行中任务线的数字徽标(超过 9 显示
24
+ `9+`),不再为了状态保留一整列。
25
+ - **头栏标题固定为「超级智能体」。** 去掉自动生成的会话名和面包屑分隔斜杠;
26
+ 会话名仍保留在数据层与抽屉列表里,不再当页面标题展示。
27
+
11
28
  ## 0.16.3 — 2026-11-17
12
29
 
13
30
  ### 修复
package/README.en.md CHANGED
@@ -36,12 +36,12 @@ Three steps. The desktop app and the CLI install the same plugin; each step says
36
36
 
37
37
  ### 1. Install
38
38
 
39
- Desktop: **Plugins** → **Add plugin** → enter `@xiangyixie/dsh-superagent@0.16.3` → install.
39
+ Desktop: **Plugins** → **Add plugin** → enter `@xiangyixie/dsh-superagent@0.16.4` → install.
40
40
 
41
41
  CLI:
42
42
 
43
43
  ```bash
44
- dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.3
44
+ dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.4
45
45
  ```
46
46
 
47
47
  **Restart DSH** afterwards — plugins are loaded once at host startup. You can also add the [plugin index](https://raw.githubusercontent.com/LittleChenLiya/dsh-superagent/main/plugin-index.json) on the **Discover** page for one-click installs; upgrades are always remove-then-add.
@@ -1666,7 +1666,7 @@ appears to "hang" until the ignored-abort child returns.
1666
1666
 
1667
1667
  | What you see | What it means | What to do |
1668
1668
  | --- | --- | --- |
1669
- | `superagent_*` tools do not exist | The bundle row is not mounted, or the host refused to load the plugin. | Run `--dump-config` and check for the `@xiangyixie/dsh-superagent` block; reinstall with `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.16.3` and read the host log for `[dsh-superagent]` lines. |
1669
+ | `superagent_*` tools do not exist | The bundle row is not mounted, or the host refused to load the plugin. | Run `--dump-config` and check for the `@xiangyixie/dsh-superagent` block; reinstall with `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.16.4` and read the host log for `[dsh-superagent]` lines. |
1670
1670
  | `Cannot find module .../lib/control.js` (or `watch.js` / `report.js` / `wizard.js`), or `[dsh-superagent] dsh-superagent failed to load because a file it imports is missing: ...` in the host log | The copy in that profile is incomplete — an `add` that was interrupted leaves a partial extraction. From 0.14.3 the entry point names the missing file itself. The published package is not the cause: every version ships all thirty-four `lib/` files. | Delete the plugin's directory under the profile's `node_modules` (scoped `@xiangyixie/dsh-superagent`, or unscoped `dsh-superagent` from an older tarball install) and run the same `add` command again, with the version number. Do not copy files in by hand. |
1671
1671
  | `[error] the model provider rejected the API key` | The key env var is missing in the process that started the host. | Export `DEEPSEEK_API_KEY` (the default route) or the variable your route names, then restart `dsh`. |
1672
1672
  | `MISSING_CREDENTIAL ... no API key for provider route "..."` | The profile's route has no credential in the environment. | Set the env var named for that route and restart. The error line names the route, so use that, not this page. |
package/README.md CHANGED
@@ -36,12 +36,12 @@ dsh-superagent 把这件事接过去:你说一句目标,它负责拆、负
36
36
 
37
37
  ### 1. 装
38
38
 
39
- 桌面端:侧边栏 **插件** → **Add plugin** → 输入 `@xiangyixie/dsh-superagent@0.16.3` → 安装。
39
+ 桌面端:侧边栏 **插件** → **Add plugin** → 输入 `@xiangyixie/dsh-superagent@0.16.4` → 安装。
40
40
 
41
41
  命令行:
42
42
 
43
43
  ```bash
44
- dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.3
44
+ dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.4
45
45
  ```
46
46
 
47
47
  装完**重启 DSH**(插件只在宿主启动时加载一次)。也可以从「发现」页添加[插件索引](https://raw.githubusercontent.com/LittleChenLiya/dsh-superagent/main/plugin-index.json)一键安装;升级一律先 `remove` 再 `add`。
@@ -1090,7 +1090,7 @@ SHA-256)。`--format html` 把同样的内容写成一个自包含
1090
1090
 
1091
1091
  | 你看到的 | 含义 | 怎么办 |
1092
1092
  | --- | --- | --- |
1093
- | `superagent_*` 工具不存在 | bundle 行没挂上,或者宿主拒绝加载插件。 | 跑 `--dump-config` 查 `@xiangyixie/dsh-superagent` 块;用 `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.16.3` 重装,并在宿主日志里找 `[dsh-superagent]` 行。 |
1093
+ | `superagent_*` 工具不存在 | bundle 行没挂上,或者宿主拒绝加载插件。 | 跑 `--dump-config` 查 `@xiangyixie/dsh-superagent` 块;用 `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.16.4` 重装,并在宿主日志里找 `[dsh-superagent]` 行。 |
1094
1094
  | `Cannot find module .../lib/control.js`(或 `watch.js` / `report.js` / `wizard.js`),或宿主日志里的 `[dsh-superagent] dsh-superagent failed to load because a file it imports is missing: ...` | 那个 profile 里的副本不完整——被中断的 `add` 会留下残缺的解包结果。0.14.3 起的入口会直接点名缺哪个文件。已发布的包不是原因:每个版本都带全部三十四个 `lib/` 文件。 | 删掉 profile 的 `node_modules` 下该插件的目录(带 scope 的 `@xiangyixie/dsh-superagent`,或旧 tarball 安装留下的无 scope 的 `dsh-superagent`),再用同一条 `add` 命令重装,并带上版本号。不要手工拷贝文件进去。 |
1095
1095
  | `[error] the model provider rejected the API key` | 启动宿主的那个进程里缺 key 环境变量。 | 导出 `DEEPSEEK_API_KEY`(默认路由)或你那条路由声明的变量,然后重启 `dsh`。 |
1096
1096
  | `MISSING_CREDENTIAL ... no API key for provider route "..."` | profile 的路由在环境里没有凭据。 | 设置该路由对应的环境变量并重启。错误行里写了路由名,以它为准,不要照本文。 |
package/README.zh.md CHANGED
@@ -36,12 +36,12 @@ dsh-superagent 把这件事接过去:你说一句目标,它负责拆、负
36
36
 
37
37
  ### 1. 装
38
38
 
39
- 桌面端:侧边栏 **插件** → **Add plugin** → 输入 `@xiangyixie/dsh-superagent@0.16.3` → 安装。
39
+ 桌面端:侧边栏 **插件** → **Add plugin** → 输入 `@xiangyixie/dsh-superagent@0.16.4` → 安装。
40
40
 
41
41
  命令行:
42
42
 
43
43
  ```bash
44
- dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.3
44
+ dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.4
45
45
  ```
46
46
 
47
47
  装完**重启 DSH**(插件只在宿主启动时加载一次)。也可以从「发现」页添加[插件索引](https://raw.githubusercontent.com/LittleChenLiya/dsh-superagent/main/plugin-index.json)一键安装;升级一律先 `remove` 再 `add`。
@@ -1090,7 +1090,7 @@ SHA-256)。`--format html` 把同样的内容写成一个自包含
1090
1090
 
1091
1091
  | 你看到的 | 含义 | 怎么办 |
1092
1092
  | --- | --- | --- |
1093
- | `superagent_*` 工具不存在 | bundle 行没挂上,或者宿主拒绝加载插件。 | 跑 `--dump-config` 查 `@xiangyixie/dsh-superagent` 块;用 `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.16.3` 重装,并在宿主日志里找 `[dsh-superagent]` 行。 |
1093
+ | `superagent_*` 工具不存在 | bundle 行没挂上,或者宿主拒绝加载插件。 | 跑 `--dump-config` 查 `@xiangyixie/dsh-superagent` 块;用 `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.16.4` 重装,并在宿主日志里找 `[dsh-superagent]` 行。 |
1094
1094
  | `Cannot find module .../lib/control.js`(或 `watch.js` / `report.js` / `wizard.js`),或宿主日志里的 `[dsh-superagent] dsh-superagent failed to load because a file it imports is missing: ...` | 那个 profile 里的副本不完整——被中断的 `add` 会留下残缺的解包结果。0.14.3 起的入口会直接点名缺哪个文件。已发布的包不是原因:每个版本都带全部三十四个 `lib/` 文件。 | 删掉 profile 的 `node_modules` 下该插件的目录(带 scope 的 `@xiangyixie/dsh-superagent`,或旧 tarball 安装留下的无 scope 的 `dsh-superagent`),再用同一条 `add` 命令重装,并带上版本号。不要手工拷贝文件进去。 |
1095
1095
  | `[error] the model provider rejected the API key` | 启动宿主的那个进程里缺 key 环境变量。 | 导出 `DEEPSEEK_API_KEY`(默认路由)或你那条路由声明的变量,然后重启 `dsh`。 |
1096
1096
  | `MISSING_CREDENTIAL ... no API key for provider route "..."` | profile 的路由在环境里没有凭据。 | 设置该路由对应的环境变量并重启。错误行里写了路由名,以它为准,不要照本文。 |
package/lib/client.js CHANGED
@@ -85,6 +85,7 @@ window.__ModuleLoader__.load({
85
85
  close: ui?.IconCloseOutlineRegular ?? ui?.IconCloseOutlineMedium,
86
86
  folder: ui?.IconFolderCloseRegular ?? ui?.IconFolderCloseMedium,
87
87
  chevron: ui?.IconChevronDownOutlineRegular ?? ui?.IconChevronDownOutlineMedium,
88
+ panel: ui?.IconPanelLeftOutlineRegular ?? ui?.IconPanelLeftOutlineMedium,
88
89
  }
89
90
  // MarkdownText reads `labels.code` on every fenced block, so the host
90
91
  // component is only safe with this shape filled in.
@@ -105,6 +106,22 @@ window.__ModuleLoader__.load({
105
106
  { id: 'queue', label: '排队' },
106
107
  { id: 'steer', label: '插话' },
107
108
  ]
109
+ const RAIL_KEY = 'dsh-superagent.rail-open'
110
+ function readRailOpen() {
111
+ try {
112
+ return window.localStorage.getItem(RAIL_KEY) === '1'
113
+ } catch (error) {
114
+ return false
115
+ }
116
+ }
117
+ function saveRailOpen(open) {
118
+ try {
119
+ window.localStorage.setItem(RAIL_KEY, open ? '1' : '0')
120
+ } catch (error) {
121
+ // Private mode or a sandboxed webview: the layout still works, it just
122
+ // does not remember the choice.
123
+ }
124
+ }
108
125
 
109
126
  /**
110
127
  * Host tooltip when it exists; the native `title` only survives as the
@@ -163,11 +180,13 @@ window.__ModuleLoader__.load({
163
180
  .dsa-iconbtn svg{width:15px;height:15px}
164
181
  .dsa-iconbtn:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08))}
165
182
  .dsa-iconbtn:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-alias-state-business-primary,#7aaaff);outline-offset:-2px}
183
+ .dsa-railtoggle{position:relative}
184
+ .dsa-badge{position:absolute;top:-2px;right:-2px;min-width:14px;height:14px;padding:0 3px;border-radius:7px;background:var(--dsw-alias-state-business-primary,#4d6bfe);color:#fff;font-size:9px;line-height:14px;font-weight:600;text-align:center;box-sizing:border-box}
166
185
  .dsa-status{display:inline-flex;align-items:center;gap:6px;font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary,rgb(129,133,140))}
167
186
  .dsa-dot{width:6px;height:6px;border-radius:50%;background:var(--dsw-alias-label-caption,rgb(129,133,140))}
168
187
  .dsa-dot[data-state=live]{background:var(--dsw-alias-state-success-primary,#22c55e)}
169
188
  .dsa-dot[data-state=warn]{background:var(--dsw-alias-state-warn-primary,#f59e0b)}
170
- .dsa-body{display:flex;flex:1;min-height:0}
189
+ .dsa-body{position:relative;display:flex;flex:1;min-height:0}
171
190
  .dsa-main{position:relative;display:flex;flex-direction:column;flex:1;min-width:0}
172
191
  .dsa-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;margin-right:2px;padding:0 32px;scrollbar-gutter:stable}
173
192
  .dsa-scroll::-webkit-scrollbar{width:10px}
@@ -215,7 +234,7 @@ window.__ModuleLoader__.load({
215
234
  .dsa-approval-title{font-size:14px;line-height:22px;font-weight:500;color:var(--dsw-alias-label-primary,#f9fafb)}
216
235
  .dsa-approval-body{font-size:13px;line-height:20px;color:var(--dsw-alias-label-secondary,rgb(207,211,214));overflow-wrap:anywhere}
217
236
  .dsa-approval-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
218
- .dsa-rail{display:flex;flex:none;flex-direction:column;width:260px;min-width:0;box-sizing:border-box;padding:6px 8px;border-left:.5px solid var(--dsw-alias-border-l3,rgba(255,255,255,.12))}
237
+ .dsa-rail{position:absolute;top:0;right:0;bottom:0;z-index:30;display:flex;flex-direction:column;width:280px;max-width:min(84vw,320px);min-width:0;box-sizing:border-box;padding:8px;border-left:.5px solid var(--dsw-alias-border-l3,rgba(255,255,255,.12));background:var(--dsw-alias-bg-base,rgb(21,21,23));box-shadow:var(--dsw-shadow-lv2,0 8px 28px rgba(0,0,0,.32));overflow:hidden}
219
238
  .dsa-rail-head{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 8px;font-size:13px;line-height:20px;color:var(--dsw-alias-label-tertiary,rgb(129,133,140))}
220
239
  .dsa-rail-list{display:flex;flex-direction:column;gap:2px;min-height:0;overflow-y:auto;margin-bottom:8px}
221
240
  .dsa-rowitem{display:flex;align-items:center;gap:6px;box-sizing:border-box;width:100%;height:32px;padding:0 8px 0 9px;border:0;border-radius:var(--dsw-radius-md,12px);background:transparent;color:var(--dsw-alias-label-primary,#f9fafb);font:inherit;font-size:14px;line-height:20px;text-align:left;cursor:pointer}
@@ -539,16 +558,24 @@ window.__ModuleLoader__.load({
539
558
  }
540
559
 
541
560
  function Header(props) {
542
- const { model, title, onNew, onRefresh } = props
561
+ const { model, railOpen, runningCount, onToggleRail, onNew, onRefresh } = props
562
+ const toggleLabel = railOpen ? '收起任务栏(Ctrl+Shift+B)' : '展开任务栏(Ctrl+Shift+B)'
543
563
  return h('header', { className: 'dsa-header' },
544
564
  h('div', { className: 'dsa-crumbs' },
545
- h('span', { className: 'dsa-crumb' }, PANEL_LABEL),
546
- h('span', { className: 'dsa-sep' }, '/'),
547
- h('span', { className: 'dsa-crumb dsa-crumb-current' }, title)),
565
+ h('span', { className: 'dsa-crumb dsa-crumb-current' }, PANEL_LABEL)),
548
566
  h('div', { className: 'dsa-head-actions' },
549
567
  h('span', { className: 'dsa-status' },
550
568
  h('span', { className: 'dsa-dot', 'data-state': model.conn }),
551
569
  model.conn === 'live' ? '已连接' : model.conn === 'warn' ? '流中断' : '连接中'),
570
+ tipped(toggleLabel, h('button', {
571
+ type: 'button',
572
+ className: 'dsa-iconbtn dsa-railtoggle',
573
+ 'aria-label': runningCount > 0 ? `${toggleLabel},${runningCount} 条任务线运行中` : toggleLabel,
574
+ 'aria-expanded': railOpen ? 'true' : 'false',
575
+ onClick: onToggleRail,
576
+ },
577
+ h(Icon, { of: 'panel' }),
578
+ runningCount > 0 ? h('span', { className: 'dsa-badge' }, runningCount > 9 ? '9+' : String(runningCount)) : null)),
552
579
  tipped('刷新', h('button', { type: 'button', className: 'dsa-iconbtn', onClick: onRefresh },
553
580
  h(Icon, { of: 'refresh' }))),
554
581
  tipped('新建会话', h('button', { type: 'button', className: 'dsa-iconbtn', onClick: onNew },
@@ -860,6 +887,35 @@ window.__ModuleLoader__.load({
860
887
 
861
888
  function Seat(props) {
862
889
  const { model, dispatch } = props
890
+ // Hooks must run before the loading/error early returns.
891
+ const [railOpen, setRailOpen] = react.useState(readRailOpen)
892
+ const toggleRail = () => {
893
+ setRailOpen(current => {
894
+ const next = !current
895
+ saveRailOpen(next)
896
+ return next
897
+ })
898
+ }
899
+ react.useEffect(() => {
900
+ if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') return undefined
901
+ const onKey = event => {
902
+ if ((event.ctrlKey || event.metaKey) && event.shiftKey && String(event.key).toLowerCase() === 'b') {
903
+ event.preventDefault()
904
+ setRailOpen(current => {
905
+ const next = !current
906
+ saveRailOpen(next)
907
+ return next
908
+ })
909
+ return
910
+ }
911
+ if (event.key === 'Escape' && railOpen) {
912
+ setRailOpen(false)
913
+ saveRailOpen(false)
914
+ }
915
+ }
916
+ window.addEventListener('keydown', onKey)
917
+ return () => window.removeEventListener('keydown', onKey)
918
+ }, [railOpen])
863
919
  if (model.phase === 'loading') {
864
920
  return h('div', { className: 'dsa-root' },
865
921
  h('div', { className: 'dsa-empty' },
@@ -876,16 +932,17 @@ window.__ModuleLoader__.load({
876
932
  onClick: () => dispatch({ type: 'retry' }),
877
933
  }, '重试')))
878
934
  }
879
- const title = (() => {
880
- const current = model.sessions.find(session => session.sessionId === model.sessionId)
881
- return current ? sessionTitle(current) : model.sessionId ? `会话 ${shortId(model.sessionId)}` : '新会话'
882
- })()
883
935
  const empty = model.messages.length === 0
936
+ const runningCount = Array.isArray(model.runs)
937
+ ? model.runs.filter(run => run.status === 'running').length
938
+ : 0
884
939
  const notify = text => dispatch({ type: 'toast', text })
885
- return h('div', { className: 'dsa-root' },
940
+ return h('div', { className: 'dsa-root', 'data-rail': railOpen ? 'open' : 'closed' },
886
941
  h(Header, {
887
942
  model,
888
- title,
943
+ railOpen,
944
+ runningCount,
945
+ onToggleRail: toggleRail,
889
946
  onNew: () => dispatch({ type: 'new-session' }),
890
947
  onRefresh: () => dispatch({ type: 'refresh' }),
891
948
  }),
@@ -921,10 +978,10 @@ window.__ModuleLoader__.load({
921
978
  onMode: mode => dispatch({ type: 'mode', mode }),
922
979
  onError: notify,
923
980
  })),
924
- h(Rail, {
981
+ railOpen ? h(Rail, {
925
982
  model,
926
983
  onSwitch: sessionId => dispatch({ type: 'switch', sessionId }),
927
- })))
984
+ }) : null))
928
985
  }
929
986
 
930
987
  /** One-line status above the composer; errors stay until replaced. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiangyixie/dsh-superagent",
3
- "version": "0.16.3",
3
+ "version": "0.16.4",
4
4
  "description": "长周期自主执行插件:一个目标拆成可并行的子任务,交付一份合并报告,重启后仍可继续。",
5
5
  "author": "Admire (LittleChenLiya)",
6
6
  "type": "module",