Introduction¶
DeepSeek Harness (DSH) adopts a plugin-based architecture. On desktop, the official behavior is that text drafts in the input box are preserved after page switches or application restarts, but uploaded images or files are typically lost. This plugin captures these attachments via IndexedDB and rebuilds them through the official createDrafts channel during restoration, making attachments persist just like text.
Core Features¶
- Persistent Draft Attachments: Supports image/file drafts in the DSH input box, automatically restoring them across page switches and application restarts.
- IndexedDB Storage: Based on browser IndexedDB, storing attachment bytes and metadata per session.
- Official Channel Restoration: Does not modify official source code; rebuilds drafts through official slots and the
createDrafts/addAttachmentschannel. - Sync Mechanism: Supports automatic capture and clearing synchronization. Records in IndexedDB are automatically cleared after successful sending or manual deletion of attachments.
Installation and Activation¶
This plugin requires local installation. Edit the ~/.dsh/profiles/desktop/package.json file and follow these steps in order:
- Add the following to the
dependenciesfield:
"dsh-draft-attachments": "file:D:/桌面/AI Port/DSH plugins/dsh-draft-attachments"
- Add the following to the
dsh.profile.bundlesarray in the same file:
"dsh-draft-attachments"
- Run the following in the profile directory:
pnpm install
- Restart DeepSeek Harness.
Typical Usage¶
After installation, upload images or files in the DSH input box. If you switch to another page, switch sessions, or close and restart DSH, when you return to that session, unsent attachments will be automatically restored to the input box with thumbnails displayed as-is. After manually deleting attachments or sending them successfully, draft records will be automatically cleared.
Use Cases and Notes¶
- Limits: Single attachment size limit is 30 MB, total size limit per session is 120 MB. Attachments exceeding these limits will not be persisted.
- Restoration Timing: Restoration only occurs when the input area is mounted and currently has no attachments. If in a submission lock phase (
adjudicating/submitting), backfilling will be rejected and must wait until the next mount. - Source Code Modification: The plugin does not modify any official source code; on failure it only warns and does not affect normal input.
- Data Storage: Plugin data is stored in the browser’s IndexedDB
dsh-draft-attachmentsdatabase. - Uninstallation: To uninstall, remove entries from
dependenciesanddsh.profile.bundlesinpackage.json, runpnpm install, and restart.
Conclusion¶
This plugin implements persistence of draft attachments through official slots, solving the issue of attachment loss when switching sessions in DSH desktop. Source code and documentation can be found on the directory page or GitHub.