Preface¶
In DeepSeek Harness (DSH), attaching local files to a conversation is primarily handled by the core pipeline within the official client packages. Validation, upload progress, the attachment bar, and prompt texts are all implemented in modules such as @deepseek-ai/dsh-client-ui-conversation, @deepseek-ai/dsh-client-file-upload, and @deepseek-ai/dsh-client-ui-attachment. Starting from DSH 0.1.7, the core can also recognize when a folder is dragged in, but it rejects entire folders in the browser. Specifically, if addFiles() does not detect the desktop host bridge (globalThis.__DSH_HOST_PATHS__), it displays a prompt stating that folders can only be added in the desktop application. On the desktop side, the folder is converted into an @path/ reference chip rather than being expanded into multiple uploadable files.
If you primarily use the DSH Web profile in a browser but want to drag an entire project directory at once—letting the files inside go through native upload and attachment display—you need to fill the single step the core misses without “reinventing” the UI or upload pipeline: expanding the folder into individual files and handing them back to the built-in intake. The following introduces how the community plugin dsh-file-drop (maintainer xuechengzou, category: Web Tools) fulfills this gap-only role.
What is this¶
dsh-file-drop is a lightweight extension for the DSH Web composer attachment entry. When a folder is dragged in, it uses webkitGetAsEntry() to traverse the directory (limited to 2000 files and a depth of 16 levels). The collected files are re-dispatched as a “standard drop event containing only files,” passing them to the core’s existing bubble-phase listeners. Consequently, validation, limits, notifications, the attachment bar, streaming uploads, and progress displays are identical to dragging multiple files directly. The plugin itself does not render rails, full-screen overlays, or toasts, nor does it write to drops/ or inject @drops/... references.
The Host-side lib/index.js is an intentional no-op (inject is empty), leaving ctx.fileUploads and profile startup behavior unchanged. The positioning change of version 2.0.0 compared to 1.x is explained in the README: version 1.x built its own chip rail and capture-phase drop listener with stopPropagation(), which blocked the built-in drag-and-drop; the current version only performs folder expansion and hand-off.
Core Features¶
Folder Expansion and Hand-off to Built-in Intake¶
The plugin intervenes only when a directory entry genuinely exists in the drop items; for standard file drag-and-drop, it returns immediately without modifying behavior. Once expansion is complete, a file-only drop is synthesized, and the core’s validation, upload paths, and UI all follow the official implementation.
Intentional Override of Browser Policy (DSH 0.1.7+)¶
In the browser, __DSH_HOST_PATHS__ is never assigned, so the stock behavior is to reject folder drag-and-drop. With this plugin enabled, the browser accepts dragged folders and adds them as attachments as individual files. Disabling or removing the plugin restores the default logic introduced in 0.1.7 (browser rejects folders, desktop shows reference chips). The README explains that this override is a deliberate product choice; the hand-off contains no directory semantics, and the expanded results follow the standard upload path.
Non-interference and Fail-safe¶
Guarantees listed in the README include: no interference with pure file drag-and-drop, no rendering of extra UI, no Host injection, and no parallel storage. If the composer is not mounted or the browser does not support the directory-entry API, the plugin does not intervene, preserving the core’s original behavior.
Compatibility Notes¶
Development and verification were conducted on DSH 0.1.6-alpha.2 and re-verified on 0.1.7-alpha.1 (folder contract change) and 0.2.0-rc.1. The plugin relies only on detecting the existence of the composer’s hidden file input ([data-composer-card] input[type="file"]) and the document drop event. The README states that the directoryDesktopOnly gating in addFiles() in 0.2.0 remains consistent with 0.1.7.
Installation and Activation¶
The plugin must be added to the web profile. The official README provides the installation method using a local directory path (not a github:owner/repo one-click name):
dsh plugin --profile web add <path-to-this-directory>
Replace <path-to-this-directory> with the path to the locally cloned or extracted plugin root directory.
Activation requires satisfying two layers of profile status simultaneously (as per the README):
- The
~/.dsh/profiles/web/cordis.patch.ymlfile must contain a force-enable line:- id: dsh-file-dropwithdisabled: false. dsh-file-dropmust not remain in thedisabledarray of~/.dsh/profiles/web/.dsh-market/state.json; the market re-applies the disable list on every startup, and a stale entry will override the enablement at the patch layer.
The force-enable line should be placed outside of any # <plugin>: begin/end marker blocks—those blocks are rewritten by their respective plugins. After modifying activation status, you must restart DSH, or toggle the switch in the plugin market panel and then refresh the page, so the browser-side loader loads the client fiber.
Typical Usage¶
The README does not provide an independent “business scenario script”; the reproducible usage is simply drag-and-drop on the Web conversation composer:
- Install and enable the plugin as described in the previous section. After restarting or refreshing, open the DSH Web conversation page.
- Drag an entire folder from the system file manager into the composer’s drop zone (this must be a drop containing directory entries; pure multi-file drops are handled directly by the core and do not involve the plugin).
- Observe the attachment bar and upload progress: upload cards for each file inside the folder should appear. The behavior is identical to dragging files in one by one, rather than the “folders can only be added in desktop” prompt found in the stock browser.
Test commands within the repository (used to verify manifest and expansion logic, not mandatory for end-users):
node test/package.test.mjs
node test/logic.test.mjs
Use Cases and Notes¶
Who it is for: Agent or Harness users who primarily use the DSH Web profile in a browser, need to drag large amounts of source code or documents from a directory at once, and want to fully utilize the official attachment UI and upload limits.
Permissions and Security: The plugin’s client code runs in the browser alongside the DSH Web process. Expanded files still go through the core upload and the model-side read-only host path contract (as stated in the README). Before installation, you should read the GitHub repository source code and the MIT license (version in package.json is 2.0.0) to evaluate whether to include it in your profile.
Boundary with Core: This plugin does not replace the desktop @path/ folder reference chip behavior. If you require the stock 0.1.7+ browser folder rejection policy, simply disable the plugin. The traversal limit is 2000 files / 16 levels; for extremely large directories, you must split them yourself or switch to dragging single files.
Ecosystem Note: DSH adopts an “everything is a plugin” extension approach. The SkillHub directory page serves as a community plugin index and has no official affiliation with DeepSeek or High-Flyer.
Conclusion¶
Given that the DSH 2.x attachment pipeline is already complete, dsh-file-drop only fills the gap of “browser folder drag → expand to multiple files → hand-off to built-in intake,” avoiding UI duplication or fighting for events at the capture phase. With local path installation, correct configuration of the web profile activation items, and a restart or refresh, you can batch-attach files via folder drag-and-drop in the Web composer.
- Directory Page: https://www.skillhub.cn/plugins/xuechengzou/dsh-file-drop
- GitHub: https://github.com/xuechengzou/dsh-file-drop