pub fn select_patches(
patches: &[PatchSearchResult],
can_access_paid: bool,
is_json: bool,
) -> Result<Vec<PatchSearchResult>, i32>Expand description
Select one patch per PURL from available patches.
- Paid users: auto-select the most recent paid patch per PURL.
- Free users with one patch: auto-select it.
- Free users with multiple patches: interactive selection via dialoguer.
- JSON mode with multiple free patches: returns an error with options list.
Returns Ok(selected_patches) or Err(exit_code) if selection fails.