aboutsummaryrefslogtreecommitdiff
path: root/scripts/coverage-summary.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-16 01:18:35 -0500
committerCraig Jennings <c@cjennings.net>2026-05-16 01:18:35 -0500
commit1ef93a50806be0163d431d61eee7b15906d40583 (patch)
treeef95f86541f1ab09f836720c1f128b0af8ba4fdf /scripts/coverage-summary.el
parent03d7c6738835e985319d84b67f582c5a75223a2d (diff)
downloaddotemacs-1ef93a50806be0163d431d61eee7b15906d40583.tar.gz
dotemacs-1ef93a50806be0163d431d61eee7b15906d40583.zip
feat(gptel-tools): wire update_text_file as a local tool with tests
I rewrote `update_text_file.el` in pure Elisp. The previous version shelled out to sed for everything, had a stray quote terminator at EOF (line 149) that broke loading, produced literal backslash-n where actual newlines were expected, and prompted via `y-or-n-p` redundantly with gptel's own `:confirm t` flag. The five operations -- replace, append, prepend, insert-at-line, delete-lines -- split into pure string transforms that test without touching the disk. The file-level wrapper validates the path, enforces a 10MB size limit, takes a timestamped backup, and writes atomically. No backup is created when the operation is a no-op. Patterns are literal substrings (not regex) so the model can't trip over metacharacter quoting. `tests/test-update-text-file.el` covers Normal / Boundary / Error per operation plus the file-level wrapper. 48 tests green. Added `update_text_file` to `cj/gptel-local-tool-features` so gptel exposes the tool after restart.
Diffstat (limited to 'scripts/coverage-summary.el')
0 files changed, 0 insertions, 0 deletions