dsh-multi-chat 0.6.8 → 1.0.1
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 +88 -30
- package/README.zh.md +54 -30
- package/bin/dsh-multi-chat.mjs +5 -9
- package/lib/client.js +778 -0
- package/lib/client.js.map +1 -0
- package/{plugin/dsh-client-ui-multi-wall/lib → lib}/index.js +58 -70
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/client/WallToggle.d.ts.map +1 -0
- package/lib/types/client/WallToggle.js +36 -0
- package/lib/types/client/WallToggle.js.map +1 -0
- package/lib/types/client/WallView.d.ts.map +1 -0
- package/lib/types/client/WallView.js +218 -0
- package/lib/types/client/WallView.js.map +1 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/index.js +59 -0
- package/lib/types/client/index.js.map +1 -0
- package/lib/types/client/locales.d.ts.map +1 -0
- package/lib/types/client/locales.js +96 -0
- package/lib/types/client/locales.js.map +1 -0
- package/lib/types/client/store.d.ts.map +1 -0
- package/lib/types/client/store.js +27 -0
- package/lib/types/client/store.js.map +1 -0
- package/lib/types/client/wall-injected.d.ts.map +1 -0
- package/lib/types/client/wall-injected.js +76 -0
- package/lib/types/client/wall-injected.js.map +1 -0
- package/lib/types/gateway.d.ts +57 -0
- package/lib/types/gateway.d.ts.map +1 -0
- package/lib/types/gateway.js +566 -0
- package/lib/types/gateway.js.map +1 -0
- package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/index.d.ts +80 -80
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +550 -0
- package/lib/types/index.js.map +1 -0
- package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/invariant.d.ts +3 -4
- package/lib/types/invariant.d.ts.map +1 -0
- package/lib/types/invariant.js +25 -0
- package/lib/types/invariant.js.map +1 -0
- package/package.json +49 -17
- package/patches/multi-wall.yml +1 -1
- package/scripts/install-plugin.ps1 +6 -9
- package/scripts/start-multi.ps1 +1 -1
- package/scripts/sync-vitest-paths.mjs +63 -0
- package/src/client/WallToggle.module.css +26 -0
- package/src/client/WallToggle.tsx +52 -0
- package/src/client/WallView.module.css +190 -0
- package/src/client/WallView.tsx +406 -0
- package/src/client/index.ts +103 -0
- package/src/client/locales.ts +100 -0
- package/src/client/store.ts +40 -0
- package/src/client/wall-injected.ts +123 -0
- package/src/css-modules.d.ts +5 -0
- package/src/gateway.ts +627 -0
- package/src/index.ts +618 -0
- package/src/invariant.ts +33 -0
- package/plugin/dsh-client-ui-multi-wall/README.md +0 -26
- package/plugin/dsh-client-ui-multi-wall/README.zh.md +0 -26
- package/plugin/dsh-client-ui-multi-wall/cordis.patch.yml +0 -7
- package/plugin/dsh-client-ui-multi-wall/lib/client.js +0 -781
- package/plugin/dsh-client-ui-multi-wall/lib/invariant.js +0 -27
- package/plugin/dsh-client-ui-multi-wall/package.json +0 -88
- /package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/client/WallToggle.d.ts +0 -0
- /package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/client/WallView.d.ts +0 -0
- /package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/client/index.d.ts +0 -0
- /package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/client/locales.d.ts +0 -0
- /package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/client/store.d.ts +0 -0
- /package/{plugin/dsh-client-ui-multi-wall/lib → lib}/types/client/wall-injected.d.ts +0 -0
package/README.md
CHANGED
|
@@ -48,13 +48,16 @@ Install a **multi-window wall** into the official [DeepSeek Harness (DSH)](https
|
|
|
48
48
|
## 🚀 30-second quick start
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
# 1. Install
|
|
51
|
+
# 1. Install — ONE command straight from the npm registry (no CLI to download):
|
|
52
|
+
dsh plugin --profile web add dsh-multi-chat
|
|
53
|
+
|
|
54
|
+
# …or via the plugin's own npx CLI (packs a tarball and installs it):
|
|
52
55
|
npx dsh-multi-chat install
|
|
53
56
|
|
|
54
57
|
# 2. Start a few instances
|
|
55
58
|
npx dsh-multi-chat start --ports 3080,3081,3082
|
|
56
59
|
|
|
57
|
-
# 3.
|
|
60
|
+
# 3. (Re)start any instance and click "Multi-window" in the sidebar footer → done 🎉
|
|
58
61
|
```
|
|
59
62
|
|
|
60
63
|
## Why this approach
|
|
@@ -67,18 +70,16 @@ npx dsh-multi-chat start --ports 3080,3081,3082
|
|
|
67
70
|
## Directory layout
|
|
68
71
|
|
|
69
72
|
```
|
|
70
|
-
|
|
73
|
+
dsh-multi-chat/ # single-package structure
|
|
71
74
|
lib/ # built artifacts (lib/index.js + lib/client.js + types)
|
|
72
|
-
src/ # source (
|
|
73
|
-
|
|
74
|
-
scripts/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
bin/dsh-multi-chat.mjs # cross-platform npx CLI (install/start/stop/gateway)
|
|
81
|
-
harness-src/ # official deepseek-harness source (dev/build reference)
|
|
75
|
+
src/ # source (node half + browser half)
|
|
76
|
+
bin/dsh-multi-chat.mjs # cross-platform npx CLI (install/start/stop/gateway)
|
|
77
|
+
scripts/
|
|
78
|
+
install-plugin.ps1 # pack + install into profile (DSH auto-mounts the bundle)
|
|
79
|
+
start-multi.ps1 / stop-multi.ps1 # start/stop multiple dsh web instances
|
|
80
|
+
gateway.mjs # token-authenticated reverse-proxy gateway (phone/remote)
|
|
81
|
+
cordis.patch.yml # DSH bundle layer declaration
|
|
82
|
+
harness-src/ # official deepseek-harness source (dev/build reference)
|
|
82
83
|
```
|
|
83
84
|
|
|
84
85
|
## Install & enable (Windows)
|
|
@@ -96,14 +97,14 @@ dsh web --port 3084
|
|
|
96
97
|
Or manual:
|
|
97
98
|
|
|
98
99
|
```bash
|
|
99
|
-
|
|
100
|
-
dsh plugin --profile web add
|
|
100
|
+
npm pack # produce a tarball (dsh-multi-chat-1.0.1.tgz)
|
|
101
|
+
dsh plugin --profile web add dsh-multi-chat-1.0.1.tgz # DSH adds the package to the bundle layer stack automatically
|
|
101
102
|
```
|
|
102
103
|
|
|
103
|
-
Uninstall (one command, nothing manual to clean up):
|
|
104
|
+
Uninstall (one command, nothing manual to clean up — restart `dsh web` to unload it):
|
|
104
105
|
|
|
105
106
|
```bash
|
|
106
|
-
dsh plugin --profile web remove
|
|
107
|
+
dsh plugin --profile web remove dsh-multi-chat
|
|
107
108
|
```
|
|
108
109
|
|
|
109
110
|
## Usage
|
|
@@ -133,27 +134,49 @@ Open that URL on your phone and enter the token to reach the full DSH UI. The ga
|
|
|
133
134
|
|
|
134
135
|
## Distribution & install
|
|
135
136
|
|
|
136
|
-
|
|
137
|
+
`dsh-multi-chat` is published to npm (unscoped public package) and released on GitHub (source zip/tarball per tag). Every channel below ends in the same three things: the package lands as a dependency of the web profile, DSH reconciles it into the bundle layer stack (the package declares `dsh.bundle.patch`, so its own `cordis.patch.yml` is mounted automatically — no manual patch edits), and a `dsh web` restart loads the wall.
|
|
138
|
+
|
|
139
|
+
### Install / uninstall cheat-sheet
|
|
140
|
+
|
|
141
|
+
| Channel | Install | Uninstall |
|
|
142
|
+
|---------|---------|-----------|
|
|
143
|
+
| **One-command (registry)** | `dsh plugin --profile web add dsh-multi-chat` | `dsh plugin --profile web remove dsh-multi-chat` |
|
|
144
|
+
| **npx (no download)** | `npx dsh-multi-chat install` | `dsh plugin --profile web remove dsh-multi-chat` |
|
|
145
|
+
| **Global CLI (npm)** | `npm i -g dsh-multi-chat` then `dsh-multi-chat install` | `dsh plugin --profile web remove dsh-multi-chat` then `npm rm -g dsh-multi-chat` |
|
|
146
|
+
| **Tarball (offline)** | `npm pack` → `dsh plugin --profile web add ./dsh-multi-chat-1.0.1.tgz` | `dsh plugin --profile web remove dsh-multi-chat` |
|
|
147
|
+
| **Git clone** | `node bin/dsh-multi-chat.mjs install` | `dsh plugin --profile web remove dsh-multi-chat` |
|
|
148
|
+
|
|
149
|
+
> `dsh plugin --profile web remove dsh-multi-chat` is the **single uninstall
|
|
150
|
+
> command for every channel**: it removes the dependency from the profile, and
|
|
151
|
+
> DSH strips it from the `dsh.profile.bundles` layer stack automatically
|
|
152
|
+
> (reconciled from the installed dependency set — see `dsh plugin --help`).
|
|
153
|
+
> Restart `dsh web` afterwards to unload the wall.
|
|
154
|
+
|
|
155
|
+
The repo also bundles a cross-platform CLI, `dsh-multi-chat` (`bin/dsh-multi-chat.mjs`). Its `install` command probes `$DSH_HOME` (default `~/.dsh`), packs the package into the profile's `plugins/` folder, and runs `dsh plugin --profile web add <tarball>` (same behavior as `install-plugin.ps1`).
|
|
137
156
|
|
|
138
157
|
### Channel 1: npm / npx (recommended, easiest)
|
|
139
158
|
|
|
140
159
|
```bash
|
|
141
|
-
#
|
|
160
|
+
# Published on npm — one line installs on any machine (node + pnpm required)
|
|
142
161
|
npx dsh-multi-chat install
|
|
143
162
|
|
|
144
|
-
# Or
|
|
163
|
+
# Or install the CLI globally, then install the plugin from anywhere
|
|
164
|
+
npm i -g dsh-multi-chat
|
|
165
|
+
dsh-multi-chat install
|
|
166
|
+
|
|
167
|
+
# Or run single commands straight from npx (no plugin install needed)
|
|
145
168
|
npx dsh-multi-chat start --remote --token <token> --ports 3080,3081
|
|
146
169
|
npx dsh-multi-chat gateway --target 127.0.0.1:3080 --token <token>
|
|
147
170
|
```
|
|
148
171
|
|
|
149
|
-
|
|
172
|
+
Maintaining / republishing (maintainer): `npm publish` (unscoped public package `dsh-multi-chat`).
|
|
150
173
|
|
|
151
174
|
### Channel 2: GitHub Release
|
|
152
175
|
|
|
153
176
|
Download the source zip/tarball from [Releases](https://github.com/daetz-coder/dsh-multi-chat/releases), unpack it, and cd in:
|
|
154
177
|
|
|
155
178
|
```bash
|
|
156
|
-
node bin/dsh-multi-chat.mjs install # pack + dsh plugin add
|
|
179
|
+
node bin/dsh-multi-chat.mjs install # pack + dsh plugin add (see cheat-sheet)
|
|
157
180
|
node bin/dsh-multi-chat.mjs start --ports 3080,3081
|
|
158
181
|
```
|
|
159
182
|
|
|
@@ -165,11 +188,13 @@ node bin/dsh-multi-chat.mjs start --ports 3080,3081
|
|
|
165
188
|
git clone https://github.com/daetz-coder/dsh-multi-chat.git
|
|
166
189
|
cd dsh-multi-chat
|
|
167
190
|
|
|
168
|
-
node bin/dsh-multi-chat.mjs install #
|
|
191
|
+
node bin/dsh-multi-chat.mjs install # pack + dsh plugin add (see cheat-sheet)
|
|
169
192
|
node bin/dsh-multi-chat.mjs start --ports 3080,3081
|
|
170
193
|
node bin/dsh-multi-chat.mjs gateway --target 127.0.0.1:3080 --token <token>
|
|
171
194
|
```
|
|
172
195
|
|
|
196
|
+
> For the one-command-on-this-machine flow, `dsh plugin --profile web add dsh-multi-chat` also works straight from a git clone — install the plugin _from_ the repo checkout without packaging it yourself.
|
|
197
|
+
|
|
173
198
|
### Running straight from this repo (development)
|
|
174
199
|
|
|
175
200
|
```bash
|
|
@@ -184,20 +209,53 @@ node bin/dsh-multi-chat.mjs gateway --target 127.0.0.1:3080 --token <token>
|
|
|
184
209
|
This plugin follows the official [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) client plugin spec:
|
|
185
210
|
|
|
186
211
|
- **Be found in the GitHub plugin ecosystem**: adding the [`dsh-plugin`](https://github.com/topics/dsh-plugin) topic to this repo makes it searchable on the official [`dsh-plugin` topic page](https://github.com/topics/dsh-plugin) (the officially recommended third-party discovery path).
|
|
187
|
-
- **Bilingual technical docs**:
|
|
212
|
+
- **Bilingual technical docs**: this repo ships `README.md` (English) and `README.zh.md` (Chinese) at the root, matching the bilingual convention of official `packages/client/*` plugins.
|
|
188
213
|
- **Purely additive, no core touching**: registers only the `conversation.view` / `sidebar.footer.action` list slots + `/multi/api/*` read-only routes, changing no official core logic.
|
|
189
214
|
|
|
190
|
-
##
|
|
215
|
+
## Building from source
|
|
191
216
|
|
|
192
|
-
|
|
217
|
+
The single-package layout uses `tsdown` for bundling and `tsc` for type declarations:
|
|
193
218
|
|
|
194
219
|
```bash
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
npx vitest run packages/client/ui-multi-wall # 14 tests
|
|
220
|
+
npm install
|
|
221
|
+
npm run build # tsc + tsdown → lib/
|
|
222
|
+
npm test # vitest (browser half in jsdom + node half)
|
|
199
223
|
```
|
|
200
224
|
|
|
225
|
+
## Testing
|
|
226
|
+
|
|
227
|
+
The unit suite (`tests/browser-plugin.client.spec.tsx`, 20 specs) exercises the
|
|
228
|
+
browser half (view-ring entry, sidebar shortcut, wall store, recursion guard,
|
|
229
|
+
HMR disposal) against a real cordis Context in jsdom, plus the node half
|
|
230
|
+
(probe routes, config schema, stop semantics).
|
|
231
|
+
|
|
232
|
+
The specs import `@deepseek-ai/*` platform packages whose published versions
|
|
233
|
+
lag the snapshot this plugin was written against, so tests resolve them to the
|
|
234
|
+
**vendored harness sources** in `harness-src/` instead of npm:
|
|
235
|
+
|
|
236
|
+
1. First install the vendored workspace once (it is a full DSH checkout):
|
|
237
|
+
```bash
|
|
238
|
+
cd harness-src && pnpm install && cd ..
|
|
239
|
+
```
|
|
240
|
+
2. `tsconfig.vitest.json` carries the workspace's `tsconfig.base.json` paths
|
|
241
|
+
map (rewritten with a `harness-src/` prefix) so every `@deepseek-ai/*`
|
|
242
|
+
import resolves to sources — never to unbuilt `lib/` outputs. Regenerate it
|
|
243
|
+
after updating the vendored checkout:
|
|
244
|
+
```bash
|
|
245
|
+
node scripts/sync-vitest-paths.mjs
|
|
246
|
+
```
|
|
247
|
+
3. `vitest.config.ts` feeds that map to `vite-tsconfig-paths` and dedupes
|
|
248
|
+
`react`/`react-dom` so the component specs and `@testing-library/react`
|
|
249
|
+
share one React instance. Then:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
npm test
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
> `npm run build`'s `tsc` step resolves `@deepseek-ai/*` types from the
|
|
256
|
+
> installed workspace (or from npm-installed versions on a machine with the
|
|
257
|
+
> matching snapshot); the committed `lib/` is the reference output.
|
|
258
|
+
|
|
201
259
|
## License
|
|
202
260
|
|
|
203
261
|
MIT
|
package/README.zh.md
CHANGED
|
@@ -48,13 +48,16 @@
|
|
|
48
48
|
## 🚀 30 秒上手
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
# 1.
|
|
51
|
+
# 1. 安装 —— 从 npm 官方源一条命令搞定(无需下载任何 CLI):
|
|
52
|
+
dsh plugin --profile web add dsh-multi-chat
|
|
53
|
+
|
|
54
|
+
# ……或通过插件自带的 npx CLI(先打包再安装):
|
|
52
55
|
npx dsh-multi-chat install
|
|
53
56
|
|
|
54
57
|
# 2. 启动几个实例
|
|
55
58
|
npx dsh-multi-chat start --ports 3080,3081,3082
|
|
56
59
|
|
|
57
|
-
# 3
|
|
60
|
+
# 3.(重新)打开任意实例,点侧边栏底部「多窗口」→ 完成 🎉
|
|
58
61
|
```
|
|
59
62
|
|
|
60
63
|
## 为什么这样做
|
|
@@ -67,18 +70,16 @@ npx dsh-multi-chat start --ports 3080,3081,3082
|
|
|
67
70
|
## 目录结构
|
|
68
71
|
|
|
69
72
|
```
|
|
70
|
-
|
|
73
|
+
dsh-multi-chat/ # 单包结构
|
|
71
74
|
lib/ # 已构建产物(lib/index.js + lib/client.js + 类型)
|
|
72
|
-
src/ #
|
|
73
|
-
|
|
74
|
-
scripts/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
bin/dsh-multi-chat.mjs # 跨平台 npx CLI(install/start/stop/gateway)
|
|
81
|
-
harness-src/ # 官方 deepseek-harness 源码(开发/构建用)
|
|
75
|
+
src/ # 源码(node half + browser half)
|
|
76
|
+
bin/dsh-multi-chat.mjs # 跨平台 npx CLI(install/start/stop/gateway)
|
|
77
|
+
scripts/
|
|
78
|
+
install-plugin.ps1 # 打包 + 装进 profile(DSH 自动挂载 bundle 层)
|
|
79
|
+
start-multi.ps1 / stop-multi.ps1 # 启停多个 dsh web 实例
|
|
80
|
+
gateway.mjs # 带令牌认证的反向代理网关(手机/远程访问)
|
|
81
|
+
cordis.patch.yml # DSH bundle 层声明
|
|
82
|
+
harness-src/ # 官方 deepseek-harness 源码(开发/构建用)
|
|
82
83
|
```
|
|
83
84
|
|
|
84
85
|
## 安装与启用(Windows)
|
|
@@ -96,14 +97,14 @@ dsh web --port 3084
|
|
|
96
97
|
或手动:
|
|
97
98
|
|
|
98
99
|
```bash
|
|
99
|
-
|
|
100
|
-
dsh plugin --profile web add
|
|
100
|
+
npm pack # 得到 tarball (dsh-multi-chat-1.0.1.tgz)
|
|
101
|
+
dsh plugin --profile web add dsh-multi-chat-1.0.1.tgz # DSH 自动把包加入 bundle 层栈
|
|
101
102
|
```
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
卸载(一条命令,无需手动清理任何文件 —— 重启 `dsh web` 后生效):
|
|
104
105
|
|
|
105
106
|
```bash
|
|
106
|
-
dsh plugin --profile web remove
|
|
107
|
+
dsh plugin --profile web remove dsh-multi-chat
|
|
107
108
|
```
|
|
108
109
|
|
|
109
110
|
## 使用
|
|
@@ -133,27 +134,47 @@ dsh plugin --profile web remove @deepseek-ai/dsh-client-ui-multi-wall
|
|
|
133
134
|
|
|
134
135
|
## 分发与安装
|
|
135
136
|
|
|
136
|
-
|
|
137
|
+
`dsh-multi-chat` 已发布到 npm(无作用域公开包),并在 GitHub 按 tag 发布 Release(源码 zip/tarball)。下面每条渠道殊途同归:包成为 web profile 的依赖 → DSH 自动调和进 bundle 层栈(包声明了 `dsh.bundle.patch`,自带 `cordis.patch.yml` 自动挂载,无需手改任何文件)→ 重启 `dsh web` 生效。
|
|
138
|
+
|
|
139
|
+
### 安装 / 卸载速查表
|
|
140
|
+
|
|
141
|
+
| 渠道 | 安装 | 卸载 |
|
|
142
|
+
|------|------|------|
|
|
143
|
+
| **一条命令(npm 官方源)** | `dsh plugin --profile web add dsh-multi-chat` | `dsh plugin --profile web remove dsh-multi-chat` |
|
|
144
|
+
| **npx(免下载)** | `npx dsh-multi-chat install` | `dsh plugin --profile web remove dsh-multi-chat` |
|
|
145
|
+
| **全局 CLI(npm)** | `npm i -g dsh-multi-chat` 然后 `dsh-multi-chat install` | `dsh plugin --profile web remove dsh-multi-chat` 然后 `npm rm -g dsh-multi-chat` |
|
|
146
|
+
| **Tarball(离线)** | `npm pack` → `dsh plugin --profile web add ./dsh-multi-chat-1.0.1.tgz` | `dsh plugin --profile web remove dsh-multi-chat` |
|
|
147
|
+
| **Git clone** | `node bin/dsh-multi-chat.mjs install` | `dsh plugin --profile web remove dsh-multi-chat` |
|
|
148
|
+
|
|
149
|
+
> `dsh plugin --profile web remove dsh-multi-chat` 是**所有渠道统一的卸载命令**:
|
|
150
|
+
> 它从 profile 移除依赖,DSH 会自动把它从 `dsh.profile.bundles` 层栈里剔除
|
|
151
|
+
> (层栈按已安装依赖实时调和,详见 `dsh plugin --help`)。之后重启 `dsh web` 卸载生效。
|
|
152
|
+
|
|
153
|
+
仓库还内置了一个跨平台 CLI `dsh-multi-chat`(`bin/dsh-multi-chat.mjs`)。它的 `install` 命令会探测 `$DSH_HOME`(缺省 `~/.dsh`),把包打包进 profile 的 `plugins/` 目录,再执行 `dsh plugin --profile web add <tarball>`(与 `install-plugin.ps1` 行为一致)。
|
|
137
154
|
|
|
138
155
|
### 渠道一:npm / npx(推荐,最省事)
|
|
139
156
|
|
|
140
157
|
```bash
|
|
141
|
-
#
|
|
158
|
+
# 已发布到 npm —— 任意机器一句话安装(需 node + pnpm)
|
|
142
159
|
npx dsh-multi-chat install
|
|
143
160
|
|
|
144
|
-
#
|
|
161
|
+
# 或全局装 CLI,再从任意目录安装插件
|
|
162
|
+
npm i -g dsh-multi-chat
|
|
163
|
+
dsh-multi-chat install
|
|
164
|
+
|
|
165
|
+
# 或直接用 npx 跑单条命令(无需安装插件)
|
|
145
166
|
npx dsh-multi-chat start --remote --token <口令> --ports 3080,3081
|
|
146
167
|
npx dsh-multi-chat gateway --target 127.0.0.1:3080 --token <口令>
|
|
147
168
|
```
|
|
148
169
|
|
|
149
|
-
|
|
170
|
+
维护者发布/再发布:`npm publish`(无作用域公开包 `dsh-multi-chat`)。
|
|
150
171
|
|
|
151
172
|
### 渠道二:GitHub Release
|
|
152
173
|
|
|
153
174
|
从 [Releases](https://github.com/daetz-coder/dsh-multi-chat/releases) 下载源码 zip/tarball,解压后进目录:
|
|
154
175
|
|
|
155
176
|
```bash
|
|
156
|
-
node bin/dsh-multi-chat.mjs install # 打包 + dsh plugin add
|
|
177
|
+
node bin/dsh-multi-chat.mjs install # 打包 + dsh plugin add(见速查表)
|
|
157
178
|
node bin/dsh-multi-chat.mjs start --ports 3080,3081
|
|
158
179
|
```
|
|
159
180
|
|
|
@@ -165,11 +186,13 @@ node bin/dsh-multi-chat.mjs start --ports 3080,3081
|
|
|
165
186
|
git clone https://github.com/daetz-coder/dsh-multi-chat.git
|
|
166
187
|
cd dsh-multi-chat
|
|
167
188
|
|
|
168
|
-
node bin/dsh-multi-chat.mjs install #
|
|
189
|
+
node bin/dsh-multi-chat.mjs install # 打包 + dsh plugin add(见速查表)
|
|
169
190
|
node bin/dsh-multi-chat.mjs start --ports 3080,3081
|
|
170
191
|
node bin/dsh-multi-chat.mjs gateway --target 127.0.0.1:3080 --token <口令>
|
|
171
192
|
```
|
|
172
193
|
|
|
194
|
+
> 在 git clone 出来的仓库里也可以直接走一条命令:`dsh plugin --profile web add dsh-multi-chat` —— 直接从已发布版本安装,无需自己打包。
|
|
195
|
+
|
|
173
196
|
### 本仓库直接运行(开发)
|
|
174
197
|
|
|
175
198
|
```bash
|
|
@@ -184,20 +207,21 @@ node bin/dsh-multi-chat.mjs gateway --target 127.0.0.1:3080 --token <口令>
|
|
|
184
207
|
本插件遵循 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 官方 client 插件规范:
|
|
185
208
|
|
|
186
209
|
- **在 GitHub 插件生态中被发现**:给本仓库添加 [`dsh-plugin`](https://github.com/topics/dsh-plugin) topic,即可在官方 [`dsh-plugin` topic 页](https://github.com/topics/dsh-plugin) 被搜索到(官方推荐的第三方插件发现方式)。
|
|
187
|
-
-
|
|
210
|
+
- **双语技术文档**:本仓库在根目录提供 `README.md`(英文)和 `README.zh.md`(中文),与官方 `packages/client/*` 插件的双语惯例一致。
|
|
188
211
|
- **纯增量、不碰核心**:只注册 `conversation.view` / `sidebar.footer.action` 两个列表槽位 + `/multi/api/*` 只读路由,不改动任何官方核心逻辑。
|
|
189
212
|
|
|
190
|
-
##
|
|
213
|
+
## 从源码构建
|
|
191
214
|
|
|
192
|
-
`
|
|
215
|
+
单包结构使用 `tsdown` 进行打包,`tsc` 生成类型声明:
|
|
193
216
|
|
|
194
217
|
```bash
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
npx vitest run packages/client/ui-multi-wall # 14 项测试
|
|
218
|
+
npm install
|
|
219
|
+
npm run build # tsc + tsdown → lib/
|
|
220
|
+
npx vitest run # 测试
|
|
199
221
|
```
|
|
200
222
|
|
|
223
|
+
开发时可借助 `harness-src/` 目录(完整 DSH 源码)作为构建和参考工作区。
|
|
224
|
+
|
|
201
225
|
## License
|
|
202
226
|
|
|
203
227
|
MIT
|
package/bin/dsh-multi-chat.mjs
CHANGED
|
@@ -29,7 +29,6 @@ import { fileURLToPath } from 'node:url'
|
|
|
29
29
|
|
|
30
30
|
const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..')
|
|
31
31
|
const STATE_FILE = join(ROOT, '.wall-pids.json')
|
|
32
|
-
const PLUGIN_DIR = join(ROOT, 'plugin', 'dsh-client-ui-multi-wall')
|
|
33
32
|
|
|
34
33
|
// Node ≥22 warns about spawn(shell:true, args[]) (DEP0190). The args here are
|
|
35
34
|
// fixed strings we control (numeric ports, our own paths), so the warning is
|
|
@@ -123,11 +122,11 @@ const INSTALL_HELP = `dsh-multi-chat install — install the multi-window wall p
|
|
|
123
122
|
Usage:
|
|
124
123
|
dsh-multi-chat install [--profile web]
|
|
125
124
|
|
|
126
|
-
Packs
|
|
127
|
-
with \`dsh plugin --profile <p> add\`. The
|
|
125
|
+
Packs the dsh-multi-chat package and installs the tarball into the profile
|
|
126
|
+
with \`dsh plugin --profile <p> add\`. The package declares \`dsh.bundle.patch\`
|
|
128
127
|
(pointing at its own cordis.patch.yml), so DSH mounts it automatically as a
|
|
129
128
|
bundle layer — no manual profile patch is needed. Restart dsh web afterwards.
|
|
130
|
-
Uninstall with: dsh plugin --profile <p> remove
|
|
129
|
+
Uninstall with: dsh plugin --profile <p> remove dsh-multi-chat
|
|
131
130
|
`
|
|
132
131
|
|
|
133
132
|
async function cmdInstall(args) {
|
|
@@ -137,17 +136,14 @@ async function cmdInstall(args) {
|
|
|
137
136
|
else if (args[i] === '--help') { process.stdout.write(INSTALL_HELP); return }
|
|
138
137
|
else throw new Error(`unknown install option: ${args[i]}`)
|
|
139
138
|
}
|
|
140
|
-
if (!existsSync(PLUGIN_DIR)) {
|
|
141
|
-
throw new Error(`plugin directory not found: ${PLUGIN_DIR} — run from the dsh-multi-chat package root`)
|
|
142
|
-
}
|
|
143
139
|
|
|
144
|
-
// 1) pack the
|
|
140
|
+
// 1) pack the tarball into a STABLE location under DSH home. The
|
|
145
141
|
// profile records a `file:` dependency on the tarball, so a temp directory
|
|
146
142
|
// (deleted after install) would break every later `dsh plugin add` — the
|
|
147
143
|
// tarball must outlive the CLI run. (npm pack is offline-safe.)
|
|
148
144
|
const stableDir = join(dshHome(), 'profiles', profile, 'plugins')
|
|
149
145
|
mkdirSync(stableDir, { recursive: true })
|
|
150
|
-
const packOut = run('npm', ['pack', '--pack-destination', stableDir], { cwd:
|
|
146
|
+
const packOut = run('npm', ['pack', '--pack-destination', stableDir], { cwd: ROOT })
|
|
151
147
|
const tarballName = packOut.trim().split(/\r?\n/).pop()
|
|
152
148
|
const tarball = join(stableDir, tarballName)
|
|
153
149
|
if (!existsSync(tarball)) throw new Error('npm pack produced no tarball')
|