2.7 KiB
DSH Coop with Visual Studio
A Windows-local integration that lets DeepSeek Harness users type @, choose a file already open in VS Code or Visual Studio, and send that file path to the model as a structured reference.
Repository layout
protocol/: versioned JSON snapshot contract shared by all components.dsh-plugin/: dual-face Cordis package. The Host reads snapshots; the Client registers the@source.vscode-extension/: VS Code companion usingwindow.tabGroups.all.visualstudio-extension/: Visual Studio 2022/2026 VSIX usingIVsRunningDocumentTable.
The companions publish paths and dirty flags only. They never copy source text. DSH and the model continue to use the normal filesystem tools, so an unsaved IDE buffer is explicitly marked but is not silently substituted for the disk file.
Build
Prerequisites: Node.js 20+, pnpm 10+, .NET SDK/MSBuild with the Visual Studio extension workload.
pnpm install
pnpm check
pnpm build:vs
Component-specific installation and development instructions live in each directory.
Install into DSH
Build the DSH package first:
pnpm --filter ./dsh-plugin build
For a normal CLI profile, install the local bundle into the default Web profile:
dsh plugin --profile web add -w F:\dsh-plugin-coop-with-vs\dsh-plugin
The packaged DeepSeek Harness desktop app uses an isolated DSH_HOME below its Electron user-data directory. Set that path for the install command so the desktop sidecar, rather than only the default CLI profile, receives the bundle:
$env:DSH_HOME = "$env:APPDATA\deepseek-harness-desktop\dsh"
$DshCli = 'F:\deepseek-harness-desktop\.artifacts\windows-electron\win-unpacked\resources\runtime\app\node_modules\@deepseek-ai\dsh\lib\bin.js'
node $DshCli plugin --profile web add -w 'F:\dsh-plugin-coop-with-vs\dsh-plugin'
The package's cordis.patch.yml inserts its own shared Host/Client row. Fully quit and restart the matching DSH process after the first install. During development, run the DSH package watcher and the Harness pnpm run dev:web watcher when Client HMR is required.
Install the generated VS Code .vsix and Visual Studio .vsix from their component output directories. Once either IDE companion is active, type @ in the DSH composer and select from the IDE open files group.
Data and security boundary
Snapshots are stored under %LOCALAPPDATA%\Prophet\dsh-plugin-coop-with-vs\v1\instances. Writers update atomically and heartbeat every 15 seconds; the Host ignores snapshots older than 60 seconds. The DSH endpoint accepts loopback GET requests only, validates all snapshot fields, limits results, and never reads file contents while producing candidates.
License
MIT