Introduction

In plugin-based harnesses like DSH, Agents frequently need to reference local file paths, but the chat interface itself may not have a convenient entry point for browsing the local disk. dsh-file-browser is a DSH plugin maintained by Clearchenpro, licensed under MIT, targeting the web harness version: it provides a “Files” button in the session header; upon clicking, it opens a file browsing sidebar on the right side of the chat interface for viewing and sorting local directories, and sending file paths or image attachments to the chat draft.

What is this

One-sentence positioning: A DSH client plugin that adds a full-disk file browsing panel to the right side of a web DSH session.

It solves the entry point problem of “quickly finding local files from the chat interface and handing the path to the Agent.” The plugin browses the disk of the machine where the host process is running, and is only meaningful for the web harness version.

Core Features

  • Adds a full-disk file browsing sidebar to the right side of the chat interface.
  • Browses all drive letters layer by layer: Windows enumerates A:Z:; POSIX is /; it also supports the root directory and provides breadcrumb navigation.
  • Sorts by name, size, and modification time, supporting ascending and descending orders; folders are grouped at the top by default.
  • Performs server-side streaming scanning with bounded Top-K truncation, defaulting to 1000 items per layer.
  • Drag and drop files into the chat box:
    • Images: png, jpg, jpeg, gif, webp; when the size does not exceed readMaxBytes, they become actual image attachments;
    • Other files or directories: Insert an absolute path wrapped in backticks into the draft.
  • Inline quick actions: Insert path, send path directly to Agent, copy path, open with system default application.
  • Provides a “Files” button in the session header to toggle the panel; the panel width is draggable within a range of 280–560px.
  • Bilingual support for text (Chinese/English): Registers the file-browser namespace via the harness locale service, falling back to Chinese if no service is available.

Installation and Enablement

First, confirm the target profile. The command below is used to install the plugin to a specific DSH profile:

dsh plugin --profile <target_profile> add "dsh-file-browser@file:<absolute_path_to_this_directory>"

If a tarball has already been built, you can also install it using the tarball:

dsh plugin --profile <target_profile> add ./dsh-file-browser-0.1.0.tgz

After installation, use the following commands to verify the plugin is registered and restart the corresponding DSH instance:

dsh plugin --profile <target_profile> list
dsh --profile <target_profile> --dump-config
dsh --profile <target_profile>

Changes take effect only after the running instance is restarted.

During development, if using --patch to point to build artifacts, the source code entry points do not have a parsable package.json, so the client will likely not load. When locally debugging the client, it is recommended to use the dsh plugin add method mentioned above for installation.

Typical Usage

After the “Files” button appears in the session header, click it to reveal the file browsing sidebar on the right.

In the directory list, you can toggle sorting by name, size, and modification time, as well as ascending and descending order. When exceeding 1000 items per layer, the list retains only the top entries based on the current sorting; you need to use sorting or navigation to narrow down the scope.

Dragging files into the chat box:

  • Dragging in plain files like txt, py, etc., inserts `path` into the draft;
  • Dragging in image files like png, jpg, jpeg, gif, webp, if the size satisfies readMaxBytes, an image attachment appears in the chat box;
  • Dragging without an active session will trigger a prompt.

Inline operations can directly perform common actions:

  • “Send”: Sends the path as a message to the Agent;
  • “Insert Path”: Writes the path into the draft;
  • “Copy”: Copies the path;
  • “Open”: Opens the file or directory with the system default application.

Compatibility and Dependencies

The plugin is written against the actual API of the harness @deepseek-ai/*@0.1.0-rc.6.

Verified dependency information:

  • Dependency: @deepseek-ai/schemastery ^3.18.1
  • Peer dependency: @deepseek-ai/cordis ^4.0.1, @deepseek-ai/dsh-web ^0.1.0-rc.6, react ^18.2.0

Security and Limitations

This plugin reads the file system on the machine where the host process is running and operates with the permissions of the current DSH process. You should check the source code, license, and runtime environment before installing.

Please note:

  • It is only meaningful for the web harness version.
  • It browses the disk of the machine where the host process is running, not the local disk of the browser machine.
  • Dragging defaults to writing the path into the draft rather than uploading arbitrary binary files as attachments; DSH sessions have semantic meaning only for image attachments; other files are typically read by the Agent’s fs tool based on the path.
  • Directory sizes are not calculated recursively and are displayed as ; directories are sorted by name when sorting by size.
  • Hidden files are determined by the dot prefix, consistent with existing harness conventions; the display of hidden files can be toggled within the panel.
  • The plugin route is not within the /api trusted perimeter; therefore, it performs Host header loopback validation, supporting 127.0.0.1, localhost, [::1], and can be extended via trustedHosts.
  • The route only accepts GET, does not set CORS, and sets Cache-Control: no-store.
  • If the harness is accessed via a LAN address and the Host header is not loopback, the Host must be listed in trustedHosts; otherwise, requests related to the file panel will return 403.

Conclusion

The value of dsh-file-browser is quite specific: it provides an entry point for local files in web DSH sessions, making it easier for the Agent to obtain clear paths or image attachments. It is suitable for developers who need to frequently have the Agent process local files.

GitHub: https://github.com/Clearchenpro/dsh-file-browser
Community Directory: https://www.skillhub.cn/plugins/Clearchenpro/dsh-file-browser