Commit graph

15 commits

Author SHA1 Message Date
Petr Houška
d1e8703375 fix(coding-agent): read and edit handle UTF-16 and non-UTF-8 files without corrupting them
One helper, tools/file-encoding.ts, detects UTF-16 by byte order mark
and decodes text for read (UTF-8 as before otherwise) and losslessly for
edit. Edit writes files back in the encoding they were read with; files
that are not valid UTF-8 are decoded as Latin-1 so ASCII edits splice
exactly their bytes, and non-ASCII edits, fuzzy matches and changes to
the byte after a non-ASCII byte are refused. EditOperations gains an
optional writeFileBytes for these files.

fixes #10349
fixes #5797
2026-11-05 23:46:22 +01:00
Armin Ronacher
1355cd36e0 fix(coding-agent): normalize UTF-8 BOMs in text inputs
closes #8337
2026-08-19 14:11:02 +02:00
Armin Ronacher
128330e36f fix(coding-agent): preserve untouched lines in fuzzy edit
closes #5899
2026-06-19 20:16:47 +02:00
Alexey Zaytsev
2b46f38863
feat(coding-agent): Expose edit-diff for extensions (#5756) 2026-06-18 17:14:39 +02:00
Mario Zechner
60a55a2399 feat(coding-agent): expose edit tool unified patch
closes #4821
2026-05-21 12:15:39 +02:00
Armin Ronacher
ae9450dc51 chore(ts): use source import extensions 2026-05-20 00:04:03 +02:00
Mario Zechner
ebdf3cf451 Adjusts #3955, better error message 2026-04-30 12:33:02 +02:00
Ramiz Wachtler
43ee9b77ed
fix(coding-agent): report edit access failures correctly (#3955)
* fix(coding-agent): report edit access failures correctly closes #3894

- classify edit and edit-preview access errors by errno
- add regressions for missing, permission, and fallback cases
- document the fix in the coding-agent changelog

* chore: get rid of CHANGELOG.md entry

* refactor(coding-agent): apply review suggestions - use single error msg

* refactor(coding-agent): clean up test cases
2026-04-30 12:31:29 +02:00
Mario Zechner
e773527b3a fix(coding-agent): simplify edit tool input closes #2639 2026-03-28 22:10:34 +01:00
Mario Zechner
a0734bd162 fix(coding-agent): tighten skill discovery and edit diffs closes #2603 2026-03-27 03:48:28 +01:00
Mario Zechner
20a57e7599 feat(coding-agent): support multi-edit in edit tool 2026-03-27 02:21:09 +01:00
Mario Zechner
700bcf3455 fix(coding-agent): normalize fuzzy edit matching and run touched tests closes #2044 2026-03-15 19:15:38 +01:00
Danila Poyarkov
0c135d0141
feat(edit): add fuzzy matching for trailing whitespace, quotes, dashes, and spaces (#713) 2026-01-14 10:22:00 +01:00
Mario Zechner
d9adf659ca Fix edit tool failing on files with UTF-8 BOM
Strip BOM before matching (LLM won't include invisible BOM in oldText),
restore on write.

Based on #394 by @prathamdby
2026-01-02 01:57:24 +01:00
Mario Zechner
1ed009e2cf Show edit diff before tool execution (fixes #393)
- Extract diff computation from edit.ts into shared edit-diff.ts
- ToolExecutionComponent computes and caches diff when args are complete
- Diff is visible while permission hooks block, before tool executes
2026-01-01 20:34:19 +01:00