claudetool: make it easier to parameterize patch tool
diff --git a/loop/agent.go b/loop/agent.go
index 0877a5a..0953a56 100644
--- a/loop/agent.go
+++ b/loop/agent.go
@@ -1390,6 +1390,9 @@
Timeouts: a.config.BashTimeouts,
Pwd: a.workingDir,
}
+ patchTool := &claudetool.PatchTool{
+ Callback: a.patchCallback,
+ }
// Register all tools with the conversation
// When adding, removing, or modifying tools here, double-check that the termui tool display
@@ -1411,7 +1414,7 @@
convo.Tools = []*llm.Tool{
bashTool.Tool(),
claudetool.Keyword,
- claudetool.Patch(a.patchCallback),
+ patchTool.Tool(),
claudetool.Think,
claudetool.TodoRead,
claudetool.TodoWrite,