dsh-collapsible-models
No description
- Stars
- 1
- Language
- JavaScript
- Created
- Aug 23, 2026
- Updated
- Aug 23, 2026
Introduction
dsh-collapsible-models
A DeepSeek Harness client plugin that makes the model-provider groups in the composer model picker collapsible.
Click any provider row in the model dropdown to fold or unfold its models — a small triangle next to the provider name rotates to show the state. Useful when you have many providers configured and want a short, focused model list.
How it works
- The composer's model seat is the single slot
conversation.input.model, occupied by the shippedclient-ui-model-selectionplugin (priority 0). - This plugin registers a shadow entry at
priority: -1. Slot entries are ordered by ascending priority and the lowest renders, so the collapsible variant takes over the seat while the shipped UI stays registered underneath. - The data layer is untouched. The per-session model directory (catalog,
current selection, load/select verbs) comes from the shipped
modelDirectoriescordis service, so selections, reasoning-effort handling, loading states, failures, and toasts behave exactly like the stock picker. - If the shipped model picker is absent (a harness without
client-ui-model-selection), the plugin loads but registers nothing — the default UI stays as-is.
Install
dsh plugin add dsh-collapsible-models
or in DSH Desktop, through the Community Market (the package carries the bundle patch the managed installer verifies). Restart the harness after installing; the new seat takes effect in the next client generation.
Remove it the same way:
dsh plugin remove dsh-collapsible-models
Behavior notes
- All provider groups start expanded (matching the stock UI). Collapse state is per dropdown open-session and intentionally not persisted.
- The
aria-expandedstate and per-group accessible labels follow the active locale (zh/en). - Keyboard navigation of the model list is unchanged; the group header is a
real
<button>, so it is focusable and toggleable with the keyboard.
Development
The plugin is hand-written in the lazy-CJS client bundle protocol
(window.__ModuleLoader__.load) — no build step. The two halves:
dsh/index.js— host half (no-op; makes the package appear in the host Cordis graph viacordis.patch.yml).dsh/client.js— browser half (the collapsibleModelSelectshadow).
To try it locally without publishing:
dsh plugin add <path-or-url-to-this-repo>
License
MIT