TiankunDai/dsh-vision-LMstudio--packages-dsh-lmstudio-vision ↗★ 1
@deepseek-ai/dsh-lmstudio-vision
本地 LM Studio 视觉识别插件:连接 LM Studio OpenAI 兼容接口(默认 http://127.0.0.1:1234),用视觉模型(自动使用最后加载的模型,不预设具体模型)识别本地图片与剪贴板图片。agent 工具 lmstudio_vision / lmstudio_clipboard / lmstudio_models + 设置页「LM Studio 视觉识别」面板;配置持久化到 ~/.dsh/dsh-lmstudio-vision.json。Hot-pluggable — 挂载方式同 dsh-ssh:profile node_modules link + dsh.profile.bundles,无需修改 dsh 源码。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:TiankunDai/dsh-vision-LMstudio#5e4144af026a1f864da5e741469110a9c8ce9d48&path:packages/dsh-lmstudio-vision说明文档
阅读完整 README ↗dsh-lmstudio-vision — Local LM Studio vision plugin for the DSH Web GUI
English | 中文
Connects to the OpenAI-compatible endpoint of a local LM Studio
server (default http://127.0.0.1:1234) and uses its vision models for image
recognition, description, and OCR of local images and the Windows clipboard.
When no model is specified, the most recently loaded model is used automatically —
no specific model is preset.
Features
- Agent tools (registered in the host half, available in every session)
lmstudio_vision— recognize a local image file (absolute path)lmstudio_clipboard— recognize the image currently in the clipboard (after a screenshot / copy) directlylmstudio_models— list loaded models and mark the most recently loaded one (the auto-selected one)
- Settings panel (browser half): "Settings → LM Studio Vision"
configure the server URL / model / default prompt / temperature / max tokens,
and recognize a local image or the clipboard image in one click; the config is
persisted to
~/.dsh/dsh-lmstudio-vision.json - Automatic model selection: when
modelis omitted, the most recently loaded model is used (the first entry of the server's model list; the native/api/v0/modelsendpoint is filtered bystate, so models that are merely JIT-visible but not loaded never get picked) — no specific model is preset
Installation
The plugin package lives at packages/dsh-lmstudio-vision in this repo. Build it
and install it into a DSH profile:
pnpm build
dsh plugin --profile web add link:/packages/dsh-lmstudio-vision
For example (replace the path with your own clone location):
dsh plugin --profile web add link:~/code/dsh-vision-LMstudio/packages/dsh-lmstudio-vision
Then restart DSH (dsh web) and refresh the page. dsh plugin adds the package
name to dsh.profile.bundles automatically (this package declares dsh.bundle).
Structure
src/index.ts— host-half entry: engine, routes, tools, system-prompt announcementsrc/config.ts— config store (~/.dsh/dsh-lmstudio-vision.json, atomic writes)src/engine.ts— LM Studio OpenAI-compatible client (listModels / image chat)src/clipboard.ts— Windows PowerShell clipboard image extraction (temp PNG)src/routes.ts—/api/lmstudio-vision/*(loopback + same-origin trust fence)src/client/— browser half (settings panel)cordis.patch.yml— bundle patch plugin row (idlmstudio-vision)tsconfig.json/tsdown.config.ts— build and types (same as task-board / dsh-ssh)
Limitations
- Requires LM Studio's local server to be running with a vision model loaded; images over 25 MB are rejected
- Clipboard reading depends on Windows PowerShell 5.1 (
Get-Clipboard -Format Image) - Recognition consumes local compute, requests time out after 180 s; API routes are loopback-only