File-backed snapshots for large-file diff review.
When a file exceeds the :agent_diff_size_threshold config, the before/after
content is written to temp files instead of held in memory. The DiffReview
reads lines lazily from these files. Temp files are cleaned up when the
diff review is dismissed or the session ends.
Summary
Functions
Cleans up temp files for file-backed snapshots.
Returns the raw content from a snapshot.
Creates a snapshot from file content. If the content exceeds the threshold, writes it to a temp file. Otherwise, keeps it in memory.
Returns the lines from a snapshot.
Types
Functions
@spec cleanup(t()) :: :ok
Cleans up temp files for file-backed snapshots.
Returns the raw content from a snapshot.
Creates a snapshot from file content. If the content exceeds the threshold, writes it to a temp file. Otherwise, keeps it in memory.
Returns the lines from a snapshot.