Files
dsh-desktop/README.md
T
Reasonix f8c101d487 init: DeepSeek Harness WebView2 桌面客户端
- dsh-app.cs: C#/WinForms/WebView2 主程序(托盘常驻、自动拉起后端、DPI 感知)
- app.manifest: PerMonitorV2 DPI 声明
- dsh.ico / logo-512.png: DeepSeek 官方鲸鱼图标
- README.md: 使用与构建文档
2026-08-14 15:11:41 +08:00

85 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DeepSeek Harness 桌面客户端
一个把 DeepSeek Harness(dsh)Web UI 包装成**独立桌面应用**的本地客户端。
使用系统 **WebView2** 渲染,不依赖 Vivaldi / Edge 等完整浏览器,双击即用。
## 功能
- **独立窗口**:WebView2 渲染 `http://127.0.0.1:3080`,无浏览器地址栏/标签栏
- **自动拉起后端**:打开应用时若 dsh 服务未运行,自动静默启动(node 进程,无 CMD 窗口)
- **系统托盘**:
- 点窗口 `X` → 直接最小化到托盘(后端保持运行)
- 托盘双击 / 右键「打开」→ 恢复窗口
- 托盘右键「退出」→ 完全退出(**同时关闭后端服务**)
- **DPI 感知**:PerMonitorV2,高分屏(250% 缩放)下界面清晰不模糊
- **DeepSeek 官方图标**:窗口、任务栏、快捷方式均为官方鲸鱼 logo
## 目录结构
```
DeepSeekHarness\
├── README.md 本文件
├── dsh.ico DeepSeek 图标(多尺寸,快捷方式/窗口使用)
├── logo-512.png 图标 512px 源图(由官方 favicon.svg 生成)
├── .gitignore 排除运行时数据
└── app\
├── dsh-app.exe 主程序(C# / WinForms / WebView2)
├── Microsoft.Web.WebView2.Core.dll WebView2 托管组件 1.0.3719.77
├── Microsoft.Web.WebView2.WinForms.dll 同上
├── WebView2Loader.dll 原生加载器(x64)
├── src\
│ ├── dsh-app.cs 全部源码
│ └── app.manifest DPI manifest(PerMonitorV2)
├── web.log dsh 服务日志(运行时生成)
└── dsh-app.exe.WebView2\ WebView2 用户数据(运行时生成)
```
## 环境依赖
| 依赖 | 说明 |
|---|---|
| Node.js ≥ 22.19 | dsh 运行环境(当前机器:v24.19.0,winget 安装) |
| `@deepseek-ai/dsh` | 全局安装:`npm i -g @deepseek-ai/dsh`(镜像源:registry.npmmirror.com) |
| WebView2 Runtime | Windows 11 自带;旧系统需安装 |
| .NET Framework 4.8 | Windows 10/11 自带(构建时才需要) |
## 使用
1. 双击桌面(或 `C:\Users\VanuSystems-Mu\DeskBox\AI\`)的 **DeepSeek Harness** 快捷方式
2. 首次打开等待几秒(后端自动启动),之后秒开
3. 用完点 `X` 即最小化到托盘;想彻底退出用托盘右键 → **退出**
> 后端服务日志:`app\web.log`;启动失败排查:`app\start-error.log`(如存在)。
## 从源码构建
```sh
cd app\src
# 需要 dsh.ico 与 app.manifest 位于 src 上级(或按需调整路径)
csc /target:winexe /nologo \
/win32manifest:app.manifest \
/win32icon:..\..\dsh.ico \
/out:..\dsh-app.exe \
/r:..\Microsoft.Web.WebView2.Core.dll \
/r:..\Microsoft.Web.WebView2.WinForms.dll \
/r:System.Windows.Forms.dll /r:System.Drawing.dll \
dsh-app.cs
```
csc 位于 `C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe`。
## 排障
| 现象 | 处理 |
|---|---|
| 界面模糊 | 确认 exe 已带 manifest(PerMonitorV2);重新构建 |
| 弹 CMD 窗口 | 旧版本用 `cmd /c` 启动后端所致;当前版本直接启动 `node.exe`,无窗口 |
| 打开后一直"正在启动服务" | 查看 `web.log`;确认 `dsh` 已全局安装、端口 3080 未被占用 |
| 托盘图标消失 | 进程异常退出;重新双击快捷方式即可(会自动拉起后端) |
## 许可
- 本包装代码:MIT(可自行修改 `app\src\dsh-app.cs` 后重新构建)
- DeepSeek Harness:由 [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) 提供,MIT
- WebView2 组件:Microsoft 分发,MIT