dsh-plugin-model-switcher
界面增强 活跃维护

dsh-plugin-model-switcher

Mrlilili/dsh-plugin-model-switcher

纯客户端实现的DSH插件,提供快捷键快速切换对话模型(Ctrl+Shift+M)与推理等级(Ctrl+Shift+R)的能力,无需服务端部署,本地即可运行,操作轻便无额外依赖。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
10 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Mrlilili/dsh-plugin-model-switcher
git clone https://github.com/Mrlilili/dsh-plugin-model-switcher.git
git clone git@github.com:Mrlilili/dsh-plugin-model-switcher.git
README.md main

dsh-plugin-model-switcher

English | 中文

DSH plugin for switching models and reasoning effort levels via keyboard shortcuts.

Shortcuts

Shortcut Action
Ctrl+Shift+M / Cmd+Shift+M Cycle through models in the current provider
Ctrl+Shift+R / Cmd+Shift+R Cycle through reasoning efforts (off → low → high → max → off)

A toast notification confirms each switch in the bottom-right corner.

How it works

Host (src/index.ts):

  • Reads the current model selection from agentDefaultModel
  • Cycles through models via llm.listModels() or reasoning efforts via llm.resolveModelInfo()
  • Persists the new selection via agentDefaultModel.saveSelection()

Client (src/client/index.ts):

  • Registers a toast overlay in the shell.overlay slot
  • Listens for Ctrl/Cmd+Shift+M and Ctrl/Cmd+Shift+R on the document (capture phase)
  • Calls the Host handlers via host.call() and updates the model selector UI via modelDirectories.directoryFor(sessionId).select()

Installation

dsh plugin --profile web add https://github.com/Mrlilili/dsh-plugin-model-switcher.git

Then restart DSH.

License

MIT