@1outres/dsh-plugin-model-picker 0.0.0-stage → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 1outres
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,116 @@
1
- # Temporary Holding Version
1
+ # @1outres/dsh-plugin-model-picker
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Replace the composer's model selector in the DeepSeek Harness Web UI with one
4
+ that stays usable when several providers list hundreds of models: it opens
5
+ straight into search, keeps favorites and recent models at the top, and
6
+ chooses reasoning effort in the same menu.
7
+
8
+ Install just this plugin:
9
+
10
+ ```sh
11
+ dsh plugin add @1outres/dsh-plugin-model-picker
12
+ ```
13
+
14
+ Or install it with every plugin in the repository through the
15
+ [`@1outres/dsh-plugins`](../dsh-plugins) bundle. Enable one or the other: both
16
+ insert the same `model-picker` row.
17
+
18
+ ## Using the picker
19
+
20
+ Click the model name in the composer. The menu opens above it with the
21
+ search field focused. The menu never grows past the room above the button in
22
+ the visible part of the page, so the Effort row stays on screen.
23
+
24
+ On a touch screen the search field is not focused on open, since the
25
+ on-screen keyboard would cover the list and the Effort row; tap the field to
26
+ search. Dismissing the keyboard keeps the menu open, and a tap outside closes
27
+ it.
28
+
29
+ - **Empty search**: ★ Favorites, then the five most recent models you picked
30
+ here (favorites excluded), then every provider with its heading pinned
31
+ while you scroll. A favorite or recent model also stays in its provider's
32
+ list.
33
+ - **Typing**: one ranked list, with the provider beside each model. Every
34
+ space-separated word must appear in the provider name, the model name, or
35
+ the model id, so `opus 4.6` finds `Anthropic: Claude Opus 4.6`. Exact
36
+ matches come first, then prefixes, word starts, and other substrings; ties
37
+ go to favorites, then recent models, then catalog order.
38
+ - **Effort**: the row at the bottom lists the current model's reasoning
39
+ levels (plus Default when the model has no default level). Each model
40
+ remembers the level you last used with it, so switching back restores it.
41
+ A model without a remembered level keeps the current one when it offers
42
+ it, and otherwise falls back to its own default.
43
+
44
+ Each row shows a check for the current model, the model name, and the model
45
+ id when it differs from the name.
46
+
47
+ | Key | Action |
48
+ | ----------------------- | ---------------------------------------------------- |
49
+ | `↑` `↓` | Move the highlight (wraps around) |
50
+ | `PageUp` `PageDown` | Move by one page |
51
+ | `Home` `End` | First or last model |
52
+ | `Enter` | Select the highlighted model |
53
+ | `Ctrl+D` / `⌘D` | Add or remove the highlighted model from favorites |
54
+ | `Tab` | Move to the Effort row; `←` `→` choose, `Enter` sets |
55
+ | `Shift+Tab` (in search) | Close |
56
+ | `Esc` | Close and return focus to the model button |
57
+
58
+ `Ctrl+D` replaces the browser's bookmark shortcut only while the menu is open.
59
+
60
+ ## Settings
61
+
62
+ There is no Settings page. Favorites are saved in the plugin's settings entry,
63
+ so they follow you to every browser that opens this profile; the star buttons
64
+ write them. To edit the list by hand, change the `model-picker` row in the
65
+ profile patch:
66
+
67
+ ```yaml
68
+ - id: model-picker
69
+ name: "@1outres/dsh-plugin-model-picker"
70
+ config:
71
+ favorites:
72
+ - provider: orcarouter
73
+ model: anthropic/claude-opus-4.6
74
+ - provider: claude-subscription
75
+ model: claude-opus-5-5
76
+ ```
77
+
78
+ Recent models and the effort remembered for each model are kept in this
79
+ browser's local storage (`dsh-plugin-model-picker:recent:v1` and
80
+ `dsh-plugin-model-picker:efforts:v1`), so every browser has its own lists.
81
+ Only selections made in this picker count.
82
+
83
+ A favorite or recent model whose provider is gone disappears from the menu but
84
+ stays saved, and comes back when the provider does.
85
+
86
+ ## How it works
87
+
88
+ 1. The browser half registers the composer seat `conversation.input.model` at
89
+ priority `-100`, above the shipped selector at `0`. Disabling the plugin
90
+ removes that entry and the shipped selector returns.
91
+ 2. It reads and changes the model through `ctx.modelDirectories`, the
92
+ per-Session directory of `@deepseek-ai/dsh-client-ui-model-selection`. The
93
+ picker and `/model` therefore share one state: the pending selection,
94
+ catalog refreshes after provider or credential changes, and per-provider
95
+ load failures.
96
+ 3. A selection applies from the Session's next request, like the shipped
97
+ selector, and the Host also saves it as the default for new Sessions.
98
+ 4. The host half only declares the `favorites` schema and turns off the
99
+ generated Settings page.
100
+
101
+ The picker copies the shipped selector's trigger, compact icon display, locked
102
+ and subagent states, pending spinner, error strips with Retry, and error
103
+ toasts. Its markup and styles are copied from the shipped controls and share
104
+ only theme tokens with the host.
105
+
106
+ ## Limits
107
+
108
+ - Other plugins' `conversation.input.model.label` decorations are not shown:
109
+ that slot belongs to the shipped selector, which stays registered underneath.
110
+ Each name keeps the `data-provider-id` and `data-model-id` attributes, so
111
+ attribute-based CSS still applies.
112
+ - `ctx.modelDirectories` is not a catalogued Harness service. If a Harness
113
+ update removes it, the plugin stays inactive and the shipped selector is
114
+ shown.
115
+ - The list is not virtualized; a few hundred models render without delay.
116
+ - English only.
@@ -0,0 +1,6 @@
1
+ # Installs this plugin on its own (dsh plugin add @1outres/dsh-plugin-model-picker).
2
+ # The @1outres/dsh-plugins bundle inserts the same "model-picker" row, so select
3
+ # one bundle or the other, never both.
4
+ - insert:
5
+ - id: model-picker
6
+ name: "@1outres/dsh-plugin-model-picker"