Introduction¶
DeepSeek Harness (DSH) uses a plugin-based architecture. When using a text-only model, pasting an image often only displays the file path or cannot be processed at all. dsh-paste-preview solves this problem by allowing images to be handled as file attachments in text models while retaining thumbnail previews.
Plugin Positioning¶
dsh-paste-preview is a DeepSeek Harness (dsh) web plugin maintained by wertyq111. It converts pasted images into thumbnails and keeps a zoomable preview after the message is sent. The license is MIT.
Core Features¶
- Paste generates thumbnails: When you paste an image into the input field, the attachment bar shows a thumbnail instead of the file path.
- Compatibility with text-only models: When the selected model does not support image input, the image is repackaged as a regular file attachment, stored by DSH, and can be read by tools such as
modlens_read_image. Vision-capable models retain the native path. - Thumbnails in messages: Sent messages display a zoomable thumbnail, which persists after the page is refreshed.
- Multiple input methods: Supports drag-and-drop upload and file picker upload.
Installation and Enablement¶
- Run the installation command:
dsh plugin add dsh-paste-preview
- After installation, restart DSH for the change to take effect.
Usage Notes¶
- Compatibility with modlens: If you are also using
@liustack/modlens, its defaultpasteToPathfeature intercepts paste operations, so it must be disabled incordis.patch.yml:
- id: modlens
config:
pasteToPath: false
- Message display mechanism: Thumbnails in sent messages rely on DSH’s built-in file card component. If DSH changes the structure of this component in the future, the behavior may degrade to a plain file card. In addition, before message persistence is complete, a plain file card may be briefly displayed.
- Permissions and validation: All HTTP routes of the plugin are checked through DSH’s
connection.requestRejectionmechanism, and unauthenticated requests return 401. Stored files are read through DSH’s attachment storage, and the name, size, and digest are revalidated.
Conclusion¶
This plugin bridges the experience gap between vision models and text-only models through deliberate routing design. If you need to process images in a pure text environment while maintaining an interactive experience, you can integrate it by referring to the documentation and source code.