D
dsh-file-confirm
v0.1.1 · 1 天前发布
文件改动确认机制(双面插件):write/edit/str_replace_editor 写入前弹出确认条,内嵌 GitHub 风格 diff(行号 + 红删绿增),允许本次 / 拒绝。File-change confirmation with inline diff for DeepSeek Harness.
README
dsh-file-confirm — 文件改动确认机制



双面插件:**任何文件改动(write / edit / str_replace_editor 的写命令)执行前,都会在
输入区出现确认条,确认条内直接展示 diff 红绿文本**(新建全绿、编辑红删绿增);
用户点「允许本次」才放行,点「拒绝」则该次工具调用以失败结束(模型能看到拒绝原因并调整)。
演示效果
使用流程
模型调用 write / edit / str_replace_editor
→ 确认条弹出(标题 + 文件路径 + 内嵌 diff 红绿预览)
→ 你点「允许本次」→ 工具执行,文件写入
→ 你点「拒绝」 → 工具失败,模型收到拒绝原因并调整
read、搜索、bash 等不受影响文档
与生态对比
| 插件 |
版本兼容矩阵
| DSH 版本 | 状态 | 说明 |
|---|---|---|
dsh@0.1.0-rc.6 | ✅ 兼容 | cordis patch ✅ |
dsh@0.1.0 | ✅ 兼容 | 标准 patch ✅ |
dsh@0.2.0 | ⚠️ 待验证 | 待实测(API 可能在变) |
dsh@0.3.0+ | ❓ 未知 | 尚未发布 |
💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正
元数据
- License
- MIT
- npm
- dsh-file-confirm
- Repo
- git+https://github.com/hfh1999/dsh-file-confirm.git
- Engines
{"node":">=18"}- Weekly DL
- 0
- Monthly DL
- 0
- dsh.bundle
{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}}