aboutsummaryrefslogtreecommitdiffstats
path: root/tools/fs_patch.sh
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2026-04-10 20:50:32 +0200
committerLeonard Kugis <leonard@kug.is>2026-04-10 20:50:32 +0200
commit4998bb433b9c7baa88e3e3d3e843c0ccbbef9f95 (patch)
tree57464577e5c6bac4b04c8dcb918bb72e558eadc4 /tools/fs_patch.sh
parent204d82d3d5b67c0b0aacf4193540e1c3c2eb95f1 (diff)
downloadllm-functions-docker-4998bb433b9c7baa88e3e3d3e843c0ccbbef9f95.tar.gz
Refined dev roleHEADmain
Now it uses wrapped tool scripts instead of raw bash commands. Together with JSON function mapping this enables better use-case fitting and less errors in tool usage (e.g. partial file writes with out-of-context deletions).
Diffstat (limited to 'tools/fs_patch.sh')
-rwxr-xr-xtools/fs_patch.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/fs_patch.sh b/tools/fs_patch.sh
index 2d9d7e4..a87cef5 100755
--- a/tools/fs_patch.sh
+++ b/tools/fs_patch.sh
@@ -6,6 +6,15 @@ set -uo pipefail
# @option --path The path of the file to apply to
# @option --contents The patch to apply to the file
# @env LLM_OUTPUT=/dev/stdout The output path
+#
+# Example:
+# --- a/hello.py
+# +++ b/hello.py
+# \@@ ... @@
+# def hello():
+# - print("Hello World")
+# + name = input("What is your name? ")
+# + print(f"Hello {name}")
ROOT_DIR="${LLM_ROOT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
OUT="${LLM_OUTPUT:-/dev/stdout}"