dsh-mode-switch: Switch Between Official DeepSeek Chat in the Same Harness Desktop Window

Introduction

When developing agents in DeepSeek Harness Desktop, it is often necessary to switch back and forth between the Harness workspace and the official web chat: opening a system browser loses context, and multiple windows easily scatter drafts and sessions. The community plugin dsh-mode-switch (maintainer abalika) addresses this pain point: it provides a single entry point within the desktop application to switch between Harness and https://chat.deepseek.com, with an option to persist website login across restarts on supported Windows installations. It is an independent community plugin and has no affiliation with or endorsement from DeepSeek officials; the web page and account services are still provided by DeepSeek, and the plugin does not act as a model API nor replace website login.

What is this

dsh-mode-switch adds same-window Harness / DeepSeek web switching for DeepSeek Harness Desktop. The buttons are placed under the top-left LOGOs of Harness and the DeepSeek web page respectively, without duplicating the header; it attempts to preserve sessions and drafts when returning to Harness. It is categorized as a DSH client plugin; the current GitHub star count is 0, the code is released under MIT, and the package version is 0.2.2 (package.json).

Directory page: skillhub.cn/plugins/abalika/dsh-mode-switch
Source code and documentation: github.com/abalika/dsh-mode-switch

Core Features

The following introduces the capabilities already documented in the README and architecture docs, without elaborating on behaviors not found in the materials.

  • Single-button switch: Each interface has only one “Switch to…” button, instead of a floating dual-button bar.
  • Lightweight embedding: Web mode only adds an entry under the original LOGO; the loading toolbar is hidden during normal use.
  • Lazy loading and keep-alive: The web view is created only after clicking DeepSeek; switching back and forth does not rebuild the pages on either side.
  • Failure recovery: If loading fails or crashes, the controlled web page can be recreated.
  • Login persistence (Windows): Starting from 0.2.2, login saving is automatically configured by default on supported desktops; the setup is completed after fully exiting the application and takes effect on the next launch, requiring no separate patch command. The workspace uses the partition name persist:dsh-deepseek-chat-v1; the plugin declares that it does not read or upload passwords, cookies, or chat history, nor does it provide account relaying.
  • Privacy boundaries: Cookies, localStorage, and IndexedDB are saved by Electron in the local user data directory; re-login may still be required after switching partitions for the first time, if the website invalidates the login, upon active exit, or after data cleanup.

The interface buttons are currently in Chinese. The web version of Harness does not display the entry when there is no desktop browser bridging interface; if the LOGO cannot be located, the sidebar is collapsed, or the login page has no sidebar, a compact backup entry will be displayed (top-left for Harness, top-right for the web page).

Compatibility and Environment

Item Support Scope
Desktop Version 0.2.0-rc.2 / 0.2.1-rc.2
Installation Method Local .tgz installed via the DSH CLI bundled with the desktop version
Node.js 22+
Default Login Saving Windows; auto-configured after exit, strictly verifies main program code, refuses to modify unknown versions

Re-adaptation may be required after the host or chat.deepseek.com updates; downloads, microphones, cameras, and some pop-ups remain restricted by the host.

Installation and Enabling

The installation commands are based on the repository’s docs/INSTALL.md. You can also download dsh-mode-switch-0.2.2.tgz from Releases. The documentation examples are for Windows PowerShell; paths need to be changed to your actual local directories; use the CLI bundled with the current desktop installation, follow the existing DSH_HOME, and do not use a separately globally installed npm CLI to operate the desktop profile.

  1. Package in the source directory (no npm install needed):
npm pack --ignore-scripts
$Package = (Resolve-Path '.\dsh-mode-switch-0.2.2.tgz').Path -replace '\\', '/'
$DshApp = 'C:\path\to\DeepSeek Harness'
$Dsh = Join-Path $DshApp 'resources\runtime\cli\bin\dsh.cmd'

If the above CLI path does not exist in your installation, locate the desktop version of dsh from the command management menu of the desktop application, and refer to the official desktop instructions.

  1. First, launch the desktop application to complete initialization, then use the application menu to fully exit (simply closing the window may only hide it to the tray).

  2. Install to the desktop profile:

& $Dsh plugin --profile desktop add "file:$Package" --ignore-scripts
  1. Restart the DSH Desktop installation. “Switch to DeepSeek” should appear under the brand, and “Switch to Harness” should appear after switching.

When updating, fully exit the application and remove then add:

& $Dsh plugin --profile desktop remove dsh-mode-switch
& $Dsh plugin --profile desktop add "file:$Package" --ignore-scripts

The plugin runs with the permissions of the current DSH process; you should read the source code and license before installing. The DeepSeek Harness ecosystem emphasizes “everything is a plugin”; community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / High-Flyer.

Typical Usage

No additional configuration is needed for daily use: click “Switch to DeepSeek” under the top-left LOGO in Harness to enter the official chat page; click “Switch to Harness” under the LOGO on the web side to return to the workspace. The page instances on both sides are maintained during switching, preserving drafts and sessions as much as possible.

If you do not want the automatic modification of app.asar for login saving on Windows, set the environment variable before the first launch of DSH and start the application from that environment:

$env:DSH_MODE_SWITCH_PERSIST_LOGIN = '0'

Patches already applied will not be automatically revoked by this variable; for manual inspection and rollback, refer to persistent-session.cjs (--check / --restore) in the installation documentation. Non-Windows users can still use the switching feature, but the desktop program will not be automatically modified.

If the web page fails to load, use the reload or return to Harness buttons on the interface; if the main entry is invisible due to sidebar collapse, use the backup entry (top-left for Harness, top-right for the web page).

Use Cases and Notes

Who it is for: Developers who primarily develop and debug within Harness Desktop but need to frequently reference or directly use the official DeepSeek Chat web page; users on Windows who want to reduce repeated logins after every restart (on supported versions and accepting the plugin’s automatic configuration method for app.asar).

Important to know:

  • Login saving is implemented by modifying app.asar on supported Windows desktops, not via standard plugin APIs; the assistant only operates on the currently running installation, does not force exit, escalate privileges, or download programs; if the version is unknown or unwritable, the original program is preserved.
  • Application upgrades may overwrite the patch, which will be re-detected on the next plugin startup.
  • To uninstall the plugin: & $Dsh plugin --profile desktop remove dsh-mode-switch; to restore the original desktop program, you need to separately execute --restore as described in the installation docs.
  • Do not upload app.asar backups or personal configurations to public repositories.

Conclusion

dsh-mode-switch consolidates Harness and the official chat page into a single desktop window, using a single button under the LOGO to complete the switch, and optionally preserves website login in the documented Windows environment. For package files, architectural boundaries, and verification records, please continue reading docs/ARCHITECTURE.md and docs/REVIEW.md in the repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye