Preliminary Notes

The message attachment protocol in DeepSeek Harness (DSH) currently supports images only. On desktop, when a user tries to send non-image files (such as .pdf, .md, or .txt files) to an agent by dragging and dropping, the native functionality cannot handle them directly. The dsh-desktop-drop-path plugin intercepts drag events, uses the Electron preload bridge mechanism in DSH Desktop to obtain the actual absolute file path, and inserts it into the input box as text.

Plugin Overview

  • Description: Drag a file into the DSH composer input box to automatically fill in its absolute path.
  • Maintainer: duanzongyuan
  • License: MIT

Core Features

  1. Automatic absolute path insertion: When a file drag is detected, the plugin no longer attempts to upload the file; instead, it writes the file’s full absolute path into the input box.
  2. Multi-file support: Supports dragging in multiple files, one path per line.
  3. Desktop-only: Depends on the Electron preload bridge mechanism in the DSH Desktop application (window.__DSH_DESKTOP_FILE_PATH__).
  4. Ignore images: When an image is dragged in, the plugin does not intervene, preserving DSH’s built-in image attachment functionality.

Installation and Activation

Install the plugin from the GitHub repository using pnpm. After installation, restart DSH Desktop.

pnpm dsh plugin --profile <profile-name> add git+https://github.com/duanzongyuan/dsh-desktop-drop-path.git

Replace <profile-name> with your DSH profile name (for example, desktop), and replace duanzongyuan with your GitHub username.

Typical Usage

  1. In the DSH Desktop input box area, drag a non-image file (for example, a .pdf, .md, .txt, or .json file).
  2. The plugin intercepts the action and inserts the file’s absolute path into the input box as plain text.
  3. The agent can directly read the contents of the file at that path.

Applicable Scenarios and Caveats

  • Runtime environment limitation: This plugin works only in the DSH Desktop environment. In a pure browser environment (Web UI), the Electron preload bridge does not exist, so the plugin does not install any code and remains idle.
  • Dependency coupling: The plugin depends on the dragend reset mechanism provided at the window level by the @deepseek-ai/dsh-client-ui-attachment plugin to clear the overlay. If the behavior of that internal plugin changes, the plugin code may need to be adjusted.
  • Event stage: Drags of non-image files are consumed during the capture phase, and the built-in image handler does not reject these operations.

Summary

This plugin solves the problem of DSH being unable to send non-image files by drag and drop on desktop. By providing a file path instead of uploading a file, it enables the agent to directly read resources in the local file system.