Introduction

The native paste functionality of DeepSeek Harness (DSH) supports images only, which leaves developers unable to directly reference local file paths when handling non-image files such as Word documents, PDFs, and archives. The dsDragPasteALL plugin takes over the browser’s drag-and-drop and paste events, silently resolves the file’s actual on-disk path in the background, and inserts the path text into the conversation input box. This creates a Codex-like file-reference experience without copying the file content itself.

Plugin Overview

This plugin is maintained by the user balue8246-maker and is released under the MIT License. It does not depend on external services. It runs in the DSH Host process, handles file fingerprint computation and path resolution, while the client side handles event interception and UI feedback.

Core Features

  1. Arbitrary file types: Supports ZIP, Word, Markdown, PPTX, videos, and more, bypassing DSH’s built-in “images only” limitation.
  2. Paste routing: Pure image pastes (macOS/Windows screenshots, copied image files) are routed back to DSH’s native flow and recognized by the image plugin. Only pastes containing non-image files are taken over by this plugin.
  3. Locked queueing: While the AI is running (the input box is locked), dragged files or pasted screenshots are queued and automatically inserted into the input box after unlocking.
  4. Path first: Files in conventional locations such as Desktop, Documents, and Downloads are resolved to real paths 100% of the time, with zero content copying.
  5. Cache fallback: If the original file cannot be found, its content is cached to ~/.dsh/dragpasteall-cache and remains readable.
  6. Multi-file support: Dragging multiple files at once inserts one path per line.
  7. Unobtrusive feedback: Provides a full-screen drag-and-drop overlay and a lightweight bottom-right notification without adding unnecessary UI.
  8. Persistence and tooling: Import records are stored in ~/.dsh/dragpasteall-inbox.json, and the dragpasteall_inbox Agent tool is provided to inspect them.

Installation and Enablement

Install the local plugin package with pnpm add and enable the bundle in the configuration.

# 安装命令示例(请替换为本地实际路径)
pnpm add "file:/Users/acegent/Documents/ds 插件/dsDragPasteALL"

After installation, edit ~/.dsh/profiles/web/package.json, add "dsdragpasteall" to dsh.profile.bundles, and restart DSH Web to activate it.

How It Works

  1. Event interception: When dragging any file or using ⌘V to paste non-image files, the browser’s document capture phase intercepts the event (before DSH’s built-in handling).
  2. Fingerprint computation: Compute a lightweight file fingerprint (SHA-256 of the first and last 1 MiB concatenated) and send a POST request.
  3. Path resolution: The host side first uses mdfind (Spotlight) for full-disk lookup in seconds; if there is no hit, it falls back to conventional directory lookup with find + stat, comparing file size, modification time, and fingerprint.
  4. Result handling: If found, only the path is recorded; if not found, the content is uploaded in base64 chunks to the cache.
  5. Automatic insertion: The path is automatically inserted into the input box, and the Agent reads the file according to the path.

Platforms and Development

Platform support: macOS is preferred (using mdfind, stat -f, and shasum); non-macOS environments automatically fall back to conventional directory lookup with find + stat, still using the cache fallback path.

Development notes:
pnpm add file:... creates hard links. If you modify the source only through an editor, the hard links can become broken, and the page may still exhibit the old behavior after a refresh. After modifying the source, you need to re-establish the hard links:

cd ~/.dsh/profiles/web
rm -rf node_modules/dsdragpasteall && pnpm install

Summary

This plugin solves local file input by using path references and is suitable for scenarios that require handling non-image files. See GitHub.