dsh-mode-switcher
Manifest validTab toggles Plan/Build in DeepSeek Harness; each mode keeps its own model and reasoning preset across restarts.
dsh-mode-switcher
Switch Plan and Build in DeepSeek Harness with Tab or a click, and let each mode keep its own model + reasoning effort. Set the model once in Plan, once in Build, and the switcher restores the right one on every toggle, /plan, /plan off, and plan approval.
This is an independent, MIT-licensed implementation of the idea popularized by gaoyinxin/dsh-mode-switcher. It contains no code or assets from that project.
Screenshots
Build — 🛠️ Build ⇥ Tab

Plan — 📋 Plan ⇥ Tab

Why this implementation
- Persistence that fits each surface. The Desktop window runs on the stable
dsh-app://apporigin, so presets live inlocalStorageand survive restarts. The browser web UI gets a random127.0.0.1port each launch, so the plugin also writes a host-scoped cookie and reads whichever copy is newest. - Only plain
Tab.Shift+Tab,Ctrl+Tab,Alt+TabandMeta+Tabare left to the application; so are IME composition and auto-repeat. - Errors are visible. If a saved model was removed or an effort level is unsupported, the chip shows a warning, the stale preset is cleared, and the mode still switches.
- No network, no telemetry, no secrets. The plugin talks only to the DSH session API and stores a small JSON preset in browser storage.
- Tested. The preset logic, cookie parser, keyboard predicate, chip lookup and the mode state machine have unit tests, and CI runs them on Node 22 and 24.
Install
DeepSeek Harness Desktop. Its profile is desktop and Electron manages it, so install from the UI: open Plugins in the sidebar (Settings holds only the read-only Built-in plugins inventory), choose Add plugin, enter @qrak/dsh-mode-switcher, confirm Install.
Any other profile (web, TUI, your own), from the CLI — dsh plugin forwards its arguments to pnpm inside the profile directory:
dsh plugin --profile <your-profile> add @qrak/dsh-mode-switcher
--profile may be omitted to use the profile dsh boots by default.
Updating: re-run the install with @latest, or Install again in the Desktop UI, then restart DSH — the running process keeps the loaded plugin code in memory, so a package update alone changes nothing until the app restarts.
To try a change that is not released yet, install from the repository:
dsh plugin --profile <your-profile> add git+https://github.com/qrak/dsh-mode-switcher.git#main
Released versions are tagged v<version> (v1.0.0 … v1.0.4), so #v1.0.4 pins one exactly.
No build step, no dependencies, nothing to configure after install.
Usage
- In Build, pick the model and reasoning effort you want for implementation work (for example
high). - Press
Tab(or click the chip) to enter Plan and pick the model/effort for planning (for examplemax). - Switch back and forth; each mode is restored automatically, and the chip tooltip shows the saved Plan and Build presets.
- The presets also apply when the mode changes via
/plan,/plan off, or approving a plan.
The chip replaces the native Plan-only chip, so it is always visible: 🛠️ Build ⇥ Tab or 📋 Plan ⇥ Tab (see Screenshots).
Behaviour and limits
- Presets are global across sessions and stored in
localStorage(Desktopdsh-app://app) plus the cookiedsh_mode_switcher_presets_v1(browser web UI). If both are blocked, they fall back to memory for the page lifetime. Clearing site data resets them; each mode then re-seeds from the model in use. - Toggle commands are not echoed into the chat: the plugin hides the generic
/plancommand rows, so repeated mode switches do not flood the transcript. The chip is the mode indicator. - DSH saves the selected model as the deployment default as well; after a mode switch, new sessions start with the model of the mode used last. This is host behaviour, not a plugin setting.
- The plugin intercepts
Tabonly while the composer has focus and no completion popup is open. If a future DSH version givesTaba different meaning in the composer, disable the plugin or remove the key listener. Tabtoggles the composer the caret is in, resolved from the focused element, not the conversation painted last. With several conversations mounted, a global "last chip" could target the wrong session.- A second toggle of the same session within
1 sis ignored, because it would undo the first one and leave a stale "switched to plan mode" notice queued in the chat. - If the saved model is no longer available, the switch still happens and the warning explains why the model was not restored.
Compatibility
Built and verified against DSH 0.2.2-rc.3 (Desktop 0.2.2-rc.3); engines.dsh allows >=0.2.0-rc.1. It uses the public client surface: ctx.slots (conversation.input.plan), the plan and modelSelection projections, remote.commands.execute, remote.session.selectModel, and ctx.locale. A future DSH release may change these; the plugin is versioned and pinned, and the plain /plan command keeps working without it.
Development
npm run check # node --check for both entry points
npm test # node:test, no dependencies
The repository has no build step and no runtime dependencies.
Prior art
The Tab toggle and per-mode model memory were popularized by gaoyinxin/dsh-mode-switcher. This repository is an independent implementation under the MIT license; it does not include that project's source, icon, or screenshots.
License
MIT © 2026 qrak
Comments
Loading…
Similar plugins
by Yaya716
Persistent one-click plan/build mode toggle for DeepSeek Harness Web: switches the session plan state through the built-in /plan command.
★ 0
JavaScript
Aug 20, 2026
dsh plugin --profile web add @local/dsh-mode-switchby sujalmandal
Toggle DeepSeek Harness plan mode with Tab in the composer
★ 0
MIT
JavaScript
Oct 1, 2026
dsh plugin --profile web add dsh-tab-plan-togglePlan / Build mode switcher for DeepSeek Harness: a composer dropdown plus a default-mode setting for new sessions.
★ 0
MIT
JavaScript
dsh plugin --profile web add dsh-plan-build-modeby jdqingm
OpenChamber-style persistent Plan|Build composer toggle for DeepSeek Harness, with Tab-to-switch. Drives the native /plan channel over the host plan projection.
★ 0
MIT
JavaScript
Aug 31, 2026
dsh plugin --profile web add dsh-plan-build-toggleby Zding89
Save and switch model and reasoning-effort presets in DeepSeek Harness
★ 0
MIT
JavaScript
Aug 18, 2026
dsh plugin --profile web add dsh-model-presetsby pinion05
Toggle DeepSeek Harness (DSH) model tools on/off from the web Settings page — hidden tools lose schema, lookup, and execution together
★ 0
MIT
JavaScript
Nov 6, 2026
dsh plugin --profile web add @npmc_5/dsh-tools-toggle