How to use dsh-image-bridge
Provides image bridging for DSH Web plain text model: saves pasted images to local paths and rewrites them as text markers for sending, allowing the model to independently call visual tools from its directory to view images.
This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.
This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.
Quick start
dsh-image-bridge
— source: plugin_wiki.wiki_content
Install & verify
dsh plugin --profile web add @kbpoyo/dsh-image-bridge
Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.
— source: plugins.install
Key points
- 一键桥接:纯文本模型下,输入框粘贴图片后出现「桥接发送图片」按钮,点击即可发送,模型能读到图片。
- 回车兜底:不点按钮、直接回车发送图片,也会在发送入口自动改写为桥接标记发送,与按钮等效。
- 多模态直通:多模态模型下按钮自动隐藏、图片原生发送,插件零干预。
- 即时感知:会话中切换模型,按钮立即显隐,不闪烁、不跳动。
- 自动清理:桥接产生的临时图片定时自动清理,无需手动管理。
— source: plugin_wiki.readme_en (fallback readme_raw)
FAQ
Do I need to configure anything after installation?
No, you don't need to. The config in cordis.patch.yml defaults to empty; after npm installation, simply restart dsh web to take effect; in text-only model sessions, pasting an image will show a "Bridge Send Image" button (cordis.patch.yml:1-5 / README.md:25-27).
What image formats and sizes can be bridged?
Follows attachments.imageLimits: supports PNG / JPEG / WebP / GIF (other types fall back to .png), single and total size limits, and max images per message are determined by the host config; the button performs full validation against limits at onClick (lib/index.js:35-43 / lib/index.js:214-236).
Where are the temporary images stored? Will they stay on disk permanently?
Stored in a hidden directory under the current session's workspace <cwd>/.dsh-image-bridge/ (starts with a dot, not shown in regular file managers); the plugin cleans up files older than 24 hours or when the directory exceeds 512 MB (oldest first), and also cleans up on plugin uninstall (lib/index.js:27-28 / lib/index.js:76-100 / README.md:76-79).
Will the button disappear after switching to a multimodal model?
Yes. The client subscribes to the official model directory store (event-driven) and adds a 1-second fallback poll; the button hides immediately when switching; for multimodal models, images are sent directly via native, the plugin doesn't intervene (lib/client.js:131-151 / README.md:12).
Can the bridged model really "see" the images? Do I need to manually select a vision tool?
It depends on whether the model itself has vision/OCR/grounding tools in its directory—the plugin only delivers the image and writes in the text marker "Check current available skills and tools first before calling". You don't need to specify a tool; if the model directory has no vision capability, the model will honestly tell you so (lib/index.js:151-159 / README.md:73).
What if the button keeps showing for a custom provider's text-only model?
The adapter only reports as multimodal when its model declaration contains input: ['text','image']; custom models without input declared are always reported as text-only, the plugin faithfully reads this. To hide the button, you need to add the input field in the model declaration or use adapter-managed directory (README.md:79-89).
Can I switch back to a text-only model after sending an image?
No, this is a DSH native limitation (session logs with native images cannot switch back), you need /compact or start a new session; this plugin doesn't bypass this limitation (README.md:81-82).
Does the bridging override parent-to-child agent image sending?
No, it doesn't override. Messages with images sent from parent agent to child agent don't go through session.prompt, they still go through the native gate MODEL_DOES_NOT_SUPPORT_IMAGES (README.md:91 / lib/index.js:300-305).
— source: plugin_wiki.faq_json
Compatibility
- DSH: >=0.1.0-rc.6
- Node: 未声明
— source: plugin_wiki.compatibility_json
Pitfalls
Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.
— source: general rule