DSH for VS Code 🐳在 VS Code 中直接使用 DeepSeek Harness(DSH) 的网页界面:点击侧边栏图标即可内嵌打开 DSH,自动启动/复用 📸 界面截图
✨ 特性
📥 安装方式一:下载 .vsix 安装包(推荐)
方式二:从源码构建
前置要求:已安装 DeepSeek Harness 的 🚀 使用
命令面板(
|
| 命令 | 说明 |
|---|---|
DSH: 打开面板 |
打开左侧面板 |
DSH: 在辅助侧边栏打开 |
打开右侧面板 |
DSH: 在浏览器中打开 |
在系统浏览器打开 DSH 页面 |
DSH: 重启服务 |
重启插件管理的服务 |
DSH: 停止服务 |
停止插件启动的服务 |
DSH: 复制网址 |
复制 DSH 页面地址 |
DSH: 查看日志 |
打开插件日志输出通道 |
⚙️ 设置(dsh.*)
| 设置项 | 默认值 | 说明 |
|---|---|---|
dsh.port |
3080 |
期望端口(探测与启动共用) |
dsh.host |
127.0.0.1 |
服务地址(仅允许回环地址) |
dsh.autoStart |
true |
服务未运行时自动启动 |
dsh.stopOnExit |
true |
关闭最后一个窗口时停止插件自启的服务 |
dsh.extraArgs |
[] |
启动 dsh web 时附加的参数 |
🌍 多语言
界面文案跟随 VS Code 显示语言(Configure Display Language):zh-* → 简体中文,其余语言 → 英文。
🧑💻 开发
环境要求:Node.js ≥ 22、VS Code ≥ 1.91。
npm install
npm run test # 39 个单元/集成测试(含真实 dsh web 全流程)
npm run compile # 构建 out/extension.js
npm run watch # 监听构建
npm run typecheck # 类型检查
npm run package # 打包 .vsix
调试:VS Code 打开本目录,按 F5 启动 Extension Development Host。
src/
├── extension.ts # 入口:装配与命令注册
├── i18n.ts # 动态文案字典(zh-* 中文 / 其余英文)
├── config.ts # 设置读取与规范化(loopback 白名单校验)
├── service/
│ ├── detect.ts # 端口探测(识别 DSH 标记)
│ ├── process.ts # 跨平台子进程封装(dsh / dsh.cmd)
│ └── manager.ts # 服务管理器状态机(核心)
├── panel/
│ ├── html.ts # 面板占位页模板(CSP 最小权限)
│ └── provider.ts # WebviewViewProvider(iframe + 占位页)
└── statusbar.ts # 状态栏控制器
🧭 已知限制
- 欢迎页"DSH 入门"卡片的彩色图标来自 Marketplace 画廊数据,仅在商店上架后显示(卡片功能本身不受影响);
- VS Code 平台规则:左侧图标打开左侧面板、右侧图标打开右侧面板,无法让左侧图标打开右侧面板。
🌐 社区
本项目是 DeepSeek Harness 社区插件(话题:dsh-plugin)。
- DSH 官方仓库:https://github.com/deepseek-ai/deepseek-harness
- 问题反馈:https://github.com/Fengze233/dsh-vscode/issues
- DSH 社区讨论:https://github.com/deepseek-ai/deepseek-harness/discussions
📄 License
MIT © 2026 Fengze233
English
A VS Code extension that embeds the DeepSeek Harness (DSH) web UI right inside the sidebar. One click auto-starts (or reuses) dsh web and loads the page in an embedded panel — no more switching between terminal, browser, and IDE.
Features: dual sidebar entrances (activity bar + secondary side bar), automatic service lifecycle management, live status bar indicator, graceful error/reconnect pages, bilingual UI (Chinese for zh-*, English otherwise), loopback-only security boundary.
Install: download dsh-vscode.vsix from Releases, then run Extensions: Install from VSIX... — or build from source (npm install && npm run package).
Requirements: Node.js ≥ 22 to build; VS Code ≥ 1.91; the dsh CLI from deepseek-harness on your PATH.
Community: this is a DeepSeek Harness community plugin (topic: dsh-plugin). Feedback welcome at https://github.com/Fengze233/dsh-vscode/issues.
