dsh-bots 0.2.22 → 0.2.23
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.md +160 -8
- package/README.zh-CN.md +157 -0
- package/lib/client.js +28 -11
- package/package.json +15 -3
package/README.md
CHANGED
|
@@ -1,12 +1,164 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# dsh-bots
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
**A multi-bot workbench for DeepSeek Harness (dsh)** —
|
|
6
|
+
bridges the sdk-bots orchestration gateway into the dsh web
|
|
7
|
+
shell: single bots, group chats, transcripts and live events, styled like the official UI.
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/dsh-bots)
|
|
10
|
+
[](./LICENSE)
|
|
11
|
+
[](./package.json)
|
|
12
|
+
[](./scripts)
|
|
13
|
+
|
|
14
|
+
English · [简体中文](./README.zh-CN.md)
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
**dsh-bots** is a formal Cordis plugin (Host +
|
|
21
|
+
Client halves) for the `dsh` web profile. It mounts a workbench into the sidebar where every bot of
|
|
22
|
+
your sdk-bots swarm is one click away — chat with single bots, run group productions with
|
|
23
|
+
@-mentions, watch transcripts stream in over SSE, and manage each bot's workspace sandbox without
|
|
24
|
+
leaving the shell.
|
|
25
|
+
|
|
26
|
+
## ✨ Features
|
|
27
|
+
|
|
28
|
+
**Workbench sidebar**
|
|
29
|
+
|
|
30
|
+
- Two-group collapsible nav 「工作区 | Bots」 with the native sidebar interaction model (hover
|
|
31
|
+
actions, chevron fold, accordion expansion, gateway status dot)
|
|
32
|
+
- 群聊 / 单聊 sections with hover-revealed `+` (create) and `⋯` (more actions) menus
|
|
33
|
+
- Unread badges with a plugin-owned read model (SSE + transcript rebase), composing indicators
|
|
34
|
+
|
|
35
|
+
**Conversations**
|
|
36
|
+
|
|
37
|
+
- Full chat surface: day dividers, stick-to-bottom with jump-to-latest, IME-safe composer,
|
|
38
|
+
same-author run compaction
|
|
39
|
+
- Group chat turn-taking: @-mention directed replies, one-hop delegation, `@全员` broadcast —
|
|
40
|
+
powered by the engine's responder election
|
|
41
|
+
- Markdown rendering, tool-call cards with status dots, thinking blocks
|
|
42
|
+
- **Stop generating**: composer send button morphs into a stop square wired to the gateway's
|
|
43
|
+
`interruptAgent`
|
|
44
|
+
- Local media: inline image previews and one-click file chips for paths mentioned by bots
|
|
45
|
+
|
|
46
|
+
**Management**
|
|
47
|
+
|
|
48
|
+
- **Session settings** (gear in the chat bar): rename, description, and the workspace jail editor
|
|
49
|
+
- **Manage members** for groups (checkbox roster editor, honest 6-member cap feedback)
|
|
50
|
+
- Create bots and groups from the section headers; delete with confirm dialogs
|
|
51
|
+
- Settings page section: gateway health, data dir, SSE state, workspace list, MCP servers & tools
|
|
52
|
+
|
|
53
|
+
**Under the hood**
|
|
54
|
+
|
|
55
|
+
- Host half: a `TypertRemoteService` bridging 27 gateway RPC endpoints + SSE proxy
|
|
56
|
+
- Client half: plain-JS React via Cordis Slots (no build step), zh/en i18n
|
|
57
|
+
- Workspace jail (macOS Seatbelt) editing per bot: root dir + extra writable paths
|
|
58
|
+
|
|
59
|
+
## 📦 Install
|
|
60
|
+
|
|
61
|
+
Requirements:
|
|
62
|
+
|
|
63
|
+
- `dsh` with a web profile (Cordis `^4.0.1` — what the plugin is tested against)
|
|
64
|
+
- An sdk-bots host running its gateway (default discovery:
|
|
65
|
+
`~/.dsh-bots/gateway.json`, falling back to the legacy `~/.sdk-bots/gateway.json`)
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# from npm
|
|
69
|
+
dsh plugin --profile web add dsh-bots
|
|
70
|
+
|
|
71
|
+
# or from a packed tarball
|
|
72
|
+
pnpm pack
|
|
73
|
+
dsh plugin --profile web add ./dsh-bots-0.2.22.tgz
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Then restart `dsh web` and refresh the page. The workbench appears as the second group in the
|
|
77
|
+
sidebar; the settings page gains a **Bots** section.
|
|
78
|
+
|
|
79
|
+
> ⚠️ **Half-loading trap**: the plugin's Client half is served fresh on every page load, but the
|
|
80
|
+
> Host half only loads at `dsh web` boot. After upgrading, refresh for UI changes — restart
|
|
81
|
+
> `dsh web` when host RPCs change (otherwise the new UI hits a stale host and new endpoints 404).
|
|
82
|
+
|
|
83
|
+
## ⚙️ Configuration
|
|
84
|
+
|
|
85
|
+
The plugin reads a single option (via `cordis.patch.yml`):
|
|
86
|
+
|
|
87
|
+
| Option | Default | Description |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| `dataDir` | `~/.dsh-bots` | Directory holding `gateway.json` and plugin-owned state. Discovery falls back to the legacy `~/.sdk-bots` root until the engine migrates; unread ledger, workspace ops and the media allowlist follow the gateway's actual location. |
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
# cordis.patch.yml (shipped in the package; applied when the plugin is
|
|
93
|
+
# added to a profile — change dataDir here if your gateway lives elsewhere)
|
|
94
|
+
- insert:
|
|
95
|
+
- id: bots
|
|
96
|
+
name: dsh-bots
|
|
97
|
+
config:
|
|
98
|
+
dataDir: '~/.dsh-bots'
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## 🚀 Usage
|
|
102
|
+
|
|
103
|
+
| Task | How |
|
|
104
|
+
|---|---|
|
|
105
|
+
| Open a conversation | Click a bot in 单聊 or a group in 群聊 |
|
|
106
|
+
| Direct a group reply | Type `@` and pick a member; `@全员` wakes everyone |
|
|
107
|
+
| Stop a generation | Click the ⏹ square (replaces ▲ send while composing) |
|
|
108
|
+
| Rename / jail a bot | Gear button (top-right of the chat bar) |
|
|
109
|
+
| Add/remove group members | 管理成员 button (top-right, group chats) |
|
|
110
|
+
| Create / refresh | Hover a section header → `+` / `⋯` |
|
|
111
|
+
| Fold a section | Click the section header row |
|
|
112
|
+
| Gateway health & MCP | Settings page → Bots section |
|
|
113
|
+
|
|
114
|
+
**Workspace jail** (singles only): set a workspace root to confine a bot's shell writes via macOS
|
|
115
|
+
Seatbelt (reads stay unrestricted, same-slug bots share a directory, takes effect next turn).
|
|
116
|
+
Empty root = jail disabled. Extra writable paths accept a comma-separated list.
|
|
117
|
+
|
|
118
|
+
**Group member cap**: the engine hard-caps groups at **6 members** and silently truncates larger
|
|
119
|
+
rosters — the member editor surfaces the cap instead of letting a save pretend to work.
|
|
120
|
+
|
|
121
|
+
## 🏗️ Architecture
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
┌────────────────────────── dsh web ──────────────────────────┐
|
|
125
|
+
│ shell ── Slots: sidebar.workspaces (shadow) │
|
|
126
|
+
│ shell.overlay (chat + modals) │
|
|
127
|
+
│ settings.section (Bots card) │
|
|
128
|
+
│ │ botsCall RPC (lossless JSON) │
|
|
129
|
+
│ ┌─────────────────── Host half ───────────────────────┐ │
|
|
130
|
+
│ │ TypertRemoteService · 27 endpoints │ │
|
|
131
|
+
│ │ SSE proxy (3k-entry ring buffer) · unread model │ │
|
|
132
|
+
│ └──────────────────────┬────────────────────────────┘ │
|
|
133
|
+
└─────────────────────────┼──────────────────────────────────┘
|
|
134
|
+
│ HTTP + SSE (loopback token auth)
|
|
135
|
+
┌───────────▼───────────┐
|
|
136
|
+
│ sdk-bots gateway :7331 │ ← single bots · sand groups · MCP
|
|
137
|
+
└────────────────────────┘
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
- **Host** (`src/index.ts`, `src/gateway.ts`, `src/sse.ts`, …): gateway discovery + calls, SSE
|
|
141
|
+
ring with reconnect + transcript rebase, unread ledger, media `readImage`/`openFile` with a
|
|
142
|
+
fail-closed realpath allowlist, diagnostics file.
|
|
143
|
+
- **Client** (`src/client.ts`): the whole UI in one factory — sidebar nav, chat surface, six
|
|
144
|
+
modals, settings cards — registered through Cordis Slots with zh/en dictionaries.
|
|
145
|
+
|
|
146
|
+
## 🧪 Development
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
pnpm install
|
|
150
|
+
pnpm build # tsc host + client
|
|
151
|
+
pnpm test # vitest (83 tests)
|
|
152
|
+
pnpm test:integration # boots a fixture host, checks all 27 endpoints
|
|
153
|
+
pnpm test:dsh-smoke # plugin loads inside a real dsh profile
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Release loop: build → test → integration → bump → pack → `dsh plugin --profile web add` →
|
|
157
|
+
verify → commit → push → `npm publish --access public`.
|
|
158
|
+
|
|
159
|
+
Project docs: [DESIGN.md](./DESIGN.md) (architecture decisions) ·
|
|
160
|
+
[DEVELOPMENT.md](./DEVELOPMENT.md) (engineering log & pitfalls).
|
|
5
161
|
|
|
6
|
-
|
|
7
|
-
- `sidebar.workspaces` shadow — two-group collapsible nav 「工作区|Bots」.
|
|
8
|
-
- `shell.overlay` — chat surface.
|
|
9
|
-
- `settings.section` — gateway status / guide.
|
|
162
|
+
## 📄 License
|
|
10
163
|
|
|
11
|
-
|
|
12
|
-
`DESIGN.md`.
|
|
164
|
+
[MIT](./LICENSE)
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# dsh-bots
|
|
4
|
+
|
|
5
|
+
**DeepSeek Harness (dsh) 多 Bot 工作台** ——
|
|
6
|
+
把 sdk-bots 编排网关桥接进 dsh web 外壳:单聊、群聊、转录流、实时事件,UI 与官方风格一致。
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/dsh-bots)
|
|
9
|
+
[](./LICENSE)
|
|
10
|
+
[](./package.json)
|
|
11
|
+
[](./scripts)
|
|
12
|
+
|
|
13
|
+
[English](./README.md) · 简体中文
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
**dsh-bots** 是一个正式的 Cordis插件(宿主 + 客户端双半边),服务于 `dsh` web 配置。它在侧边栏
|
|
20
|
+
挂载一个工作台,让 sdk-bots 蜂群里的每个 Bot 都触手可及——和单个 Bot 对话、用 @提及指挥群聊
|
|
21
|
+
剧组、看转录随 SSE 实时滚动、不离开外壳就能管理每个 Bot 的工作区沙盒。
|
|
22
|
+
|
|
23
|
+
## ✨ 功能
|
|
24
|
+
|
|
25
|
+
**工作台侧栏**
|
|
26
|
+
|
|
27
|
+
- 「工作区 | Bots」双分组可折叠导航,完全对齐原生侧栏交互(悬停操作、chevron 折叠、手风琴
|
|
28
|
+
展开、网关状态圆点)
|
|
29
|
+
- 群聊 / 单聊分区,悬停浮现 `+`(新建)与 `⋯`(更多操作)菜单
|
|
30
|
+
- 未读徽章(插件自有已读模型:SSE + 转录重放对账)、生成中指示
|
|
31
|
+
|
|
32
|
+
**对话**
|
|
33
|
+
|
|
34
|
+
- 完整聊天界面:日期分割线、贴底滚动 + 跳到最新、IME 安全输入框、同作者连续发言合并
|
|
35
|
+
- 群聊发言调度:@提及定向回复、一跳接力、`@全员` 全员唤醒——由引擎的 responder 选举驱动
|
|
36
|
+
- Markdown 渲染、带状态圆点的工具调用卡片、思考块
|
|
37
|
+
- **停止生成**:输入框发送键在生成中变形为停止方块,直连网关 `interruptAgent`
|
|
38
|
+
- 本地媒体:Bot 提到的本地路径直接内联图片预览、文件一键打开
|
|
39
|
+
|
|
40
|
+
**管理**
|
|
41
|
+
|
|
42
|
+
- **会话设置**(聊天栏右上角齿轮):改名、简介、工作区隔离编辑器
|
|
43
|
+
- 群聊**管理成员**(checkbox 名单编辑器,6 人上限诚实提示)
|
|
44
|
+
- 分区 header 新建 Bot / 群聊;删除带确认弹窗
|
|
45
|
+
- 设置页 Bots 卡片:网关健康、数据目录、SSE 状态、工作区列表、MCP 服务器与工具
|
|
46
|
+
|
|
47
|
+
**底层**
|
|
48
|
+
|
|
49
|
+
- 宿主半边:`TypertRemoteService` 桥接 27 个网关 RPC 端点 + SSE 代理
|
|
50
|
+
- 客户端半边:纯 JS React 走 Cordis Slots(无构建产物依赖),中英双语
|
|
51
|
+
- 每个 Bot 的工作区监狱(macOS Seatbelt)编辑:根目录 + 额外可写路径
|
|
52
|
+
|
|
53
|
+
## 📦 安装
|
|
54
|
+
|
|
55
|
+
前置要求:
|
|
56
|
+
|
|
57
|
+
- `dsh` 与 web 配置(插件在 Cordis `^4.0.1` 上测试)
|
|
58
|
+
- 一个运行中的 [sdk-bots](https://github.com/dushaobindoudou) 宿主网关(默认发现:
|
|
59
|
+
`~/.dsh-bots/gateway.json`,自动回退旧版 `~/.sdk-bots/gateway.json`)
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# 从 npm 安装
|
|
63
|
+
dsh plugin --profile web add dsh-bots
|
|
64
|
+
|
|
65
|
+
# 或从本地打包安装
|
|
66
|
+
pnpm pack
|
|
67
|
+
dsh plugin --profile web add ./dsh-bots-0.2.22.tgz
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
然后重启 `dsh web` 并刷新页面。工作台出现在侧栏第二个分组;设置页多出 **Bots** 卡片。
|
|
71
|
+
|
|
72
|
+
> ⚠️ **两半边加载陷阱**:插件客户端半边每次页面加载都现读,但宿主半边只在 `dsh web` 启动时
|
|
73
|
+
> 加载一次。升级后 UI 改动刷新即可;宿主 RPC 有变化时必须重启 `dsh web`(否则新 UI 打旧
|
|
74
|
+
> host,新端点 404)。
|
|
75
|
+
|
|
76
|
+
## ⚙️ 配置
|
|
77
|
+
|
|
78
|
+
插件只有一个配置项(随 `cordis.patch.yml` 下发):
|
|
79
|
+
|
|
80
|
+
| 配置 | 默认值 | 说明 |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| `dataDir` | `~/.dsh-bots` | 存放 `gateway.json` 与插件自有状态。引擎迁移完成前,发现逻辑自动回退旧版 `~/.sdk-bots`;未读账本、工作区操作、媒体白名单都跟随网关真实所在目录。 |
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
# cordis.patch.yml(随包分发;插件装入 profile 时应用——
|
|
86
|
+
# 网关不在默认位置时在这里改 dataDir)
|
|
87
|
+
- insert:
|
|
88
|
+
- id: bots
|
|
89
|
+
name: dsh-bots
|
|
90
|
+
config:
|
|
91
|
+
dataDir: '~/.dsh-bots'
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## 🚀 使用
|
|
95
|
+
|
|
96
|
+
| 任务 | 操作 |
|
|
97
|
+
|---|---|
|
|
98
|
+
| 打开对话 | 点击单聊中的 Bot 或群聊中的群 |
|
|
99
|
+
| 让群里某人回话 | 输入 `@` 选成员;`@全员` 唤醒所有人 |
|
|
100
|
+
| 停止生成 | 点击 ⏹ 方块(生成中替换 ▲ 发送键) |
|
|
101
|
+
| 改名 / 工作区隔离 | 聊天栏右上角齿轮 |
|
|
102
|
+
| 增删群成员 | 群聊聊天栏右上角「管理成员」 |
|
|
103
|
+
| 新建 / 刷新 | 悬停分区 header → `+` / `⋯` |
|
|
104
|
+
| 折叠分区 | 点击分区 header 行 |
|
|
105
|
+
| 网关健康 & MCP | 设置页 → Bots 卡片 |
|
|
106
|
+
|
|
107
|
+
**工作区隔离**(仅单聊 Bot):设置工作区根目录后,Bot 的 Shell 写入被 macOS Seatbelt 限制在
|
|
108
|
+
工作区内(读取不受限,同名 Bot 共享目录,下一轮对话生效)。根目录留空 = 不启用。额外可写路径
|
|
109
|
+
接受逗号分隔列表。
|
|
110
|
+
|
|
111
|
+
**群成员上限**:引擎硬性限制每群 **6 人**,超限名单会被静默截断——成员编辑器会把上限明示出来,
|
|
112
|
+
不让保存假装成功。
|
|
113
|
+
|
|
114
|
+
## 🏗️ 架构
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
┌────────────────────────── dsh web ──────────────────────────┐
|
|
118
|
+
│ shell ── Slots: sidebar.workspaces(影子替换) │
|
|
119
|
+
│ shell.overlay(聊天 + 弹窗) │
|
|
120
|
+
│ settings.section(Bots 卡片) │
|
|
121
|
+
│ │ botsCall RPC(无损 JSON) │
|
|
122
|
+
│ ┌─────────────────── Host半边 ────────────────────────┐ │
|
|
123
|
+
│ │ TypertRemoteService · 27 端点 │ │
|
|
124
|
+
│ │ SSE 代理(3k 环形缓冲)· 未读模型 │ │
|
|
125
|
+
│ └──────────────────────┬────────────────────────────┘ │
|
|
126
|
+
└─────────────────────────┼──────────────────────────────────┘
|
|
127
|
+
│ HTTP + SSE(回环 token 鉴权)
|
|
128
|
+
┌───────────▼───────────┐
|
|
129
|
+
│ sdk-bots 网关 :7331 │ ← 单 Bot · 沙盒群 · MCP
|
|
130
|
+
└────────────────────────┘
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
- **Host**(`src/index.ts`、`src/gateway.ts`、`src/sse.ts` 等):网关发现与调用、SSE 环形缓冲
|
|
134
|
+
(重连 + 转录重放对账)、未读账本、媒体 `readImage`/`openFile`(realpath 白名单 fail-closed)、
|
|
135
|
+
诊断文件。
|
|
136
|
+
- **Client**(`src/client.ts`):整个 UI 在一个工厂里——侧栏导航、聊天界面、六个弹窗、设置
|
|
137
|
+
卡片——通过 Cordis Slots 注册,中英双语字典。
|
|
138
|
+
|
|
139
|
+
## 🧪 开发
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
pnpm install
|
|
143
|
+
pnpm build # tsc 宿主 + 客户端
|
|
144
|
+
pnpm test # vitest(83 个测试)
|
|
145
|
+
pnpm test:integration # 拉起夹具宿主,校验全部 27 个端点
|
|
146
|
+
pnpm test:dsh-smoke # 插件在真实 dsh profile 内加载
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
发布流程:build → test → integration → bump → pack → `dsh plugin --profile web add` →
|
|
150
|
+
verify → commit → push → `npm publish --access public`。
|
|
151
|
+
|
|
152
|
+
项目文档:[DESIGN.md](./DESIGN.md)(架构决策)· [DEVELOPMENT.md](./DEVELOPMENT.md)(工程日志
|
|
153
|
+
与踩坑记录)。
|
|
154
|
+
|
|
155
|
+
## 📄 许可
|
|
156
|
+
|
|
157
|
+
[MIT](./LICENSE)
|
package/lib/client.js
CHANGED
|
@@ -399,9 +399,13 @@
|
|
|
399
399
|
.dbs-modalBody{display:flex;flex-direction:column;gap:10px}
|
|
400
400
|
.dbs-modalMembers{display:flex;flex-direction:column;gap:2px;max-height:220px;overflow-y:auto;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;padding:6px}
|
|
401
401
|
.dbs-modalFooter{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:16px}
|
|
402
|
-
.dbs-
|
|
403
|
-
.dbs-
|
|
404
|
-
.dbs-srow:hover .dbs-
|
|
402
|
+
.dbs-rowMore{display:none;border:none;background:transparent;cursor:pointer;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;width:24px;height:24px;border-radius:6px;padding:0}
|
|
403
|
+
.dbs-rowMore:hover,.dbs-rowMore:focus-visible{color:var(--dsw-alias-label-primary);background:transparent}
|
|
404
|
+
.dbs-srow:hover .dbs-rowMore,.dbs-rowMore:focus-visible,.dbs-srow[data-menu="true"] .dbs-rowMore{display:inline-flex}
|
|
405
|
+
.dbs-srow{position:relative}
|
|
406
|
+
.dbs-rowMenu{position:absolute;top:calc(100% - 2px);right:4px;z-index:40}
|
|
407
|
+
/* Same quiet-hover contract for the section-header action buttons. */
|
|
408
|
+
.dbs-secHead .dbs-rowActions button:hover,.dbs-secHead .dbs-rowActions button:focus-visible{background:transparent}
|
|
405
409
|
.dbs-mention{position:absolute;bottom:calc(100% + 6px);left:12px;right:12px;max-height:180px;overflow-y:auto;background:var(--dsw-specific-input-major);border:1px solid var(--dsw-alias-border-l2,rgba(0,0,0,.12));border-radius:12px;box-shadow:var(--dsw-shadow-lv2);padding:4px;z-index:3}
|
|
406
410
|
.dbs-mentionRow{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:8px;cursor:pointer;font-size:13px;line-height:20px;color:var(--dsw-alias-label-primary)}
|
|
407
411
|
.dbs-mentionRow[data-active="true"],.dbs-mentionRow:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
@@ -810,6 +814,7 @@
|
|
|
810
814
|
manageMembers: null,
|
|
811
815
|
settingsAgentId: null,
|
|
812
816
|
sectionMenu: null,
|
|
817
|
+
rowMenu: null,
|
|
813
818
|
sectionsOpen: null,
|
|
814
819
|
/** Bumped on a language switch so module-scope `t` output re-renders. */
|
|
815
820
|
localeRev: 0,
|
|
@@ -1119,6 +1124,7 @@
|
|
|
1119
1124
|
return e('div', {
|
|
1120
1125
|
key: a.id,
|
|
1121
1126
|
className: 'dbs-srow' + (s.chatAgentId === a.id ? ' dbs-selected' : ''),
|
|
1127
|
+
'data-menu': s.rowMenu === a.id ? 'true' : 'false',
|
|
1122
1128
|
role: 'treeitem',
|
|
1123
1129
|
'aria-selected': s.chatAgentId === a.id,
|
|
1124
1130
|
tabIndex: 0,
|
|
@@ -1134,14 +1140,21 @@
|
|
|
1134
1140
|
? e(StateDot, { state: 'warning', size: 10 })
|
|
1135
1141
|
: unread > 0
|
|
1136
1142
|
? e('span', { className: 'dbs-badge' }, unread > 99 ? '99+' : String(unread))
|
|
1137
|
-
: null,
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1143
|
+
: null,
|
|
1144
|
+
// 更多操作: a single-item menu (删除) replaces the bare trash
|
|
1145
|
+
// button — same affordance as the section headers, room to grow.
|
|
1146
|
+
// The trigger paints NO hover background (user request): color
|
|
1147
|
+
// shift only, so the reveal stays quiet.
|
|
1148
|
+
e('button', {
|
|
1149
|
+
type: 'button', className: 'dbs-rowMore',
|
|
1150
|
+
title: t('list.more'), 'aria-label': t('list.more') + ' ' + a.name,
|
|
1151
|
+
onClick: (ev) => { ev.stopPropagation(); patch({ rowMenu: s.rowMenu === a.id ? null : a.id }); },
|
|
1152
|
+
}, Ico('IconEllipsisOutline16', { size: 14 })), s.rowMenu === a.id
|
|
1153
|
+
? e(React.Fragment, null, e('div', { style: { position: 'fixed', inset: 0, zIndex: 39 }, onClick: () => patch({ rowMenu: null }) }), e('div', { className: 'dbs-secMenu dbs-rowMenu', onClick: (ev) => { ev.stopPropagation(); } }, e('button', {
|
|
1154
|
+
className: 'dbs-secMenuItem', type: 'button',
|
|
1155
|
+
onClick: () => { patch({ rowMenu: null, confirmDelete: { id: a.id, name: a.name, isGroup: a.isGroup === true } }); },
|
|
1156
|
+
}, Ico('IconTrashOutline16', { size: 14 }), t('action.delete'))))
|
|
1157
|
+
: null);
|
|
1145
1158
|
}
|
|
1146
1159
|
/**
|
|
1147
1160
|
* Section header + rows. The header always renders (even when the
|
|
@@ -2436,6 +2449,10 @@
|
|
|
2436
2449
|
if (ev.key !== 'Escape')
|
|
2437
2450
|
return;
|
|
2438
2451
|
// Topmost dialog first: delete confirm, then create, then chat.
|
|
2452
|
+
if (state.rowMenu !== null) {
|
|
2453
|
+
patch({ rowMenu: null });
|
|
2454
|
+
return;
|
|
2455
|
+
}
|
|
2439
2456
|
if (state.confirmDelete !== null) {
|
|
2440
2457
|
patch({ confirmDelete: null });
|
|
2441
2458
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-bots",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.23",
|
|
4
4
|
"description": "Multi-bot workbench for DeepSeek Harness: bridges the sdk-bots orchestration gateway (group chats, single bots) into the dsh web shell with official-styled UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -28,11 +28,15 @@
|
|
|
28
28
|
"test:dsh-smoke": "bash scripts/dsh-smoke.sh"
|
|
29
29
|
},
|
|
30
30
|
"keywords": [
|
|
31
|
+
"bots",
|
|
32
|
+
"cordis",
|
|
31
33
|
"deepseek-harness",
|
|
32
34
|
"dsh-plugin",
|
|
33
|
-
"
|
|
35
|
+
"dsh-plugins",
|
|
36
|
+
"group-chat",
|
|
37
|
+
"mcp",
|
|
34
38
|
"multibot",
|
|
35
|
-
"
|
|
39
|
+
"workbench"
|
|
36
40
|
],
|
|
37
41
|
"license": "MIT",
|
|
38
42
|
"peerDependencies": {
|
|
@@ -53,5 +57,13 @@
|
|
|
53
57
|
"client": {
|
|
54
58
|
"platform": "web"
|
|
55
59
|
}
|
|
60
|
+
},
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "git+ssh://git@github.com/dushaobindoudou/dsh-bots.git"
|
|
64
|
+
},
|
|
65
|
+
"homepage": "https://github.com/dushaobindoudou/dsh-bots#readme",
|
|
66
|
+
"bugs": {
|
|
67
|
+
"url": "https://github.com/dushaobindoudou/dsh-bots/issues"
|
|
56
68
|
}
|
|
57
69
|
}
|