summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVineet Kumar <git@vineetk.net>2026-05-26 01:50:23 -0400
committerVineet Kumar <git@vineetk.net>2026-05-26 03:21:07 -0400
commit4e2c04ec27a7e69272dcede8efaa7fc2d36898cf (patch)
treeb2030ed19fd78a0740cb18d533a3e8959adb7bbd
parente256030cf5a23a652bb310bd6f2fbd1f2f7d9ffd (diff)
fix bug in read_file causing string to not be json-serializable
-rw-r--r--llm-tools.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/llm-tools.el b/llm-tools.el
index 905a072..0b2474c 100644
--- a/llm-tools.el
+++ b/llm-tools.el
@@ -5,7 +5,9 @@
5;; read_file (hl-file-read) 5;; read_file (hl-file-read)
6(gptel-make-tool 6(gptel-make-tool
7 :name "read_file" 7 :name "read_file"
8 :function #'llm-tools--hl-file-read 8 :function (lambda (file beg end only-anchors? as-list?)
9 (json-encode-string (llm-tools--hl-file-read
10 file beg end only-anchors? as-list?)))
9 :description "\ 11 :description "\
10Read a file (or a range of lines) and return its contents in hashline 12Read a file (or a range of lines) and return its contents in hashline
11format. Each line is represented as LINE_NUMBER HASH|CONTENT, where 13format. Each line is represented as LINE_NUMBER HASH|CONTENT, where