xechat-dsh 0.0.0-stage → 0.1.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/INSTALL.md +227 -0
- package/LICENSE +21 -0
- package/README.md +123 -2
- package/cordis.patch.yml +8 -0
- package/install.bat +61 -0
- package/install.ps1 +347 -0
- package/install.sh +354 -0
- package/lib/client.js +730 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +11 -0
- package/lib/xechat-app.css +1546 -0
- package/lib/xechat-app.js +102260 -0
- package/package.json +95 -4
- package/screenshots.json +1 -0
package/INSTALL.md
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# xechat-dsh 安装说明
|
|
2
|
+
|
|
3
|
+
DSH(DeepSeek Harness)侧边栏聊天插件。本文分「普通用户安装」「开发者本地安装」「发布与上架」三部分。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 一、先确认环境
|
|
8
|
+
|
|
9
|
+
| 项目 | 要求 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| DSH 版本 | **0.2.0-rc.1 及以上**(`package.json` 的 `engines.dsh` 声明) |
|
|
12
|
+
| 平台 | **仅 DSH Web 客户端**(`dsh.client.platform: "web"`)。桌面端 Electron 走的是 `desktop` profile,需单独安装,见第四节 |
|
|
13
|
+
| Node | ≥ 20(只有源码安装/本地构建时才需要) |
|
|
14
|
+
| 网络 | 需要能连到 XEChat 服务端(默认端口在插件设置里指定) |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 二、普通用户安装(推荐:预构建包)
|
|
19
|
+
|
|
20
|
+
预构建包已把 Vue 应用、CSS 与插件壳全部打进去,**安装时不需要执行任何构建脚本**,
|
|
21
|
+
因此可以跳过 pnpm ≥10 的 `allowBuilds` 构建授权步骤。
|
|
22
|
+
|
|
23
|
+
### 最快方式:一键脚本
|
|
24
|
+
|
|
25
|
+
仓库根目录有三个等价脚本,按你的系统选一个。它们会**先检查环境、再安装、最后用
|
|
26
|
+
dsh 自己的解析器验证**,任何一步失败都会明确告诉你要改什么。
|
|
27
|
+
|
|
28
|
+
**Windows:**
|
|
29
|
+
|
|
30
|
+
```bat
|
|
31
|
+
install.bat
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
双击也可以(会停在窗口里让你看结果)。它只是 `install.ps1` 的启动器——
|
|
35
|
+
逻辑只写一份,避免两种语言各自实现后行为漂移。
|
|
36
|
+
|
|
37
|
+
**Windows(直接调 PowerShell):**
|
|
38
|
+
|
|
39
|
+
```powershell
|
|
40
|
+
.\install.ps1
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
若提示脚本被禁止运行,加 `-ExecutionPolicy Bypass`(只对本次进程生效,不改系统设置):
|
|
44
|
+
|
|
45
|
+
```powershell
|
|
46
|
+
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**macOS / Linux:**
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
chmod +x install.sh
|
|
53
|
+
./install.sh
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
三个脚本都支持这些参数(sh 用 `--`,PowerShell 用 `-`):
|
|
57
|
+
|
|
58
|
+
| 用途 | sh | PowerShell / bat |
|
|
59
|
+
| --- | --- | --- |
|
|
60
|
+
| 装到桌面端 | `--profile desktop` | `-Profile desktop` |
|
|
61
|
+
| 指定本地包 | `--tgz a.tgz` | `-Tgz a.tgz` |
|
|
62
|
+
| 从仓库装 | `--repo owner/repo` | `-Repo owner/repo` |
|
|
63
|
+
| 只检查环境 | `--dry-run` | `-DryRun` |
|
|
64
|
+
| 卸载 | `--uninstall` | `-Uninstall` |
|
|
65
|
+
| 跳过确认 | `--yes` | `-Yes` |
|
|
66
|
+
|
|
67
|
+
脚本的验证逻辑值得单独说明:它不只看 pnpm 是否报成功(那个结论**不可靠**,
|
|
68
|
+
dsh 的 reconcile 早于 pnpm 写入完成,会误报失败;反过来也曾出现报成功但目录为空),
|
|
69
|
+
而是逐项检查四个关键文件是否存在、`dsh.profile.bundles` 是否注册,
|
|
70
|
+
最后跑一次 `dsh --dump-config` 当作终审。
|
|
71
|
+
|
|
72
|
+
> ⚠️ 如果终审报 `failed to parse overlay ... YAMLException`,那是 **profile 的
|
|
73
|
+
> `cordis.patch.yml` 本身坏了**(多根节点),不是插件问题。脚本会明确指出来。
|
|
74
|
+
|
|
75
|
+
### 方式 A:从 GitHub Release 安装
|
|
76
|
+
|
|
77
|
+
把 `xechat-dsh.tgz` 下载到本地后:
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
dsh plugin --profile web add file:/绝对路径/xechat-dsh.tgz
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
或者直接用 Release 的在线地址(DSH 支持 `https:` 直链):
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
dsh plugin --profile web add https://github.com/chargeduck/xechat-dsh/releases/latest/download/xechat-dsh.tgz
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 方式 B:从插件市场一键安装
|
|
90
|
+
|
|
91
|
+
收录通过后,在 DSH 里安装市场应用:
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
dsh plugin --profile web add dshmarket
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
重启 `dsh web`,打开 **Settings → Plugin Market**,搜索 `xechat`,点安装。
|
|
98
|
+
市场会优先选用预构建 tarball,效果与方式 A 相同。
|
|
99
|
+
|
|
100
|
+
### 方式 C:从源码安装
|
|
101
|
+
|
|
102
|
+
源码安装会触发 pnpm 的构建脚本审批(pnpm ≥10 默认阻止),需要你逐包放行:
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
dsh plugin --profile web add https://github.com/chargeduck/xechat-dsh
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
如果卡在 `allowBuilds` 提示,按终端给出的提示逐个批准后重试即可。
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 三、安装后
|
|
113
|
+
|
|
114
|
+
1. **重启 DSH Web 服务**,然后刷新浏览器页面。
|
|
115
|
+
2. 侧边栏出现在视口**右侧**,是一条 44px 宽的图标条。
|
|
116
|
+
3. 点最上面的箭头展开面板;面板顶部有:
|
|
117
|
+
|
|
118
|
+
| 按钮 | 作用 |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| ◀ / ▶(第一条) | 收起 / 展开面板 |
|
|
121
|
+
| 聊天气泡 | 回到聊天页 |
|
|
122
|
+
| 方框图标 | 左右停靠切换 |
|
|
123
|
+
| 双箭头(最后一条) | **完全隐藏**,只在侧边留一条 14px 细条,点细条恢复 |
|
|
124
|
+
|
|
125
|
+
4. 面板宽度可拖拽左边缘调整(280–720px),停靠位置与宽度存入 `localStorage`,刷新后保持。
|
|
126
|
+
|
|
127
|
+
### 登录 XEChat 服务器
|
|
128
|
+
|
|
129
|
+
插件**不带默认服务器**,首次使用需要在聊天输入框里登录:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
#showServer 拉取鱼塘列表并探测存活
|
|
133
|
+
#login <鱼塘名> 登录指定鱼塘
|
|
134
|
+
#login -h 1.2.3.4 -p 9000 直接指定地址与端口
|
|
135
|
+
#exit 断开连接
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
图片下载走 WebSocket 端口 + 1(例如 ws 用 9000,图片服务在 9001)。
|
|
139
|
+
|
|
140
|
+
### 常见问题
|
|
141
|
+
|
|
142
|
+
**内置浏览器的白色页面和暗色主题不搭?**
|
|
143
|
+
设置里有两个选项:
|
|
144
|
+
- **浏览器配色**:跟随主题 / 深色 / 浅色 / 不做处理。控制 iframe 外框与加载前后露出的底色。
|
|
145
|
+
- **网页降亮**:0–60%,给网页盖一层半透明遮罩,缓解整块白屏的刺眼感。设为 0 即关闭。
|
|
146
|
+
|
|
147
|
+
两者都**只作用于容器与遮罩**,不改写网页内部样式。原因是内置浏览器用 `<iframe>` 承载页面,
|
|
148
|
+
对 B 站、知乎这类跨源站点,同源策略禁止父页面读写其内部 DOM,所以做不到 DarkReader
|
|
149
|
+
那种逐元素反色。遮罩是 `pointer-events: none`,页面内的点击、滚动、拖选都不受影响。
|
|
150
|
+
|
|
151
|
+
如果你内嵌的是**自己的本地服务**(同源),插件会额外给它注入 `color-scheme`,
|
|
152
|
+
让原生滚动条、输入框跟随深浅色。
|
|
153
|
+
|
|
154
|
+
**侧边栏挡住了窗口的最小化/最大化/关闭按钮?**
|
|
155
|
+
已在 0.1.0 修复:面板高度会避开窗口标题栏(读取 DSH 发布的 `--dsh-frame-top-clearance`)。
|
|
156
|
+
如果仍被遮挡,说明你的 DSH 版本没有发布这个令牌,请反馈 DSH 版本号。
|
|
157
|
+
|
|
158
|
+
**点活动栏的关闭按钮没反应?**
|
|
159
|
+
把插件「完全隐藏」后,恢复入口是侧边一条淡化的细条,鼠标移上去会变亮。
|
|
160
|
+
|
|
161
|
+
**面板打开后内容区空白 / 提示「xechat 应用包加载失败」?**
|
|
162
|
+
多半是产物问题,按 F12 看 Console 里以 `xechat-dsh` 开头的报错。开发者可运行
|
|
163
|
+
`npm run verify:bundle` 自查。
|
|
164
|
+
|
|
165
|
+
**macOS 上折叠左侧栏后插件位置不对?**
|
|
166
|
+
插件会读取 `--dsh-frame-leading-clearance` 避让;左侧停靠时,宿主折叠侧栏还会自动把插件收成图标条。
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 四、桌面端(Electron)安装
|
|
171
|
+
|
|
172
|
+
**先试一键脚本**,它已包含本节的全部步骤:
|
|
173
|
+
|
|
174
|
+
```powershell
|
|
175
|
+
.\install.ps1 -Profile desktop
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
如果脚本走到最后一步报 `managed exclusively by the Electron application`,
|
|
179
|
+
说明该 profile 由应用独占管理,CLI 无法验证加载结果——**这不算失败**,
|
|
180
|
+
直接用应用重启确认即可。
|
|
181
|
+
|
|
182
|
+
如果 pnpm 在该 profile 下误判「已安装」并静默跳过(实测会遇到),
|
|
183
|
+
改用目录联接(junction):
|
|
184
|
+
|
|
185
|
+
```powershell
|
|
186
|
+
# 1. 先完全退出 DeepSeek Harness(否则写入会被静默丢弃)
|
|
187
|
+
New-Item -ItemType Junction `
|
|
188
|
+
-Path "$env:USERPROFILE\.dsh\profiles\desktop\node_modules\xechat-dsh" `
|
|
189
|
+
-Target "E:\path\to\xechat-dsh"
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
```jsonc
|
|
193
|
+
// 2. 编辑 %USERPROFILE%\.dsh\profiles\desktop\package.json,追加两处
|
|
194
|
+
{
|
|
195
|
+
"dependencies": { "xechat-dsh": "link:E:/path/to/xechat-dsh" },
|
|
196
|
+
"dsh": { "profile": { "bundles": ["...", "xechat-dsh"] } }
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
重启 DeepSeek Harness 即可。用 junction 的好处是改完源码重新 `npm run build` 就生效,不用重装。
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 五、开发者:本地构建
|
|
205
|
+
|
|
206
|
+
```sh
|
|
207
|
+
npm install
|
|
208
|
+
|
|
209
|
+
npm run build # 两步:vite 打 Vue 应用 → tsdown 打包插件
|
|
210
|
+
npm test # 36 项测试
|
|
211
|
+
npm run verify:dock # 真实渲染验证三态(open / collapsed / paused)
|
|
212
|
+
npm run verify:bundle # 端到端验证 client.js 加载链路
|
|
213
|
+
|
|
214
|
+
npm pack # 产出 xechat-dsh-0.1.0.tgz
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
构建产物:
|
|
218
|
+
|
|
219
|
+
| 文件 | 说明 |
|
|
220
|
+
| --- | --- |
|
|
221
|
+
| `lib/xechat-app.js` | Vue 应用 IIFE,约 3.9 MB |
|
|
222
|
+
| `lib/xechat-app.css` | 应用样式,约 446 KB |
|
|
223
|
+
| `lib/client.js` | 插件客户端 bundle(CJS 闭包,内联了上面两个),约 4.5 MB |
|
|
224
|
+
| `lib/index.js` | host half,ESM,Node 侧空实现 |
|
|
225
|
+
|
|
226
|
+
> `lib/client.js` 是**构建产物,必须提交到仓库**。市场走源码安装时不会为你跑构建,
|
|
227
|
+
> 而且仓库里没有 `node_modules` 也跑不了。
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 chargeduck
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,124 @@
|
|
|
1
|
-
#
|
|
1
|
+
# xechat-dsh
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> XEChat 的 DeepSeek Harness 侧边栏客户端:可停靠的摸鱼聊天面板,写代码时鱼塘不掉线。
|
|
4
|
+
|
|
5
|
+
`xechat-dsh` 是 `xechat-web` 的 DSH 移植版。与原版不同,它不依赖任何 IDE 插件宿主,
|
|
6
|
+
作为 DSH Web UI 的独立插件运行,只用一条 WebSocket 连接 XEChat 服务端。
|
|
7
|
+
|
|
8
|
+
## 功能
|
|
9
|
+
|
|
10
|
+
- **可停靠侧边栏**:贴靠视口左侧或右侧,一键切换;面板宽度可拖拽调节(280–720px)。
|
|
11
|
+
- **聊天**:Markdown 渲染、图片消息、表情、@ 提醒分级通知、跨塘邀请。
|
|
12
|
+
- **鱼塘管理**:`#showServer` 拉取鱼塘列表并探测 TCP/WS 存活,`#login` 登录指定服务器。
|
|
13
|
+
- **在线列表**:查看当前鱼塘在线用户及状态。
|
|
14
|
+
- **游戏**:从 manager 游戏大厅加载,单机游戏 iframe 运行,联机游戏由 MatchLobby SDK 承载房间。
|
|
15
|
+
- **内置浏览器**:受限站点可切到系统浏览器打开;容器配色跟随主题,可叠加降亮遮罩。
|
|
16
|
+
- **摸鱼防护**:紧急模式快捷键全屏显示伪装内容、面板透明度调节、主题切换。
|
|
17
|
+
- **布局持久化**:停靠位置、宽度、可视状态存入 `localStorage`,刷新后恢复。
|
|
18
|
+
|
|
19
|
+
## 安装
|
|
20
|
+
|
|
21
|
+
一键脚本(推荐,会校验环境并验证安装结果):
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
# macOS / Linux
|
|
25
|
+
./install.sh
|
|
26
|
+
|
|
27
|
+
# Windows
|
|
28
|
+
install.bat
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
或直接用 dsh 命令:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
# 预构建包,跳过构建授权步骤
|
|
35
|
+
dsh plugin --profile web add https://github.com/chargeduck/xechat-dsh/releases/latest/download/xechat-dsh.tgz
|
|
36
|
+
|
|
37
|
+
# 从源码安装
|
|
38
|
+
dsh plugin --profile web add https://github.com/chargeduck/xechat-dsh
|
|
39
|
+
|
|
40
|
+
# 本地开发时链接源码目录
|
|
41
|
+
dsh plugin --profile web add link:/absolute/path/to/xechat-dsh
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
安装后**重启 `dsh web`** 并刷新页面。侧边栏出现在视口右侧,点击活动栏第一条图标开合。
|
|
45
|
+
|
|
46
|
+
详细说明见 [INSTALL.md](./INSTALL.md)。
|
|
47
|
+
|
|
48
|
+
### 本地开发
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
npm install
|
|
52
|
+
npm run dev # 独立浏览器预览 Vue 应用(无需 DSH)
|
|
53
|
+
npm run build # 先构建 Vue 应用,再打包插件 bundle
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`npm run build` 产出:
|
|
57
|
+
|
|
58
|
+
| 文件 | 说明 |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| `lib/xechat-app.js` | Vue + Element Plus 应用(IIFE,全局 `__XECHAT_DSH_APP__`) |
|
|
61
|
+
| `lib/xechat-app.css` | 应用样式 |
|
|
62
|
+
| `lib/client.js` | 插件客户端 bundle(CJS 闭包,`__ModuleLoader__.load` 注册) |
|
|
63
|
+
| `lib/index.js` | 宿主侧(空实现) |
|
|
64
|
+
|
|
65
|
+
## 使用
|
|
66
|
+
|
|
67
|
+
登录需要一个可达的 XEChat 服务端:
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
# 直接指定地址
|
|
71
|
+
#login <用户名> -h <host> -p <port>
|
|
72
|
+
|
|
73
|
+
# 或先从鱼塘列表选
|
|
74
|
+
#showServer
|
|
75
|
+
#login <用户名> -s 0
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
常用命令:`#exit` 断开、`#showStatus` 查看状态、`#mode` / `#notify` / `#alive` 摸鱼相关开关、`#help` 查看全部。
|
|
79
|
+
|
|
80
|
+
## 权限与网络
|
|
81
|
+
|
|
82
|
+
| 项目 | 说明 |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| WebSocket | 连接 `ws://<host>:<port+1>/xechat`(用户通过 `#login` 或鱼塘列表指定) |
|
|
85
|
+
| HTTPS 请求 | 拉取鱼塘列表(默认 `https://dld.lesscoding.net/api/server/list`) |
|
|
86
|
+
| localStorage | 保存登录信息、面板布局、快捷键等偏好 |
|
|
87
|
+
| 凭据 | 插件不收集、不外传任何凭据;管理员 Token 仅存于本地并在登录时随 `LOGIN` 帧上报 |
|
|
88
|
+
|
|
89
|
+
插件不含遥测,不向第三方发送数据。
|
|
90
|
+
|
|
91
|
+
## 兼容性
|
|
92
|
+
|
|
93
|
+
| 依赖 | 版本 |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| DSH Web 客户端 | `>= 0.2.0-rc.1` |
|
|
96
|
+
| 运行时 | 仅 Web(`dsh.client.platform = "web"`);桌面端需装到 `desktop` profile,TUI 不可用 |
|
|
97
|
+
| Node(构建期) | `>= 20` |
|
|
98
|
+
| react / react-dom | `^18.2.0`(peer,由 DSH Web shell 提供) |
|
|
99
|
+
|
|
100
|
+
DSH 处于 developer preview,接口可能变动。以上兼容性声明基于 2026-10 的公开文档,
|
|
101
|
+
宿主升级后请重新验证。
|
|
102
|
+
|
|
103
|
+
## 与原版(xechat-web)的差异
|
|
104
|
+
|
|
105
|
+
| 方面 | xechat-web | xechat-dsh |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| 宿主 | IntelliJ 插件 / VSCode 扩展 | DSH Web 插件 |
|
|
108
|
+
| 传输 | JSBridge(JCEF)+ WebSocket | **仅 WebSocket** |
|
|
109
|
+
| 宿主通信 | `window.xechat.*`(getState/getTools/httpGet…) | 无,全部走 WS 或 `fetch` |
|
|
110
|
+
| 工具面板 | 有(宿主下发工具列表) | 已移除(纯 WS 无数据源) |
|
|
111
|
+
| 文字样式管理 | 工具面板进入 | 设置面板进入 |
|
|
112
|
+
| 外链打开 | 宿主原生浏览器 | `window.open` 新标签 |
|
|
113
|
+
| 图标资源 | 随插件打包 | 同左,样式与 DSH 令牌对齐 |
|
|
114
|
+
|
|
115
|
+
## 已知限制
|
|
116
|
+
|
|
117
|
+
- 面板内容区在打开时才挂载 Vue 应用;关闭面板即卸载,重新打开会重建 store(登录态保留在 localStorage 中,但当前会话需重连)。
|
|
118
|
+
- 自动隐藏(`edge` 模式)目前仅在布局层预留,未在 UI 暴露开关。
|
|
119
|
+
- 移动端窄视口下面板宽度受 `calc(100vw - 44px)` 限制。
|
|
120
|
+
- 游戏与浏览器面板依赖 manager 侧接口,离线环境下不可用。
|
|
121
|
+
|
|
122
|
+
## 许可
|
|
123
|
+
|
|
124
|
+
MIT,见 [LICENSE](./LICENSE)。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# xechat-dsh bundle patch
|
|
2
|
+
#
|
|
3
|
+
# 由 `dsh plugin --profile web add <repo>` 追加到 profile 的 bundle 栈。
|
|
4
|
+
# 插入一条 loader row:Node 侧为空的 host half,浏览器侧由
|
|
5
|
+
# dsh.client.platform = "web" + exports["./client"] 发现并加载 lib/client.js。
|
|
6
|
+
- insert:
|
|
7
|
+
- id: xechat-dsh
|
|
8
|
+
name: 'xechat-dsh'
|
package/install.bat
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
chcp 65001 >nul 2>&1
|
|
3
|
+
rem ===========================================================================
|
|
4
|
+
rem xechat-dsh installer (Windows)
|
|
5
|
+
rem
|
|
6
|
+
rem This .bat is only a launcher for install.ps1 - the real logic lives in
|
|
7
|
+
rem PowerShell so that environment probing, error handling and verification
|
|
8
|
+
rem exist in exactly one place. Two implementations would drift apart and
|
|
9
|
+
rem every bug would have to be fixed twice.
|
|
10
|
+
rem
|
|
11
|
+
rem NOTE: keep this file ASCII-only. cmd.exe reads .bat in the OEM codepage
|
|
12
|
+
rem (GBK on zh-CN Windows), so UTF-8 Chinese comments get mangled into
|
|
13
|
+
rem commands and the script fails with "'xxx' is not recognized".
|
|
14
|
+
rem
|
|
15
|
+
rem Usage:
|
|
16
|
+
rem install.bat install into the web profile
|
|
17
|
+
rem install.bat -Profile desktop install into the desktop profile
|
|
18
|
+
rem install.bat -Tgz xechat-dsh-0.1.0.tgz
|
|
19
|
+
rem install.bat -DryRun check environment only
|
|
20
|
+
rem install.bat -Uninstall uninstall
|
|
21
|
+
rem ===========================================================================
|
|
22
|
+
|
|
23
|
+
setlocal EnableExtensions
|
|
24
|
+
|
|
25
|
+
set "SCRIPT_DIR=%~dp0"
|
|
26
|
+
set "PS1=%SCRIPT_DIR%install.ps1"
|
|
27
|
+
|
|
28
|
+
if not exist "%PS1%" (
|
|
29
|
+
echo [X] install.ps1 not found
|
|
30
|
+
echo It should sit next to this file: %SCRIPT_DIR%
|
|
31
|
+
exit /b 1
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
rem Prefer pwsh (PowerShell 7+), fall back to the bundled powershell (5.1)
|
|
35
|
+
set "PS_EXE="
|
|
36
|
+
where pwsh >nul 2>&1 && set "PS_EXE=pwsh"
|
|
37
|
+
if not defined PS_EXE (
|
|
38
|
+
where powershell >nul 2>&1 && set "PS_EXE=powershell"
|
|
39
|
+
)
|
|
40
|
+
if not defined PS_EXE (
|
|
41
|
+
echo [X] PowerShell not found
|
|
42
|
+
echo Windows 10/11 ships powershell.exe; install PowerShell 7 if it is really missing
|
|
43
|
+
exit /b 1
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
rem -NoProfile : avoid aliases / policies from the user profile
|
|
47
|
+
rem -ExecutionPolicy Bypass : applies to this process only, changes no system setting
|
|
48
|
+
"%PS_EXE%" -NoProfile -ExecutionPolicy Bypass -File "%PS1%" %*
|
|
49
|
+
|
|
50
|
+
set "RC=%ERRORLEVEL%"
|
|
51
|
+
if not "%RC%"=="0" (
|
|
52
|
+
echo.
|
|
53
|
+
echo Installer exited with code %RC%. See the messages above.
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
rem When launched by double-click the window would vanish instantly; wait for input
|
|
57
|
+
if "%~1"=="" (
|
|
58
|
+
echo.
|
|
59
|
+
pause
|
|
60
|
+
)
|
|
61
|
+
exit /b %RC%
|