Skip to main content

Module grouper

Module grouper 

Source

Modules§

llm

Structs§

DiffDelta
Categorization of files between two diff snapshots.
GroupedChange
A reference to specific hunks within a file that belong to a group.
GroupingResponse
Response envelope from LLM grouping request.
SemanticGroup
A semantic group of related changes (hunk-level granularity). Accepts both changes (hunk-level) and files (file-level fallback) from LLM.

Enums§

GroupingStatus
Tracks the lifecycle of an async grouping request.

Functions§

compute_all_file_hashes
Compute hashes for all files in a diff. Key = file path with b/ prefix stripped.
compute_diff_delta
Compare new file hashes against previous to categorize each file.
compute_file_hash
Compute a stable hash of a file’s diff content (hunk headers + line types + line content). Used to detect whether a file’s diff has changed between refreshes.
hunk_summaries
incremental_hunk_summaries
Build hunk summaries for ONLY new/modified files, prepended with existing group context.
merge_groups
Merge new LLM grouping assignments into existing groups.
normalize_hunk_indices
Post-process grouping results: fill in explicit hunk indices when hunks is empty and the file has multiple hunks, so the UI can filter hunks per group correctly.
remove_files_from_groups
Remove all entries for the given file paths from existing groups. Groups that become empty after removal are dropped.