@fonlan/dsh-apply-patch
DSH 插件:向模型工具箱注入 Codex 风格的 apply_patch 文件修改工具,并提供配置卡片。
AI 分析
核心用途是让模型(尤其是 GPT 系列)能以高效的补丁格式直接修改、新增或删除文件。适合希望减少文件读写 Token 消耗、提高代码修改成功率的用户。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:fonlan/dsh-apply-patch說明文件
閱讀完整 README ↗使用
模型(尤其是 GPT 系列)会像在 Codex 中一样直接调用 apply_patch,例如:
*** Begin Patch
*** Update File: hello.py
@@
-print("hello")
+print("hello, world")
*** Add File: new.py
+x = 1
*** Delete File: old.py
*** End Patch
工具返回 codex 风格的摘要:
Success. Updated the following files:
M /path/to/hello.py
A /path/to/new.py
D /path/to/old.py