/** * Conflict Resolver * * Handles interactive conflict resolution for template sync. * Uses @inquirer/prompts for user interaction. */ import type { FileComparison, ResolutionChoice, ResolutionResult } from './types.js'; /** * Resolution options for a single conflict */ export interface ResolutionOptions { /** Whether to show diffs by default */ showDiff?: boolean; /** Whether to allow batch resolution */ allowBatch?: boolean; /** Default choice */ defaultChoice?: ResolutionChoice; } /** * Batch resolution strategy */ export type BatchStrategy = 'keep-all' | 'overwrite-all' | 'individual'; /** * Handles interactive conflict resolution */ export declare class ConflictResolver { private projectRoot; private templateRoot; constructor(projectRoot: string | undefined, templateRoot: string); /** * Resolve conflicts interactively * * @param conflicts - Array of conflicting comparisons * @param options - Resolution options * @returns Array of resolution results */ resolveConflicts(conflicts: FileComparison[], options?: ResolutionOptions): Promise; /** * Resolve a single conflict * * @param conflict - File comparison in conflict * @param options - Resolution options * @returns Resolution result */ resolveConflict(conflict: FileComparison, options?: ResolutionOptions): Promise; /** * Prompt for batch resolution strategy * * @param count - Number of conflicts * @returns Batch strategy */ private promptBatchStrategy; /** * Prompt for resolution of a single conflict * * @param conflict - File comparison * @param options - Resolution options * @returns Resolution choice */ private promptResolution; /** * Show conflict information * * @param conflict - File comparison */ private showConflictInfo; /** * Show conflict summary * * @param conflicts - Array of conflicts */ private showConflictSummary; /** * Show diff for a conflict * * @param conflict - File comparison */ private showDiff; /** * Format file state for display * * @param state - File state * @returns Formatted state string */ private formatState; /** * Apply resolution results using merger * * @param resolutions - Array of resolution results * @param conflicts - Original conflicts for reference * @returns Results of applied resolutions */ applyResolutions(resolutions: ResolutionResult[], conflicts: FileComparison[]): Promise<{ applied: number; skipped: number; errors: number; }>; /** * Prompt for archival of removed files * * @param removedFiles - Array of removed file paths * @returns true if user wants to archive */ promptArchiveRemoved(removedFiles: string[]): Promise; /** * Show dry run results * * @param comparisons - File comparisons */ showDryRunResults(comparisons: FileComparison[]): void; } //# sourceMappingURL=conflict-resolver.d.ts.map