deepseek-harness-desktop/dsh-plugin-desktop

11.5kStars512Forks175Issues31Watchers

Package DSH into an Electron desktop app with native window, system tray, profile switching, standalone terminal, and update checking—no need to open the web version in a browser.

Language
TypeScript
License
MIT
Branch
master
cordiscordis-plugindeepseekdeepseek-harnessdesktopdshdsh-plugindsh-plugin-desktop

Install

$ dsh plugin --profile web add github:anywhere-labs/deepseek-harness-desktop/dsh-plugin-desktop

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

One-Line Description

Wraps DeepSeek Harness in an Electron desktop application, using native windows and system tray to replace the "open local webpage in browser" approach. The installed app is named DSH Desktop, and the interface content remains the official DSH suite.

Core Features

  • Launch DSH as a desktop app: start a service listening only on the local loopback address within the process, then load it in a native window with navigation restricted to this address
  • Provide system tray menu: reopen window, switch profile, open dedicated terminal, check for updates, switch interface mode, exit app
  • Switch profiles (plugin combinations) from the tray, with changes taking effect via "save first, then orderly restart"; failed starts automatically roll back once
  • Provide two interface appearances: compatibility mode uses system native borders and the official interface; advanced mode uses frosted glass title bar on macOS and Mica material on Windows
  • Open a system terminal on macOS/Windows with the current profile as working directory, where the dsh command defaults to the current profile
  • Check and download new version packages: periodic silent checks on timer; manual checks always show a result dialog

Technical Implementation

  • Language: TypeScript
  • Key Dependencies: electron (host runtime, peer dependency), @deepseek-ai/cordis (plugin orchestration), @deepseek-ai/dsh series 0.1.0-rc.6 (Host and Web client capabilities), koffi (Windows volume info diagnostics)
  • Architecture Pattern: The packaged executable does minimal startup: acquire single-instance lock, parse current profile, set up native runtime capabilities, then start the Cordis root in the Electron main process. Features are inserted via cordis.patch.yml as multi-line plugins (desktop shell, terminal, package management, profile, updates); windows and tray are held by effects with cleanup logic; interface is loaded via loopback HTTP/WebSocket, no preload bridge used, renderer process has context isolation and sandbox enabled, Node integration disabled
  • Entry Files: src/main.ts (Electron launcher), src/index.ts (desktop shell plugin), src/bin.ts (command-line entry for non-GUI environments)

Use Cases

Suitable for those already using DSH but not wanting to open a browser tab each time: after installation you have a standalone app that can sit in the Dock or taskbar, with the window hidden in the tray when closed. Also suitable for users who need to switch between multiple plugin combinations; the tray's profile menu is more convenient than manually editing config and restarting. If you only run DSH server-side without a UI, this plugin is not useful for you.

Prerequisites and Compatibility

DependencyMinimum VersionDescription
Node.js^22.19.0 or >=24.0.0Declared by the package's engines field
DSH0.1.0-rc.6Fixed dependency on this version of the DSH package family; no loose range declared
Electron43.4.0peer dependency; npm global install will bring it automatically; installing in profile requires manual add
PlatformmacOS / Windows / LinuxRuns on all three, but Linux only has compatibility mode, and no tray terminal or update download
Native Moduleskoffi, node-ptykoffi for Windows volume diagnostics; packaged product includes node-pty precompiled binaries

Installation

dsh plugin --profile web add github:anywhere-labs/deepseek-harness-desktop/dsh-plugin-desktop

Configuration Options

