Skip to main content

Module diff

Module diff 

Source
Expand description

Diff block renderer.

Renders a [TranscriptBlock::Diff] as a header line (📝 path) plus one line per [DiffLine] with + / - lines coloured green / red and unchanged context lines greyed. When the diff has no hunks (typically the synthesised “Created/Updated” stub for write_file) we render a single muted line summarising the path.

V4A patch parsing lives in crate::tui::app::parse_v4a_patch; this module is purely the visual layer.

Functions§

body_lines
Render the body lines of a Diff block (no header).
empty_stub_line
“No hunks” stub line used when a write_file only produced a path summary.
header_line
Header line for a Diff block: 📝 <path>.