filesystem edit: render red/green diff in TUI without changing model context
edit is now the primary editing method, yet its output was a dry one-line
status ("Edited …: replaced X B with Y B") while edit_lines/smart_edit showed a
highlighted unified diff. Carry the unified diff in ToolResult.metadata["diff"]
(kept out of the model-facing output, so the agent's context is unchanged) and
render it in the TUI: dim summary line plus highlighted diff (green +, red -,
dim @@). Falls back to plain text when no diff metadata is present.

Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9640fa3 commit 348fdf62d796d9dcf1ab631d2eae9bc5f721f653
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 6 hours ago
Showing 4 changed files
View
clients/terminal/tui/renderers/filesystem.py
View
navi/tools/filesystem.py
View
tests/clients/test_filesystem_renderer.py
View
tests/unit/tools/test_filesystem.py