ConfigTypeDescriptionDefault
Interface Modecompatibility | advancedChoose native appearance: compatibility mode loads official interface with system borders, advanced mode换成桌面专属外观; takes effect after restart, Linux doesn't accept advanced modecompatibility
Window WidthNumber (CSS pixels)Window width on first open, minimum 8001280
Window HeightNumber (CSS pixels)Window height on first open, minimum 600840
Min WidthNumber (CSS pixels)Narrowest width allowed, minimum 640900
Min HeightNumber (CSS pixels)Shortest height allowed, minimum 480640
Background Update CheckBooleanWhen disabled, packaged version no longer periodically checks for new versions; tray manual check still availabletrue
First Check DelayMillisecondsHow long to wait after startup before first update check60000
Check IntervalMillisecondsWait time between one check ending and the next check starting21600000 (6 hours)
Single Request TimeoutMillisecondsMaximum wait time for one version query; timeout treated as silent failure15000

The interface mode can also be written directly in DSH home's settings.yaml (under dsh-desktop.mode); the tray selection modifies the same file.

FAQ

Q: After installing this plugin, can I double-click to open the desktop app directly?

A: Not necessarily. Starting requires electron to be present: using npm install -g dsh-plugin-desktop will automatically install electron, but installing via profile does not auto-install; you need to add dsh plugin --profile <name> add electron manually. When missing, the command only prints installation guidance, it won't throw a module error.

Q: Is the interface seen in the desktop version the same as the web version?

A: The default compatibility mode loads the official web interface, just wrapped in a native window with system borders; macOS hides the page title, Windows removes the menu bar. After switching to advanced mode, macOS gets a transparent title bar plus sidebar frosted glass, Windows gets a Mica background.

Q: How do I switch interface mode?

A: Choose from the tray menu, or manually edit DSH home's settings.yaml, setting dsh-desktop.mode to compatibility or advanced. Both methods modify the same file; after committing, the app will restart orderly, it won't hot-swap while running.

Q: Does it work on Linux?

A: It can start, but only supports compatibility mode; writing advanced mode will be rejected rather than downgraded; the "Open DSH Terminal" command in tray is not included on Linux, nor is update package download.

Q: Will switching profiles lose chat history?

A: No. The default official profile shares the same sessions, settings, and storage under the DSH home; switching just swaps to a different plugin combination and restarts, it won't copy or migrate data. Custom profiles can actively change a storage location elsewhere.

Q: I added a new plugin to the profile, why don't I see it in the desktop app?

A: The launcher doesn't listen for changes to the profile list; after adding/removing plugins you need to restart the desktop app for changes to take effect; switching a profile from the tray will also complete this restart.

Q: Are updates automatically installed?

A: No. Packaged version checks once after 60 seconds of startup, then checks again every 6 hours after each check completes; it prompts for download when an update is found. On macOS it opens the downloaded DMG, requiring you to manually replace the app; Windows requires confirmation before running the installer. Checks fail silently when there's no network or versions match.

Q: Does closing the window exit the program?

A: No. Closing the window only hides the window; the Cordis tree in the background continues running and can be reopened from the tray; to truly exit, choose the exit command from the tray, or send SIGINT/SIGTERM.

Getting Started Difficulty

Beginner — after installation, mode switching, profile switching, and update checking can all be done from the tray; default config works out of the box; only when installing in profile is an extra electron dependency needed.

Known Issues and Limitations

  • After adding/removing plugins in a profile, the app must be restarted; the launcher doesn't listen for profile list changes
  • Switching compatibility/advanced mode inevitably restarts the app; running windows won't hot-swap appearance or plugin lines
  • Linux doesn't support advanced mode, nor tray terminal commands or update package downloads
  • On Windows, pnpm and Node helper commands exposed to the environment are .cmd scripts; third-party plugins that call them directly without going through shell will fail; should use managed services or shell-based launch methods
  • Update process only verifies downloaded file integrity, not publisher identity; locally built Windows installers are unsigned and may trigger unknown publisher or SmartScreen warnings
  • Communication between interface and backend uses local loopback HTTP/WebSocket, not Electron IPC; replacing it requires upstream DSH to provide transport extension points
  • Dependency is fixed to published DSH 0.1.0-rc.6 package family; no wider version range declared
  • Third-party marketplace package dshmarket@1.2.3 is not pre-installed and is incompatible with this plugin's profile and package management capabilities; need to wait for its adapted version release