In the DeepSeek Harness (DSH) Web interface, clicking a file path is usually intercepted by the plugin’s internal logic, causing the page to navigate instead of opening the local file. dsh-client-open-in-vscode changes this behavior by intercepting the click event and invoking the host-side VS Code CLI, opening the file in a matched VS Code window.
Plugin Overview¶
This is a DSH client plugin developed by quei4r. It runs in the context of the DSH Web Profile and uses HTTP requests to communicate with the host process, enabling a jump from the browser UI to a local editor.
Installation and Enablement¶
Installation requires manually placing the package into the Web Profile directory and modifying the configuration file.
- Copy the plugin package into the
node_modulesdirectory of the Web Profile:
cp -r dsh-client-open-in-vscode ~/.dsh/profiles/web/node_modules/
- Edit
~/.dsh/profiles/web/cordis.patch.ymland add the following configuration:
- insert:
- id: ui-open-in-vscode
name: dsh-client-open-in-vscode
- Restart
dsh web.
Note: The host component of the plugin must register HTTP routes at startup; simply refreshing the page is not enough for it to take effect.
Core Features¶
The plugin mainly intercepts the click events on the following UI elements and performs the corresponding open logic:
- Capture scope: Capture paths in tool cards, artifact chips, and file mention links in the body.
- Edit/Write behavior: When clicking the path in a file-change line (such as Edit/Write), it attempts to reconstruct the full-file diff for that edit and open it. The plugin uses the reverse logic of
git applyand attempts to reconstruct the full file using the current file on disk or the git HEAD version as the base. - Multi-window routing: When clicking a file, the system matches VS Code windows in the following order:
- Filter by
remote authority(prefer windows on the same host or local); - Determine which opened workspace folder contains the file’s absolute path;
- If multiple windows match, prefer the workspace window with the deepest path;
- If none match, fall back to the most recently active window with the same authority.
- Filter by
- Bypass mechanism: Supports
Alt+clickto bypass interception and follow the original product logic. - Security trust gate: Routing requests must pass trust validation, requiring the Host to be loopback,
Sec-Fetch-Siteto be cross-site, and the carriedOriginto match the Host. This prevents other websites from using a web page to trigger local VS Code to open a file.
Typical Usage¶
- Click to open a file: In the chat UI, click a file path in a tool card or in the body, and the system automatically opens the file in the matched VS Code window.
- View the changed diff: Click the path in an Edit/Write line to view the full-file diff generated by that edit.
- View original logic: Hold the
Altkey and click a file path to view the product’s original navigation logic.
Notes¶
- Environment requirements: The
codeCLI must be available in the system PATH, and the desktop session (X11/Wayland) where the host process runs must allow launching GUI windows. - Protocol limitation: The plugin does not use the
vscode://file/...protocol, avoiding a black screen in the VS Code webview environment where the DSH GUI often runs. - Compatibility: The plugin has passed testing in the web profile of
@deepseek-ai/dsh0.1.0-rc.6. - Temporary files: Temporary files used for diff comparison are automatically cleaned up after 10 minutes.
- Source code review: The plugin runs with the permissions of the current DSH process. It is recommended to check the source code and license before installation.
Summary¶
This plugin solves the fragmentation between the DSH Web interface and the local VS Code workflow. Through precise routing matching and a trust-gate design, it achieves seamless navigation to a local editor for opening files without breaking existing UI interactions. More details can be found in the GitHub repository or the DSH ecosystem catalog.