Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture. When developing agents or managing sessions, developers often need to view the project structure, edit configuration files, or open local resources directly. Native environments often lack a robust file browsing interface. devacc8/dsh-file-explorer is designed to address this need. It is a hardened file management tool that provides DSH with secure and controllable file access capabilities.

Plugin Positioning

This plugin is a vendored and hardened fork of joejojoking-cloud/dsh-file-explorer. The upstream code has been frozen. This version adds security fixes, a fully English UI, and a panel background that matches the Harness theme. It works as the global file manager for DSH, providing users with a file tree panel on the right side of the page in every session.

Layout and Interaction

The plugin opens a panel named shell.overlay on the right side of the page.

  • Resizing: The panel width can be adjusted by dragging its left edge, ranging from 260px to 900px.
  • Independent collapsing: The file tree and preview area have independent collapse handles, located on their respective left edges.
    • Collapsing the tree view keeps the preview area and snaps it to the right edge.
    • Collapsing the preview area preserves all tabs; reopening it restores them.
  • Double-click chat area: Double-clicking the chat area collapses the panels on both the left and right sides and applies the “Project Filter” feature. At this point, only files located inside the current project folder are kept in tabs; other tabs are closed. Expanding the panels again preserves the filter state.

Preview and Editing

  • Tabbed preview: Supports browser-style tabs; switching tabs does not reload file contents. Clicking a background tab scrolls the tab bar, while clicking the current tab switches the active content.
  • Syntax highlighting: Supports file previews for multiple syntaxes, including Markdown, JSON, YAML, JS, TS, Python, C, C++, Java, Go, Rust, Shell, SQL, TOML, INI, CSS, and HTML.
  • In-panel editing: Clicking the edit icon switches the preview to an editable text box. Saving writes the content to disk. Clicking the preview file again closes the corresponding tab.
  • Limitation: Preview is not supported when the file size exceeds 1 MB.

Feature Details

  • Header toolbar: Contains the “Files” tab and several functional icons:
    • VS Code: Click to open the entire current workspace.
    • System file manager: Operates based on the current selection state. If a directory is selected, it opens directly; if a file is selected, it highlights the file and navigates to its folder; if nothing is selected, it opens the project root directory.
    • Expand/collapse all: Controls the expanded or collapsed state of the file tree.
    • Refresh: Updates the file list.
    • Collapse tree view: Collapses only the left-side tree while keeping the right-side preview.
  • Search: The search box supports recursive scanning of the workspace and automatically excludes the .git and node_modules directories. The search result limit is 300 matches.
  • File tree: The root directory is expanded by default. It supports lazy loading (clicking a directory to expand it) and supports clicking to toggle expanded and collapsed states.

Installation and Enablement

The plugin must be installed using the official command. After installation, restart Harness.

dsh plugin --profile web add <path-to-this-package-or-npm-name>

Once the installation takes effect, the plugin is mounted under the /plugins/file-explorer/* path and provides a file switching toggle in the session header.

Development and Maintenance

  • Build notes: The client bundle (lib/client.js) is manually patched because the upstream build toolchain cannot be installed independently (its declared peer dependencies include unpublished packages). The host-side code is generated mechanically with tsc.
  • Code conventions: The artifacts under the lib/ directory are generated files; do not edit them directly. All logic and style changes should be made in the src/ directory. Past experience shows that directly editing files under lib/ can cause builds to overwrite the changes and may introduce syntax errors (such as backtick issues in CSS template strings).
  • Patch mechanism: The cordis.patch.yml file is used to inject the plugin into the host configuration.

Applicable Scenarios and Notes

  • This plugin runs with the permissions of the current DSH process. Make sure the installation source is trusted and verify the license.
  • Because it is a fork of frozen upstream, if you encounter an issue that has been fixed upstream, you need to wait for the maintainer to merge the fix or submit a PR.