Introduction

In the DeepSeek Harness (DSH) development workflow, passing local files to the model usually requires manually copying file paths. This plugin solves this pain point by allowing users to save files to the current workspace via pasting, dragging and dropping, or file selection, and automatically inserts the relative path into the input box.

Plugin Overview

This plugin is maintained by lhh666-6 and is an open-source plugin under the MIT license. It enables file upload and path injection by adding an interactive entry point to DSH’s composer interface.

Core Features

The plugin has responsibilities on both the Host side and the Client side:

  • Client-side interaction: Registers to the conversation.input.left slot and adds a “Paste Files” button to the left of the composer, supporting multiple file selection. It also listens for paste, drag-and-drop, and file-selection events in the input box.
  • Host-side processing: Registers the /_dsh-paste-files/upload route. After receiving an upload request, it reads the current session’s cwd from SessionStore based on sessionId and saves the file(s) to the pasted-files directory in the current workspace.
  • Path insertion: After the file(s) are saved successfully, it inserts the relative path into the input box draft as inline code.

Installation and Activation

Install it using DSH’s CLI:

dsh plugin --profile web add dsh-paste-files
dsh plugin --profile desktop add dsh-paste-files

After installation, restart DSH or switch the profile once to make it take effect.

Typical Usage

  • Click the “Paste Files” button on the left of the composer, then select or paste files.
  • Paste files directly into the input box, or drag files into it.
  • The plugin automatically handles file upload and inserts a path code similar to `pasted-files/1724320000000-report.pdf` into the input box.

Notes

  • Browser limitations: For security reasons, browsers cannot obtain the absolute file path, so this plugin uses the approach of “uploading to the workspace and then inserting the relative path”.
  • File size limit: The current default per-file limit is 64 MiB.
  • Image handling: If only images are included, DSH’s native behavior is preserved; if non-image files are included, it intercepts and uploads all files.
  • Protocol limitations: This plugin is only used to generate model-readable paths and does not add a generic binary attachment protocol.

Conclusion

After the steps above, the plugin becomes active. By simplifying the interaction flow, this plugin automates file uploads and path injection, making it suitable for development scenarios that require frequent references to local files and interaction with DSH.

Plugin Directory
GitHub Repository