@xiangyixie/dsh-superagent 0.16.1 → 0.16.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 +14 -0
- package/README.en.md +3 -3
- package/README.md +3 -3
- package/README.zh.md +3 -3
- package/lib/client.js +93 -35
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,20 @@ 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.2 — 2026-11-17
|
|
12
|
+
|
|
13
|
+
### 变化
|
|
14
|
+
|
|
15
|
+
- **「排队 / 插话」不再用浏览器原生 `<select>`。** 换成宿主导出的 `Menu`:
|
|
16
|
+
深浅两套语义 token、32px 行高、圆角与阴影都来自宿主菜单,选中态有对勾,
|
|
17
|
+
支持方向键 / Home / End / Enter、Esc 关闭、点击外部关闭、关闭后焦点回到
|
|
18
|
+
触发器,并用 `portal` + CSS anchor 定位,不会被输入卡裁掉。
|
|
19
|
+
- **原生提示条换成宿主 `Tooltip`。** 刷新、新建会话、附件、发送、停止、会话行、
|
|
20
|
+
任务线行、工具参数气泡都改用宿主 `Tooltip`(无 primitives 的宿主才退回
|
|
21
|
+
`title`),不再出现系统黄框提示。
|
|
22
|
+
- 附件仍用隐藏的 `<input type="file">` 触发系统文件选择器——宿主没有文件选择
|
|
23
|
+
组件,这个输入框本身不可见,外观由旁边的宿主风格按钮承担。
|
|
24
|
+
|
|
11
25
|
## 0.16.1 — 2026-11-17
|
|
12
26
|
|
|
13
27
|
### 变化
|
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.2` → 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.2
|
|
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.2` 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.2` → 安装。
|
|
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.2
|
|
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.2` 重装,并在宿主日志里找 `[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.2` → 安装。
|
|
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.2
|
|
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.2` 重装,并在宿主日志里找 `[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
|
@@ -57,6 +57,8 @@ window.__ModuleLoader__.load({
|
|
|
57
57
|
const MarkdownText = ui && typeof ui.MarkdownText === 'function' ? ui.MarkdownText : null
|
|
58
58
|
const UserMessageBubble = ui && typeof ui.UserMessageBubble === 'function' ? ui.UserMessageBubble : null
|
|
59
59
|
const StateDot = ui && typeof ui.StateDot === 'function' ? ui.StateDot : null
|
|
60
|
+
const Menu = ui && typeof ui.Menu === 'function' ? ui.Menu : null
|
|
61
|
+
const Tooltip = ui && typeof ui.Tooltip === 'function' ? ui.Tooltip : null
|
|
60
62
|
const ICONS = {
|
|
61
63
|
spark: ui?.IconSparkleRegular ?? ui?.IconSparkleMedium,
|
|
62
64
|
send: ui?.IconSendOutlineRegular ?? ui?.IconSendOutlineMedium,
|
|
@@ -68,6 +70,7 @@ window.__ModuleLoader__.load({
|
|
|
68
70
|
check: ui?.IconCheckOutlineRegular ?? ui?.IconCheckOutlineMedium,
|
|
69
71
|
close: ui?.IconCloseOutlineRegular ?? ui?.IconCloseOutlineMedium,
|
|
70
72
|
folder: ui?.IconFolderCloseRegular ?? ui?.IconFolderCloseMedium,
|
|
73
|
+
chevron: ui?.IconChevronDownOutlineRegular ?? ui?.IconChevronDownOutlineMedium,
|
|
71
74
|
}
|
|
72
75
|
// MarkdownText reads `labels.code` on every fenced block, so the host
|
|
73
76
|
// component is only safe with this shape filled in.
|
|
@@ -83,6 +86,20 @@ window.__ModuleLoader__.load({
|
|
|
83
86
|
},
|
|
84
87
|
footnotes: '脚注',
|
|
85
88
|
}
|
|
89
|
+
/** Composer delivery modes, rendered by the host Menu. */
|
|
90
|
+
const MODES = [
|
|
91
|
+
{ id: 'queue', label: '排队' },
|
|
92
|
+
{ id: 'steer', label: '插话' },
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Host tooltip when it exists; the native `title` only survives as the
|
|
97
|
+
* fallback for a host that ships no primitives at all.
|
|
98
|
+
*/
|
|
99
|
+
function tipped(label, node, side = 'bottom', key) {
|
|
100
|
+
if (Tooltip) return h(Tooltip, { key, label, side }, node)
|
|
101
|
+
return react.cloneElement(node, { key, title: label })
|
|
102
|
+
}
|
|
86
103
|
|
|
87
104
|
/**
|
|
88
105
|
* One class sheet for the panel. Every value is copied from the host's own
|
|
@@ -127,8 +144,8 @@ window.__ModuleLoader__.load({
|
|
|
127
144
|
.dsa-trailing{margin-left:auto;flex:none}
|
|
128
145
|
.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}
|
|
129
146
|
.dsa-add:hover{background:var(--dsw-alias-interactive-bg-hover-solid,rgba(255,255,255,.14))}
|
|
130
|
-
.dsa-chip{height:28px;padding:0
|
|
131
|
-
.dsa-chip:hover{background-color:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08))}
|
|
147
|
+
.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}
|
|
148
|
+
.dsa-chip:hover,.dsa-chip[aria-expanded=true]{background-color:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08))}
|
|
132
149
|
.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}
|
|
133
150
|
.dsa-send:hover:not(:disabled){background:var(--dsw-alias-button-info-hover,#2f57e6)}
|
|
134
151
|
.dsa-send:disabled{opacity:.4;cursor:default}
|
|
@@ -489,10 +506,10 @@ window.__ModuleLoader__.load({
|
|
|
489
506
|
h('span', { className: 'dsa-status' },
|
|
490
507
|
h('span', { className: 'dsa-dot', 'data-state': model.conn }),
|
|
491
508
|
model.conn === 'live' ? '已连接' : model.conn === 'warn' ? '流中断' : '连接中'),
|
|
492
|
-
h('button', { type: 'button', className: 'dsa-iconbtn',
|
|
493
|
-
h(Icon, { of: 'refresh' })),
|
|
494
|
-
h('button', { type: 'button', className: 'dsa-iconbtn',
|
|
495
|
-
h(Icon, { of: 'newChat' }))))
|
|
509
|
+
tipped('刷新', h('button', { type: 'button', className: 'dsa-iconbtn', onClick: onRefresh },
|
|
510
|
+
h(Icon, { of: 'refresh' }))),
|
|
511
|
+
tipped('新建会话', h('button', { type: 'button', className: 'dsa-iconbtn', onClick: onNew },
|
|
512
|
+
h(Icon, { of: 'newChat' })))))
|
|
496
513
|
}
|
|
497
514
|
|
|
498
515
|
function UserMessage(props) {
|
|
@@ -511,12 +528,18 @@ window.__ModuleLoader__.load({
|
|
|
511
528
|
children.push(h('div', { key: 'reasoning', className: 'dsa-reasoning' }, message.reasoning))
|
|
512
529
|
}
|
|
513
530
|
if (tools.length > 0) {
|
|
514
|
-
children.push(h('div', { key: 'tools', className: 'dsa-tools-row' }, tools.map(tool =>
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
531
|
+
children.push(h('div', { key: 'tools', className: 'dsa-tools-row' }, tools.map(tool => {
|
|
532
|
+
const chip = h('span', {
|
|
533
|
+
key: tool.callId ?? tool.name,
|
|
534
|
+
className: 'dsa-tool',
|
|
535
|
+
'data-status': tool.status,
|
|
536
|
+
}, tool.name)
|
|
537
|
+
return typeof tool.arguments === 'string' && tool.arguments
|
|
538
|
+
? (Tooltip
|
|
539
|
+
? h(Tooltip, { key: tool.callId ?? tool.name, label: tool.arguments, side: 'top', maxWidth: 420 }, chip)
|
|
540
|
+
: react.cloneElement(chip, { title: tool.arguments }))
|
|
541
|
+
: chip
|
|
542
|
+
})))
|
|
520
543
|
}
|
|
521
544
|
if (message.text) {
|
|
522
545
|
children.push(MarkdownText
|
|
@@ -588,10 +611,50 @@ window.__ModuleLoader__.load({
|
|
|
588
611
|
}))
|
|
589
612
|
}
|
|
590
613
|
|
|
614
|
+
/**
|
|
615
|
+
* Delivery-mode picker. The host Menu carries the theme, radius, row height,
|
|
616
|
+
* hover fill, check mark, shadow, keyboard handling, outside dismiss and
|
|
617
|
+
* focus return; without it the chip still never falls back to a native
|
|
618
|
+
* `<select>` (it just cycles on click).
|
|
619
|
+
*/
|
|
620
|
+
function Chooser(props) {
|
|
621
|
+
const label = MODES.find(entry => entry.id === props.mode)?.label ?? '排队'
|
|
622
|
+
if (!Menu) {
|
|
623
|
+
return h('button', {
|
|
624
|
+
type: 'button',
|
|
625
|
+
className: 'dsa-chip',
|
|
626
|
+
'aria-label': `发送方式:${label},点击切换`,
|
|
627
|
+
onClick: () => props.onMode(props.mode === 'queue' ? 'steer' : 'queue'),
|
|
628
|
+
}, h('span', null, label), h(Icon, { of: 'chevron', size: 12 }))
|
|
629
|
+
}
|
|
630
|
+
return h(Menu, {
|
|
631
|
+
open: props.open,
|
|
632
|
+
anchor: h('button', {
|
|
633
|
+
type: 'button',
|
|
634
|
+
className: 'dsa-chip',
|
|
635
|
+
'aria-haspopup': 'menu',
|
|
636
|
+
'aria-expanded': props.open ? 'true' : 'false',
|
|
637
|
+
'aria-label': `发送方式:${label}`,
|
|
638
|
+
onClick: () => props.onOpenChange(!props.open),
|
|
639
|
+
}, h('span', null, label), h(Icon, { of: 'chevron', size: 12 })),
|
|
640
|
+
items: MODES,
|
|
641
|
+
selectedId: props.mode,
|
|
642
|
+
side: 'top',
|
|
643
|
+
align: 'start',
|
|
644
|
+
portal: true,
|
|
645
|
+
onClose: () => props.onOpenChange(false),
|
|
646
|
+
onSelect: id => {
|
|
647
|
+
props.onOpenChange(false)
|
|
648
|
+
if (id !== props.mode) props.onMode(id)
|
|
649
|
+
},
|
|
650
|
+
})
|
|
651
|
+
}
|
|
652
|
+
|
|
591
653
|
function Composer(props) {
|
|
592
654
|
const { hero, disabled, onSend } = props
|
|
593
655
|
const [text, setText] = react.useState('')
|
|
594
656
|
const [busy, setBusy] = react.useState(false)
|
|
657
|
+
const [chooser, setChooser] = react.useState(false)
|
|
595
658
|
const areaRef = react.useRef(null)
|
|
596
659
|
const fileRef = react.useRef(null)
|
|
597
660
|
|
|
@@ -667,39 +730,36 @@ window.__ModuleLoader__.load({
|
|
|
667
730
|
event.target.value = ''
|
|
668
731
|
},
|
|
669
732
|
}),
|
|
670
|
-
h('button', {
|
|
733
|
+
tipped('放进工作区', h('button', {
|
|
671
734
|
type: 'button',
|
|
672
735
|
className: 'dsa-add',
|
|
673
|
-
title: '放进工作区',
|
|
674
736
|
disabled: busy,
|
|
737
|
+
'aria-label': '放进工作区',
|
|
675
738
|
onClick: () => fileRef.current?.click(),
|
|
676
|
-
}, h(Icon, { of: 'plus', size: 16 })),
|
|
677
|
-
h(
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
},
|
|
683
|
-
h('option', { value: 'queue' }, '排队'),
|
|
684
|
-
h('option', { value: 'steer' }, '插话'))),
|
|
739
|
+
}, h(Icon, { of: 'plus', size: 16 })), 'top'),
|
|
740
|
+
h(Chooser, {
|
|
741
|
+
mode: props.mode ?? 'queue',
|
|
742
|
+
open: chooser,
|
|
743
|
+
onOpenChange: setChooser,
|
|
744
|
+
onMode: props.onMode,
|
|
745
|
+
})),
|
|
685
746
|
h('div', { className: 'dsa-trailing' },
|
|
686
747
|
props.running
|
|
687
|
-
? h('button', {
|
|
748
|
+
? tipped('停止本轮', h('button', {
|
|
688
749
|
type: 'button',
|
|
689
750
|
className: 'dsa-send',
|
|
690
751
|
'data-mode': 'stop',
|
|
691
752
|
'aria-label': '停止本轮',
|
|
692
|
-
title: '停止本轮',
|
|
693
753
|
disabled: props.canceling === true,
|
|
694
754
|
onClick: () => props.onStop?.(),
|
|
695
|
-
}, props.canceling ? h('span', { className: 'dsa-spin' }) : h(Icon, { of: 'stop', size: 10 }))
|
|
696
|
-
: h('button', {
|
|
755
|
+
}, props.canceling ? h('span', { className: 'dsa-spin' }) : h(Icon, { of: 'stop', size: 10 })), 'top')
|
|
756
|
+
: tipped('发送', h('button', {
|
|
697
757
|
type: 'button',
|
|
698
758
|
className: 'dsa-send',
|
|
759
|
+
'aria-label': '发送',
|
|
699
760
|
disabled: disabled || !text.trim(),
|
|
700
|
-
title: '发送',
|
|
701
761
|
onClick: submit,
|
|
702
|
-
}, h(Icon, { of: 'send', size: 15 }))))),
|
|
762
|
+
}, h(Icon, { of: 'send', size: 15 })), 'top')))),
|
|
703
763
|
h('div', { className: 'dsa-stats' },
|
|
704
764
|
h('span', null, props.model.sessionId ? `会话 ${shortId(props.model.sessionId)}` : '还没有会话'),
|
|
705
765
|
h('span', null, `${props.model.runs.length} 条任务线`)))
|
|
@@ -714,29 +774,27 @@ window.__ModuleLoader__.load({
|
|
|
714
774
|
h('div', { className: 'dsa-rail-list' },
|
|
715
775
|
model.sessions.length === 0
|
|
716
776
|
? h('div', { className: 'dsa-hint', style: { padding: '8px' } }, model.sessionsReason || '还没有历史会话')
|
|
717
|
-
: model.sessions.map(session => h('button', {
|
|
777
|
+
: model.sessions.map(session => tipped(sessionTitle(session), h('button', {
|
|
718
778
|
key: session.sessionId,
|
|
719
779
|
type: 'button',
|
|
720
780
|
className: 'dsa-rowitem',
|
|
721
781
|
'data-selected': session.sessionId === model.sessionId ? 'true' : 'false',
|
|
722
|
-
title: sessionTitle(session),
|
|
723
782
|
onClick: () => onSwitch(session.sessionId),
|
|
724
783
|
},
|
|
725
784
|
h('span', { className: 'dsa-rowtitle' }, sessionTitle(session)),
|
|
726
|
-
h('span', { className: 'dsa-rowtime' }, clockOf(session.updatedAt))))),
|
|
785
|
+
h('span', { className: 'dsa-rowtime' }, clockOf(session.updatedAt))), 'left', session.sessionId))),
|
|
727
786
|
h('div', { className: 'dsa-rail-head' },
|
|
728
787
|
h('span', null, '任务线'),
|
|
729
788
|
h('span', null, `${model.runs.length}`)),
|
|
730
789
|
h('div', { className: 'dsa-rail-list' },
|
|
731
790
|
model.runs.length === 0
|
|
732
791
|
? h('div', { className: 'dsa-hint', style: { padding: '8px' } }, '这一轮还没有任务线')
|
|
733
|
-
: model.runs.map(run => h('div', {
|
|
792
|
+
: model.runs.map(run => tipped(run.goal ?? '', h('div', {
|
|
734
793
|
key: run.id,
|
|
735
794
|
className: 'dsa-rowitem',
|
|
736
|
-
title: run.goal ?? '',
|
|
737
795
|
},
|
|
738
796
|
h('span', { className: 'dsa-rowtitle' }, run.goal ?? '任务线'),
|
|
739
|
-
h('span', { className: 'dsa-rowtime' }, run.status === 'running' ? '运行中' : run.status === 'completed' ? '完成' : '已停')))))
|
|
797
|
+
h('span', { className: 'dsa-rowtime' }, run.status === 'running' ? '运行中' : run.status === 'completed' ? '完成' : '已停')), 'left', run.id))))
|
|
740
798
|
}
|
|
741
799
|
|
|
742
800
|
function Hero(props) {
|