Preface¶
When sending messages with images in DeepSeek Harness (DSH), images typically go to the attachment rail while text is arranged separately in the bubble. If you want to “directly reference a specific image within the text” (e.g., “See pic-2.png in Step 2”) while ensuring a one-to-one correspondence between the model-side handle lines and attachments, you need to implement paste interception, inline referencing, and serialization coordination at the Web GUI layer. Below is an introduction to the community client plugin dsh-inline-pastes (maintainer: qgynisc): upon pasting an image, it inserts an inline capsule at the cursor, shows a floating name with a thumbnail preview, and automatically numbers them according to rules. It works in both DSH Desktop and the dsh web browser client.
What is this¶
dsh-inline-pastes (npm package name @qgynisc/dsh-inline-pastes, current version 0.6.0) is a client-side plugin for the DeepSeek Harness Desktop built-in Web GUI, categorized as a client plugin. It relies solely on Web client APIs (conversation / sessions / uiSession / inputTriggers) and the DOM, without depending on desktop-specific bridges. Therefore, its behavior is consistent across DSH Desktop and dsh web.
The core problem solved by the plugin: extending “paste image” from “go to attachments only” to “insert a readable reference capsule at the cursor + send the attachment as usual with the message,” while providing a hover preview and pre-send self-checks on the interface side to reduce the risk of text and image misalignment.
Core Features¶
Inserting Images in Text¶
When pasting an image, an inline capsule is inserted at the cursor (showing a short name like pic-1 by default). The image is still sent as an attachment with the current message via the official DSH pipeline, and the model receives the image as usual.
Hover Preview¶
Hovering the mouse over the capsule name (either in the input box capsule or the same text within a sent bubble) will pop up a thumbnail preview card showing dimensions and file size; it collapses when the mouse moves away or when pressing Esc.
Auto-numbering¶
Names are assigned prefixes based on the broad media category, with extensions following the real MIME type (e.g., PNG becomes pic-1.png, pic-2.png; WebP / JPEG / GIF become pic-1.webp / pic-1.jpg / pic-1.gif). v1 only handles image pasting (image/png|jpeg|webp|gif); naming rules for audio, PDF, etc., are reserved in the code, but the settings page currently primarily exposes image-related prefixes.
Counting restarts from pic-1 for each message (the criterion is that there are no existing capsules from this plugin in the current draft); the paste order, numbering, and attachment order remain consistent within the same message. After sending, the draft is cleared, and the next message starts counting from 1 again.
Settings Page: Settings → Mixed layout¶
After installation and restarting DSH, Mixed layout will appear in the settings. Key items include: UI language (Follow DSH / Chinese / English), naming prefix (default pic, optional image or custom), display short name or full filename in capsules, four levels of thumbnail badge sizes, and behavioral switches such as enable plugin, intercept image pastes, hover name preview, and pre-send self-check. Settings are stored in localStorage per device (dsh-inline-pastes:settings:v1) and take effect immediately upon change.
When “Capsule Display” is set to short name, you see pic-1 in the input box, but the text and model-side handle after sending remain the full name pic-1.png; if you want consistency in both places, you can change it to full filename in the settings.
One-to-One Correspondence with the Model Side¶
When DSH sends images, it inserts handle text (containing filename and sha256, etc.) immediately before each image. When the model reads pic-1.png in the text, the corresponding image handle line in the same message has the same name, avoiding guessing images by pure sequence. The plugin ensures consistency between paste order, numbering, and attachment order within the same message; if a thumbnail is deleted from the dock but the text capsule is not, numbering may be offset from the image count. It is advisable to scan or delete the capsule simultaneously before sending.
Codec Registration¶
During sending, the official client re-serializes based on “Capsule source → codec.” This plugin registers the inline-paste codec via inputTriggers.registerSource to avoid sending failures caused by slash: no serializer for reference source "inline-paste"; if inputTriggers is unavailable, it falls back to plain text insertion.
Installation and Activation¶
It is recommended to use the built-in DSH plugin installation command (desktop profile):
dsh plugin --profile desktop add git@github.com:qgynisc/dsh-inline-pastes.git
Restart DeepSeek Harness after installation to take effect, as the client bundle will be reloaded.
To uninstall, remove @qgynisc/dsh-inline-pastes from dsh.profile.bundles and dependencies in the profile, or use npm run uninstall:desktop provided in the repository (requires a local clone).
Verification: After restarting, execute in the browser console; __dshInlinePastes.version should equal the installed plugin version number (e.g., 0.6.0).
Typical Usage¶
- Paste a screenshot or clipboard image at the position in the input box where you want to reference it.
- A capsule like
[🖼 pic-1]appears at the cursor, and the corresponding thumbnail appears on the attachment rail. - Continue writing the description in the text, for example:
1. Feature 1 [🖼 pic-1]
2. Feature 2 [🖼 pic-2]
3. Bug fix as shown: [🖼 pic-3], make it automatically locatable.
- Before sending, you can hover over
pic-1orpic-1.pngto view the preview; if pre-send self-check is enabled, prompts will appear above the input box if names and images are inconsistent. By default, the first Enter press is intercepted, and pressing it again allows sending. - The sequence number badge can be displayed at the bottom left corner of the thumbnail (size adjustable in settings) to facilitate comparing “which image”.
Settings can also be changed temporarily via the console, for example:
__dshInlinePastes.setSettings({ badgeSize: 'lg' })
__dshInlinePastes.resetSettings()
Applicable Scenarios and Notes¶
Who it is for: Developers who frequently write step descriptions, bug reproductions, or multi-image comparisons in DSH; users who need to refer to attachments with stable filenames in the body text and want quick hover previews.
Permissions and Security: The plugin runs with the permissions of the current DSH process and Web client. It intercepts pastes, reads/writes localStorage, injects DOM, and registers inputTriggers. You should read the GitHub repository source code and MIT license before installation, and only install from trusted sources.
Ecosystem Description: The DSH community plugin directory (such as the SkillHub Directory Page) is maintained by the community and has no official subordination to DeepSeek / High-Flyer; installation and upgrades are subject to the repository README and releases.
Other Notes: Numbering defaults to restarting per message, so the same name pic-1.png may appear in different messages; you need to distinguish them yourself when referencing across messages. If continuous numbering for the entire conversation is required, you need to change DEFAULTS.counterScope to 'session' in src/client.js and rebuild (this item is not yet open in the settings page). Extremely old or non-Web clients may not see the settings page, but pasting, capsules, and previews may still work.
Conclusion¶
dsh-inline-pastes consolidates DSH image pasting into a dual-track system of “Body Text Capsule + Official Attachment”: providing clear naming when writing messages, ensuring alignment between filenames and handles on the model side after sending, and accompanied by hover previews and pre-send self-checks. If needed, you can learn about it from the directory page or view full documentation and issues on GitHub.
- Directory Page: https://www.skillhub.cn/plugins/qgynisc/dsh-inline-pastes
- GitHub: https://github.com/qgynisc/dsh-inline-pastes