Image-to-text input for the Web UI: paste or drag an image and it is transcribed into structured text and sent, giving text-only LLMs image-input takeover (OpenAI-compatible vision API).
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-plugin-image-input
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Elohia/dsh-plugin-image-input
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
给没有视觉能力的纯文本 LLM(DeepSeek、GPT-4 base 等)提供图片输入接管:
- 在对话输入框里照常粘贴 / 拖拽图片(出现缩略预览)
- 直接按 Enter 或点发送——插件会自动把图片转成文字描述,与你的文字一起发出
- 会话里收到的就是"你的文字 + 图片识别上下文"(画布/元素/百分比坐标,K线图、截图、图表都适用),模型不会再因为图片拒绝消息
当前模型支持图片时(如 qwen-vl / gpt-4o),插件完全放行,走原生图片通道。
也可以先点输入框左侧的 🖼️ 图片转文字 按钮,只把描述插入输入框(不发),自己修改后再发送。
安装(每台 PC 一次)
# 方式 A:从本地目录安装(拿到插件目录后)
dsh plugin --profile web add D:\path\to\dsh-plugin-image-input
# 方式 B:从 npm / GitHub 安装(发布后)
dsh plugin --profile web add dsh-plugin-image-input
然后重启 DSH web。
配置视觉 API(设置页填写,一次搞定)
重启后打开 设置 → 图片转文字,填写:
| 字段 | 说明 | 示例 |
|---|---|---|
baseUrl |
OpenAI 兼容接口地址(不含 /chat/completions) |
https://dashscope.aliyuncs.com/compatible-mode/v1 |
model |
视觉模型名 | qwen-vl-max / gpt-4o / glm-4v |
apiKey |
你的 API Key(留空 = 保持不变) | sk-... |
maxTokens |
最大输出 token | 2048 |
保存即生效(无需重启)。配置存于 ~/.config/mm-vision/config.json。
不填设置页也可以:插件会回退读取同路径配置文件或环境变量
MM_VISION_API_KEY/DASHSCOPE_API_KEY/QWEN_API_KEY/OPENAI_API_KEY/GEMINI_API_KEY。
使用
- 粘贴 / 拖拽一张图片到输入框(出现缩略预览)
- 直接按 Enter 或点发送(或先点 🖼️ 按钮只转文字)
- 等约 1 分钟(思考型视觉模型对复杂图较慢),自动转为文字描述并发送
- 模型就能"看"到图了
转换期间输入框显示"正在把图片转为文字后发送…";失败会提示并保留图片,不会丢内容。 多张图片逐张转换、一起发送。
原理
- 发送接管:Enter / 发送按钮(捕获阶段)→ 输入框有图片草稿且模型非多模态 → 阻止原生提交
- 页面读取 blob 图片(浏览器内存,模型拿不到)→ base64 → 本地路由
/plugins/mmv/analyze - host 以
danger-full-access策略运行固定内容的 node 子进程,直连你配置的视觉 API (OpenAI 兼容协议)——不依赖本机沙箱后端(Windows ACL / Linux bubblewrap / macOS sandbox-exec), 任何平台都能跑;仅限本机页面调用(Origin 校验),请求只发往你自己配置的地址
插件不依赖 DSH 的任何模型适配器,任何 OpenAI 兼容视觉端点都能用。
开发
lib/index.js # host 半:本地路由(capability/config/analyze)+ node 子进程视觉调用
lib/client.js # client 半:发送接管 + 输入框按钮 + 设置页配置表单(浏览器 bundle)
License
MIT
Links
More in this category
liustack/modlens★ 4063
Vision bridge for text-only models: paste an image, get structured JSON evidence (OCR, layout, semantics).
ysr666/dsh-vision-router★ 1125
Free vision for text-only agents: built-in keyless vision chain plus pixel tools (Q&A, grounding, crop, pixel diff, colors, OCR, SVG trace, cutout, screenshots); paste an image to use it.
Anionex/dsh-vision-toolkit★ 884
Vision for text-only models: paste an image and the model switches to a Vision Toolkit variant for image Q&A, multi-image comparison, long-screenshot OCR, screenshot-to-UI reproduction, element grounding, and pixel diff. No API key by default — images are processed by the author-hosted free service, 100 per machine per day; configurable to your own provider.
dickpy/dsh-imagegen★ 93
AI image generation for the DSH Web GUI: text-to-image and image-to-image through a configurable OpenAI-compatible endpoint (gpt-image-2 / gpt-image-1 / dall-e-3), with an api_url/api_key settings card and a sidebar split-pane generation studio.
fandc520/dsh-comfyui★ 89
Drive a local or remote ComfyUI server from DeepSeek Harness: comfyui_run / comfyui_object_info / comfyui_workflow tools generate and edit images and videos, with a workflow library (graph extraction: per component / main flow / all), a load area with resolution auto-match, a live queue, SDXL and Wan 2.1 templates, a companion skill, and a same-origin media proxy.
sunxin-ai/dsh-design-qa★ 44
Design-fidelity QA for text-only models: a `deepseek_vision` tool borrows an eye from any OpenAI-compatible vision route, so the model can judge whether an implementation matches its mock — shipped with the benchmark behind that judgement (four fixtures, 23 injected defects, raw transcripts) and the questioning discipline it depends on.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.