commit 4e2c04ec27a7e69272dcede8efaa7fc2d36898cf
parent e256030cf5a23a652bb310bd6f2fbd1f2f7d9ffd
Author: Vineet Kumar <git@vineetk.net>
Date: Tue, 26 May 2026 01:50:23 -0400
fix bug in read_file causing string to not be json-serializable
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/llm-tools.el b/llm-tools.el
@@ -5,7 +5,9 @@
;; read_file (hl-file-read)
(gptel-make-tool
:name "read_file"
- :function #'llm-tools--hl-file-read
+ :function (lambda (file beg end only-anchors? as-list?)
+ (json-encode-string (llm-tools--hl-file-read
+ file beg end only-anchors? as-list?)))
:description "\
Read a file (or a range of lines) and return its contents in hashline
format. Each line is represented as LINE_NUMBER HASH|CONTENT, where