dsh-plan-build-mode: Bidirectional Switching Between Plan / Build Modes in Composer

Introduction

DeepSeek Harness (dsh) includes Plan mode (@deepseek-ai/dsh-plan-mode) natively starting from version 0.2.0-rc.2, and the Composer features an official PlanChip. However, this chip follows an “exit-only” design: the component does not render when the session is not in Plan mode, and entering Plan mode requires manually typing /plan, making the entry point inconspicuous. If you frequently switch between “plan first, then implement” and “directly modify code,” or wish to set a default mode for new sessions, the official UI coverage is insufficient. The community plugin dsh-plan-build-mode (Maintainer: yzhclcl, Category: Client) provides a persistent dropdown next to the permission controls and adds a “Default mode” setting, mirroring the Build/Plan selector in opencode.

What is this

dsh-plan-build-mode is a Plan / Build mode switcher for DeepSeek Harness: it adds an always-visible dropdown to the right of the permission controls (“Full access”) in the Composer input bar to switch the current session mode; it adds a Default mode below the permission line in Settings → General to determine the starting mode for new sessions. Under the hood, it still maps to the official /plan and /plan off commands and does not replace the plan-mode mechanism itself.

  • Directory Page: https://www.skillhub.cn/plugins/yzhclcl/dsh-plan-build-mode
  • Source Code: https://github.com/yzhclcl/dsh-plan-build-mode
  • License: MIT
  • Current Package Version (Reference): 1.1.0

Core Features

Composer Dropdown

  • Persistently displays the current mode (Build or Plan) with a chevron.
  • The menu contains two checked items: Build (direct implementation, corresponds to /plan off) and Plan (planning only without executing changes, corresponds to /plan).
  • Uses the official --dsw-alias-state-business-* token for blue highlighting in Plan mode.
  • When a switch is in progress (pending), the button optimistically displays the target mode; mid-stream switches take effect at the next turn boundary, and the button reflects the target immediately.

Default Mode (Settings)

In Settings → General, directly below the permission line, Default mode allows selecting Build or Plan. This only affects newly created sessions; the current session continues to use the Composer dropdown. Upon first save, the plugin configuration (e.g., defaultMode: plan) is written to the end of ~/.dsh/profiles/<profile>/cordis.patch.yml, which is the standard config-editor path. Removing the entry or changing it back to build restores the default behavior.

Relationship with Official PlanChip

The plugin occupies the same slot conversation.input.plan and renders at the lowest priority using register({ priority: -1 }), effectively replacing the exit-only official chip with a bidirectional dropdown. After uninstallation, the official PlanChip behavior is restored immediately. No official files are modified.

Actual Meaning of Plan Mode (Usage Notes)

Plan mode is a prompt-layer guide (injecting plan:policy), not a sandbox: tools remain available in both modes. If strict read-only access is required, you should modify the permission presets (e.g., Read Only), which is independent of the Plan state.

Installation and Activation

For the Web profile, it is recommended to pin the version to avoid pnpm pulling old builds due to publish cooldowns:

dsh plugin --profile web add dsh-plan-build-mode@1.1.0

You can also install directly from GitHub (no npm release needed):

dsh plugin --profile web add github:yzhclcl/dsh-plan-build-mode

Desktop: Install via the in-app Plugins page; the CLI cannot modify profiles/desktop.

After installation, you must fully exit and restart the process serving that profile. The client bundle version is derived from file metadata (mtime/ctime/size), so simply refreshing the page is not enough; if the version is stale, client-modules: bundle script ... failed to load may occur.

Uninstallation:

dsh plugin --profile web remove dsh-plan-build-mode

A restart is also required after uninstallation.

Typical Usage

  1. Switch current session: Click the dropdown to the right of the Composer permission controls and select Build or Plan.
  2. Set default for new sessions: Open Settings → General → Default mode, select Build or Plan, and save.

This is equivalent to manually typing /plan or /plan off, so no need to memorize commands.

Use Cases and Compatibility

Suitable for: Developers already using Plan mode on DSH 0.2.x who want a discoverable UI to enter/exit Plan mode, or who want to set a default Plan/Build mode for new sessions.

Environment Requirements (per documentation): dsh >=0.2.0-0 <0.3.0-0; verified on 0.2.0-rc.2, Windows, and web profile for the dropdown, settings row, persistence, and new session pinning. Host 0.1.x is out of scope.

The plugin runs with the current dsh process permissions. Please review the GitHub repository source code and the MIT license before installing. Community directories like SkillHub are independent sites and are not officially affiliated with DeepSeek or High-Flyer.

Conclusion

dsh-plan-build-mode fills the gap in the official Plan entry point, which was previously “exit-only and hard to enter”: it offers a Composer bidirectional switch plus a default mode for new sessions, while still utilizing the built-in /plan command chain. You can install it from the directory page or GitHub when needed; remember to pin the version and restart the profile.

  • Directory: https://www.skillhub.cn/plugins/yzhclcl/dsh-plan-build-mode
  • GitHub: https://github.com/yzhclcl/dsh-plan-build-mode
羽毛球分组比赛记分
小程序二维码

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

Xiaoye