Introduction¶
DeepSeek Harness (DSH) provides plugin-based extensibility. In agent development, pasting an image into the input box is usually treated as a temporary in-memory draft. When the input box is remounted due to a conversation switch or re-rendering, these drafts are lost and need to be pasted again.
dsh-draft-keeper is a plugin maintained by XWIDE, designed to solve this problem.
Plugin Overview¶
The plugin’s core value is “mirroring images to IndexedDB and storing them by conversation.” Through a local storage mechanism, it automatically reconstructs File objects and restores images when the input box is remounted, solving the issue of images disappearing after switching away from a conversation and back.
Core Features¶
- Automatic mirroring and restoration: The plugin mirrors image drafts in the input box to the browser’s IndexedDB. When the input box is remounted, it automatically attempts to restore these images.
- Automatic cleanup: After a message is sent or an image is manually deleted, the corresponding record in storage is immediately cleared.
- Scope limitation: The plugin only handles drafts with
kind === "image", without interfering with documents or other file types. - Capacity limitation: Each conversation supports up to 12 images or 32 MB of storage.
Installation and Activation¶
The plugin has no UI and no configuration options; it is ready to use after installation.
Using the official install script (Linux/macOS):
curl -fsSL https://raw.githubusercontent.com/XWIDE/dsh-draft-keeper/main/install.sh | sh
Manual installation (Web Profile):
dsh plugin --profile web add git+https://github.com/XWIDE/dsh-draft-keeper.git
After installation, restart the DSH process or UI.
Usage¶
- Paste an image into the input box.
- Switch to another conversation.
- Switch back to the original conversation.
- The image will automatically appear in the input box.
Compatibility and Limitations¶
- Host environment: Requires Node.js 22.19+ or 24+.
- DSH version: Compatible with DSH 0.2.0-rc.1 (compatible) and 0.2.0-rc.2 (tested).
- Privacy and security: Data is stored only in the local browser’s IndexedDB; there are no network requests or telemetry, and no UI interactions.
- Isolation: Storage is isolated by browser Profile and conversation.
- Restoration timing: Restoration is attempted only when the input box is idle and in the
plainstage, with up to 6 retries.
Conclusion¶
dsh-draft-keeper uses a local cache to solve the common draft-loss problem in DSH, making it suitable for scenarios that require frequent image pasting for debugging or development.