dsh-desktop-windows 0.3.0 → 0.4.0

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.en.md CHANGED
@@ -19,7 +19,7 @@ Pure shell — it **does not modify dsh itself**. The server reuses your globall
19
19
  - 🗂️ **Session manager**: `Alt → File → Session Manager…` lists every session, delete with one click (permanently removes chat history)
20
20
  - 🪟 **Standalone window**: native desktop window loading the Harness Web UI
21
21
  - 🍱 **System tray**: closing the window minimizes to the tray; right-click to show or quit
22
- - 🔄 **Easy reload**: `F5` / `Ctrl+R` / floating button — load new plugins without restarting the window
22
+ - 🔄 **Easy reload**: `F5` / `Ctrl+R` / floating button — reloads the Web UI; frontend plugins (skins, layout, enhancements) take effect on reload without restarting the app
23
23
  - 🧭 **Auto environment setup**: on first launch it detects Node.js / dsh and guides a one-click install — friendly to non-technical users
24
24
  - 🔧 **Configurable port**: `npm start -- --port 3081` when 3080 is taken
25
25
  - 🧠 **Smart reuse**: reuses an already-running dsh service instead of starting a duplicate
package/README.md CHANGED
@@ -1,104 +1,132 @@
1
- # dsh-desktop
2
-
3
- [中文](README.md) | [English](README.en.md)
4
-
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6
- [![Electron](https://img.shields.io/badge/Electron-43-blue)](https://www.electronjs.org/)
7
- [![dsh](https://img.shields.io/badge/dsh-0.1.0--rc.6-purple)](https://github.com/deepseek-ai/deepseek-harness)
8
- [![Platform](https://img.shields.io/badge/Platform-Windows-0078D6)]()
9
- [![Build](https://github.com/ReachGa0/dsh-desktop/actions/workflows/build.yml/badge.svg)](https://github.com/ReachGa0/dsh-desktop/actions)
10
- [![awesome-dsh-plugin](https://img.shields.io/badge/awesome--dsh--plugin-listed-8A2BE2)](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)
11
-
12
- > **English summary** · An [Electron](https://www.electronjs.org/) desktop shell for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (dsh web) on **Windows** — double-click to run the harness in a standalone window. **Region screenshot to ask AI**, system tray, session manager, auto environment setup. Full English docs: [README.en.md](README.en.md)
13
-
14
- DeepSeek Harness 的 **Electron 桌面壳**:双击图标,一个独立窗口运行 `dsh web` —— 不用开终端、不用敲命令、不用切浏览器。
15
-
16
- 纯壳,**不改动 dsh 本身**。服务端复用全局安装的 `@deepseek-ai/dsh`。
17
-
18
- ## ✨ 特性
19
-
20
- - 📸 **选区截图提问**:一键截屏 → 全屏遮罩实时框选(GPU 加速、8 方向手柄微调)→ 自动粘贴到聊天框 → AI 直接看图回答;截图时自动隐藏聊天窗口
21
- - 🗂️ **会话管理**:`Alt 文件 会话管理…` 列出所有会话,一键删除(永久清理聊天记录)
22
- - 🪟 **独立窗口**:原生桌面窗口加载 Harness Web UI,可最小化到任务栏
23
- - 🍱 **系统托盘**:关窗口最小化到托盘常驻,右键菜单可随时显示/退出
24
- - 🔄 **便捷刷新**:`F5` / `Ctrl+R` / 右下角悬浮按钮,加载新插件不用重启窗口
25
- - 🧭 **环境自动引导**:首次启动自动检测 Node.js / dsh,缺失时引导一键安装,小白也能搞定
26
- - 🔧 **可换端口**:`npm start -- --port 3081` 解决端口占用
27
- - 🧠 **智能复用**:检测到已有的 dsh 服务就直接复用,不重复启动
28
- - 🧹 **干净退出**:关窗口只杀自己启动的 dsh 进程,绝不误杀外部服务
29
- - 🔒 **单实例锁**:防止双开冲突
30
- - 🎨 **安全加固**:`contextIsolation` + `sandbox` + 禁用 Node 集成,外部链接走系统浏览器
31
- - 📦 **一键安装包**:`npm run dist` 生成 NSIS 安装程序
32
-
33
- ## 原理
34
-
35
- 1. 启动时探测 `127.0.0.1:3080` 是否已有 dsh 服务;
36
- 2. 没有 → 自动执行 `dsh web --port 3080`(日志在 `%APPDATA%/DeepSeek Harness Desktop/dsh.log`);
37
- 3. 就绪后打开 Electron 窗口加载 Web UI;
38
- 4. 关窗口自动杀掉由本壳启动的 dsh 进程树(手动起的外部服务不会被误杀)。
39
-
40
- ## 📸 选区截图提问
41
-
42
- ![选区截图直接问 AI 演示](docs/demo/screenshot-ask.gif)
43
-
44
- 1. 点右下角 **📸**(聊天窗口自动隐藏)
45
- 2. 全屏遮罩上**拖动框选**区域(实时显示,画完可拖 8 个手柄微调)
46
- 3. **✔ 确定**(或双击 / 回车)→ 聊天窗口恢复
47
- 4. 截图自动进入聊天框 输入问题 AI 看图回答
48
-
49
- > 配合 [ModLens](https://www.npmjs.com/package/@liustack/modlens) 等识图插件,DeepSeek 文本模型也能看懂图片。
50
- > 截图同时自动保存到 `~/.dsh/screenshots/`(托盘右键可打开目录)。
51
-
52
- ## 前提
53
-
54
- - Node.js 22(v24 验证通过)
55
- - 全局安装 dsh:`npm i -g @deepseek-ai/dsh`(0.1.0-rc.6 验证通过)
56
- - 如需覆盖 dsh 路径,设置环境变量 `DSH_BIN`(例如指向源码构建的 `apps/cli/src/bin.ts`)
57
-
58
- ## 安装与运行
59
-
60
- ```sh
61
- cd Desktop\deepseek_work\dsh-desktop
62
- npm install
63
- npm start
64
- ```
65
-
66
- > 国内网络下 Electron 二进制下载可能很慢或失败,用镜像:
67
- > ```sh
68
- > set "ELECTRON_MIRROR=https://cdn.npmmirror.com/binaries/electron/"
69
- > npm install
70
- > ```
71
-
72
- **换端口**(3080 被占用时):
73
-
74
- ```sh
75
- npm start -- --port 3081
76
- ```
77
-
78
- 首次打开后:**设置 → 模型 → 填入 DeepSeek API Key**,然后选择工作区即可使用。
79
-
80
- ## 打包成安装程序
81
-
82
- ```sh
83
- npm run dist
84
- ```
85
-
86
- 产物在 `release/` 下:`dsh-desktop-<版本>-setup.exe`(NSIS 安装包)。
87
-
88
- 自定义图标:放一个 `assets/icon.ico`(≥256×256),并在 `package.json` 的 `build.win` 里加 `"icon": "assets/icon.ico"`。
89
-
90
- ## 常见问题
91
-
92
- - **启动失败弹窗**:看 `%APPDATA%/DeepSeek Harness Desktop/dsh.log`;确认 `dsh --version` 可用。
93
- - **端口被占**:用 `npm start -- --port <新端口>` 换一个端口即可。
94
- - **改了 dsh 版本**:重新 `npm i -g @deepseek-ai/dsh` 即可,壳无需改动。
95
- - **截图没进聊天框**:点一下输入框按 `Ctrl+V`(截图已在剪贴板)。
96
- - **关闭窗口后应用还在**:正常!它最小化到托盘了,右键托盘图标选"退出"。
97
-
98
- ## 贡献
99
-
100
- 欢迎提 Issue 和 PR!项目很小,代码都在 `src/` 里,容易上手。
101
-
102
- ## License
103
-
104
- [MIT](LICENSE)
1
+ # dsh-desktop
2
+
3
+ [中文](README.md) | [English](README.en.md)
4
+
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6
+ [![Electron](https://img.shields.io/badge/Electron-43-blue)](https://www.electronjs.org/)
7
+ [![dsh](https://img.shields.io/badge/dsh-0.1.0--rc.6-purple)](https://github.com/deepseek-ai/deepseek-harness)
8
+ [![Platform](https://img.shields.io/badge/Platform-Windows-0078D6)]()
9
+ [![Build](https://github.com/ReachGa0/dsh-desktop/actions/workflows/build.yml/badge.svg)](https://github.com/ReachGa0/dsh-desktop/actions)
10
+ [![awesome-dsh-plugin](https://img.shields.io/badge/awesome--dsh--plugin-listed-8A2BE2)](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)
11
+
12
+ > **English summary** · An [Electron](https://www.electronjs.org/) desktop shell for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (dsh web) on **Windows** — double-click to run the harness in a standalone window. **Region screenshot to ask AI**, system tray, session manager, auto environment setup. Full English docs: [README.en.md](README.en.md)
13
+
14
+ DeepSeek Harness 的 **Electron 桌面壳**:双击图标,一个独立窗口运行 `dsh web` —— 不用开终端、不用敲命令、不用切浏览器。
15
+
16
+ 纯壳,**不改动 dsh 本身**。服务端复用全局安装的 `@deepseek-ai/dsh`。
17
+
18
+ ## ✨ 特性
19
+
20
+ - 📸 **选区截图提问**:一键截屏 → 全屏遮罩实时框选(GPU 加速、8 方向手柄微调)→ 自动粘贴到聊天框 → AI 直接看图回答;截图时自动隐藏聊天窗口
21
+ - 🔌 **远程连接(可选)**:DSH 跑在 NAS / Docker / 内网服务器?在连接页填地址即可;局域网 IP 自动补 `http`、域名自动补 `https`,服务器离线自动回连接页(可选每 8 秒重试),不影响本机默认体验
22
+ - ⬆️ **DSH 一键更新(本机模式)**:托盘「检查 DSH 更新」→ 确认后自动 `npm install -g` → 重启托管的 dsh 进程 → 自动重连,全程不用开终端
23
+ - 🗂️ **会话管理**:`Alt → 文件 → 会话管理…` 列出所有会话,一键删除(永久清理聊天记录)
24
+ - 🪟 **独立窗口**:原生桌面窗口加载 Harness Web UI,可最小化到任务栏
25
+ - 🍱 **系统托盘**:关窗口最小化到托盘常驻,右键菜单可随时显示/退出
26
+ - 🔄 **便捷刷新**:`F5` / `Ctrl+R` / 右下角悬浮按钮,重新加载 Web UI——前端类插件(皮肤、布局、增强)装完刷新即生效,无需重启应用
27
+ - 🧭 **环境自动引导**:首次启动自动检测 Node.js / dsh,缺失时引导一键安装,小白也能搞定
28
+ - 🔧 **可换端口**:`npm start -- --port 3081` 解决端口占用
29
+ - 🧠 **智能复用**:检测到已有的 dsh 服务就直接复用,不重复启动
30
+ - 🧹 **干净退出**:关窗口只杀自己启动的 dsh 进程,绝不误杀外部服务
31
+ - 🔒 **单实例锁**:防止双开冲突
32
+ - 🎨 **安全加固**:`contextIsolation` + `sandbox` + 禁用 Node 集成,外部链接走系统浏览器
33
+ - 📦 **一键安装包**:`npm run dist` 生成 NSIS 安装程序
34
+
35
+ ## 原理
36
+
37
+ 1. 启动时探测 `127.0.0.1:3080` 是否已有 dsh 服务;
38
+ 2. 没有自动执行 `dsh web --port 3080`(日志在 `%APPDATA%/DeepSeek Harness Desktop/dsh.log`);
39
+ 3. 就绪后打开 Electron 窗口加载 Web UI;
40
+ 4. 关窗口 → 自动杀掉由本壳启动的 dsh 进程树(手动起的外部服务不会被误杀)。
41
+
42
+ ## 🔌 远程连接(可选)
43
+
44
+ DSH 不一定要跑在本机。首次启动会出现连接页:
45
+
46
+ - **💻 本机连接(默认)**:完全走上面的本地流程——探测 3080、没有则自动启动 dsh、缺失环境走引导安装
47
+ - **远程地址**:DSH 跑在 NAS(Docker)、内网服务器等,直接填 `https://你的域名` `http://192.168.x.x:3080`
48
+ - 局域网 IP / loopback 自动补 `http://`,域名自动补 `https://`
49
+ - 连接地址会被记住(`%APPDATA%/DeepSeek Harness Desktop/config.json`),下次自动进入
50
+ - 服务器离线时回到连接页,可勾选「每 8 秒自动重试」,恢复后自动进入
51
+ - 支持 URL 内嵌 Basic Auth(`https://user:pass@host/`)与自签名证书(仅限已配置的主机)
52
+ - 远程模式下自动隐藏本机管理项(会话管理 / 重启服务 / DSH 更新),托盘显示当前服务器
53
+ - 随时切换:托盘右键或 `Alt → 文件 → 连接设置…`
54
+ - 临时指定(不覆盖已保存地址):`npm start -- --url https://dsh.example.com`
55
+
56
+ ## ⬆️ DSH 一键更新(本机模式)
57
+
58
+ 托盘右键或 `Alt → 文件 → 检查 DSH 更新`:
59
+
60
+ 1. 静默对比本机 `dsh --version` 与 npm 最新版(支持 `-rc.N` 等预发布号比较)
61
+ 2. 发现新版 → 弹窗确认 → 自动执行 `npm install -g @deepseek-ai/dsh@latest`
62
+ 3. 自动重启本壳托管的 dsh 进程 → 轮询端口就绪 → 自动重连窗口
63
+
64
+ > 仅对由本壳启动的 dsh 生效(启动 3 秒后也会静默检查一次)。
65
+ > 复用了外部服务或远程模式时,请在对应环境手动更新。
66
+
67
+ ## 📸 选区截图提问
68
+
69
+ ![选区截图直接问 AI 演示](docs/demo/screenshot-ask.gif)
70
+
71
+ 1. 点右下角 **📸**(聊天窗口自动隐藏)
72
+ 2. 全屏遮罩上**拖动框选**区域(实时显示,画完可拖 8 个手柄微调)
73
+ 3. 点 **✔ 确定**(或双击 / 回车)→ 聊天窗口恢复
74
+ 4. 截图自动进入聊天框 → 输入问题 → AI 看图回答
75
+
76
+ > 配合 [ModLens](https://www.npmjs.com/package/@liustack/modlens) 等识图插件,DeepSeek 文本模型也能看懂图片。
77
+ > 截图同时自动保存到 `~/.dsh/screenshots/`(托盘右键可打开目录)。
78
+
79
+ ## 前提
80
+
81
+ - Node.js ≥ 22(v24 验证通过)
82
+ - 全局安装 dsh:`npm i -g @deepseek-ai/dsh`(0.1.0-rc.6 验证通过)
83
+ - 如需覆盖 dsh 路径,设置环境变量 `DSH_BIN`(例如指向源码构建的 `apps/cli/src/bin.ts`)
84
+
85
+ ## 安装与运行
86
+
87
+ ```sh
88
+ cd Desktop\deepseek_work\dsh-desktop
89
+ npm install
90
+ npm start
91
+ ```
92
+
93
+ > 国内网络下 Electron 二进制下载可能很慢或失败,用镜像:
94
+ > ```sh
95
+ > set "ELECTRON_MIRROR=https://cdn.npmmirror.com/binaries/electron/"
96
+ > npm install
97
+ > ```
98
+
99
+ **换端口**(3080 被占用时):
100
+
101
+ ```sh
102
+ npm start -- --port 3081
103
+ ```
104
+
105
+ 首次打开后:**设置 → 模型 → 填入 DeepSeek API Key**,然后选择工作区即可使用。
106
+
107
+ ## 打包成安装程序
108
+
109
+ ```sh
110
+ npm run dist
111
+ ```
112
+
113
+ 产物在 `release/` 下:`dsh-desktop-<版本>-setup.exe`(NSIS 安装包)。
114
+
115
+ 自定义图标:放一个 `assets/icon.ico`(≥256×256),并在 `package.json` 的 `build.win` 里加 `"icon": "assets/icon.ico"`。
116
+
117
+ ## 常见问题
118
+
119
+ - **启动失败弹窗**:看 `%APPDATA%/DeepSeek Harness Desktop/dsh.log`;确认 `dsh --version` 可用。
120
+ - **端口被占**:用 `npm start -- --port <新端口>` 换一个端口即可。
121
+ - **改了 dsh 版本**:重新 `npm i -g @deepseek-ai/dsh` 即可,壳无需改动;也可以直接用托盘里的「检查 DSH 更新」一键完成。
122
+ - **想连远程/NAS 上的 DSH**:托盘右键 → 连接设置…,填远程地址即可;本机功能(会话管理、重启服务、DSH 更新)会自动隐藏。
123
+ - **截图没进聊天框**:点一下输入框按 `Ctrl+V`(截图已在剪贴板)。
124
+ - **关闭窗口后应用还在**:正常!它最小化到托盘了,右键托盘图标选"退出"。
125
+
126
+ ## 贡献
127
+
128
+ 欢迎提 Issue 和 PR!项目很小,代码都在 `src/` 里,容易上手。
129
+
130
+ ## License
131
+
132
+ [MIT](LICENSE)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-desktop-windows",
3
3
  "productName": "DeepSeek Harness Desktop",
4
- "version": "0.3.0",
4
+ "version": "0.4.0",
5
5
  "description": "DeepSeek Harness 桌面版(Windows)· Electron desktop shell for DeepSeek Harness — 双击即用 / double-click to run · 支持选区截图提问、系统托盘、会话管理 / region screenshot, system tray, session manager",
6
6
  "main": "src/main.js",
7
7
  "license": "MIT",
@@ -65,3 +65,5 @@
65
65
  }
66
66
  }
67
67
 
68
+
69
+
@@ -0,0 +1,88 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>连接 DSH — DeepSeek Harness Desktop</title>
6
+ <style>
7
+ :root { color-scheme: dark; }
8
+ * { box-sizing: border-box; }
9
+ body {
10
+ margin: 0; height: 100vh;
11
+ display: flex; align-items: center; justify-content: center;
12
+ background: #0d1117; color: #e6edf3;
13
+ font-family: system-ui, 'Microsoft YaHei', sans-serif;
14
+ user-select: none;
15
+ }
16
+ .card {
17
+ width: min(520px, calc(100vw - 48px));
18
+ padding: 36px 40px 30px;
19
+ background: #161b22;
20
+ border: 1px solid #30363d;
21
+ border-radius: 14px;
22
+ text-align: center;
23
+ }
24
+ .logo { width: 64px; height: 64px; margin-bottom: 14px; opacity: 0.92; }
25
+ h1 { font-size: 19px; font-weight: 600; margin: 0 0 6px; }
26
+ .sub { font-size: 12.5px; color: #8b949e; margin: 0 0 20px; line-height: 1.6; }
27
+ button {
28
+ cursor: pointer; border-radius: 8px; font-size: 13px;
29
+ border: 1px solid #30363d; background: #21262d; color: #c9d1d9;
30
+ padding: 7px 14px; transition: background .15s, border-color .15s;
31
+ }
32
+ button:hover { background: #30363d; border-color: #8d96a0; }
33
+ button:disabled { opacity: 0.5; cursor: default; }
34
+ button.primary {
35
+ background: #1f6feb; border-color: #1f6feb; color: #fff;
36
+ font-weight: 600; padding: 9px 26px; font-size: 14px;
37
+ }
38
+ button.primary:hover { background: #388bfd; }
39
+ #btn-local {
40
+ display: block; width: 100%;
41
+ padding: 13px 20px; font-size: 15px; margin-bottom: 18px;
42
+ }
43
+ .or {
44
+ display: flex; align-items: center; gap: 12px;
45
+ color: #484f58; font-size: 12px; margin-bottom: 14px;
46
+ }
47
+ .or::before, .or::after { content: ''; flex: 1; height: 1px; background: #30363d; }
48
+ input#addr {
49
+ width: 100%; padding: 10px 12px; font-size: 13.5px;
50
+ background: #0d1117; color: #e6edf3;
51
+ border: 1px solid #30363d; border-radius: 8px; outline: none;
52
+ user-select: text;
53
+ }
54
+ input#addr:focus { border-color: #1f6feb; box-shadow: 0 0 0 2px rgba(31,111,235,.25); }
55
+ .actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; }
56
+ .auto { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #8b949e; margin-right: auto; cursor: pointer; }
57
+ .auto input { accent-color: #1f6feb; cursor: pointer; }
58
+ #status { min-height: 34px; margin-top: 14px; font-size: 12.5px; line-height: 1.55; white-space: pre-line; }
59
+ #status.err { color: #f85149; }
60
+ #status.ok { color: #3fb950; }
61
+ #status.muted { color: #8b949e; }
62
+ #hint { margin-top: 4px; font-size: 11.5px; color: #484f58; line-height: 1.6; }
63
+ </style>
64
+ </head>
65
+ <body>
66
+ <div class="card">
67
+ <img class="logo" src="../assets/whale-256.png" alt="">
68
+ <h1>连接到你的 DeepSeek Harness</h1>
69
+ <p class="sub">DSH 可以跑在本机,也可以跑在远程服务器(NAS / Docker / 内网主机)。<br>选择后会被记住,下次自动进入;随时可从托盘菜单切换。</p>
70
+
71
+ <button id="btn-local" class="primary">💻 本机连接(推荐)</button>
72
+
73
+ <div class="or">或连接远程服务器</div>
74
+
75
+ <input id="addr" spellcheck="false" autocomplete="off"
76
+ placeholder="例如 https://dsh.example.com 或 http://192.168.31.10:3080">
77
+
78
+ <div class="actions">
79
+ <label class="auto" id="auto-wrap"><input type="checkbox" id="auto">每 8 秒自动重试</label>
80
+ <button id="btn-cancel">返回应用</button>
81
+ <button id="btn-go" class="primary">连 接</button>
82
+ </div>
83
+
84
+ <div id="status"></div>
85
+ <div id="hint"></div>
86
+ </div>
87
+ </body>
88
+ </html>