dsh-file-drop: Writing Non-Image File Paths into the DSH Input Field

Introduction

In DeepSeek Harness (DSH), when an agent reads a file, it typically needs an accessible path. DSH has built-in image drag-and-drop support, but for non-image files such as PDFs, Word documents, Excel spreadsheets, ZIP archives, and plain text files, manually copying a path can feel cumbersome. dsh-file-drop provides a persistent plugin entry point: it lets you upload non-image files to the current session context via drag-and-drop or a click, then writes the file path directly into the input box draft so the agent can read it.

What This Is

dsh-file-drop is a persistent plugin for DeepSeek Harness. The repository is dannyvan/dsh-file-drop, licensed under MIT, requiring Node >=22.

The problem it solves is straightforward: turning non-image files into editable, continuable path text in the DSH input box. The file types include PDFs, Word documents, Excel spreadsheets, ZIP archives, and text files. The plugin does not “convert files into images”; instead, it tries to obtain a readable file path or workspace path.

Core Features

Below are the verified main capabilities.

Three Entry Points

  1. Supports dragging and dropping files anywhere in the window to upload non-image files.

  2. Supports clicking a paperclip button to open the system file picker with multi-select support.

  3. Supports a hover tooltip suggesting selecting a file or dragging a file anywhere into the window.

Path Acquisition Strategy

The plugin processes files in order of availability:

  1. The desktop shell directly retrieves the original Finder path, achieving zero-upload.

  2. Drag-and-drop provides a text/uri-list path, for example when dragging notes from Obsidian.

  3. In a browser or without a shell, files are uploaded to <session workspace>/.dsh-drops/ via POST /api/dsh-file-drop, and the workspace path is returned.

Writing and Interception

The plugin intercepts drag events during the window capture phase, ahead of DSH’s built-in document-level image drag handling.

Text files are written directly as text; binary files are decoded from base64 and written as actual bytes.

Installation and Activation

First, confirm that the Node environment satisfies >=22. The command below installs the plugin using a local link path:

dsh plugin --profile web add "link:/Users/fanxiaokang/dsh-file-drop"

After execution, restart dsh web for the changes to take effect.

Typical Usage

After the steps above, you can use the following entry points.

Drag-and-Drop Upload

Drag a file anywhere into the window; once the fullscreen highlight overlay appears, release the mouse button to obtain the file.

Paperclip Button

Click the 28px circular native-style paperclip button on the left side of the input box toolbar to open the system file picker with multi-select support.

Hover Tooltip

On hover, a tooltip displays “Click to select files · or drag files anywhere into the window”. It auto-dismisses after 1.5s and repeats every hover.

Using the Desktop Shell for Direct Path Retrieval

When using the desktop shell, the original path is retrieved directly through window.dshDesktop’s webUtils.getPathForFile.

When dragging Obsidian notes or other items that carry a text/uri-list path, the path can also be retrieved directly.

Browser or Shell-less Upload

In a browser or without a shell, files are saved to the session workspace via the following endpoint:

POST /api/dsh-file-drop

The save location is:

<session workspace>/.dsh-drops/

The workspace path is returned.

Optional Desktop Shell

The companion desktop shell is an optional but recommended component. Start it with:

cd ~/dsh-desktop/
npm start

It will reuse or launch dsh web at:

127.0.0.1:3080

Use Cases and Considerations

This plugin is suitable for handling non-image files in the DSH web interface, especially when you want to quickly write paths of PDFs, Word documents, Excel spreadsheets, ZIP archives, and text files into the input box.

Things to keep in mind before use:

  1. The per-file limit is ≤ 25MB, which applies to the upload fallback path; paths obtained directly via the shell are not subject to this limit.

  2. If a path obtained directly via the shell points to a file outside the workspace, the agent may require sandbox approval to read it; in workspace-write mode, permission configuration may be needed.

  3. The plugin runs with the permissions of the current dsh process. It is recommended to review the source code and license before installation.

  4. The installation command uses a local link path, and a restart of dsh web is required for the plugin to take effect.

  5. The companion desktop shell is an optional component; when it is not used, the browser path will fall back to upload.

Closing

The value of dsh-file-drop lies in simplifying the process of getting non-image files into a DSH session to just a drag-and-drop or a click, while ensuring the agent can directly obtain a usable path. The directory page and repository address are as follows:

https://www.skillhub.cn/plugins/dannyvan/dsh-file-drop
https://github.com/dannyvan/dsh-file-drop
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye