@xiangyixie/dsh-superagent 0.16.8 → 0.16.10

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,24 @@ 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.10 — 2026-11-17
12
+
13
+ ### 修复
14
+
15
+ - **用户消息重复出现。** `accepted` 帧之前会立刻清掉本地待确认气泡,随后宿主
16
+ 的 `user/message` 事件找不到待确认行,就再追加一条,导致同一条 prompt 显示
17
+ 两次。现在 `accepted` 只标记已确认、不清 pending,由宿主事件收口;同时对
18
+ 5 秒内重复到达的同文本用户事件做折叠,`turn/end` 兜底清理仍未确认的待确认行。
19
+
20
+ ## 0.16.9 — 2026-11-17
21
+
22
+ ### 变化
23
+
24
+ - **去掉输入区的「放进工作区」附件按钮。** 单会话面板不再需要手动上传文件;
25
+ 超级智能体直接在工作区里读写文件。隐藏的 file input、上传调用、`busy`
26
+ 状态和附件图标一并删除,输入卡右下角只保留发送/停止。
27
+ - 输入行改为右对齐,去掉左侧工具区,避免留下空白占位。
28
+
11
29
  ## 0.16.8 — 2026-11-17
12
30
 
13
31
  ### 变化
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.8` → install.
39
+ Desktop: **Plugins** → **Add plugin** → enter `@xiangyixie/dsh-superagent@0.16.10` → install.
40
40
 
41
41
  CLI:
42
42
 
43
43
  ```bash
44
- dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.8
44
+ dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.10
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.8` 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.10` 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.8` → 安装。
39
+ 桌面端:侧边栏 **插件** → **Add plugin** → 输入 `@xiangyixie/dsh-superagent@0.16.10` → 安装。
40
40
 
41
41
  命令行:
42
42
 
43
43
  ```bash
