Commit f4b416c

mo khan <mo@mokhan.ca>
2026-01-20 00:39:17
refactor: replace patch tool with update to the system prompt
1 parent c8bfd19
Changed files (2)
lib/elelem/agent.rb
@@ -125,7 +125,7 @@ module Elelem
         - execute: shell command
 
         # Editing
-        Use `patch` tool for multi-line changes (unified diff format)
+        Use `patch -p1` for multi-line changes: `echo "DIFF" | patch -p1`
         Use sed for single-line changes: `sed -i'' 's/old/new/' file`
         Use write for new files or full rewrites
 
lib/elelem/toolbox.rb
@@ -27,18 +27,6 @@ module Elelem
         params: { command: { type: "string" } },
         required: ["command"],
         fn: ->(a) { Elelem.sh("bash", args: ["-c", a["command"]]) { |x| $stdout.print(x) } }
-      },
-      "patch" => {
-        desc: "Apply unified diff",
-        params: { diff: { type: "string", description: "Unified diff content" } },
-        required: ["diff"],
-        fn: lambda do |a|
-          Tempfile.create("patch") do |f|
-            f.write(a["diff"])
-            f.flush
-            Elelem.sh("patch", args: ["-p1", "-i", f.path])
-          end
-        end
       }
     }.freeze