Preface¶
DeepSeek Harness (DSH) model names generally follow the <model id> · <provider> structure:
doubao-seed-translation · Volcengine Ark
search_agent_qwen_fast-0710 · Trae CN
deepseek-v41-flash · Baidu DuMate
The model selector capsule in the input box is only about 150–162px wide out of the box, so long model names like the ones above get truncated to doubao-seed-transl…. The dropdown panel is also relatively narrow and tends to obscure part of the content. This plugin does one thing: it widens the DSH input box model selector so that long model names are no longer cut off by an ellipsis.
What This Is¶
This is a DSH client plugin maintained by noname-nikke. It increases the width of the input capsule and the dropdown panel, combined with a right-edge-anchored layout relative to the input box, so that model names with provider suffixes or inherently long identifiers display in full in the UI. Both the panel width and the input box width are adjustable in the settings page, and excessively long names show the full title on hover.
Core Features¶
- Widened input capsule: default 360px, adjustable range 240–560px.
- Widened dropdown panel: default 480px, adjustable range 340–760px.
- Right-edge anchored to input box: the panel’s right edge still aligns with the input box and won’t overflow the viewport.
- Hover tooltip for long names: when a name is too long, a
titleattribute is shown; hover the mouse to see the full name. - Settings take effect immediately: adjust under Settings → Model Selector Width; supports Chinese/English locale switching.
- Clean uninstallation: disabling or hot-reloading leaves no residual listeners, stylesheets, or
data-mpw*markers.
Installation & Enablement¶
Install via DSH’s plugin management commands:
dsh plugin --profile web add link:<path-to-this-repo>
# or install directly from GitHub:
dsh plugin --profile web add github:noname-nikke/dsh-model-picker-wide
After installation, restart DSH (or refresh the page). To uninstall:
dsh plugin --profile web remove dsh-model-picker-wide
Note: you must use dsh plugin add. Do not use pnpm add directly. The latter only writes to dependencies and does not merge the plugin into the dsh.profile.bundles layer stack, meaning the plugin will be installed but not take effect.
Compatibility¶
A single stylesheet covers both implementations:
| Implementation | Selectors |
|---|---|
dsh-better-panel custom overlay (takes over the input box model slot by default) |
.cxp-trigger / .cxp-root / .cxp-panel |
Official @deepseek-ai/dsh-client-ui-model-selection |
button[data-mpw="trigger"] / [data-mpw="menu"] |
If neither implementation is present, the plugin silently does nothing — it does not register slots or modify DOM structure. The worst case is simply “it didn’t get wider.”
Settings¶
| Item | Default | Range | Description |
|---|---|---|---|
| Enable widening | On | — | Turning it off immediately restores the original width |
| Dropdown panel width | 480 px | 340–760 | The overlay for the model list |
| Input capsule width | 360 px | 240–560 | Will never exceed the panel width |
| Long name line-wrap | Off | — | On: wraps to show the full name (lines become taller); Off: still truncates with ellipsis, but hover reveals the full name |
Configuration is stored in the browser’s localStorage under the key dsh-model-picker-wide:config:v1. Settings page copy switches between Chinese and English based on the browser language.
Implementation Details¶
- Right-edge anchoring:
dsh-better-panelusesposition:fixedwith an inlineleftthat is calculated in JS against a fixedPANEL_W=272. Simply changing the CSS would cause the widened panel to overflow the right side of the viewport. At runtime, the plugin reads the right edge of the trigger (or[data-composer-card]as a fallback), computesright = clamp(vw - anchorRight, 12, vw - W - 12), writes it into--mpw-right, and lets CSS applyleft:auto; right:var(--mpw-right). - Tagging instead of structural changes: only
data-mpwattributes are added to real DOM nodes; all styles are scoped to those attributes, so uninstalling the plugin leaves zero residue. - Minimal observation surface: the main
MutationObserveronly watches direct children ofdocument.body(both panels are portaled to body), without enablingsubtree, so DOM churn during streaming output won’t trigger it. When React rewrites panel attributes (wipingdata-mpwalong the way), a “subtree attribute observer filtered to onlydata-mpw” patches it back immediately. After the panel is opened, only four fallback rescans at 0 / 120 / 600 / 1400 ms are kept — no more seven full-document queries. - Scan on click only: a rescan is triggered only when a click lands within the input card, the capsule, or the overlay. Clicks elsewhere on the page no longer cause full-document queries.
- Clean teardown: a disposal function is registered via
ctx.effect. When the plugin is disabled or HMR reloads, observers, resize/click listeners, and both stylesheets are removed, and alldata-mpw*markers are cleared along with any rewrittentitleattributes being restored. - Never disrupt the input area: every entry point is wrapped in
try/catch; on failure, only a singleconsole.warnis emitted.
Use Cases¶
Suitable for developers and users who need to see full model names (including provider/version suffixes) in DSH. The plugin runs with the current dsh process permissions; review the source code and license before installing.
Closing¶
This plugin widens the input capsule and the dropdown panel so that long model names are no longer truncated, while keeping the panel’s right edge anchored to the input box. For full documentation and source code, see the plugin catalog page and the GitHub repository.
- Catalog page: https://www.skillhub.cn/plugins/noname-nikke/dsh-model-picker-wide
- GitHub: https://github.com/noname-nikke/dsh-model-picker-wide