DSH for VS Code 🐳English | 中文
The full DeepSeek Harness agent, docked beside your code. One click opens the full DSH UI as an editor tab or side panel. The extension starts or reuses Install from Marketplace · Download VSIX · Quick start · Troubleshooting
Two independent DSH tabs beside your code — each tab keeps its own conversation, and reloading the window brings them back.
⚡ Quick start (3 minutes)1. Install DSH onceDSH is the agent; this extension is the VS Code shell around it.
Verify it works:
If you have not configured a model yet, do it once inside DSH — the panel opens DSH's own onboarding. 2. Install the extensionInstall from the Marketplace, or run the command above. Then reload the VS Code window. Install from a VSIX or from sourceVSIX: download From source:
3. Open DSHThree entry points, same agent:
Click the title-bar/status-bar entry again for another tab. Each tab is an independent DSH conversation; reloading the window restores all of them. 4. Add code to your first request
You can also type 5. Day-to-day controls
✨ What you getEverything the extension adds on top of the DSH web UI:
Right-click any file or folder → the path is inserted into the composer as a DSH 🆚 Browser tab vs. DSH in VS Code
🎬 See it in action59-second demo (Chinese): BV1p8bD6dE18 🆕 What's new in 0.5.1
🕹 CommandsAll commands
❓ Troubleshooting“dsh not found” / the panel won't startInstall the CLI ( Blank panel, 401, or the sign-in pageDSH ≥ 0.1.2 requires a browser session. For an extension-started service, sign-in is automatic. For a service you started outside VS Code, copy the launch URL from its log and paste it once into the panel — it lasts up to 30 days and survives service restarts. Check npm CLI or DSH Desktop — which one is used?
The model API is unreachable behind a proxySet Images are not sent
SSH Remote / WSL / Dev ContainersEnable How do I check the bridge version?Open DevTools inside the DSH panel; the console shows ⚙️ SettingsAll
|
| Setting | Default | Description |
|---|---|---|
dsh.profile |
web |
DSH profile for startup and bridge installation (custom profiles must provide the web UI) |
dsh.launchPreference |
auto |
Which dsh install to prefer: auto (npm, then Desktop), npm, or desktop |
dsh.desktopCommandPath |
empty | Absolute path to the Desktop command; empty auto-detects (PATH is also checked) |
dsh.host |
127.0.0.1 |
Service address (loopback only) |
dsh.port |
3080 |
Desired port for probing and startup |
dsh.autoStart |
true |
Start the service when it is not running |
dsh.stopOnExit |
true |
Stop the extension-started service when the last window closes |
dsh.extraArgs |
[] |
Extra arguments appended to dsh web |
dsh.executablePath |
empty | Absolute path to the dsh executable (dsh.cmd on Windows) |
dsh.openInBrowser |
false |
Open the DSH page in the default browser after startup |
dsh.remote.enabled |
false |
Enable remote scenarios (tunnel the panel via VS Code); reload after changing |
dsh.image.fallback |
true |
Send images as file-path references when the model has no vision |
dsh.startTimeoutMs |
45000 |
How long to wait for dsh web to become ready (Windows cold start is 17–23 s) |
dsh.env |
{} |
Extra environment variables for the DSH child process |
dsh.useEnvProxy |
false |
Append --use-env-proxy to the child's NODE_OPTIONS |
dsh.panel.zoomLevel |
1 |
Embedded page zoom, 0.5–1.5 |
dsh.workspaceRootIndex |
0 |
Multi-root workspaces: which root becomes the dsh web working directory |
dsh.workspace.autoOpen |
true |
Newly opened DSH editor tabs and DSH sidebar views switch DSH to the current VS Code workspace folder and open/reuse a blank session there; restored editor tabs are untouched |
dsh.bridge.enabled |
true |
Enable the editor bridge (file links, clipboard, undo/redo, images) |
dsh.bridge.silenceWarning |
false |
Suppress the bridge degradation warning |
🏗 How it works

