dsh-vscode-plugin
在 VS Code 中运行 DeepSeek Harness(dsh) 的扩展,提供原生聊天侧栏:流式回复、工具调用卡片、可点击文件跳转与 diff 预览,交互风格对齐主流 AI 编程助手扩展。
功能
- 活动栏聊天面板(
Ctrl+Alt+D):流式助手回复,可折叠推理块,Markdown 与语法高亮。
- 工具卡片:运行中 / 成功 / 失败状态,单行摘要,可展开查看参数与结果。
- 文件跳转:工具路径可点击;正文中的
path:line 可定位到编辑器行号。
- Diff 预览:编辑类工具提供 VS Code 原生 diff 标签页(编辑前快照 vs 编辑后)。
- 交互卡片:Agent 提问与审批在聊天内渲染为可操作卡片。
- 会话管理:历史切换、重命名、队列、取消/停止、运行中 steer。
- 模型选择:使用 dsh 配置中的完整提供商目录。
- 斜杠菜单:技能命令(
/skill-name …)与自动补全。
- 跟随编辑(
dshCoder.followFileEdits):Agent 改文件时自动打开。
扩展默认每个窗口自管 dsh web 服务(端口 0,仅 loopback);也可通过 dshCoder.serverUrl 连接已有服务。
环境要求
- VS Code 1.85+
- 已安装
dsh CLI 且在 PATH 中(或配置 dshCoder.executablePath),并完成凭证配置(dsh 设置 / .credentials.yaml)。
配置项
| 键 |
默认值 |
说明 |
dshCoder.executablePath |
dsh |
dsh CLI 路径。 |
dshCoder.serverUrl |
(空) |
连接已有 dsh web 服务,不自动拉起。 |
dshCoder.defaultAgentPreset |
(空) |
新会话使用的 Agent 预设(如 code、standard)。 |
dshCoder.followFileEdits |
false |
Agent 编辑文件时自动打开。 |
dshCoder.diffPreview |
true |
编辑类工具卡片显示 diff 按钮。 |
dshCoder.busyEnter |
queue |
运行中按 Enter:queue 入队 / steer 转向当前轮次。 |
dshCoder.defaultPermission |
workspace-write |
新会话默认权限预设。 |
dshCoder.language |
zh |
面板界面语言(zh / en)。 |
开发
npm install
npm run compile
npm test
npm run package
按 F5 启动扩展开发宿主。
许可证
MIT
| |