@xiangyixie/dsh-superagent 0.16.7 → 0.16.8
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 +10 -0
- package/README.en.md +3 -3
- package/README.md +3 -3
- package/README.zh.md +3 -3
- package/lib/client.js +6 -65
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,16 @@ 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.8 — 2026-11-17
|
|
12
|
+
|
|
13
|
+
### 变化
|
|
14
|
+
|
|
15
|
+
- **去掉输入区的「排队 / 插话」选择。** 用户不再需要决定投递方式:空闲时发送
|
|
16
|
+
正常开启一轮,回合进行中发送自动使用 `steer` 立即交给超级智能体,适合连续
|
|
17
|
+
快速发多条消息;对应 `mode` 状态、`Menu` 选择器和 chip 样式一并删除。
|
|
18
|
+
- 输入区只剩附件与发送/停止两个控件;附件按钮从「+」换成宿主回形针图标,
|
|
19
|
+
不再看起来像新建会话,提示文案保持「放进工作区」。
|
|
20
|
+
|
|
11
21
|
## 0.16.7 — 2026-11-17
|
|
12
22
|
|
|
13
23
|
### 变化
|
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.
|
|
39
|
+
Desktop: **Plugins** → **Add plugin** → enter `@xiangyixie/dsh-superagent@0.16.8` → install.
|
|
40
40
|
|
|
41
41
|
CLI:
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.
|
|
44
|
+
dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.8
|
|
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.
|
|
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. |
|
|
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.
|
|
39
|
+
桌面端:侧边栏 **插件** → **Add plugin** → 输入 `@xiangyixie/dsh-superagent@0.16.8` → 安装。
|
|
40
40
|
|
|
41
41
|
命令行:
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.
|
|
44
|
+
dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.8
|
|
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.
|
|
1093
|
+
| `superagent_*` 工具不存在 | bundle 行没挂上,或者宿主拒绝加载插件。 | 跑 `--dump-config` 查 `@xiangyixie/dsh-superagent` 块;用 `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.16.8` 重装,并在宿主日志里找 `[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.
|
|
39
|
+
桌面端:侧边栏 **插件** → **Add plugin** → 输入 `@xiangyixie/dsh-superagent@0.16.8` → 安装。
|
|
40
40
|
|
|
41
41
|
命令行:
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.
|
|
44
|
+
dsh plugin --profile web add @xiangyixie/dsh-superagent@0.16.8
|
|
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.
|
|
1093
|
+
| `superagent_*` 工具不存在 | bundle 行没挂上,或者宿主拒绝加载插件。 | 跑 `--dump-config` 查 `@xiangyixie/dsh-superagent` 块;用 `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.16.8` 重装,并在宿主日志里找 `[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
|
@@ -64,9 +64,8 @@ window.__ModuleLoader__.load({
|
|
|
64
64
|
const MarkdownText = pick('MarkdownText')
|
|
65
65
|
const UserMessageBubble = pick('UserMessageBubble')
|
|
66
66
|
const StateDot = pick('StateDot')
|
|
67
|
-
const Menu = pick('Menu')
|
|
68
67
|
const Tooltip = pick('Tooltip')
|
|
69
|
-
const MISSING_PRIMITIVES = ['Button', 'FishLogo', 'MarkdownText', 'UserMessageBubble', 'StateDot', '
|
|
68
|
+
const MISSING_PRIMITIVES = ['Button', 'FishLogo', 'MarkdownText', 'UserMessageBubble', 'StateDot', 'Tooltip']
|
|
70
69
|
.filter(name => !pick(name))
|
|
71
70
|
if (!ui) {
|
|
72
71
|
console.warn('[dsh-superagent] host primitives module is absent; assistant text renders as plain text')
|
|
@@ -76,13 +75,12 @@ window.__ModuleLoader__.load({
|
|
|
76
75
|
const ICONS = {
|
|
77
76
|
spark: ui?.IconSparkleRegular ?? ui?.IconSparkleMedium,
|
|
78
77
|
send: ui?.IconSendOutlineRegular ?? ui?.IconSendOutlineMedium,
|
|
79
|
-
|
|
78
|
+
attach: ui?.IconPaperclipOutlineRegular ?? ui?.IconPaperclipOutlineMedium,
|
|
80
79
|
stop: ui?.IconStopFillRegular ?? ui?.IconStopFillMedium,
|
|
81
80
|
clock: ui?.IconClockOutlineRegular ?? ui?.IconClockOutlineMedium,
|
|
82
81
|
check: ui?.IconCheckOutlineRegular ?? ui?.IconCheckOutlineMedium,
|
|
83
82
|
close: ui?.IconCloseOutlineRegular ?? ui?.IconCloseOutlineMedium,
|
|
84
83
|
folder: ui?.IconFolderCloseRegular ?? ui?.IconFolderCloseMedium,
|
|
85
|
-
chevron: ui?.IconChevronDownOutlineRegular ?? ui?.IconChevronDownOutlineMedium,
|
|
86
84
|
panel: ui?.IconPanelLeftOutlineRegular ?? ui?.IconPanelLeftOutlineMedium,
|
|
87
85
|
}
|
|
88
86
|
// MarkdownText reads `labels.code` on every fenced block, so the host
|
|
@@ -99,11 +97,7 @@ window.__ModuleLoader__.load({
|
|
|
99
97
|
},
|
|
100
98
|
footnotes: '脚注',
|
|
101
99
|
}
|
|
102
|
-
/** Composer delivery
|
|
103
|
-
const MODES = [
|
|
104
|
-
{ id: 'queue', label: '排队' },
|
|
105
|
-
{ id: 'steer', label: '插话' },
|
|
106
|
-
]
|
|
100
|
+
/** Composer delivery behaviour: idle sends start a turn, running sends steer. */
|
|
107
101
|
const RAIL_KEY = 'dsh-superagent.rail-open'
|
|
108
102
|
function readRailOpen() {
|
|
109
103
|
try {
|
|
@@ -202,8 +196,6 @@ window.__ModuleLoader__.load({
|
|
|
202
196
|
.dsa-trailing{margin-left:auto;flex:none}
|
|
203
197
|
.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}
|
|
204
198
|
.dsa-add:hover{background:var(--dsw-alias-interactive-bg-hover-solid,rgba(255,255,255,.14))}
|
|
205
|
-
.dsa-chip{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 8px;border:0;border-radius:var(--dsw-radius-sm,8px);background-color:transparent;color:var(--dsw-alias-label-secondary,rgb(207,211,214));font-size:13px;line-height:20px;font-weight:500;white-space:nowrap;cursor:pointer;appearance:none}
|
|
206
|
-
.dsa-chip:hover,.dsa-chip[aria-expanded=true]{background-color:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08))}
|
|
207
199
|
.dsa-send{display:grid;place-items:center;flex:none;width:34px;height:34px;border:0;border-radius:999px;background:var(--dsw-alias-button-info-fill,#3964fe);color:var(--dsw-alias-label-on-color,#fff);cursor:pointer;transform:translateY(-2px);transition:background-color 100ms ease}
|
|
208
200
|
.dsa-send:hover:not(:disabled){background:var(--dsw-alias-button-info-hover,#2f57e6)}
|
|
209
201
|
.dsa-send:disabled{opacity:.4;cursor:default}
|
|
@@ -322,7 +314,6 @@ window.__ModuleLoader__.load({
|
|
|
322
314
|
messages: [],
|
|
323
315
|
approvals: [],
|
|
324
316
|
runs: [],
|
|
325
|
-
mode: 'queue',
|
|
326
317
|
toast: null,
|
|
327
318
|
canceling: false,
|
|
328
319
|
approvalBusy: {},
|
|
@@ -653,50 +644,10 @@ window.__ModuleLoader__.load({
|
|
|
653
644
|
}))
|
|
654
645
|
}
|
|
655
646
|
|
|
656
|
-
/**
|
|
657
|
-
* Delivery-mode picker. The host Menu carries the theme, radius, row height,
|
|
658
|
-
* hover fill, check mark, shadow, keyboard handling, outside dismiss and
|
|
659
|
-
* focus return; without it the chip still never falls back to a native
|
|
660
|
-
* `<select>` (it just cycles on click).
|
|
661
|
-
*/
|
|
662
|
-
function Chooser(props) {
|
|
663
|
-
const label = MODES.find(entry => entry.id === props.mode)?.label ?? '排队'
|
|
664
|
-
if (!Menu) {
|
|
665
|
-
return h('button', {
|
|
666
|
-
type: 'button',
|
|
667
|
-
className: 'dsa-chip',
|
|
668
|
-
'aria-label': `发送方式:${label},点击切换`,
|
|
669
|
-
onClick: () => props.onMode(props.mode === 'queue' ? 'steer' : 'queue'),
|
|
670
|
-
}, h('span', null, label), h(Icon, { of: 'chevron', size: 12 }))
|
|
671
|
-
}
|
|
672
|
-
return h(Menu, {
|
|
673
|
-
open: props.open,
|
|
674
|
-
anchor: h('button', {
|
|
675
|
-
type: 'button',
|
|
676
|
-
className: 'dsa-chip',
|
|
677
|
-
'aria-haspopup': 'menu',
|
|
678
|
-
'aria-expanded': props.open ? 'true' : 'false',
|
|
679
|
-
'aria-label': `发送方式:${label}`,
|
|
680
|
-
onClick: () => props.onOpenChange(!props.open),
|
|
681
|
-
}, h('span', null, label), h(Icon, { of: 'chevron', size: 12 })),
|
|
682
|
-
items: MODES,
|
|
683
|
-
selectedId: props.mode,
|
|
684
|
-
side: 'top',
|
|
685
|
-
align: 'start',
|
|
686
|
-
portal: true,
|
|
687
|
-
onClose: () => props.onOpenChange(false),
|
|
688
|
-
onSelect: id => {
|
|
689
|
-
props.onOpenChange(false)
|
|
690
|
-
if (id !== props.mode) props.onMode(id)
|
|
691
|
-
},
|
|
692
|
-
})
|
|
693
|
-
}
|
|
694
|
-
|
|
695
647
|
function Composer(props) {
|
|
696
648
|
const { hero, disabled, onSend } = props
|
|
697
649
|
const [text, setText] = react.useState('')
|
|
698
650
|
const [busy, setBusy] = react.useState(false)
|
|
699
|
-
const [chooser, setChooser] = react.useState(false)
|
|
700
651
|
const areaRef = react.useRef(null)
|
|
701
652
|
const fileRef = react.useRef(null)
|
|
702
653
|
|
|
@@ -778,13 +729,7 @@ window.__ModuleLoader__.load({
|
|
|
778
729
|
disabled: busy,
|
|
779
730
|
'aria-label': '放进工作区',
|
|
780
731
|
onClick: () => fileRef.current?.click(),
|
|
781
|
-
}, h(Icon, { of: '
|
|
782
|
-
h(Chooser, {
|
|
783
|
-
mode: props.mode ?? 'queue',
|
|
784
|
-
open: chooser,
|
|
785
|
-
onOpenChange: setChooser,
|
|
786
|
-
onMode: props.onMode,
|
|
787
|
-
})),
|
|
732
|
+
}, h(Icon, { of: 'attach', size: 16 })), 'top')),
|
|
788
733
|
h('div', { className: 'dsa-trailing' },
|
|
789
734
|
props.running
|
|
790
735
|
? tipped('停止本轮', h('button', {
|
|
@@ -908,13 +853,11 @@ window.__ModuleLoader__.load({
|
|
|
908
853
|
empty
|
|
909
854
|
? h(Hero, {
|
|
910
855
|
model,
|
|
911
|
-
mode: model.mode,
|
|
912
856
|
disabled: model.sending,
|
|
913
857
|
running: model.typing,
|
|
914
858
|
canceling: model.canceling,
|
|
915
859
|
onStop: () => dispatch({ type: 'cancel' }),
|
|
916
860
|
onSend: text => dispatch({ type: 'send', text }),
|
|
917
|
-
onMode: mode => dispatch({ type: 'mode', mode }),
|
|
918
861
|
onError: notify,
|
|
919
862
|
})
|
|
920
863
|
: h(Transcript, { model, scrollRef: model.scrollRef }),
|
|
@@ -925,13 +868,11 @@ window.__ModuleLoader__.load({
|
|
|
925
868
|
}),
|
|
926
869
|
empty ? null : h(Composer, {
|
|
927
870
|
model,
|
|
928
|
-
mode: model.mode,
|
|
929
871
|
disabled: model.sending || model.capabilities?.chat === false,
|
|
930
872
|
running: model.typing,
|
|
931
873
|
canceling: model.canceling,
|
|
932
874
|
onStop: () => dispatch({ type: 'cancel' }),
|
|
933
875
|
onSend: text => dispatch({ type: 'send', text }),
|
|
934
|
-
onMode: mode => dispatch({ type: 'mode', mode }),
|
|
935
876
|
onError: notify,
|
|
936
877
|
})),
|
|
937
878
|
h(Rail, { model })))
|
|
@@ -1026,10 +967,11 @@ window.__ModuleLoader__.load({
|
|
|
1026
967
|
typing: true,
|
|
1027
968
|
messages: [...current.messages, { id, role: 'user', text, at: Date.now(), pending: true }],
|
|
1028
969
|
}))
|
|
970
|
+
const mode = modelRef.current.typing ? 'steer' : 'queue'
|
|
1029
971
|
try {
|
|
1030
972
|
await call('/message', {
|
|
1031
973
|
method: 'POST',
|
|
1032
|
-
body: JSON.stringify({ text, mode
|
|
974
|
+
body: JSON.stringify({ text, mode, sessionId }),
|
|
1033
975
|
})
|
|
1034
976
|
} catch (error) {
|
|
1035
977
|
patch(current => ({
|
|
@@ -1071,7 +1013,6 @@ window.__ModuleLoader__.load({
|
|
|
1071
1013
|
patch(current => ({ ...current, phase: 'loading', reason: '' }))
|
|
1072
1014
|
setAttempt(value => value + 1)
|
|
1073
1015
|
},
|
|
1074
|
-
mode: action => patch(current => ({ ...current, mode: action.mode })),
|
|
1075
1016
|
toast: action => patch(current => ({ ...current, toast: { kind: 'err', text: String(action.text ?? '') } })),
|
|
1076
1017
|
}
|
|
1077
1018
|
|