DeepSeek Harness Plugin: dsh-vsceditor

Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture. When debugging agents or performing long-running coding tasks, developers usually need to observe the AI’s actions in real time or have a fully featured code editor in the browser. The dsh-vsceditor plugin is designed to solve this problem by embedding code-server in the DSH Web UI, providing a complete VS Code environment.

Basic Information

  • Plugin Name: dsh-vsceditor
  • Maintainer: k-ying
  • License: MIT
  • Category: Client
  • GitHub: k-ying/dsh-vsceditor

Core Features

The plugin mainly addresses the limitations of browser-side editors, the inability to monitor AI code changes in real time, and process management issues.

  • Three mutually exclusive backend modes

    • Embedded: The default mode, which embeds code-server inside the DSH interface.
    • Local: Syncs AI changes to a local desktop VS Code instance.
    • Off: Disconnects all editor connections.
  • An authentic VS Code environment

    • Uses code-server 4.x with the full kernel.
    • Supports extensions, themes, keyboard shortcuts, and the Git panel.
  • Follow mode and change view

    • When the agent calls the write or edit tool, the editor displays a red/green diff view and scrolls to the first changed line.
    • DSH renders its own read-only Diff tab, making it easy to view from either side.
    • Diffs accumulate until the next conversation turn begins editing, when they are cleared.
  • File locking mechanism

    • While the agent is writing a file, the file becomes read-only in the editor to prevent conflicts between manual and AI overwrites.
    • It is automatically unlocked after writing completes.
  • No orphan processes

    • code-server runs under a Watchdog process that periodically sends heartbeats to the DSH host.
    • If the DSH host crashes, is force-quit, or upgraded, the Watchdog terminates the entire editor process tree to ensure no residual processes remain.
  • Workspace follows session

    • When the workspace of the current session changes, the editor automatically switches to the corresponding directory and restarts code-server.
  • Persistent Iframe

    • The editor page remains attached to <body>; switching tabs only hides/shows it and does not recreate the session.
  • Settings page integration

    • A configuration card is provided under Settings → Plugins → Plugin Configuration, allowing control of the Follow toggle, auto-start, port, and code-server path.
  • Zero dependencies

    • Both the host and client are hand-written in native JavaScript, without relying on npm packages.

Installation and Enablement

  1. Install the plugin
    Install it via the command line:
    dsh plugin --profile web add github:k-ying/dsh-vsceditor
  1. Configure embedded mode (required)
    The plugin does not bundle the code-server runtime (about 100MB). To use the default Embedded mode, you need to install code-server.

    • Option 1: One-click installation
      Open the Editor tab and click the Install code-server in one click button in the toolbar. Follow the prompts in the dialog to download and install it.
    • Option 2: Global CLI installation
        sh ~/.dsh/profiles/web/node_modules/dsh-vsceditor/scripts/install-code-server.sh ~/.dsh-editor
    If you want to use it separately in the current workspace, run the script directly (without parameters) to install it into the `.dsh-editor` directory.

Typical Usage

  • Monitor AI work: During a conversation, whenever the AI modifies a file, the editor immediately displays a Diff view, allowing you to intuitively see which lines were modified.
  • Switch to local editor: Click the toggle in the editor toolbar to switch the sync mode to Local. The Follow/Diff/locking features then transfer to your local desktop VS Code.
  • Disconnect: If you do not need editor features, click the toggle to set it to Off. The system will release the related resources.

Notes

  • System limitations: Currently, only macOS or Linux is supported. Windows has not been tested (code-server officially does not have a Windows build).
  • Runtime location: The editor’s runtime data (user data, configuration, logs) is not stored in the workspace directory, but in the global directory ~/.dsh-editor/workspaces/<hash>-<workspace-name>/.
  • Process guarding: Because the Watchdog is used, if the DSH host process terminates unexpectedly, the editor processes are also automatically cleaned up.

Summary

dsh-vsceditor provides DeepSeek Harness with the ability to perform professional-level code editing without leaving the Web interface. Combined with Follow mode and the Diff view, it can effectively improve controllability when collaborating with AI for development.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye