Introduction

The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When developing, debugging, or reviewing code, if you can only view or edit code in a chat window, the experience is often not smooth. The dsh-editor plugin adds a “Files” tab to the main session area, integrates the core editing experience of VS Code into the DSH Web interface, and solves the problem of lacking file tree, multi-file editing, and complex code operation capabilities in a single session window.

What It Is

dsh-editor is a VS Code-style code editor plugin for DeepSeek Harness (DSH). It is maintained by owner yangshen830-eng and is released under the MIT License. By coordinating the Host side (Node process) and the Client side (browser UI), the plugin provides file tree, Monaco editor, cross-file search, Markdown preview, and Git status management capabilities in the browser.

Core Features

The plugin provides the following capabilities:

  • File Tree
    • Browse the current workspace directory with expand/collapse support.
    • Automatically follow session or workspace switches.
    • Display Git status badges (such as M/A/??); click a badge to view the diff.
  • Monaco Editor
    • Supports multiple file tabs.
    • Provides syntax highlighting, word wrapping, Minimap, font size, and Tab width configuration.
    • Supports custom keyboard shortcuts.
  • Cross-File Search
    • Implemented with ripgrep and supports streaming incremental results.
    • Supports match highlighting and virtual scrolling (up to 20000 entries).
    • Supports case sensitivity, whole word, and regex toggles, as well as include/exclude glob patterns.
    • Provides search history and cross-file replacement.
  • Markdown Preview
    • Supports switching between source, preview, and split views.
    • Uses marked for rendering, DOMPurify for sanitization, highlight.js for syntax highlighting, mermaid for diagrams, KaTeX for formulas, and task list checkboxes.
  • Quick Open
    • Use Ctrl+P (Cmd+P on macOS) to enter a relative path and fuzzy-match to open a file.
  • Chat Path Jump
    • In a chat conversation, for file paths in inline code form, Ctrl+click (Cmd+click on macOS) directly jumps to the “Files” tab and opens the corresponding file.
  • Theme Sync
    • The themes of the editor and Markdown preview follow DSH’s light/dark theme changes in real time.

Installation and Enablement

It is recommended to install the plugin from the GitHub repository.

dsh plugin --profile web add git@github.com:yangshen830-eng/dsh-editor.git

After installation, you must restart DSH to see the “Files” tab in the main session area.

dsh web --profile web

You can also install it from a local directory or an npm package:

# 从本地目录
dsh plugin --profile web add file:/path/to/dsh-editor

# 从 npm 安装(发布后)
dsh plugin --profile web add dsh-editor

Typical Usage

  1. Quick Open: Press Ctrl+P in the editor interface, enter a file name or relative path, and fuzzy search to open it.
  2. Chat Jump: In the chat history, find a code block returned by the Agent; Ctrl+click the file path in the code block to directly locate the file in the editor.
  3. Cross-File Search: Configure rules in the editor search bar and perform global search and replace.

Notes

  • Activation mechanism: Changes to the plugin set (including additions, deletions, and updates) require restarting the DSH process to take effect.
  • Dynamic plugin limitation: Dynamic plugin source code under the src/ directory is not persisted to disk; it becomes invalid after the process restarts and is only suitable for temporary trial use.
  • Configuration mechanism: Running dsh plugin add adds the package to dsh.profile.bundles. When a Profile starts, it mounts the Host side according to dsh.bundle.patch and loads the browser side according to the dsh.client declaration.
  • Data transmission: Only JSON-serializable data is transmitted between the Host side and the Client side.

Conclusion

By combining the Monaco editor with DSH’s session system, dsh-editor provides developers with a lightweight code editing environment. It not only supports basic browsing and editing but also enhances the efficiency of code review and document writing through ripgrep and rich Markdown rendering capabilities. For more details or to view the source code, please refer to its GitHub repository or the skills community directory.