using System; using System.Threading.Tasks; namespace ClaudeDo.Ui.Services; /// /// Single entry point for handing a conflicting merge to the in-app 3-pane resolver. /// Replaces the per-VM RequestConflictResolution Func seams that used to be /// hand-threaded shell → details → merge-section → diff → merge-modal. /// /// DI singleton holding the resolver entry. The holder breaks the shell↔island construction /// cycle: islands depend on this type, the shell sets after it is built. /// public sealed class MergeCoordinator { /// Set once at composition to the shell's resolver entry. Null (headless/tests) ⇒ no-op. public Func? Handler { get; set; } /// Opens the resolver for ; is the /// caller's stash consent, repeated because the resolver restarts the merge on its own. public Task ResolveConflictAsync(string taskId, string targetBranch, bool autostash = false) => Handler?.Invoke(taskId, targetBranch, autostash) ?? Task.CompletedTask; }