Introduction

In the Web development of DeepSeek Harness, browsing and editing files in a conversation workspace usually requires switching to a local terminal or an external editor. The dsh-explorer-editor plugin introduces a VS Code-style file management experience in the Web interface: the left sidebar displays the file tree of the current conversation workspace, while the middle column provides source editing through the Monaco editor.

Feature Overview

  1. Sidebar file tree and main-area editing
    The sidebar displays the file directory of the current workspace in a tree structure. After clicking a file, the “Files” view in the middle column loads and displays its content, with syntax highlighting provided by the Monaco editor.

  2. Markdown source and preview switch
    For .md files, you can switch between source-edit mode and preview mode. The toolbar provides a toggle button. Preview mode is based on Markdown rendering and supports GFM formats such as headings, lists, and code blocks.

  3. Theme settings and import/export
    Provides a VS Code-like theme settings panel. Custom background color, text color, and font size (10-28px) are supported. Themes can be exported to a JSON file or imported from a JSON file, making it easy to migrate color schemes across environments.

  4. File operations
    Creating files, creating directories, renaming, deleting, cutting, copying, pasting, and other operations are supported. The right-click menu provides full context operations.

  5. Keyboard navigation and right-click menu
    The file tree supports arrow-key navigation (up/down to move, left/right to collapse/expand, Enter to open). The right-click menu provides options for cut, copy, rename, delete, copy path, and more.

  6. Automatic encoding detection
    Text files are preferentially read as UTF-8. If invalid characters are encountered, the reader automatically falls back to GBK or GB2312, resolving common Chinese character encoding issues on Windows. After saving, files are unified to UTF-8.

  7. Session restoration and live refresh
    Open file tabs and unsaved content are persisted in browser local storage and can be restored after a page refresh. The directory tree refreshes in real time through SSE pushes, listening for file-system changes.

Installation and Configuration

The plugin is released under the MIT license and maintained by oneirictouch.

Web Installation

# 在插件目录内执行
cd /path/to/dsh-explorer-editor
dsh plugin --profile web add .

Desktop Installation

# 在插件目录内执行
cd /path/to/dsh-explorer-editor
dsh plugin --profile desktop add .

After installation, the desktop app must be completely quit and restarted for the changes to take effect.

Configuration Notes

Configure root in cordis.patch.yml as the fallback root directory, and use allowArbitraryRoot to constrain the security boundary:

- insert:
    - id: dsh-explorer-editor
      name: 'dsh-explorer-editor'
      config:
        root: !!js process.cwd()   # 仅作为兜底根目录
        allowArbitraryRoot: true   # 是否允许 setRoot 越出 root
  • root: The default root directory when no session is active.
  • setRoot: The file manager automatically resolves the current session workspace and locks the root directory when opened.
  • allowArbitraryRoot: Defaults to true. Setting it to false restricts setRoot to within root, preventing out-of-bound reads.

Usage

  1. Browse and edit
    Click a file in the sidebar file tree to edit it in the middle column. Use Ctrl+S to save the file. Modified content shows a Dirty marker.

  2. Markdown preview
    Open a .md file and click the preview/source toggle button next to the “Theme” button in the toolbar to switch to read-only rendered mode.

  3. Theme management
    Click the “Theme” button in the toolbar to open the settings panel. Select a preset theme or customize colors; the configuration is saved automatically.

  4. File management
    Use arrow keys to navigate the file tree, and use the right-click menu for cut, copy, paste, and other operations.

Notes

  • Profile separation: The Web and desktop environments use separate profiles, and plugins are not shared automatically. A plugin installed on the Web side will not appear on the desktop side.
  • Security: All file operations are constrained by the “workspace boundary.” A path is rejected as soon as it escapes the current locked root.
  • Dependencies: The editor core is Monaco. If the CDN is unreachable, it falls back to a plain-text editor.

Conclusion

dsh-explorer-editor provides a solution for managing code files directly on the Web side of DeepSeek Harness. Together with the Monaco editor and theme system, it can meet the needs of everything from code browsing to detailed editing.

GitHub repository | Plugin directory