Introduction

In the agent development workflow of DeepSeek Harness (DSH), frequently switching between the code editor and conversation sessions to reference specific code snippets or file paths creates fragmented context. The dsh-sidebar-vscode plugin embeds the VS Code Web workbench into the official right sidebar of DSH, converting selected editor code or file resources directly into atomic reference chips in the conversation, thereby simplifying context transfer.

What Is This

This is an official right sidebar tab type plugin for DeepSeek Harness (DSH). It is maintained by the developer chendefine and open-sourced under the MIT License.

Core positioning: It provides an official right sidebar tab named vscode, embeds the VS Code Web workbench, and converts editor selections or file operations into atomic reference marks that can be read directly by the model.

Runtime environment: Web platform (DSH Web GUI), requiring Node.js ^22.19.0 || >=24.0.0.

Core Features

1. Official Right Sidebar Tab and Persistent Workbench

The plugin registers the official right sidebar tab type vscode. The workbench logic is implemented in workbenchRuntime.ts, which persists the iframe in a container under document.body rather than inside the tab body. This ensures that switching tabs does not reload the workbench, its WebSocket connections, or the editor state. The workbench context is destroyed only when the tab is closed or the plugin is unloaded.

2. Keyboard Shortcut and Right-Click Send

  • Send selected code: Select code in the embedded VS Code, press Ctrl/Cmd+Alt+C, or choose “DSH: Send Selected Code to Session” from the right-click menu. The code is inserted as an atomic chip at the current cursor position in the input box. When submitted, it expands into a <text-selection> tag containing the snapshot content.
  • Send file/folder: Right-click a file or folder in the File Explorer and choose “DSH: Send File/Folder to Session.” The file is inserted as a path chip (for example, @src/main.ts). On submission, only the path is included, without file content, allowing the model to read it as needed.

3. Atomic Reference Chips and Reference Management

  • The plugin serializes references into self-contained canonical mentions. The reference management track displays all references and their occurrence counts, and supports removing all chips for a selected reference in one click.
  • References support cross-origin fallback: when the same-origin bridge is unavailable, references fall back to clipboard paste recognition or plain text fallback to maintain availability.

4. Cross-Origin Support and Takeover Functionality

  • Same-origin access can be achieved through the plugin’s built-in reverse proxy, or by configuring a gateway subpath. The default path is /sidebar/vscode.
  • The plugin provides an openAsDefault toggle. When enabled, it can take over clicks on the right sidebar expand button (when the column is collapsed), as well as clicks on file links and tool-output files in the conversation, opening them in the embedded VS Code instead of the default viewer.

5. Bilingual Text Copy Toolbar

The toolbar provides copy functionality for Chinese and English text and follows the DSH appearance style (light/dark/system).

Install and Enable

This plugin is managed through the DSH plugin system. No additional command-line installation steps are required.

  1. Go to the DSH settings page.
  2. Navigate to the Plugins section.
  3. Edit the plugin configuration in the dsh-sidebar-vscode configuration area. The configuration items are derived from the volatile Config schema defined in the plugin entry.

Typical Usage

  1. Code reference: Select a code snippet in the VS Code workbench inside the right sidebar and press Ctrl/Cmd+Alt+C. The snippet appears immediately as a chip in the conversation input box.
  2. File reference: Right-click src/main.ts in the project’s File Explorer and choose to send it. An @src/main.ts reference chip appears in the conversation.
  3. Configuration adjustment: Adjust toggles such as openAsDefault in the corresponding configuration area on the settings page to take over file-opening behavior.

Applicable Scenarios and Cautions

  • Applicable scenarios: Agent development scenarios that require frequent references to specific code snippets, file paths, or folder structures in conversations. In particular, when maintaining editor state continuity (such as unsaved changes), the persistent workbench can significantly improve efficiency.
  • Cautions: The plugin runs with the permissions of the current DSH process. Before using it, review the source code and license (MIT). The workbench logic depends on persistent iframe rendering; manually removing the iframe context will destroy the workbench. Plugin tests: 477 passing (24 spec files).

Brief Closing

dsh-sidebar-vscode seamlessly integrates the VS Code development experience into DSH sessions through persistent embedding and atomic references, reducing the overhead of context switching. Plugin repository and GitHub repository: https://github.com/chendefine/dsh-sidebar-vscode