Skip to main content

Module diff

Module diff 

Source

Structs§

AgentFeedbackOptions
Options controlling feedback wording.
CellContext
CommandContext
CommentContext
The captured source context for a comment.
CommentDraft
ContentProjection
Reveal state used to project a document over the sources it carries.
DiffDocument
A complete renderer-neutral review snapshot: every changed file with its patch and, when captured, both complete source versions.
DiffPresentation
Eager row indexes and cheap descriptors. Syntax and frontend widgets are not constructed here.
FileDiff
One changed file.
Fingerprint
GapExpansion
User-controlled revealed ranges at both hunk-adjacent edges of a gap.
GapId
Stable identity of a gap before, between, or after hunks.
GapInfo
Adapter-facing state for an expansion affordance.
GapInterval
One-based half-open source intervals for both sides of a gap.
GitStatusEntry
One entry from git status --porcelain=v1 -z.
Hunk
A unified-diff hunk.
HunkSequence
Renderer-neutral description of the hunk-side line sequence containing a patch cell, used to keep multiline syntax context for patch-only files.
LineAnchor
A stable, serializable identity for a source line in a diff.
ModeChange
A file mode change, represented as Git’s six-digit mode string.
ParseDiffScopeError
PatchLine
A line in a hunk, including canonical old/new numbering.
PresentationOptions
Options used while indexing presentation rows.
PresentedCell
One side of a presented row.
PresentedRow
One cheap renderer-neutral row descriptor.
RepoPath
A validated UTF-8 path relative to a repository root.
Review
Mutable collection of review comments.
ReviewCapabilities
ReviewComment
A review comment retained even when its source disappears.
ReviewSession
ReviewSubmission
Structured review data and its deterministic prompt representation.
RowId
Stable identity for a presented row.
SessionOptions
SourceDocument
An immutable, contiguous source document with stable line coordinates.
SourceLineRef
A one-based source coordinate independent of patch provenance.
SourceLocation
A durable source coordinate within the current review snapshot.
SourceSequenceId
Snapshot-local identity for one ordered sequence of source lines.
UntrackedFile
Contents for an untracked file, supplied by a native Git host.

Enums§

DiffError
Errors shared by model and parser adapters.
DiffReviewCommand
DiffReviewEvent
Events emitted by a diff review UI.
DiffScope
The snapshot included in a document.
DiffSide
The side of a patch to which a line or comment belongs.
DiffTone
Semantic tint for a diff cell.
FileStatus
Git’s file operation classification.
FingerprintError
Errors produced while decoding a hexadecimal fingerprint.
FocusPane
InteractionPhase
Layout
PatchLineKind
A line’s semantic patch kind.
RepoPathError
Errors produced while constructing or decoding a repository-relative path.
RepositoryAction
A repository mutation requested by a diff review UI.
RevealAmount
ReviewCommand
RowKind
Semantic row type.
SourceUnavailable
Why a complete source version cannot be displayed.
StageState
Index/worktree staging state.
ViewMode
Requested diff layout.

Constants§

MAX_HUNK_SEQUENCE_LINES
Largest hunk (in total patch lines) served as a fallback syntax sequence. Larger hunks degrade to per-line highlighting so patch-only rendering work stays bounded by the viewport rather than the document.
MAX_SOURCE_FILE_BYTES
Maximum UTF-8 bytes accepted for one complete source version.
MAX_SOURCE_FILE_LINES
Defensive maximum normalized lines accepted for one complete source version.

Functions§

format_review
gaps_for_file
Computes leading, between-hunk, and trailing one-based source intervals.
join_lines
Joins lines into the newline-terminated text a SourceSequenceId names.
parse_git_diff
Parses and normalizes a multi-file Git diff.
parse_porcelain_v1_z
Parses git status --porcelain=v1 -z output.

Type Aliases§

SourceResult
One side of a changed file: its complete source, or why it is unavailable.