Introduction¶
When debugging models or interacting daily with DSH (DeepSeek Harness), frequently switching models and thinking intensity is a common requirement. The existing UI flow requires clicking the model selector, and when used with a peripheral device (such as a remote control or numpad), the operation path is lengthy. The plugin introduced below aims to solve this problem by using custom key mappings to compress model switching and intensity adjustment into a trigger on a single physical key.
What This Is¶
dsh-model-switch is a global DSH plugin maintained by succlz123. It addresses the pain point of “quickly switching models and thinking intensity,” and allows any key (including spare keys, Bluetooth numpads, or remote control HID keyboards) to be mapped to a specific model and thinking intensity combination.
Core Features¶
- Visual key mapping: Renders a mechanical-keycap-style button on the left side of the model row below the input box. When the panel is open, the button appears in a “pressed” state.
- Key combination management: Supports adding a mapping, changing the model, adjusting thinking intensity, or deleting a mapping.
- Embedded capture flow: Click “Add key mapping” in the panel to start. The panel shows “Listening” and reports received keys in real time. Then select the model and intensity without closing the panel at any point.
- Data source synchronization: The model list comes directly from the official DSH
modelDirectoriesservice (same source as the UI model selector, synchronized in real time). It also remains compatible with the oldremote.sessioninterface. - Diagnostics channel: Includes a lightweight diagnostics tool. If a key does not respond, you can inspect the host-side file
$DSH_HOME/.dms-diag.ndjsonwithout opening browser DevTools.
Installation and Enablement¶
Official command:
dsh plugin --profile web add link:<本目录绝对路径>
Manual installation method (recommended):
1. Place the plugin directory into $(DSH_HOME)/profiles/web/packages/dsh-model-switch.
2. Modify profiles/web/package.json:
* Add "dsh-model-switch": "file:./packages/dsh-model-switch" to dependencies.
* Add "dsh-model-switch" to the dsh.profile.bundles array.
3. Run pnpm install in the profiles/web directory.
4. Completely quit DSH, restart it, and refresh the page.
Note: pnpm may skip re-linking
file:dependencies whose version number does not change but whose content does. If changes tolib/*.jsdo not take effect, manually sync the files toprofiles/web/node_modules/dsh-model-switch/, or bump the version and reinstall.
Typical Usage¶
After installing the plugin and refreshing the page, a mechanical-keycap button appears on the left side of the model row below the input box. Open the panel and capture a key combination (F13–F24 or a Ctrl/Alt combination is recommended), then map it to the target model and thinking intensity level. Afterwards, press the peripheral key directly on the page to complete the switch, with no floating popup interference throughout the process.
Use Cases and Notes¶
- Use cases: Developers who need to switch frequently among different models, or who use peripherals such as Bluetooth numpads or TV remote controls to assist input.
- Peripheral requirements: The external keyboard/remote must send standard key codes as an HID keyboard (F13–F24 are ideal). Multimedia/consumer keys (volume, playback, etc.) do not generate
keydownevents in the browser and therefore cannot be captured. - Data persistence: Current key mappings are stored only in page memory. After refreshing the page, the mappings must be reconfigured (persistence is planned).
- Development notes: Day-to-day iteration only requires modifying
lib/client.js. After modification, sync it tonode_modulesor runpnpm installagain.
Conclusion¶
This plugin reduces the operational cost of model switching through a lightweight UI and key-listening mechanism. For more details and source code, refer to the project directory or the GitHub repository.