返回目录
文件与数据 插件

dsh-model-picker-search

honoriomelo/dsh-model-picker-search

DSH Web GUI plugin: adds a live search field inside the model picker menu of the composer, plus the Effort (reasoning) selector. Drop-in replacement for the native model seat, sharing the same per-session ModelDirectory so /model popup, the effort selector, and the /model command stay consistent.

Stars
0
Forks
0
Issues
0
更新
23 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:honoriomelo/dsh-model-picker-search

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-model-picker-search

DSH Web GUI plugin. Adds a live search field inside the model picker menu of the composer, plus the Effort (reasoning) selector that the native ModelSelect ships with.

When you click the Model button in the composer, the menu now opens already focused on a search box at the top. As you type, the list of models is filtered in real time across every provider — matching against the model id, model name, provider displayName, and provider name (case-insensitive substring). The two-level (Model / Effort) submenu from the native picker is preserved, so switching reasoning effort on a model that supports it still works as before.

The plugin reads and writes the same per-session ModelDirectory the native ModelSelect and /model popup consume, so every entry surface stays consistent: select a model in the composer picker, and the /model command in the chat shows the same selection; change effort here, and the trigger label updates to show it.

No source code of DSH is modified — the plugin composes a new occupant for the conversation.input.model slot, which DSH was designed to allow.

Install

dsh plugin --profile web add link:/path/to/dsh-model-picker-search

Then restart dsh web (or refresh the page so the new bundle is picked up).

How it works

  • Client (lib/client.js): registers a single occupant for the conversation.input.model slot. The component renders:
    • a trigger button matching the native _7KE1Ra_trigger look (label + optional effort caption + chevron that rotates 180° when open);
    • a two-pane menu (Model / Effort) styled with the same theme tokens as the shipped menu;
    • on the Model pane, a <input type="text"> at the top that filters the model list as the user types;
    • on the Effort pane, the list of reasoning effort levels for the current model, plus a "Provider default" option when the model declares no default.
  • Host (lib/index.js): a no-op entry kept so the bundle has a valid host half. The plugin is driven entirely by the client — model data comes from the shared ModelDirectory, so no host route or RPC is needed and no host-side state is duplicated.

The injected ModelDirectory (ctx.modelDirectories.directoryFor(sessionId)) is the same instance the native seat uses, which is what makes the two entry surfaces share their state.

UX details

  • Auto-focus. The search input is focused as soon as the Model pane opens, so the user can start typing without an extra click. The focus call uses requestAnimationFrame to ensure the input is fully mounted and focus({ preventScroll: true }) to avoid pushing the page.
  • Back button. Each sub-pane has a "‹ Back" button that returns to the root pane, matching the native two-level menu.
  • Outside click. Clicking outside the menu closes it and resets the query. ESC and the chevron toggle behave like the native picker.
  • Effort preservation. When you pick a model, the plugin preserves the current reasoningEffort if it's still valid for the new model (matches the way the native seat handles it).

Compatibility

  • DSH 0.1.0-rc.8 or newer (uses the dsh.client package metadata, ctx.modelDirectories, and the conversation.input.model slot).
  • Themes: all colors and spacing come from DSH theme tokens (--dsw-alias-*, --dsw-specific-menu, --dsw-shadow-lv3, --dsw-alias-scrollbar-bg-l2), so it follows light/dark and the brand overrides.

License

MIT.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类文件与数据
规则置信度高

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: search。