dsh-reasoning

August 31, 2026 · View on GitHub

Codex-style /reasoning command for DeepSeek Harness Web.

Type /reasoning in the composer, press Enter, and pick a reasoning effort (Off / Low / High / Max, whatever the current model's adapter advertises) from the popup — fully keyboard-driven, no mouse required.

Why

The built-in model picker exposes reasoning effort through a two-level menu in the composer seat. This plugin surfaces the exact same data as a slash command, so switching effort is three keystrokes instead of a click path: /reasoning → Enter → ↑↓ (or type to filter) → Enter.

It is a thin client-only plugin:

  • no host configuration, no persistence, no settings page;
  • registers one popupSelect command contribution through the official ctx.commandUi extension point (the same one /model uses);
  • submits picks through the shared per-session model directory (ctx.modelDirectoriessession.selectModel), i.e. the identical RPC the composer effort pane uses;
  • never touches the draft, the IME composition, or an in-flight request — a pick applies to the next model request only.

Requirements

  • DeepSeek Harness Web host exposing the model-directory service and the commandUi extension point (both ship with the official Web bundle);
  • an open ordinary session with a model selected (the model's adapter must advertise reasoning metadata — the popup lists them; without a selected model the popup stays empty and the pick reports the host error).

Install

Add the package to a Web profile dsh.profile.bundles, e.g.:

dsh plugin --profile <profile> add @bo_wu/dsh-reasoning

or reference it from your own cordis.patch.yml:

- insert:
    - id: dsh-reasoning
      name: '@bo_wu/dsh-reasoning'

Then restart the profile's Web host.

Behavior contract

  • The command is hidden for addressed subagent sessions (same rule as /model).
  • A pick re-selects the current model with the chosen effort; the popup lists only the current model's advertised effort levels, plus a Default row when the adapter has no explicit default.
  • Selecting the already-active effort closes the popup without a request.
  • Rejected selections keep the previous effort and surface the host error in the popup.
  • No global keyboard shortcuts — nothing to conflict with other plugins.

Publish (maintainer)

  • CI (pnpm check: typecheck + tests + build) runs on every push/PR.
  • Tagging v* publishes the package to npm (public) via GitHub Actions.
  • Publishing needs the repo secret NPM_TOKEN: an npm automation token (npmjs.com → Access Tokens → Generate New Token → Automation) for an account owning the @bo_wu scope.

Development

pnpm install
pnpm build      # tsc -b && tsdown → lib/
pnpm test       # vitest
pnpm check      # typecheck + test + build

The browser bundle is produced by tsdown into lib/client.js wrapped in the DSH lazy module loader.

License

MIT