The extension owns the service lifecycle and a local relay. The panel is an iframe inside a VS Code webview; the extension host talks to dsh web on 127.0.0.1. A small bridge inside the DSH page relays editor actions over postMessage.
Authentication and the loopback relay
DSH 0.1.2 introduced mandatory browser authentication. On startup dsh web prints a one-time launch URL:
dsh web: http://127.0.0.1:3080/?token=<one-time token>
Visiting it returns a 30-day HttpOnly; SameSite=Strict session cookie bound to the request Host. The panel is a cross-site iframe (vscode-webview://…), so that cookie is never sent by the browser and the iframe cannot log itself in.
For a service the extension starts, it parses the launch URL from the child output, exchanges it once for the cookie, stores it in extension-private storage keyed by host:port, and runs a loopback relay: the iframe loads the relay, which forwards traffic to dsh web, injects the cookie, rewrites Host, strips browser-origin headers as a trusted local intermediary, and streams uploads, SSE and WebSocket upgrades. When the session expires, the relay reports upstream 401 and the extension re-acquires it (or shows the sign-in page again).
The relay listens on 127.0.0.1 only and is not exposed to the network. It holds a 30-day session, so a local process that finds the random relay port could drive that session — the same local exposure as a DSH ≤ 0.1.1 service on 127.0.0.1:3080, but not a network exposure.
The editor bridge
The extension installs dsh-vscode-bridge into DSH's official client-plugin extension point under $DSH_HOME/profiles/<profile> and registers it with a marked insert: block in cordis.patch.yml. It adds:
- external links open in the system browser instead of being trapped in the iframe;
- file paths open in VS Code;
- copy buttons are routed through the extension host (VS Code blocks clipboard access for cross-origin iframes);
- undo/redo is restored inside the embedded composer (VS Code swallows the shortcuts and the editor's native stack is empty);
- images work even when the active model has no vision.
The bridge only works inside the panel. If it is inactive (browser use, failed install), the panel stays fully usable — only those integrations are missing. A one-time warning offers Retry Install / Don't Show Again. Uninstall the extension or run DSH: Uninstall Bridge to remove the package and its marked cordis.patch.yml entry.
🌍 Localization
UI copy follows the VS Code display language: zh-* shows Simplified Chinese, everything else English. The package ships package.nls.json, package.nls.zh-cn.json and package.nls.zh-hans.json.
🧑💻 Development
Requirements: Node.js ≥ 22, VS Code ≥ 1.91.
npm install
npm run test # 359 unit/integration tests (including real dsh web flows: service lifecycle, auth session)
npm run compile # builds out/extension.js
npm run watch # watch build
npm run typecheck # type check
npm run package # package .vsix
Open the folder in VS Code and press F5 for the Extension Development Host. The main modules live under src/: service/ (detection, process, launcher, state machine), bridge/ (installer, handshake, message handling), panel/ (HTML templates and the webview provider), plus config.ts, workspaceRoot.ts and statusbar.ts.
🤝 Contributing
Issues and PRs are welcome. Keep PRs small and focused, and read CONTRIBUTING.md before opening one. Run npm run typecheck, npm test, npm run compile and npx vsce package --no-dependencies; CI must pass. Do not bump versions, add CHANGELOG version headings, or commit out/, *.vsix or local caches. Keep README.md and README.zh.md in sync — the test count must match npm test.
🧭 Known limitations
- Shift+drag from the Explorer (upstream VS Code): since 1.140, Explorer drags no longer deliver
dragenter/dragover/dropto a webview (microsoft/vscode#339278). Use the system file manager or type@in the composer. Tracked in [issue #37](https://github.com/Fengze233/dsh-vscode/issues/37). - No microphone inside the panel: VS Code's webview iframe does not delegate
microphone, so DSH's voice input cannot work there. UseDSH: Open in Browserfor voice. - Image fallback needs a workspace folder: images are cached under the workspace root; with no folder open the fallback is unavailable.
- Externally started DSH (≥ 0.1.2): the extension cannot read another process's log, so the first sign-in needs one paste of the launch URL (then up to 30 days).
🌐 Community
This is a DeepSeek Harness community plugin (topic: dsh-plugin).
- DSH official repo: https://github.com/deepseek-ai/deepseek-harness
- Issue tracker: https://github.com/Fengze233/dsh-vscode/issues
- DSH community discussions: https://github.com/deepseek-ai/deepseek-harness/discussions
🙏 Contributors & acknowledgements
Community contributions
Many improvements here came from the community (IDs link to the corresponding issue/PR):
Code contributions
| Contributor | Contribution | Ref |
|---|---|---|
| @jubeater | Configurable DSH profile and multi-profile bridge cleanup; accurate stopping-state UX | #35, #40 |
| @log-li | Root-cause analysis and patch for image links that could not be opened (existence-first, filename fallback) | #45 |
Issue reports
| Reporter | Report | Ref |
|---|---|---|
| @Donarli | DSH Desktop installed on a non-default drive (H:\) failing with ENOENT, with complete root-cause analysis and a suggested fix |
#41 |
| @log-li | Image links in chat never opening: traced it to DSH omitting title on image links plus the bridge falling back to button text, with production evidence |
#43 |
| @Joshuayang228 | Shift+drag from the Explorer not reaching the webview: identified the VS Code regression and the Lexical second layer | #37 |
| @AAAwoshi | Panel reloading on every active-editor switch: traced it to the redundant render() and regenerated nonce, with log evidence and a minimal patch |
#27 |
| @Joshuayang228 | File clicks not forwarded to the editor: pinpointed the CSS Module hashed class name and provided reproduction evidence and a fix sketch | #22 |
| @lizhuoyuan41-droid | Bridge package written into DSH Desktop's private command directory, breaking desktop startup: root cause plus an allow-list suggestion | #20 |
| @Minelenbolan | Duplicate bridge entry in cordis.patch.yml crashing the plugin tree |
#19 |
| @HafenYin | Windows cold start exceeding the hard-coded 15 s timeout (with full startup log) | #23 |
| @NOIPJohnny | DSH unable to reach the model API behind a proxy; suggested injecting child-process environment variables | #18 |
| @ThinBuffalo | Request for zoom control of the embedded page | #8 |
| @smallshieh | Request for editor context injection (send the active file/selection with a message) | #10 |
| @Tsechiyuan | Request to send the current selection straight into the conversation | #7 |
| @sseryling | WSL Remote blank panel and bridge handshake failure: provided measured fixes | #13 |
| @Zanford | DSH failing to start from VS Code | #12 |
Upstream notes
- The narrow-viewport CJK caret issue (#9) was traced to the DSH frontend composer; upstream rewrote it as a Lexical editor.
- Shift+drag from the Explorer is a VS Code regression (#339278 / #339036); the upstream fix is tracked in microsoft/vscode#344153.
📄 License
MIT © 2026 Fengze233
Try it now: install from the Marketplace, or grab the VSIX. If DSH becomes part of your daily loop, a Marketplace rating is what helps other developers find this extension; a GitHub star helps contributors find the repo.



