Introduction¶
The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” During agent development or day-to-day debugging, developers often use text-only models (such as DeepSeek or the GLM series) to process code or documentation, but images in the clipboard cannot be sent directly. The system usually displays a message in the composer such as “This model does not support vision; please switch to a vision model,” interrupting the workflow.
This plugin intercepts image paste operations in the composer at the capture stage, writes the image bytes to disk through the dsh-drop-caret upload route, and inserts the file path into the input field. This allows the text-only model to remain usable, while the image content is passed to downstream workflows or vision tools for processing via the file path.
Plugin Role¶
This is a DSH Web client plugin maintained by quei4r under the MIT license. Its core purpose is to solve the problem that text-only models cannot receive images: for text routes listed in the configuration, it intercepts paste operations and converts them into file paths; for vision models, it leaves native behavior untouched.
Core Capabilities¶
- Paste interception and conversion
Intercepts image paste events inside the composer (textarea / contenteditable). Images are uploaded to the session directory and generate a file path, and finally are inserted into the input field as text. - Native pipeline protection
It only applies to thetextOnlyRouteslisted in the configuration. Native thumbnail, draft attachment, and other behaviors of vision models and other unconfigured models remain completely unaffected. - Operation bypass
Supports theAlt+Pasteshortcut to bypass the plugin interception and fall back to native product behavior. - Compatibility
Compatible with@deepseek-ai/dshversion 0.1.0-rc.6.
Installation and Activation¶
This plugin relies on host routes to provide configuration bridging and file upload services.
- Copy the plugin files
Copy the plugin directory into the local DSH installation directory.
cp -r dsh-client-paste-image ~/.dsh/profiles/web/node_modules/
- Configure a Patch
Add the following entry to theinsertlist in~/.dsh/profiles/web/cordis.patch.yml:
- id: ui-paste-image
name: dsh-client-paste-image
- Restart the service
Because the host’s semi-registered routes only take effect at startup, you must restartdsh webafter installation to load the configuration.
Typical Usage¶
The plugin uses the textOnlyRoutes configuration option to control where it is active. Only models listed in this array will trigger the image-to-path conversion logic.
- id: ui-paste-image
name: dsh-client-paste-image
config:
textOnlyRoutes:
- zai-coding-cn/glm-5.3
- "opencode-go/deepseek-*" # 使用通配符匹配
After configuration, paste an image in the composer, and the system automatically uploads the file and inserts the path text. When sending, any paths included in the text are serialized.
Use Cases and Considerations¶
Use cases:
* You need to reference images in the context of a text-only model (such as DeepSeek-Coder).
* You are using workflow or agent mechanisms and need to pass image paths to downstream vision models or tools.
Considerations:
* Prerequisites: dsh-drop-caret must be installed and running, as it provides the POST /api/dsh-drop upload route.
* Empty configuration list: If the textOnlyRoutes list is empty, the plugin remains in a fail-safe state and does not intercept any paste operations.
* File storage: Image files are written to the <session cwd>/.dsh-drop/<sessionId>/ directory.
* Session ID retrieval: The plugin depends on the sessionId injected by the conversation slot, ensuring compatibility with the DSH version.
Conclusion¶
dsh-client-paste-image is a concrete solution for the issue that text-only models in DSH Web cannot directly handle images. By intercepting and converting, it fills a gap in the toolchain and makes model selection and context passing more flexible. Refer to the plugin directory or source repository for more details.