Skip to main content

merge_groups

Function merge_groups 

Source
pub fn merge_groups(
    existing: &[SemanticGroup],
    new_assignments: &[SemanticGroup],
    delta: &DiffDelta,
) -> Vec<SemanticGroup>
Expand description

Merge new LLM grouping assignments into existing groups.

Steps:

  1. Clone existing groups.
  2. Remove entries for removed_files and modified_files (stale data).
  3. For each group in new_assignments:
    • If label matches an existing group (case-insensitive), merge changes into it.
    • Otherwise, append as a new group.
  4. Remove empty groups.