feat: filter IDE reference candidates

This commit is contained in:
2026-08-17 13:55:12 +08:00
parent 35163e12b4
commit 0ff9477b5d
10 changed files with 138 additions and 15 deletions
+7 -1
View File
@@ -45,10 +45,16 @@ $DshCli = 'F:\deepseek-harness-desktop\.artifacts\windows-electron\win-unpacked\
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.
The package's `cordis.patch.yml` inserts its own shared Host/Client row. After the first install or any change to that bundle patch, rerun the install command, fully quit the matching DSH desktop process, and restart it. 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.
## Candidate filtering
The DSH Host filters IDE project metadata before it builds the shared VS Code and Visual Studio candidate list. `excludedExtensions` defaults to `.csproj`, `.fsproj`, `.vbproj`, `.vcxproj`, `.vsproj`, `.sln`, and `.slnx`. Matching is case-insensitive, and configured values may include or omit the leading dot.
Set `excludedExtensions: []` in `dsh-plugin/cordis.patch.yml` to expose every open document. After changing the bundle patch, reinstall the local plugin into the target profile, fully quit the desktop app, and restart it so the Host receives the new configuration.
## 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.