Skip to main content

Module diff_preview

Module diff_preview 

Source
Expand description

Compatibility re-exports for vtcode-diff preview semantics.

New internal consumers should depend on vtcode-diff directly. These exports remain for one release so downstream callers can migrate.

Structs§

DiffCell
One side of a semantic preview row.
DiffChangeCounts
Aggregate addition/deletion counts retained for compatibility.
DiffDisplayLine
A semantic legacy display line.
DiffRow
A renderer-neutral row, optionally containing paired side-by-side cells.
DiffSegment
One independently styled content segment.
IntralineRange
Intraline byte range, always aligned to UTF-8 boundaries.
LayoutOptions
Width and bounded-excerpt options for semantic layout.
SideBySideRow
One paired row in the compatibility side-by-side model.

Enums§

DiffDisplayKind
Semantic role used by legacy preview consumers.
DiffLayout
Requested preview layout.
DiffRowKind
Semantic role for a renderer-neutral row.

Functions§

annotate_word_level_diffs
Adds byte-safe intraline ranges to consecutive deletion/addition groups.
count_diff_changes
Counts additions and deletions in structured hunks.
diff_display_line_number_width
Computes the clamped line-number gutter width.
display_lines_from_hunks
Converts hunks to semantic display lines and bounded intraline ranges.
display_lines_from_unified_diff
Parses unified text into display lines, retaining metadata lines.
format_numbered_unified_diff
Formats a numbered unified diff without ANSI color.
layout_display_lines
Lays out precomputed display lines without repeating intraline analysis.
side_by_side_rows
Pairs deletions and additions for side-by-side presentation.
word_level_changed_ranges
Computes byte-safe word-level changed ranges for a line pair.

Type Aliases§

WordChangedRanges
Intra-line highlight ranges retained for compatibility.