dsh-splash-launcher 1.0.0 → 1.3.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/DSH-GUI.exe +0 -0
- package/LICENSE +28 -28
- package/README.en.md +43 -30
- package/README.md +171 -161
- package/lib/index.js +64 -64
- package/package.json +42 -39
- package/splash.html +448 -379
package/DSH-GUI.exe
CHANGED
|
Binary file
|
package/LICENSE
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Isilsolme and contributors
|
|
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.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
Brand assets notice: `whale.png`, `deepseek-wordmark.svg` and `whale-anim.svg`
|
|
26
|
-
are derived from the DeepSeek Harness (`@deepseek-ai/dsh`, MIT, © 2026 DeepSeek)
|
|
27
|
-
web frontend favicon / wordmark assets. They remain DeepSeek brand assets; the
|
|
28
|
-
DeepSeek name and whale logo are trademarks of their respective owner.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Isilsolme and contributors
|
|
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.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Brand assets notice: `whale.png`, `deepseek-wordmark.svg` and `whale-anim.svg`
|
|
26
|
+
are derived from the DeepSeek Harness (`@deepseek-ai/dsh`, MIT, © 2026 DeepSeek)
|
|
27
|
+
web frontend favicon / wordmark assets. They remain DeepSeek brand assets; the
|
|
28
|
+
DeepSeek name and whale logo are trademarks of their respective owner.
|
package/README.en.md
CHANGED
|
@@ -1,30 +1,43 @@
|
|
|
1
|
-
# DSH GUI
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
# DSH GUI
|
|
2
|
+
|
|
3
|
+
[](https://awesome-dsh-plugin.com)
|
|
4
|
+
|
|
5
|
+
A one-click Windows launcher for the DeepSeek Harness (`dsh`) Web GUI with a borderless WPF startup animation (stroke-by-stroke "HARNESS" lettering inspired by SPlayer-Next). It starts `dsh web` in the background, preloads the real GUI behind the animation, and fades into it only when the GUI is actually ready. Closing the window stops the service it started.
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
### Option A: Download the portable build (recommended, no build required)
|
|
10
|
+
|
|
11
|
+
1. Download `dsh-splash-launcher-vX.Y.Z.zip` (or just the single-file `DSH-GUI.exe`) from [Releases](https://github.com/Isilsolme/dsh-splash-launcher/releases);
|
|
12
|
+
2. Unzip (or drop the exe) anywhere — the exe is self-contained, all splash assets are embedded, **a single file is enough**;
|
|
13
|
+
3. Double-click `DSH-GUI.exe`.
|
|
14
|
+
|
|
15
|
+
> If SmartScreen shows "Windows protected your PC" on first run: click **More info → Run anyway** (the exe is unsigned).
|
|
16
|
+
|
|
17
|
+
### Option B: Build from source
|
|
18
|
+
|
|
19
|
+
```bat
|
|
20
|
+
build.cmd
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Produces a self-contained `DSH-GUI.exe` (black-whale icon, assets embedded as resources) using the Windows built-in `csc.exe` (no external toolchain).
|
|
24
|
+
|
|
25
|
+
## Requirements
|
|
26
|
+
|
|
27
|
+
- Windows 10/11
|
|
28
|
+
- Node.js + global `npm install -g @deepseek-ai/dsh`
|
|
29
|
+
- Microsoft Edge or Google Chrome
|
|
30
|
+
|
|
31
|
+
## Configuration
|
|
32
|
+
|
|
33
|
+
- `DSH_GUI_WORKSPACE` env var, or a `workspace.txt` next to the exe — working directory for `dsh web` (default: your user profile `%USERPROFILE%`)
|
|
34
|
+
- `DSH_GUI_PORT` — port (default `3080`)
|
|
35
|
+
- Splash assets are embedded in the exe; drop the same-named files (`splash.html`, `*.svg`, `whale.png`) next to the exe to override them (custom splash, no rebuild needed).
|
|
36
|
+
|
|
37
|
+
## Known issues
|
|
38
|
+
|
|
39
|
+
1. The taskbar briefly shows the Chrome/Edge default icon before the page favicon (black whale) loads; this is a browser-level placeholder and cannot be preset via command line.
|
|
40
|
+
2. Startup takes a while (dsh boot + browser cold start + plugin loading). The animation covers the whole wait and only fades out when the GUI is ready.
|
|
41
|
+
3. Unsigned launchers that start hidden processes / stop process trees may trigger SmartScreen or behavior-based antivirus heuristics; click "More info → Run anyway" on first run, add the folder to your AV exclusions, or code-sign the exe.
|
|
42
|
+
|
|
43
|
+
See the Chinese [README](README.md) for full details. Code is MIT; brand assets derive from DeepSeek Harness (MIT, © 2026 DeepSeek).
|
package/README.md
CHANGED
|
@@ -1,161 +1,171 @@
|
|
|
1
|
-
# DSH GUI
|
|
2
|
-
|
|
3
|
-
> DeepSeek Harness(dsh)Web GUI 的 Windows 一键启动器:双击即弹出无边框启动动画,后台拉起 `dsh web`,GUI 真正加载完成后无缝淡入;关闭窗口自动停服务。
|
|
4
|
-
|
|
5
|
-
启动动画借鉴 [SPlayer-Next](https://github.com/SPlayer-Dev/SPlayer-Next) 的思路:SVG `stroke-dashoffset` “一笔一划”书写效果——鲸鱼 Logo 升起呼吸,`deepseek` 官方字标浮现,`HARNESS` 七个字母逐笔描边。
|
|
6
|
-
|
|
7
|
-
 
|
|
8
|
-
|
|
9
|
-
## 效果截图
|
|
10
|
-
|
|
11
|
-
**启动动画(WPF 无边框,HARNESS 逐笔描边)**
|
|
12
|
-
|
|
13
|
-

|
|
14
|
-
|
|
15
|
-
**进入后的 GUI 界面**
|
|
16
|
-
|
|
17
|
-

|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## 功能特性
|
|
22
|
-
|
|
23
|
-
- **点击即出动画**:WPF 原生动画窗口,不等待浏览器冷启动,双击后立刻播放;
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
├─
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
├─
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
DSH-GUI.exe
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
1
|
+
# DSH GUI
|
|
2
|
+
|
|
3
|
+
> DeepSeek Harness(dsh)Web GUI 的 Windows 一键启动器:双击即弹出无边框启动动画,后台拉起 `dsh web`,GUI 真正加载完成后无缝淡入;关闭窗口自动停服务。
|
|
4
|
+
|
|
5
|
+
启动动画借鉴 [SPlayer-Next](https://github.com/SPlayer-Dev/SPlayer-Next) 的思路:SVG `stroke-dashoffset` “一笔一划”书写效果——鲸鱼 Logo 升起呼吸,`deepseek` 官方字标浮现,`HARNESS` 七个字母逐笔描边。
|
|
6
|
+
|
|
7
|
+
  [](https://awesome-dsh-plugin.com)
|
|
8
|
+
|
|
9
|
+
## 效果截图
|
|
10
|
+
|
|
11
|
+
**启动动画(WPF 无边框,HARNESS 逐笔描边)**
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
**进入后的 GUI 界面**
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 功能特性
|
|
22
|
+
|
|
23
|
+
- **点击即出动画**:WPF 原生动画窗口,不等待浏览器冷启动,双击后立刻播放;
|
|
24
|
+
- **便携单文件**:`splash.html` 与 SVG/PNG 素材内嵌进 exe,`DSH-GUI.exe` 单独一个文件即可运行;同目录放置同名素材文件可覆盖内嵌版本(自定义动画,无需重编译);
|
|
25
|
+
- **一笔一划描边**:`HARNESS` 七个字母按 CSS `cubic-bezier(0.25,0.1,0.25,1)` 缓动逐笔书写,笔尖连续、首帧空白;
|
|
26
|
+
- **后台加载、就绪切换**:启动动画期间,真实 GUI 在浏览器后台(同源 iframe)完成加载,检测到官方启动页(`Loading plugins…`)消失后才淡出动画,不会出现“动画播完又加载”的断档;
|
|
27
|
+
- **无 PowerShell**:启动器是单个 C#/WPF 程序,无脚本进程,规避“PowerShell 木马”类安全软件启发式误报;
|
|
28
|
+
- **开即启动、关即退出**:窗口关闭后自动结束本次启动的 `dsh web` 服务;端口已有服务时只开窗口、不接管生命周期;
|
|
29
|
+
- **可配置**:工作目录与端口可通过环境变量或 `workspace.txt` 修改;
|
|
30
|
+
- **深浅色跟随**:启动动画跟随 dsh 设置里的“外观”选项(浅色/深色/跟随系统),浅色为接近白色的淡蓝,深色保留原深蓝黑;
|
|
31
|
+
- **开源友好**:单文件 C# 源码 + `build.cmd`,使用 Windows 自带 `csc.exe` 编译,无需外部工具链。
|
|
32
|
+
|
|
33
|
+
## 快速开始
|
|
34
|
+
|
|
35
|
+
### 方式一:下载便携版(推荐,无需构建)
|
|
36
|
+
|
|
37
|
+
1. 在 [Releases](https://github.com/Isilsolme/dsh-splash-launcher/releases) 下载最新 `dsh-splash-launcher-vX.Y.Z.zip`(或只下载单文件 `DSH-GUI.exe`);
|
|
38
|
+
2. 解压(或直接把 exe)放到任意目录——exe 自包含全部素材,**单独一个文件即可运行**;
|
|
39
|
+
3. 双击 `DSH-GUI.exe`。
|
|
40
|
+
|
|
41
|
+
> 首次运行可能弹出 SmartScreen“Windows 已保护你的电脑”:点击 **更多信息 → 仍要运行**(exe 未代码签名,属正常提示)。
|
|
42
|
+
|
|
43
|
+
### 方式二:源码构建
|
|
44
|
+
|
|
45
|
+
环境要求:
|
|
46
|
+
|
|
47
|
+
- Windows 10 / 11;
|
|
48
|
+
- 已通过 npm 全局安装 DeepSeek Harness:`npm install -g @deepseek-ai/dsh`(`dsh web` 可用);
|
|
49
|
+
- Node.js(npm 全局安装 dsh 时自带依赖);
|
|
50
|
+
- Microsoft Edge 或 Google Chrome(二选一,自动探测)。
|
|
51
|
+
|
|
52
|
+
构建(双击或命令行运行):
|
|
53
|
+
|
|
54
|
+
```bat
|
|
55
|
+
build.cmd
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
生成自包含的 `DSH-GUI.exe`(黑鲸图标,素材已内嵌为资源)。构建仅使用 Windows 自带的 `C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe`。
|
|
59
|
+
|
|
60
|
+
### 使用
|
|
61
|
+
|
|
62
|
+
双击 `DSH-GUI.exe` 即可。如需桌面快捷方式:右键 `DSH-GUI.exe` → 发送到 → 桌面快捷方式(图标会自动使用黑鲸)。
|
|
63
|
+
|
|
64
|
+
### 作为 dsh 插件安装(可选)
|
|
65
|
+
|
|
66
|
+
本项目同时是一个可安装的 dsh bundle:随包携带 `DSH-GUI.exe`,并在宿主机注册 `desktop_launch` 工具,在对话中直接让 agent 打开带动画的 GUI 窗口:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
dsh plugin --profile web add dsh-splash-launcher
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
安装后重启 `dsh web`,agent 可使用 `desktop_launch` 工具(参数 `workspace` 可选,指定会话工作目录)。
|
|
73
|
+
|
|
74
|
+
### 配置
|
|
75
|
+
|
|
76
|
+
| 项 | 默认值 | 修改方式 |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| 工作目录(`dsh web` 启动目录) | `%USERPROFILE%`(用户主目录) | 环境变量 `DSH_GUI_WORKSPACE`,或在 exe 同目录新建 `workspace.txt` 写入路径 |
|
|
79
|
+
| 端口 | `3080` | 环境变量 `DSH_GUI_PORT` |
|
|
80
|
+
| 启动动画版式 | HARNESS 描边 | 源码 `SplashStyle` 改为 `"&logo=draw"` 可切换为“鲸鱼本体一笔一划”版 |
|
|
81
|
+
| 动画素材 | 内嵌于 exe | exe 同目录放置同名 `splash.html` / `*.svg` / `whale.png` 可覆盖(自定义,无需重编译) |
|
|
82
|
+
|
|
83
|
+
## 启动流程
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
双击 DSH-GUI.exe
|
|
87
|
+
├─ 端口已占用 ────────────────→ 直接打开 GUI 窗口(不显示动画、不接管服务)
|
|
88
|
+
└─ 端口空闲
|
|
89
|
+
├─ 立即显示 WPF 无边框启动动画(≈0ms,不等浏览器)
|
|
90
|
+
├─ 解析 dsh 安装路径(npm root -g + node require.resolve)
|
|
91
|
+
├─ 将 splash 素材同步进 dsh-web-frontend/dist(同源 iframe 探测的前提)
|
|
92
|
+
├─ 后台启动 `node <dsh>/lib/bin.js web`(隐藏窗口)
|
|
93
|
+
├─ 轮询端口就绪(最多 90s)
|
|
94
|
+
├─ 以相同尺寸/位置在动画背后打开浏览器 `--app` 窗口
|
|
95
|
+
│ └─ splash.html(hold) 用隐藏 iframe 加载 `/`
|
|
96
|
+
│ └─ 检测到官方启动卡片消失 → 揭示 iframe,并同步标题
|
|
97
|
+
├─ WPF 检测到浏览器标题包含 "DeepSeek Harness" → 淡出动画
|
|
98
|
+
└─ 浏览器窗口关闭 → taskkill 结束本次 dsh web 进程树
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## 项目结构
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
dsh-gui/
|
|
105
|
+
├─ DSH-GUI.cs # 启动器全部源码(C# 5 / WPF,单文件)
|
|
106
|
+
├─ build.cmd # 构建脚本(Windows 自带 csc.exe)
|
|
107
|
+
├─ splash.html # 浏览器侧启动页(hold 态 + 后台 iframe 预加载 + 就绪检测)
|
|
108
|
+
├─ deepseek-wordmark.svg # 官方 deepseek 字标(提取自 dsh 前端)
|
|
109
|
+
├─ whale.png # 黑鲸 Logo(256px,透明底)
|
|
110
|
+
├─ whale-anim.svg # 鲸鱼描边动画(可选版式 logo=draw)
|
|
111
|
+
├─ icons/
|
|
112
|
+
│ └─ whale-black.ico # 黑鲸图标(exe 与快捷方式共用)
|
|
113
|
+
├─ LICENSE # MIT + 品牌素材说明
|
|
114
|
+
└─ README.md
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
> `DSH-GUI.exe` 为自包含便携程序(素材已内嵌为资源,可在任意目录单独运行);仓库内保留素材源文件用于源码构建,且 exe 同目录的同名文件会优先于内嵌版本(自定义动画)。
|
|
118
|
+
|
|
119
|
+
## 开发
|
|
120
|
+
|
|
121
|
+
```bat
|
|
122
|
+
:: 构建
|
|
123
|
+
build.cmd
|
|
124
|
+
|
|
125
|
+
:: 自检(校验素材路径、dsh 安装路径与前端 dist,不弹窗)
|
|
126
|
+
DSH-GUI.exe --selftest
|
|
127
|
+
:: 结果写入 selftest.txt,退出码 0 为通过
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
常用调节点(`DSH-GUI.cs`):
|
|
131
|
+
|
|
132
|
+
| 想调什么 | 位置 |
|
|
133
|
+
|---|---|
|
|
134
|
+
| 描边速度 | `SplashWindow.DrawSeconds`(默认 0.22s/字母,线性速度) |
|
|
135
|
+
| 相邻字母起笔间隔 | `SplashWindow.LetterStep`(默认 0.14s,重叠书写) |
|
|
136
|
+
| 动画窗口尺寸 | `Program.WinW / WinH`(默认 1100×720) |
|
|
137
|
+
| 最短动画时长 | `SplashWindow.MinShowSec`(默认 2.0s) |
|
|
138
|
+
| 就绪判定标题 | `SplashWindow.AppTitle`(按“包含”匹配) |
|
|
139
|
+
|
|
140
|
+
## 已知问题
|
|
141
|
+
|
|
142
|
+
### 1. 任务栏图标会先闪一下 Chrome/Edge 默认图标
|
|
143
|
+
浏览器 `--app` 窗口创建时,任务栏按钮先使用浏览器进程自带图标,页面 `favicon`(黑鲸)加载完成后才切换,因此会出现极短暂的一闪。这是浏览器自身的图标占位机制,没有命令行参数可预设;当前动画窗口会盖住这段过程,实际看到界面时已是黑鲸图标。彻底隐藏需要 Win32 控制窗口显隐,可能引起页面节流、拖慢启动,暂不实现。
|
|
144
|
+
|
|
145
|
+
### 2. 启动有一定等待时间
|
|
146
|
+
启动时长主要来自:`dsh web` 服务引导 + 浏览器冷启动 + 前端插件装载。动画会覆盖全部等待过程并持续到 GUI 就绪,属于“可见但不可压缩”的时间。首次运行、杀毒软件实时扫描、机械硬盘会进一步加长。可通过 WPF 描边速度(见上)让动画与等待时长更匹配。
|
|
147
|
+
|
|
148
|
+
### 3. SmartScreen / 安全软件可能误报(未签名 exe)
|
|
149
|
+
本程序会启动隐藏进程、结束后台进程、复制文件,这类“类管理工具”行为可能触发启发式防护(例如卡巴斯基 PDM:Trojan.Win32.Generic 对旧版 PowerShell 脚本的误报)。建议:
|
|
150
|
+
- 首次运行若弹出 SmartScreen“Windows 已保护你的电脑”:点击 **更多信息 → 仍要运行**;
|
|
151
|
+
- 将 `dsh-gui` 目录加入杀软排除项/受信任应用程序;
|
|
152
|
+
- 正式分发时对 `DSH-GUI.exe` 做代码签名(本程序已不使用 PowerShell,命中率大幅降低)。
|
|
153
|
+
|
|
154
|
+
### 4. 端口已被占用时直接进入 GUI
|
|
155
|
+
如果 `3080` 端口已有 `dsh web`(例如正在终端里使用),双击只会打开 GUI 窗口,不会显示启动动画,也不会在关窗时停止该服务——这是刻意设计,避免误杀已有会话。
|
|
156
|
+
|
|
157
|
+
### 5. 同源预加载依赖 dist 写入权限
|
|
158
|
+
启动器需要把 `splash.html` 等素材复制到 npm 全局的 `dsh-web-frontend/dist` 目录。若该目录不可写,会自动退回“文件页动画 → 就绪后直接跳转 GUI”模式(素材内嵌于 exe,此模式下自动释放到 `%LocalAppData%\DSH-GUI\assets`),此时会短暂看到官方 HARNESS 加载页。
|
|
159
|
+
|
|
160
|
+
### 6. 就绪判定依赖标题
|
|
161
|
+
WPF 以浏览器窗口标题包含 `DeepSeek Harness` 判定 GUI 就绪;若官方前端修改标题结构,可能需要同步更新 `SplashWindow.AppTitle`。
|
|
162
|
+
|
|
163
|
+
## 许可证
|
|
164
|
+
|
|
165
|
+
- 代码:MIT,见 [LICENSE](LICENSE)。
|
|
166
|
+
- `whale.png`、`deepseek-wordmark.svg`、`whale-anim.svg` 派生自 DeepSeek Harness(`@deepseek-ai/dsh`,MIT © 2026 DeepSeek)前端素材,保留 DeepSeek 品牌权利;DeepSeek 名称与鲸鱼 Logo 为各自权利人的商标。
|
|
167
|
+
|
|
168
|
+
## 致谢
|
|
169
|
+
|
|
170
|
+
- 启动动画的“一笔一划”与时长编排思路借鉴 [SPlayer-Next](https://github.com/SPlayer-Dev/SPlayer-Next)(AGPL-3.0;本项目未复制其代码,仅参考交互思路)。
|
|
171
|
+
- DeepSeek Harness(`dsh`,npm 包 `@deepseek-ai/dsh`)及其 Web GUI。
|
package/lib/index.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* dsh-splash-launcher — host half.
|
|
3
|
-
* Ships the Windows DSH-GUI.exe startup-animation launcher inside the npm
|
|
4
|
-
* package and registers a desktop_launch agent tool so the GUI can be opened
|
|
5
|
-
* from a conversation with one tool call.
|
|
6
|
-
*/
|
|
7
|
-
import { defineTool } from '@deepseek-ai/dsh-tools'
|
|
8
|
-
import { spawn } from 'node:child_process'
|
|
9
|
-
import { dirname, join } from 'node:path'
|
|
10
|
-
import { fileURLToPath } from 'node:url'
|
|
11
|
-
|
|
12
|
-
const here = dirname(fileURLToPath(import.meta.url))
|
|
13
|
-
const exe = join(here, '..', 'DSH-GUI.exe')
|
|
14
|
-
|
|
15
|
-
export const name = 'splash-launcher'
|
|
16
|
-
export const inject = ['tools']
|
|
17
|
-
|
|
18
|
-
export function apply(ctx) {
|
|
19
|
-
ctx.effect(() => {
|
|
20
|
-
const dispose = ctx.tools.register(defineTool({
|
|
21
|
-
name: 'desktop_launch',
|
|
22
|
-
description:
|
|
23
|
-
'Launch the DSH Web GUI in a desktop window with the splash startup animation (Windows only). ' +
|
|
24
|
-
'Use when the user asks to open/start the DSH GUI, web interface, or desktop window.',
|
|
25
|
-
parameters: {
|
|
26
|
-
workspace: {
|
|
27
|
-
type: 'string',
|
|
28
|
-
description:
|
|
29
|
-
'Optional workspace directory for the launched dsh web session. ' +
|
|
30
|
-
'Defaults to the launcher config (DSH_GUI_WORKSPACE / workspace.txt /
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
output: {
|
|
34
|
-
schema: {
|
|
35
|
-
type: 'object',
|
|
36
|
-
additionalProperties: false,
|
|
37
|
-
properties: {
|
|
38
|
-
ok: { type: 'boolean', required: true },
|
|
39
|
-
pid: { type: 'integer' },
|
|
40
|
-
hint: { type: 'string' },
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
render(_args, value) {
|
|
44
|
-
return [{ type: 'text', text: value.hint ?? (value.ok ? 'DSH GUI launched.' : 'launch failed.') }]
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
async execute(args) {
|
|
48
|
-
if (process.platform !== 'win32') {
|
|
49
|
-
return { ok: false, hint: 'desktop_launch is Windows-only; this platform is not supported.' }
|
|
50
|
-
}
|
|
51
|
-
try {
|
|
52
|
-
const env = { ...process.env }
|
|
53
|
-
if (args && args.workspace) env.DSH_GUI_WORKSPACE = args.workspace
|
|
54
|
-
const child = spawn(exe, [], { detached: true, stdio: 'ignore', cwd: dirname(exe), env })
|
|
55
|
-
child.unref()
|
|
56
|
-
return { ok: true, pid: child.pid, hint: 'DSH GUI launcher started; the splash shows immediately and the GUI window appears when ready.' }
|
|
57
|
-
} catch (err) {
|
|
58
|
-
return { ok: false, hint: String(err && err.message ? err.message : err) }
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
}))
|
|
62
|
-
return dispose
|
|
63
|
-
}, 'dsh-splash-launcher: desktop_launch tool')
|
|
64
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* dsh-splash-launcher — host half.
|
|
3
|
+
* Ships the Windows DSH-GUI.exe startup-animation launcher inside the npm
|
|
4
|
+
* package and registers a desktop_launch agent tool so the GUI can be opened
|
|
5
|
+
* from a conversation with one tool call.
|
|
6
|
+
*/
|
|
7
|
+
import { defineTool } from '@deepseek-ai/dsh-tools'
|
|
8
|
+
import { spawn } from 'node:child_process'
|
|
9
|
+
import { dirname, join } from 'node:path'
|
|
10
|
+
import { fileURLToPath } from 'node:url'
|
|
11
|
+
|
|
12
|
+
const here = dirname(fileURLToPath(import.meta.url))
|
|
13
|
+
const exe = join(here, '..', 'DSH-GUI.exe')
|
|
14
|
+
|
|
15
|
+
export const name = 'splash-launcher'
|
|
16
|
+
export const inject = ['tools']
|
|
17
|
+
|
|
18
|
+
export function apply(ctx) {
|
|
19
|
+
ctx.effect(() => {
|
|
20
|
+
const dispose = ctx.tools.register(defineTool({
|
|
21
|
+
name: 'desktop_launch',
|
|
22
|
+
description:
|
|
23
|
+
'Launch the DSH Web GUI in a desktop window with the splash startup animation (Windows only). ' +
|
|
24
|
+
'Use when the user asks to open/start the DSH GUI, web interface, or desktop window.',
|
|
25
|
+
parameters: {
|
|
26
|
+
workspace: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description:
|
|
29
|
+
'Optional workspace directory for the launched dsh web session. ' +
|
|
30
|
+
'Defaults to the launcher config (DSH_GUI_WORKSPACE / workspace.txt / user profile).',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
output: {
|
|
34
|
+
schema: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
additionalProperties: false,
|
|
37
|
+
properties: {
|
|
38
|
+
ok: { type: 'boolean', required: true },
|
|
39
|
+
pid: { type: 'integer' },
|
|
40
|
+
hint: { type: 'string' },
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
render(_args, value) {
|
|
44
|
+
return [{ type: 'text', text: value.hint ?? (value.ok ? 'DSH GUI launched.' : 'launch failed.') }]
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
async execute(args) {
|
|
48
|
+
if (process.platform !== 'win32') {
|
|
49
|
+
return { ok: false, hint: 'desktop_launch is Windows-only; this platform is not supported.' }
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
const env = { ...process.env }
|
|
53
|
+
if (args && args.workspace) env.DSH_GUI_WORKSPACE = args.workspace
|
|
54
|
+
const child = spawn(exe, [], { detached: true, stdio: 'ignore', cwd: dirname(exe), env })
|
|
55
|
+
child.unref()
|
|
56
|
+
return { ok: true, pid: child.pid, hint: 'DSH GUI launcher started; the splash shows immediately and the GUI window appears when ready.' }
|
|
57
|
+
} catch (err) {
|
|
58
|
+
return { ok: false, hint: String(err && err.message ? err.message : err) }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
}))
|
|
62
|
+
return dispose
|
|
63
|
+
}, 'dsh-splash-launcher: desktop_launch tool')
|
|
64
|
+
}
|