|
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>
|
|---|
|
|
| clients/terminal/tui/renderers/filesystem.py |
|---|
| navi/tools/filesystem.py |
|---|
| tests/clients/test_filesystem_renderer.py |
|---|
| tests/unit/tools/test_filesystem.py |
|---|