44
- dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.8
44
+ dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.10
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.8` 重装,并在宿主日志里找 `[dsh-superagent]` 行。 |
1093
+ | `superagent_*` 工具不存在 | bundle 行没挂上,或者宿主拒绝加载插件。 | 跑 `--dump-config` 查 `@xiangyixie/dsh-superagent` 块;用 `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.16.10` 重装,并在宿主日志里找 `[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.8` → 安装。
39
+ 桌面端:侧边栏 **插件** → **Add plugin** → 输入 `@xiangyixie/dsh-superagent@0.16.10` → 安装。
40
40
 
41
41
  命令行:
42
42
 
43
43
  ```bash
44
- dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.8
44
+ dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.10
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.8` 重装,并在宿主日志里找 `[dsh-superagent]` 行。 |
1093
+ | `superagent_*` 工具不存在 | bundle 行没挂上,或者宿主拒绝加载插件。 | 跑 `--dump-config` 查 `@xiangyixie/dsh-superagent` 块;用 `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.16.10` 重装,并在宿主日志里找 `[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
@@ -75,7 +75,6 @@ window.__ModuleLoader__.load({
75
75
  const ICONS = {
76
76
  spark: ui?.IconSparkleRegular ?? ui?.IconSparkleMedium,
77
77
  send: ui?.IconSendOutlineRegular ?? ui?.IconSendOutlineMedium,
78
- attach: ui?.IconPaperclipOutlineRegular ?? ui?.IconPaperclipOutlineMedium,
79
78
  stop: ui?.IconStopFillRegular ?? ui?.IconStopFillMedium,
80
79
  clock: ui?.IconClockOutlineRegular ?? ui?.IconClockOutlineMedium,
81
80
  check: ui?.IconCheckOutlineRegular ?? ui?.IconCheckOutlineMedium,
@@ -191,8 +190,8 @@ window.__ModuleLoader__.load({
191
190
  .dsa-input{box-sizing:border-box;width:100%;min-height:36px;max-height:336px;padding:4px 8px 0 14px;border:0;outline:none;background:transparent;color:var(--dsw-alias-label-primary,#f9fafb);font:inherit;font-size:var(--dsh-content-font-size,14px);line-height:calc(24px + var(--dsh-content-font-delta,0px));resize:none;overflow-y:auto}
192
191
  .dsa-input::placeholder{color:var(--dsw-alias-label-caption,rgb(129,133,140))}
193
192
  .dsa-card[data-hero=true] .dsa-input{min-height:52px}
194
- .dsa-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:2px 8px 6px;min-width:0}
195
- .dsa-tools,.dsa-trailing{display:flex;align-items:center;min-width:0;gap:12px}
193
+ .dsa-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:12px;padding:2px 8px 6px;min-width:0}
194
+ .dsa-trailing{display:flex;align-items:center;min-width:0;gap:12px}
196
195
  .dsa-trailing{margin-left:auto;flex:none}
197
196
  .dsa-add{display:grid;place-items:center;flex:none;width:28px;height:28px;border:0;border-radius:999px;background:var(--dsw-specific-selector,rgba(255,255,255,.08));color:var(--dsw-alias-label-primary,#f9fafb);cursor:pointer}
198
197
  .dsa-add:hover{background:var(--dsw-alias-interactive-bg-hover-solid,rgba(255,255,255,.14))}
@@ -371,6 +370,12 @@ window.__ModuleLoader__.load({
371
370
  return { ...model, typing: true }
372
371
  case 'turn/end': {
373
372
  let next = { ...model, typing: false, canceling: false }
373
+ if (next.messages.some(message => message.pending)) {
374
+ next = {
375
+ ...next,
376
+ messages: next.messages.map(message => message.pending ? { ...message, pending: false, accepted: true } : message),
377
+ }
378
+ }
374
379
  if (next.currentId) {
375
380
  next = { ...next, messages: patchMessage(next.messages, next.currentId, { streaming: false }), currentId: null }
376
381
  }
@@ -383,9 +388,15 @@ window.__ModuleLoader__.load({
383
388
  const pendingIndex = model.messages.findIndex(message => message.role === 'user' && message.pending && message.text.trim() === text)
384
389
  if (pendingIndex >= 0) {
385
390
  const messages = model.messages.slice()
386
- messages[pendingIndex] = { ...messages[pendingIndex], pending: false, at: event.time ?? messages[pendingIndex].at }
391
+ messages[pendingIndex] = { ...messages[pendingIndex], pending: false, accepted: true, at: event.time ?? messages[pendingIndex].at }
387
392
  return { ...model, messages, typing: true }
388
393
  }
394
+ // The accepted frame and the host event can race; if this exact user
395
+ // turn was already settled moments ago, fold instead of duplicating.
396
+ const tail = model.messages[model.messages.length - 1]
397
+ if (tail && tail.role === 'user' && tail.text.trim() === text && Math.abs((event.time ?? Date.now()) - tail.at) < 5000) {
398
+ return { ...model, typing: true }
399
+ }
389
400
  localSeq += 1
390
401
  const row = { id: `user-${localSeq}`, role: 'user', text, at: event.time ?? Date.now() }
391
402
  return { ...model, messages: [...model.messages, row], typing: true }
@@ -498,9 +509,12 @@ window.__ModuleLoader__.load({
498
509
  case 'assistant.frame':
499
510
  return applyAssistantFrame(model, frame.frame)
500
511
  case 'accepted': {
512
+ // Do not settle the pending row here: the host still emits the
513
+ // authoritative user/message event, and settling early makes that
514
+ // event append a second copy. Just mark it confirmed.
501
515
  const index = model.messages.findIndex(message => message.role === 'user' && message.pending && message.text.trim() === String(frame.text ?? '').trim())
502
516
  if (index < 0) return model
503
- return { ...model, messages: patchMessage(model.messages, model.messages[index].id, { pending: false, at: Date.now() }) }
517
+ return { ...model, messages: patchMessage(model.messages, model.messages[index].id, { accepted: true }) }
504
518
  }
505
519
  case 'approval': {
506
520
  const approval = frame.approval
@@ -647,9 +661,7 @@ window.__ModuleLoader__.load({
647
661
  function Composer(props) {
648
662
  const { hero, disabled, onSend } = props
649
663
  const [text, setText] = react.useState('')
650
- const [busy, setBusy] = react.useState(false)
651
664
  const areaRef = react.useRef(null)
652
- const fileRef = react.useRef(null)
653
665
 
654
666
  const grow = () => {
655
667
  const area = areaRef.current
@@ -658,31 +670,6 @@ window.__ModuleLoader__.load({
658
670
  area.style.height = `${Math.min(area.scrollHeight, 336)}px`
659
671
  }
660
672
 
661
- /** Files are copied into the workspace by the console, then the path is typed. */
662
- const attach = async files => {
663
- const list = Array.from(files || []).filter(Boolean)
664
- if (list.length === 0) return
665
- setBusy(true)
666
- for (const file of list) {
667
- try {
668
- const bytes = new Uint8Array(await file.arrayBuffer())
669
- let binary = ''
670
- for (let index = 0; index < bytes.length; index += 1) binary += String.fromCharCode(bytes[index])
671
- const data = await call('/upload', {
672
- method: 'POST',
673
- body: JSON.stringify({ sessionId: props.model.sessionId, name: file.name, data: btoa(binary) }),
674
- })
675
- if (data?.path) {
676
- setText(current => `${current}${current && !current.endsWith(' ') ? ' ' : ''}${data.path} `)
677
- }
678
- } catch (error) {
679
- props.onError?.(`${file.name}:${error.message}`)
680
- }
681
- }
682
- setBusy(false)
683
- grow()
684
- }
685
-
686
673
  const submit = () => {
687
674
  const value = text.trim()
688
675
  if (!value || disabled) return
@@ -712,24 +699,6 @@ window.__ModuleLoader__.load({
712
699
  },
713
700
  }),
714
701
  h('div', { className: 'dsa-row' },
715
- h('div', { className: 'dsa-tools' },
716
- h('input', {
717
- ref: fileRef,
718
- type: 'file',
719
- multiple: true,
720
- style: { display: 'none' },
721
- onChange: event => {
722
- attach(event.target.files)
723
- event.target.value = ''
724
- },
725
- }),
726
- tipped('放进工作区', h('button', {
727
- type: 'button',
728
- className: 'dsa-add',
729
- disabled: busy,
730
- 'aria-label': '放进工作区',
731
- onClick: () => fileRef.current?.click(),
732
- }, h(Icon, { of: 'attach', size: 16 })), 'top')),
733
702
  h('div', { className: 'dsa-trailing' },
734
703
  props.running
735
704
  ? tipped('停止本轮', h('button', {
@@ -840,7 +809,6 @@ window.__ModuleLoader__.load({
840
809
  const runningCount = Array.isArray(model.runs)
841
810
  ? model.runs.filter(run => run.status === 'running').length
842
811
  : 0
843
- const notify = text => dispatch({ type: 'toast', text })
844
812
  return h('div', { className: 'dsa-root', 'data-rail': railOpen ? 'open' : 'closed' },
845
813
  h(Header, {
846
814
  railOpen,
@@ -858,7 +826,6 @@ window.__ModuleLoader__.load({
858
826
  canceling: model.canceling,
859
827
  onStop: () => dispatch({ type: 'cancel' }),
860
828
  onSend: text => dispatch({ type: 'send', text }),
861
- onError: notify,
862
829
  })
863
830
  : h(Transcript, { model, scrollRef: model.scrollRef }),
864
831
  h(Approvals, {
@@ -873,7 +840,6 @@ window.__ModuleLoader__.load({
873
840
  canceling: model.canceling,
874
841
  onStop: () => dispatch({ type: 'cancel' }),
875
842
  onSend: text => dispatch({ type: 'send', text }),
876
- onError: notify,
877
843
  })),
878
844
  h(Rail, { model })))
879
845
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiangyixie/dsh-superagent",
3
- "version": "0.16.8",
3
+ "version": "0.16.10",
4
4
  "description": "长周期自主执行插件:一个目标拆成可并行的子任务,交付一份合并报告,重启后仍可继续。",
5
5
  "author": "Admire (LittleChenLiya)",
6
6
  "type": "module",