joygqz/vscode-dsh

DeepSeek Harness Launcher

Start, open, and manage the DeepSeek Harness Web UI from VS Code.

Uncategorizeddeepseekdeepseek-harnessvisual-studio-code

DeepSeek Harness Launcher

Start, open, and manage the DeepSeek Harness Web UI from VS Code with one click. The extension checks the environment, fetches DSH through npm, picks a safe port, waits for readiness, and cleans up the process on stop.

Features

  • One-click access — start and open Harness from the status bar or Command Palette.
  • Environment checks — validate Node.js, npx, the working directory, and launch settings.
  • Server lifecycle — start, stop, restart, cancel, or connect to an existing server.
  • Shared profile — reuse model settings and sessions across projects in the same environment.
  • Remote access — support local, SSH, WSL, Dev Container, and Codespaces workspaces.
  • Browser or editor — open Harness in the system browser or a VS Code webview.

Prerequisites

  • VS Code 1.125 or newer.
  • Node.js 22.19+ (22.x only) or 24+, with both node and npx in the same installation directory.
  • A trusted local, SSH, WSL, Dev Container, or Codespaces workspace.
  • An API key for a model you have access to (configured inside the Harness page; this extension does not read or store it).

Harness can read and write files and run commands: the extension does not start or connect services in Restricted Mode, and it asks for confirmation again when choosing a directory from an empty window.

Installation

Search for DeepSeek Harness Launcher in the Extensions view (Ctrl/Cmd+Shift+X), or visit Visual Studio Marketplace or Open VSX. You can also install a .vsix from GitHub Releases using Extensions: Install from VSIX….

Quick Start

  1. Open and trust a project folder, then click DSH in the status bar or run DeepSeek Harness Launcher: Open.
  2. The first run fetches DSH through npm. The status bar shows DSH Working…; click it to cancel or view the output.
  3. Once the page opens, add your API key under Settings → Models in Harness, then confirm a directory in Choose workspace and start a session.

workingDirectory is DSH's launch directory and default workspace context, which affects AGENTS.md, CLAUDE.md, cwd .env, and similar files.

Commands

CommandDescription
DeepSeek Harness Launcher: OpenStart if needed, or open the running UI
DeepSeek Harness Launcher: Start ServerStart the server without opening the page
DeepSeek Harness Launcher: Open in Browser / DeepSeek Harness Launcher: Open in VS CodeStart if needed, then open in the chosen location
DeepSeek Harness Launcher: Stop ServerStop the hosted server; run it again if cleanup failed
DeepSeek Harness Launcher: Restart ServerApply new settings; reuses the selected directory when workingDirectory is unchanged
DeepSeek Harness Launcher: Cancel Current OperationCancel an environment check, startup, restart, or connection in progress
DeepSeek Harness Launcher: Connect to Running Server…Connect to an existing DSH in this environment
DeepSeek Harness Launcher: Disconnect External ServerStop tracking an external DSH without stopping its process
DeepSeek Harness Launcher: Copy Access URLCopy the full address a client can use
DeepSeek Harness Launcher: Show Output / DeepSeek Harness Launcher: Open SettingsOpen the output panel or extension settings

Settings

SettingDescriptionDefault
vscode-dsh.startupBehaviormanual start on demand; start start silently when VS Code opens; startAndOpen start and openmanual
vscode-dsh.openLocationUse the system browser or VS Code's editor for the primary commandbrowser
vscode-dsh.portPick a free port automatically. When a fixed port is taken, the extension does not attach to other instances0
vscode-dsh.startupTimeoutMaximum seconds to wait for DSH to become ready120
vscode-dsh.workingDirectoryLaunch and default workspace context; supports absolute paths, relative paths, ~, and ${workspaceFolder}. Relative paths require an open workspace folder""
vscode-dsh.webArgsExtra DSH Web arguments (must not include --host, --port, or --patch)[]
vscode-dsh.environmentProcess environment variables; may override PATH, cannot override DSH_HOME{}

Usage

DeepSeek Harness Launcher: Open is the primary command: it starts the server when it is not running and opens it directly when it is.

Status Bar

The status bar shows: shield + DSH (untrusted), DSH (not running), DSH Working… (click to cancel or view output), DSH Stopping… (click for output), DSH: port (hosted by this window), link icon + DSH: port (external server), DSH: port* (settings changed; click to restart and apply), or error icon + DSH (hover for details and click for recovery actions).

Managed and External Servers

  • A managed server is started by the extension. Its data lives in the extension's global storage, so model credentials, settings, and sessions are shared across projects. A single-writer lease keeps the profile safe; another VS Code window automatically connects to the running shared instance instead of starting a competing process. "Stop Server" waits for the session to clean up, then force-ends it and confirms the port was released.
  • An external server can only be connected explicitly through an HTTP loopback address in this environment (for example http://127.0.0.1:3080). It supports open, copy, refresh, and disconnect only; the extension never stops it, and it keeps its own data directory.
  • All projects in the same local or remote VS Code environment use one DSH application profile and reuse its running instance. Local, SSH, WSL, and container environments retain separate global storage because they run on different machines/filesystems.

Remote, WSL, and Containers

Node/npx, workingDirectory, relative paths, environment variables, and connection addresses are resolved in the environment where the workspace lives. The system browser is opened through openExternal, which resolves localhost forwarding; the built-in page and "Copy Access URL" use asExternalUri. With an automatic port, the exact non-loopback authority returned by VS Code is added to the DSH Host allow-list; if the forwarded authority cannot be determined, the extension fails safely.

DSH only listens on 127.0.0.1, but forwarding visibility is controlled by VS Code, Codespaces, or Dev Tunnels. Keep forwarded ports Private and do not share forwarded URLs.

Security and Privacy

  • Use Harness only with projects you fully trust. workingDirectory and any added directories may be read, written, and executed by the agent. Workspace Trust is not a filesystem sandbox.
  • The extension always passes --host 127.0.0.1, refuses to let users override the listen address, and does not support patches that would rewrite this boundary.
  • The upstream Web service has no authentication or TLS suitable for the public internet. The first startup downloads a pinned top-level DSH version from npm; transitive dependencies may still change.
  • API keys, model configuration, and sessions are written by DSH to the extension's global application profile and are shared across projects in the same environment. This extension does not read API keys and contains no telemetry.

Troubleshooting

ProblemWhat to check
Node.js / npx not found or unsupported versionrun node --version in the extension's runtime environment; Remote uses the remote Node. The integrated terminal may be initialized by nvm while the Extension Host's PATH is not synced; provide an absolute PATH in vscode-dsh.environment.
First startup is slownpx downloads DSH and its dependencies. Click "Show Output" in the status bar or increase startupTimeout.
Fixed port already in usechange back to port: 0. If that port is a DSH instance you started yourself, use "Connect to Running Server…".
The page opens but sessions do not workconfigure a model under Settings → Models, then add and select a directory under Choose workspace; see the official Web UI guide.
The built-in page is blank or limiteduse Open in Browser instead, and check the output panel and the Private setting for Remote port forwarding.
The server exits unexpectedlyhover the error status to see why and pick a recovery action. A managed process must confirm cleanup before restart is allowed.

Development

Use Node.js 24 and the pnpm version declared in package.json.

pnpm install --frozen-lockfile
pnpm compile
pnpm verify
pnpm ext:package

compile creates a development bundle; verify runs the available static checks and unit tests; build verifies and creates the production bundle. ext:package builds a VSIX through the same verification gate used in CI. Use watch during development.

See Architecture for module boundaries and lifecycle rules, and Contributing for validation and release conventions.

Feedback

License

MIT

Maintained by Quincy Zhang.