Skip to main content

Module diff_format

Module diff_format 

Source
Expand description

Build unified-diff strings for tool results.

edit_file and write_file capture the file contents before and after the mutation and emit a unified diff at the head of their ToolResult output. The TUI’s output_looks_like_diff detector then routes the payload through diff_render::render_diff, which renders it with line numbers and coloured +/- gutters (#505).

Functions§

make_unified_diff
Build a unified diff between old and new keyed at path.