DeepSeek Harness (DSH) client plugin system allows extending default capabilities. The default official attachment pipeline is optimized specifically for images, and documents (such as PDF and Word) cannot be uploaded through that path. Inlining text directly consumes a large amount of context. The dsh-md-picker plugin solves this by converting documents to Markdown and storing them, enabling the agent to read them on demand via file tools.
Core Features¶
- Image Composition and Injection: Images are injected into the official attachment pipeline through a composed drop, with thumbnail preview and count/size validation.
- Text Stored As-Is:
.txt,.md, and.markdownfiles are read as raw bytes; the server auto-detects encoding (BOM/UTF-8/GBK, etc.) and stores them uniformly as UTF-8. - Document Conversion to Markdown: Supports multiple formats, including
.doc/.docx,.ppt/.pptx,.xls/.xlsx,.pdf,.rtf,.odt/.ods/.odp,.csv,.epub; conversion is performed byanydocon the server side. - Duplicate Upload Deduplication: Based on SHA-256 content fingerprints, identical content only returns the existing path, without persisting duplicate files.
- Security and Directory Protection: Open access by default, with optional token authentication (LAN hardening). When the attachments directory is created, a
.gitignoreis automatically written to prevent it from being added to version control. - Interaction and Feedback: Supports upload progress display and drag-and-drop of files from anywhere. The message body inserts only a very short receipt (path, character count, preview), without occupying conversation context.
Installation and Configuration¶
The plugin is deployed via an installation command and relies on the host environment.
dsh plugin add github:shangfr/dsh-md-picker
Prerequisites:
* Node 20+ is installed on the host (DSH Desktop includes npx).
* The repository must declare dsh.bundle (already declared in this package).
On first document conversion, npx automatically downloads anydoc.
How It Works¶
The plugin adds a button to the left of the session input box. The interaction logic is as follows:
- Images: A composed drop is injected and received by the official ComposerAttachments.
- Text: POST to local
/dsh-md-picker/store; encoding is detected and the content is stored as UTF-8 in the working directory. - Documents: POST to local
/dsh-md-picker/convert;anydocconverts the document to Markdown, and it is written to disk after SHA-256 deduplication. - Others: Lists an “unprocessed” list.
Attachment directory resolution order: environment variable DSH_MD_PICKER_DIR > session workspace > current working directory > ~/.dsh/md-picker-attachments/.
Limitations and Notes¶
- Per-file limit: 25 MB; exceeding it returns 413.
- Other types: For types that are not images, text, or supported convertible document types, the receipt lists an “unprocessed” list.
- PDF Scanning: If the PDF requires OCR, anydoc exits with code 3 and the response returns 422, indicating that OCR is required.
- Dependency Environment: The host must have Node 20+ and npx.
Use Cases¶
Suitable for developers who need to process documents in DSH and want to avoid context overflow. The plugin runs with the permissions of the current dsh process; it is recommended to inspect the source code and license before installation.
Conclusion¶
This plugin solves the insufficient document support in DSH’s official attachment pipeline by standardizing document formats and storing them locally.