dsh-model-fold: DSH's ZCode-style model selector

Preface

When writing in the DeepSeek Harness (DSH) composer, the model selector in the bottom right corner is a high-frequency entry point: switching providers, changing models, or adjusting reasoning levels is often done within one or two clicks. However, if the interaction of the built-in selector differs from the ZCode composer, your muscle memory will conflict—menu expansion direction, submenu positioning relative to the main menu, and keyboard focus management differ from what you are used to in ZCode.

dsh-model-fold is a community client plugin maintained by KKYZD and categorized as “Client”. It does not modify DSH source code; instead, it takes over the composer’s model slot via the conversation.input.model slot, aligning the interaction with ZCode: the provider menu expands upwards, the model submenu opens on the side, and it supports reasoning level selection and full keyboard navigation. See SkillHub for the directory page, and GitHub for source code and documentation.

What is this

In short: dsh-model-fold replaces the model selector in the bottom right corner of the DSH composer with the interaction mode of the ZCode composer selector.

In terms of implementation, it is an independent client plugin registered in the single slot conversation.input.model of the DSH plugin system. The built-in model selector has a default priority of 0, while this plugin uses priority: -1 to shadow it—this is the registry’s own election mechanism, not a monkey-patch of DSH. Selection still goes through the directory.select(...) of the same ModelDirectory instance, so switching models in the composer syncs with the /model popup, and vice versa.

Core Features

The following behaviors have been verified in the README and can be experienced on the trigger in the bottom right corner of the composer after installation.

Trigger and Label

The trigger displays the current model and current reasoning level in the format ModelName · LevelName (with the level shown in a de-emphasized color); it includes a 14px small chevron (↓). Font size and line height are aligned with ZCode (--ui-font-size: 14px, 32px line height).

Provider Menu and Sub-panels

When opened via click or keyboard, the provider menu expands upwards, anchored to the top-right of the trigger, accounting for collisions with the right and bottom edges. Each provider with models occupies one row, ending with a right-facing chevron (›); the provider belonging to the current model is marked with a ✓, so you can see “where I am” without expanding.

Hovering, clicking, or pressing → opens the model sub-panel: it prefers opening to the right of the menu, flipping to the left if space on the right is insufficient; vertically, it follows ZCode/Radix rules—the first row of the sub-panel aligns with the hovered provider row, shifting up entirely if it overflows the bottom, or pinning to the top with internal scrolling if it is too tall. Long directories scroll within the panel.

After selecting a model, the menu closes and the trigger label updates immediately.

Reasoning Level

At the bottom of the menu (below the divider) is a “Reasoning Level” row displaying the current level; hovering, clicking, or pressing → opens the level sub-panel. Levels come from the current model’s reasoning.efforts (e.g., Off/Low/High/Max); models without a default level have an extra “Default” item. The current level is marked with a ✓. Selecting a new level is equivalent to resubmitting with the current provider/model plus the new reasoningEffort, consistent with the built-in slot semantics; selecting the current level simply closes the menu. If the model has no reasoning metadata, this row does not appear.

Keyboard Navigation

  • ↑ / ↓: Move focus within the current panel (provider menu or sub-panel)
  • →: Open the sub-panel for the focused row (provider or reasoning level) and focus the first row
  • ← / Esc: Collapse the sub-panel back to the parent row
  • Esc (menu level): Close the entire selector and return focus to the trigger

Errors and Empty States

If the directory fails to load, an error and a retry button are displayed in the menu; an empty state is shown if the directory is empty.

Known Limitations

  • It only affects the composer’s model slot. The /model command popup uses popupSelect of commandUi, which is a separate rendering system that this plugin does not modify.
  • ZCode’s visual badges (e.g., vision tags) are not replicated—there are no corresponding fields in the DSH directory data.
  • If the built-in selector changes its registration priority in the future, the shadowing may fail (the UI falls back to the built-in style, usually without errors).

Installation and Activation

DSH version requirement: >= 0.2.0-rc.1 (tested on 0.2.0-rc.2 as noted in the README). The engines.node in package.json is >=20. License: MIT (npm package version 1.0.0).

After publishing to npm, or by entering the package name directly in the DSH Plugin panel, run:

dsh plugin --profile desktop add dsh-model-fold

For local development, run the following in this plugin’s directory (replace the path with your absolute path):

dsh plugin --profile desktop add "link:<absolute path to this directory>"

After installation, dsh.profile.bundles in package.json will add a new line dsh-model-fold. Host plugin changes take effect after restarting DSH; changes to lib/client.js also require a DSH restart (after migration to ~/.dsh/plugins/, host HMR usually no longer captures changes here, so restarting is the reliable path).

Uninstallation:

dsh plugin --profile desktop remove dsh-model-fold

After removal, the single slot election automatically falls back to the built-in model selector without needing further cleanup; the plugin does not modify the DSH installation directory or asar.

Typical Usage

After installation and restarting DSH, find the model trigger in the bottom right corner of the composer input area (displaying Model · Reasoning Level).

  1. Mouse: Click the trigger → Select a provider in the upward list → Select a model in the right (or left) sub-panel; to change the reasoning level, open the sub-panel from the “Reasoning Level” row at the bottom of the provider menu and select.
  2. Keyboard: Focus the trigger and open the menu → Use ↑/↓ to select a provider → → to enter the model list → Enter to confirm the model; to change the level, focus the “Reasoning Level” row and press → to enter the level panel.
  3. Work with /model: After switching models with this plugin in the composer, you can verify synchronization via the /model popup; changes made in the popup will also reflect in the composer trigger label.

The maintainer provides local self-check commands in the README (for reference during plugin development; regular users do not need to run these):

node tools/verify.cjs
node tools/validate.cjs <this directory>
node tools/discover.cjs <profile cordis.yml> dsh-model-fold
node tools/smoke.cjs <this directory>
node tools/election.cjs

For end-to-end verification with DSH started with --remote-debugging-port=9222:

node tools/cdp-probe.cjs --reload --capture errors.json
node tools/cdp-probe.cjs --eval tools/e2e-picker.js

Use Cases and Notes

Who is it for: Developers who frequently switch models in the DSH desktop composer and prefer the ZCode-style “upward main menu + side sub-menu + closed-loop keyboard” interaction; users who need to adjust reasoningEffort frequently and want consistency with built-in submission semantics.

Ecosystem Note: The DSH community plugin directory (e.g., SkillHub) is an independent site with no official affiliation with DeepSeek / High-Flyer; installation packages come from npm releases by maintainers or local links you specify, not a “curated” one-click list from an “official app store”.

Security and Permissions: Client plugins run under the current DSH process permissions and can participate in UI injection and slot election. Before installation, you should read the source code and MIT license on the GitHub repository to ensure the source and behavior comply with your environment policy. The README does not provide independent configuration files; behavior is determined by slot registration and the shared ModelDirectory.

Conclusion

dsh-model-fold replaces the composer model slot with ZCode-style interaction: upward-expanding provider menus, side model sub-panels, reasoning level rows, and full keyboard navigation, without touching DSH source code, and reverting to the built-in selector upon uninstallation. If you primarily select models via the bottom right corner of the composer rather than relying on the /model popup UI, this plugin is worth trying.

  • Directory Page: https://www.skillhub.cn/plugins/KKYZD/dsh-model-fold
  • GitHub: https://github.com/KKYZD/dsh-model-fold
羽毛球分组比赛记分
小程序二维码

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

Xiaoye