Introduction¶
In the DeepSeek Harness (DSH) ecosystem, enabling an Agent to process local files directly requires injecting file contents into the conversation input box. The older dsh-file-drop plugin implemented the basic functionality, but in EAC environments it conflicted with the vision bridge by injecting images twice.
dsh-file-drop-eac is an EAC-specific rewrite of the older dsh-file-drop. It is designed as the built-in replacement plugin for EAC clients, resolving the conflict while adding support for folders.
Core Features¶
The plugin executes different injection logic based on file type:
- Text / code files (such as
.md,.js,.py,.json, or files without extensions)
Automatically injects file contents into the input box (up to 256 KB) and adds a file header before the content:<!-- 拖入文件:<名> -->. - Binary / oversize files
Does not inject contents; instead, it injects a full disk path hint. The Agent can use file tools to read the file by path. - Images
Completely unmanaged. When an image is dropped, the plugin does nothing and leaves processing to the vision bridge or native thumbnail behavior, avoiding duplicate-injection conflicts. - Folders
Newly supported. The plugin detects when a folder is dropped, but due to browser security restrictions, it cannot obtain the folder’s absolute disk path. In this case, it provides an actionable fallback hint, such as “open this directory in the Files/Project Directory tab” or “drag key files one by one.”
Technical Implementation and Runtime Environment¶
The plugin is implemented entirely on the client side. Its directory structure is as follows:
dsh-file-drop-eac/
├── lib/
│ ├── index.js # host half(no-op,让包成为合法 bundle)
│ └── client.js # 浏览器半边(classic-script,经 __ModuleLoader__.load 注册)
├── test/
│ └── client.test.js # node:test + vm 沙箱(纯逻辑 + 端到端 drop 注入)
├── README.md
└── package.json
- Loading mode:
client.jsis a classic-script bundle; the official module loader supports only this form. - Path retrieval:
- Electron desktop: Retrieves the full disk path of the dropped file through
dshDesktop.getPathForFileexposed by preload (based onwebUtils). - Pure browser WebUI: Due to security restrictions, only a virtual path can be retrieved; the plugin automatically degrades to a readable prompt.
- Electron desktop: Retrieves the full disk path of the dropped file through
Installation and Enablement¶
The plugin is intended to be distributed as a built-in EAC replacement. In the EAC client, it is registered in COMPANION_PLUGINS in main.js and placed at resources/app/assets/plugins/dsh-file-drop-eac. The client’s syncCompanionPlugins then distributes it to the web profile, replacing the original dsh-file-drop.
(Note: No specific installation command is provided in the documentation.)
Typical Usage¶
- Action: Drag a local file or folder directly into the conversation input box.
- Result:
- For text/code files, the contents automatically appear in the input box.
- For binary/oversize files, a file path hint appears in the input box.
- For images, file contents do not appear in the input box; the vision bridge handles them.
- For folders, a prompt appears to guide the next action.
Applicable Scenarios and Notes¶
- Applicable scenario: Scenarios where the Agent needs to quickly read local code, documentation, or configuration files.
- Notes:
- The plugin runs with the privileges of the current DSH process; review the source code and license (MIT) before installation.
- Browsers cannot obtain the absolute disk path of a folder due to security restrictions. This is a technical limitation, not a plugin bug.
- When working with the vision bridge and thumbnail features, the plugin proactively avoids duplicate injection.
Summary¶
dsh-file-drop-eac resolves the image conflict caused by the older plugin in EAC environments and adds folder-recognition capability. Through its classic-script mode, it integrates deeply with the EAC client and provides developers with an intuitive way to interact with local files.