pi-mono/packages/coding-agent/src/core/tools
Petr Houška 991cb1ad24 fix(coding-agent): edit keeps line endings of untouched lines, diffs before writing
The edit tool wrote the whole file back with the first line ending it
found, so mixed CRLF/LF files and lone CRs were rewritten. Replacements
are now mapped from the LF-normalized text back to the original and
spliced in; new line breaks use the ending of the replaced line.

The diff and patch were computed after writing and diffed the whole
file, which ran out of memory on large files after the write. They are
now computed before writing, and files larger than 5 MB get a notice
instead of a diff (empty patch).

fixes #8544
2026-11-05 23:46:20 +01:00
..
renderers fix(coding-agent,tui): reuse syntax highlighting and rendered Markdown blocks 2026-11-01 14:40:56 +01:00
bash.ts fix(coding-agent): report the shell exit code when bash times out after the shell exited (#11813) 2026-11-04 23:47:16 +01:00
edit-diff.ts fix(coding-agent): edit keeps line endings of untouched lines, diffs before writing 2026-11-05 23:46:20 +01:00
edit.ts fix(coding-agent): edit keeps line endings of untouched lines, diffs before writing 2026-11-05 23:46:20 +01:00
file-mutation-queue.ts fix(coding-agent): use async operations in tools 2026-05-23 09:50:03 +02:00
find.ts fix(coding-agent): find and ls limit edge cases (#11747) 2026-11-03 23:56:31 +01:00
grep.ts fix(coding-agent): take grep context lines from ripgrep instead of reading matched files (#11705) 2026-11-03 23:43:40 +01:00
index.ts feat(coding-agent): add optional PowerShell tool (#8512) 2026-08-24 12:27:03 +02:00
ls.ts fix(coding-agent): find and ls limit edge cases (#11747) 2026-11-03 23:56:31 +01:00
output-accumulator.ts feat(coding-agent): save codemode image() output to temp files 2026-10-04 23:32:43 +02:00
path-utils.ts Finish async tool cleanup 2026-05-23 11:36:41 +02:00
powershell.ts feat(coding-agent): add optional PowerShell tool (#8512) 2026-08-24 12:27:03 +02:00
read.ts fix(coding-agent): stream the read tool instead of loading whole files (#11750) 2026-11-04 23:14:52 +01:00
render-utils.ts fix(coding-agent): compare paths case-insensitively on Windows (#11588) 2026-10-29 21:53:06 +01:00
tool-definition-wrapper.ts feat(agent): pi-schema's Static types TypeBox-built schemas too, without depending on TypeBox 2026-11-01 11:12:44 +00:00
truncate.ts fix(coding-agent): do not split surrogate pairs when truncating text (#11757) 2026-11-04 20:59:46 +01:00
write.ts feat(ai,agent,coding-agent): validate tool arguments with pi-schema, drop TypeBox 2026-11-01 10:08:42 +00:00