bitterSmilezzz/dsh-model-selector ↗★ 1
dsh-model-selector
DeepSeek Harness web plugin: enhance the conversation model picker with provider-group collapse and model name search.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:bitterSmilezzz/dsh-model-selector说明文档
阅读完整 README ↗Install
# from a git host (pin a commit for reproducible installs)
dsh plugin --profile
add github:you/dsh-model-selector#
Then boot the profile as usual:
dsh --profile
web
To remove it:
dsh plugin --profile
remove dsh-model-selector
Requirements
- A web profile (the browser surface that mounts
@deepseek-ai/dsh-client-ui-model-selection, which provides the sharedmodelDirectoriesservice this plugin reads). reactand the@deepseek-ai/dsh-client-*platform modules are provided by the shell; the bundle keeps them external.
How it works
dsh --profile web (dsh-base + dsh-web-app + dsh-model-selector)
└─ modules node half scans dsh.client
└─ serves /plugins/dsh-model-selector/client.js
└─ browser loads the bundle → apply registers:
- locale dictionary + plugin stylesheet
- conversation.input.model (priority -1) → enhanced ModelSelect
└─ reads/writes ctx.modelDirectories.directoryFor(sessionId)
- The enhanced seat renders the same trigger and the same two-level menu (Model / Effort); only the model list pane gains search and collapsible groups.
- Collapse state is in-memory only (per seat instance), following the "no durable settings for transient UI" rule.
Build
lib/ is committed (prebuilt), so installing needs no build step — local
and git installs both resolve lib/index.js + lib/client.js directly. To
rebuild after editing src/:
pnpm install
pnpm build # emits lib/index.js (node half) + lib/client.js (browser half)
pnpm typecheck # optional: tsc --noEmit
The build is self-contained tsdown (no monorepo project
references), so it also works as a prepare script for git installs if you
prefer to build from source (see the harness
publish guide).
Layout
dsh-model-selector/
├── package.json # dsh.bundle + dsh.client declarations
├── cordis.patch.yml # inserts the model-selector row
├── tsdown.config.ts # self-contained build for both halves
├── tsconfig.json # editor/typecheck config
├── src/
│ ├── index.ts # node half (empty apply)
│ ├── types.ts # local structural types (no package imports)
│ └── client/
│ ├── index.ts # client apply: locale + styles + seat registration
│ ├── ModelSelect.tsx # enhanced seat (search + collapse)
│ ├── styles.ts # plugin stylesheet (--dsw-* tokens)
│ └── locales.ts # zh + en dictionaries
├── README.md
└── README.zh.md