Bundle
dsh-vscode
DeepSeek Harness tool plugin: open files, folders, and diff views in the local Visual Studio Code (open_in_vscode tool), spawning Code.exe directly so the sandboxed shell cannot block it.
- Source
- Hyna-hla
- License
- MIT
- Updated
- Updated 3 days ago
Readme
# dsh-vscode
宿主工具插件:给 DSH 注册 `open_in_vscode` 工具,直接调用本地 Visual Studio Code。
- 打开文件或文件夹(相对路径基于当前会话工作区);
- `line`/`column` 跳转到指定位置(`--goto file:line:col`);
- `diffPath` 打开两个文件的对比视图(`--diff`);
- `wait: true` 时等待窗口关闭再返回(默认立即返回)。
之所以做成插件:DSH 的 pwsh 沙盒会拦截工作区外的可执行文件,模型自己敲 `code xxx` 不可靠;宿主插件直接 spawn `Code.exe`(`stdio: ignore` + detached),不受沙盒限制。
## 配置
```yaml
- insert:
- id: dsh-vscode
name: dsh-vscode
config:
codeExe: '' # 留空自动探测;可指定 Code.exe 或 bin\code.cmd 路径
```
自动探测顺序:`%LOCALAPPDATA%\Programs\Microsoft VS Code\Code.exe` → `%ProgramFiles%` → `%ProgramFiles(x86)%` → PATH 上的 `code.cmd`(经 cmd.exe 启动)。
## 构建安装
```powershell
pnpm install
pnpm build
.\scripts\install-to-profile.ps1 -Name dsh-vscode -SourceDir .
# 重启 DeepSeek Harness
```
Install
dsh plugin --profile web add github:Hyna-hla/dsh-vscode#f587a7a1482b028acf85e22c003fbfa09f9a2f0f
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-vscode from the hub
- This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.