Files
dsh-plugin-coop-with-vs/README.md
T

59 lines
2.7 KiB
Markdown
Raw Normal View History

2026-08-17 11:52:48 +08:00
# 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 using `window.tabGroups.all`.
- `visualstudio-extension/`: Visual Studio 2022/2026 VSIX using `IVsRunningDocumentTable`.
2026-08-17 11:52:48 +08:00
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.
2026-08-17 11:52:48 +08:00
```powershell
pnpm install
pnpm check
pnpm build:vs
```
Component-specific installation and development instructions live in each directory.
## Install into DSH
2026-08-17 13:16:26 +08:00
Build the DSH package first:
2026-08-17 11:52:48 +08:00
```powershell
pnpm --filter ./dsh-plugin build
2026-08-17 13:16:26 +08:00
```
For a normal CLI profile, install the local bundle into the default Web profile:
```powershell
dsh plugin --profile web add -w F:\dsh-plugin-coop-with-vs\dsh-plugin
2026-08-17 11:52:48 +08:00
```
2026-08-17 13:16:26 +08:00
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:
```powershell
$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.
2026-08-17 11:52:48 +08:00
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