前言¶
DeepSeek Harness(DSH)通常提供 dsh CLI 與 Web UI 兩種使用方式。對於已經安裝 DSH 的開發者來說,如果希望把官方 Web UI 放到桌面窗口中使用,同時不重新實現 DSH 自身的 agent 能力,就需要一個原生桌面套殼。dsh-gui 做的就是在 Electron 原生窗口裏加載 dsh 官方 Web UI,並支持作爲 dsh 插件安裝、維護和卸載。
這是什麼¶
dsh-gui 由 Aaaaamadeus 維護,許可證爲 MIT,倉庫地址爲:
https://github.com/Aaaaamadeus/dsh-gui
它的定位是 DeepSeek Harness(dsh)的 native desktop web-shell,可以作爲 dsh profile bundle 插件安裝,並自動創建、刷新桌面快捷方式。
核心功能¶
下面介紹幾項已覈實的核心能力。
- 窗口內加載
dsh官方 Web UI;官方前端或內核更新後,無需改動本殼。 - 可以作爲
dsh插件安裝,接入webprofile 的 bundle。 - 每次
dshprofile 啓動時,冪等刷新桌面快捷方式,支持圖標與隱藏控制檯啓動。 - 只依賴
dsh的host-apiproxy線協議,不 import 任何@deepseek-ai/*包。 - 渲染側採用
contextIsolation + sandbox沙箱模式;外鏈交給系統默認瀏覽器。 - 支持 main 進程插件、RPC 權限聲明、
dshgui-plugin://資產協議、原生模式內置 UI 插件。
安裝與啓用¶
前置要求:已安裝 dsh CLI 與 pnpm。
下面先安裝爲 web profile 的 bundle 插件。
dsh plugin --profile web add "github:Aaaaamadeus/dsh-gui"
再啓動一次 dsh web,用於執行插件並自動創建桌面快捷方式。
dsh web
卸載插件時使用下面的命令。
dsh plugin --profile web remove dsh-gui
如果需要從源碼安裝,先獲取倉庫並安裝依賴。
git clone https://github.com/Aaaaamadeus/dsh-gui
cd dsh-gui && npm install --ignore-scripts
再補 Electron 運行時,並安裝爲 dsh 插件。
node node_modules\electron\install.js
scripts\install-as-dsh-plugin.cmd
如果不安裝爲插件,也可以直接啓動。
dsh-gui.cmd
pnpm 會攔截 Electron 二進制後置下載;首次啓動時會自動補齊 Electron 運行時。需要使用鏡像時,設置下面環境變量。
set ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
典型用法¶
常見流程是:
- 安裝插件:
dsh plugin --profile web add "github:Aaaaamadeus/dsh-gui"
- 啓動一次
dsh web:
dsh web
- 之後使用已創建的桌面快捷方式啓動;每次
dshprofile 啓動時,快捷方式會冪等刷新。 - 卸載插件:
dsh plugin --profile web remove dsh-gui
適用場景與注意¶
適合已經使用 dsh,並希望把官方 Web UI 放到桌面窗口中的開發者。使用前注意以下幾點:
dsh仍是開發者預覽版,未來可能有破壞性變更;協議修復集中在src/kernel/。- 開發驗證環境爲:
DeepSeek Harness 0.1.0-rc.5 / 0.1.0-rc.6
Windows
Node.js ≥ 20
Electron 37
- renderer 插件運行在沙箱裏,只能通過白名單 API 調用 manifest 已聲明的 RPC:
window.dsh / DSHGUI
- main 插件與
dsh插件同信任級,可註冊本插件命名空間 IPC:
ctx.ipc.handle(channel, fn)
- 插件會作爲
dshprofile bundle 被啓用,並且以當前dsh進程權限運行;安裝前應檢查源碼、許可證與依賴。 - 本項目不包含 DeepSeek Harness 代碼;
dsh及其生態的許可見各自倉庫。
結尾¶
dsh-gui 的價值在於保留 dsh 官方 Web UI 與內核,同時提供桌面窗口、插件安裝和快捷方式維護。倉庫地址:
https://github.com/Aaaaamadeus/dsh-gui