]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
server: fix read_file append_loc space breaking edit_file match (#25705)
authorPascal <redacted>
Wed, 15 Jul 2026 11:46:46 +0000 (13:46 +0200)
committerGitHub <redacted>
Wed, 15 Jul 2026 11:46:46 +0000 (13:46 +0200)
commita5822222909b785f23ddc74ce3c8f85bd0e38562
treee41df878768fc446bd90c77ccc0be0f5d739c35b
parenta05df0a81a99d4c87023e98b294c48fdd9878833
server: fix read_file append_loc space breaking edit_file match (#25705)

read_file with append_loc emits "{n}\u2192 {line}". The space after the
arrow is meant as a separator, but it is indistinguishable from real
indentation. Models strip "{n}\u2192" yet keep the space, so the old_text
passed to edit_file carries a phantom leading space and never matches
(normalize_for_fuzzy_match trims trailing whitespace only, never leading).

Drop the separator space so the arrow abuts content: stripping "{n}\u2192"
now yields the exact line with its real indentation preserved, and the
failure mode cannot occur by construction. Update the description example
to match the new format.
tools/server/server-tools.cpp