Review every file the agent wants to change, in Visual Studio's own diff window, before it touches disk. DeepSeek Harness is a terminal coding agent. What a terminal cannot give you is a real diff — you see a wall of text scroll past and hope. This extension gives it one: when the agent proposes a change, the comparison opens in Visual Studio's native diff window, left against right, with Accept and Reject. Nothing is written until you accept, and a rejection carries your reason back to the model. What you getA diff gate. Every Nothing is written on rejection. Not the file, not a zero-byte placeholder, not the parent directories. Reads are not gated. Only changes are. Visual Studio tools for the agent. Three read-only MCP tools report IDE state, so the model stops guessing about your workspace:
The last one works while you are typing in the terminal, because it asks the text manager for the last active view rather than the focused one. Install
Then open a solution and pick Tools → DeepSeek Harness → Start session. A terminal tab opens running DeepSeek Harness with the gate attached. The menu also has Status (reports whether the gate is ready, and what is missing if not), Open log, and an optional Clean up installed files for removing what the extension wrote. Nothing is installed into your DeepSeek Harness profileThe gate is a plugin this project owns. It lives under the extension's own directory and is mounted from there through a generated patch. Your profile's dependencies, approval policy and sandbox policy are untouched — uninstalling the extension removes every capability, because without Visual Studio there is no bridge and no diff window. Requirements
Source and securityMIT licensed, source at github.com/VSworder/deepseek-harness-visual-studio. The extension listens on a loopback port only ( UnofficialCommunity-built. Not affiliated with, endorsed by, or supported by DeepSeek. DeepSeek Harness is their product; this extension only adds an IDE surface to it. 中文agent 想改的每个文件,都会先在 Visual Studio 自己的 diff 窗口里给你过一遍,你点接受才落盘。 DeepSeek Harness 是个终端里的编码 agent。终端给不了你的东西,是一个真正的 diff —— 你只能看着一屏文字刷过去,然后祈祷。这个扩展补上这一块:agent 提出改动时,比较窗口会用 Visual Studio 原生的 diff 窗口打开,左对右,配 Accept 和 Reject。你不点接受,就什么都不写;点拒绝时你写的原因会回到模型那里。 你会得到什么一道 diff 闸门。 每次 拒绝时什么都不写。 不建文件、不留 0 字节占位、不建父目录。 读取不经过闸门,只有改动才拦。 给 agent 用的 Visual Studio 工具。 三个只读的 MCP 工具汇报 IDE 状态,模型不必再猜你的工作区:
最后那个在你于终端里打字时也能用 —— 它问的是文本管理器"最后活动的视图",而不是"当前有焦点的视图"。 安装
然后打开解决方案,选 工具 → DeepSeek Harness → Start session。会开一个终端标签页,里面跑着挂了闸门的 DeepSeek Harness。 菜单里还有 Status(报告闸门是否就绪,没就绪时缺什么)、Open log,以及一个可选的 Clean up installed files(删除扩展写入的文件)。 不会往你的 DeepSeek Harness profile 里装任何东西闸门是本项目自己维护的插件,待在扩展自己的目录下,通过生成的 patch 从那里挂载。你的 profile 依赖、审批策略、沙箱策略一概不动 —— 卸载扩展就移除了全部能力,因为没有 Visual Studio 就没有 bridge、也没有 diff 窗口。 前置条件
源码与安全MIT 许可,源码在 github.com/VSworder/deepseek-harness-visual-studio。 扩展只监听环回端口( 非官方社区作品。与 DeepSeek 没有隶属关系,未获其背书或支持。DeepSeek Harness 是他们的产品;这个扩展只是给它加了一层 IDE 界面。 |