In the DeepSeek Harness Web environment, injecting local file contents into the model context usually requires manually copying and pasting text or processing it with scripts. The plugin introduced in this article provides a direct UI entry point, allowing users to add files, and the file contents are injected into the model context.
What Is It¶
A DSH Web plugin developed by TestTheBoy, categorized under “Memory.” Its core feature is Add files to context.
Installation and Enablement¶
Run the following command for one-click installation:
dsh plugin --profile web add dsh-client-ui-file-attach
The bundle’s cordis.patch.yml automatically registers the UI row, so no manual changes are needed in any configuration files. Restart dsh web, then refresh the browser to make it take effect.
Core Features¶
UI Changes¶
The plugin adds a 📎 Add File pill button to the bottom toolbar of the input box, in the same row as controls such as Access Mode / Plan / Model (the conversation.input.left slot).
After adding files, a chip bar appears above the input box (the conversation.input.dock slot), with the contents centered and left-aligned relative to the input box. There is an ✕ on the left side of each pill; click it to remove the file. When the accumulated files exceed the width of the input box, a horizontal scrollbar appears.
Content Injection Mechanism¶
Text/code/Markdown/JSON/logs (UTF-8), once added, have their contents injected into the model context by the host during agent/pre-step. This means that each time a message is sent, the model can see the attached file contents, without manual pasting or extra read command calls.
Images (PNG/JPG/WebP/GIF) use DSH’s built-in image attachment pipeline and are displayed as image chip bars and real image message blocks.
File Filtering¶
Binary/oversized/unreadable files are not added, and the system indicates the reason with a Toast notification.
Limitations and Notes¶
File Format and Size¶
- Text files must be UTF-8. Files in UTF-16 or containing NUL bytes are treated as binary and are not added.
- The content limit per file is 256 KB, the total limit is 1 MiB, and at most 10 files can be attached at the same time.
Session and History¶
- The attachment list is browser-session-scoped (consistent with unsent draft images). It must be re-added after a page refresh or service restart.
- File contents are injected into the model context only at each send and are not written to chat history, avoiding record pollution.
Summary¶
By making UI-layer changes, the plugin solves the problem of quickly adding local files to the context. It is suitable for scenarios where code or document snippets need to be frequently referenced during conversations.