Introduction¶
In the development of DeepSeek Harness (DSH), agents often need to invoke local editors to handle code. DSH’s pwsh sandbox blocks executables outside the workspace by default, causing the model’s attempts to call an IDE through command lines such as code xxx to fail. This approach is also inherently unstable. To solve this problem, a tool is needed that can directly start external programs from the host process.
Plugin Introduction¶
dsh-vscode is a host tool plugin maintained by Hyna-hla. Its core purpose is to register the open_in_vscode tool with DSH, allowing the agent to directly invoke locally installed Visual Studio Code. By directly launching Code.exe via spawn, the plugin bypasses DSH’s pwsh sandbox restrictions and solves the problem of the model being unable to reliably execute external editor commands.
Core Features¶
- Open files or folders: Supports relative paths based on the current session workspace to directly open local files or directories.
- Jump to a specified location: Jumps to a specific line and column in a file using the
--goto file:line:colparameter. - Open a comparison view: Opens a diff window for two files using the
--diffparameter. - Wait for control: When
wait: trueis set, the plugin waits until the VS Code window closes before returning control to DSH (the default behavior is to return immediately).
Installation and Configuration¶
Installation steps:
pnpm install
pnpm build
.\scripts\install-to-profile.ps1 -Name dsh-vscode -SourceDir .
After installation is complete, restart DeepSeek Harness.
Configuration:
Insert the following content into the DSH configuration file:
- insert:
- id: dsh-vscode
name: dsh-vscode
config:
codeExe: '' # 留空自动探测;可指定 Code.exe 或 bin\code.cmd 路径
If codeExe is not specified, the plugin automatically detects Code.exe in the following order:
1. %LOCALAPPDATA%\Programs\Microsoft VS Code\Code.exe
2. %ProgramFiles%
3. %ProgramFiles(x86)%
4. code.cmd on the PATH (launched via cmd.exe).
Usage¶
- Jump to a specified location:
Use--goto file:line:colin the agent configuration. - Open a comparison view:
Use--diffin the agent configuration. - Wait for the window to close:
Setwait: trueto block until the VS Code window closes.
Notes¶
- This plugin is suitable for developers who need to integrate local IDE capabilities in a DSH environment.
- The plugin performs the
spawnoperation directly with the permissions of the current DSH process, so be sure to check the source code and license (MIT) before installation. - When the agent uses this tool, file paths should be based on the current session workspace as much as possible to avoid path issues caused by sandbox restrictions.
Conclusion¶
dsh-vscode provides a way to bypass sandbox restrictions and reliably invoke local VS Code. For DSH agents that require deep editor integration, this is a practical tool. For more details, see GitHub.