hfh1999/dsh-file-confirm0

dsh-file-confirm

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

包名
dsh-file-confirm
版本
0.1.1
许可证
MIT
最近更新
2026年8月16日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:hfh1999/dsh-file-confirm

使用流程

模型调用 write / edit / str_replace_editor
  → 确认条弹出(标题 + 文件路径 + 内嵌 diff 红绿预览)
  → 你点「允许本次」→ 工具执行,文件写入
  → 你点「拒绝」   → 工具失败,模型收到拒绝原因并调整
  • 只拦文件写操作;read、搜索、bash 等不受影响
  • 其他工具的审批(如 bash 沙箱升级)仍走内置面板
  • 长文本 diff 不截断,块内滚动查看

配置(cordis.patch.yml 中该行的 config)

默认说明
tools[write, edit, str_replace_editor]拦截的工具名列表
pathPatternRegExp 字符串;仅对匹配的文件路径确认
enabledtrue总开关