Initial commit: model-selector-plus DSH plugin with docs
This commit is contained in:
commit
22db8c4596
52 files changed
+1692
No files matched your search
@@ -0,0 +1,70 @@
|
||||
# model-selector-plus
|
||||
|
||||
An enhanced model selector for the DeepSeek Harness (DSH) Web UI: **pinned, drag-reorderable models** and **brand icons**.
|
||||
|
||||
## Features
|
||||
|
||||
- Replaces the composer model seat (slot `conversation.input.model`).
|
||||
- Pin favourite models to the top and reorder them with drag and drop; pins persist in `localStorage` and sync across tabs.
|
||||
- Brand icons (Anthropic, OpenAI, Gemini, DeepSeek, Qwen, Mistral, Grok, Meta, …) matched by model id/name first, then by provider; serving platforms (OpenRouter, Bedrock, Azure, Together, …) only when the model name says nothing.
|
||||
- Shortcut to open **Settings → Models**.
|
||||
- English and Chinese strings.
|
||||
|
||||
## Layout
|
||||
|
||||
| File | Role |
|
||||
| --- | --- |
|
||||
| `client.src.js` | **Source** of the client module — edit this. |
|
||||
| `icons/*.svg` | Brand icons, inlined at build time. |
|
||||
| `build.mjs` | Generates `client.js` from `client.src.js` + `icons/`. |
|
||||
| `client.js` | Generated, committed bundle loaded by DSH. |
|
||||
| `index.js` | Empty Host half. |
|
||||
| `cordis.patch.yml` | Bundle patch inserting the plugin row. |
|
||||
|
||||
## Installation
|
||||
|
||||
Requirements: a working DeepSeek Harness (`dsh`) install with the **web** profile (or any profile that includes the Web UI).
|
||||
|
||||
### Option A — install from git (recommended)
|
||||
|
||||
```bash
|
||||
dsh plugin --profile web add git+https://git.rizzy.dev/DSH-Plugins/model-selector-plus.git
|
||||
```
|
||||
|
||||
You can also paste `git+https://git.rizzy.dev/DSH-Plugins/model-selector-plus.git` into **Settings → Plugins → Install** in the Web UI, or ask the agent to install it with its `plugin_manager` tool (`install_bundle`).
|
||||
|
||||
The plugin manager adds `@local/model-selector-plus` to `dependencies` and to `dsh.profile.bundles` in `~/.dsh/profiles/web/package.json`.
|
||||
|
||||
### Option B — local checkout (for development)
|
||||
|
||||
```bash
|
||||
git clone https://git.rizzy.dev/DSH-Plugins/model-selector-plus.git ~/dsh-plugins/model-selector-plus
|
||||
dsh plugin --profile web add link:$HOME/dsh-plugins/model-selector-plus
|
||||
```
|
||||
|
||||
With a `link:` install, edits in the checkout are picked up directly (client changes reload on page refresh, Host changes after a DSH restart or HMR reload).
|
||||
|
||||
### Enable / verify
|
||||
|
||||
1. Make sure `@local/model-selector-plus` is listed in `dsh.profile.bundles` of `~/.dsh/profiles/web/package.json` (the installer does this; add it by hand if you edited `package.json` manually).
|
||||
2. Restart DSH (`dsh web`) or reload the page.
|
||||
3. Check **Settings → Plugins**: the `@local/model-selector-plus` bundle should be enabled.
|
||||
|
||||
### Uninstall
|
||||
|
||||
```bash
|
||||
dsh plugin --profile web remove @local/model-selector-plus
|
||||
```
|
||||
|
||||
### Updating
|
||||
|
||||
Re-run the `add` command from Option A (or `git pull` in your Option B checkout).
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
# edit client.src.js or add icons/<brand>.svg, then:
|
||||
node build.mjs
|
||||
```
|
||||
|
||||
Reload the Web UI page to pick up the new `client.js`. To add a brand, drop an SVG into `icons/` and add a `[icon, regexp]` rule to `BRAND_RULES` in `client.src.js`.
|
||||
Reference in new issue
Block a user