Summary
Add an "automatic rebase" option that runs a rebase from start to finish, using AI to resolve conflicts at each paused step, then presents a reviewable summary of every conflict encountered and the strategy chosen — with a one-click undo.
Background / Motivation
GitLens can already start rebases and resolve the current set of conflicts with AI (Resolve mode, #5306). But on a multi-commit rebase the user must manually apply, stage, click Continue, and re-resolve at each paused step. There's no end-to-end automation, no consolidated summary of what the AI decided across the whole operation, and no way to undo a rebase once it has completed.
Proposed capability (user-facing)
- Kick off a rebase that proceeds automatically: at each conflicted step the AI resolves, stages, and continues without manual intervention.
- Keep resolutions consistent across steps when the same region conflicts repeatedly.
- Escalate rather than guess: if AI confidence is below a configurable threshold, or a non-conflict pause needs attention, stop and hand off to the existing Resolve panel, pre-populated with what was already resolved.
- Present an end-of-run summary: per file — strategy, confidence, and rationale — grouped by the commit/step where it occurred, with before/after diffs.
- Offer Undo on the summary to roll the branch back to its pre-rebase state (validated — refuses if the branch has moved since).
Impact
- Benefits users rebasing conflict-prone or long-lived branches, who today resolve conflicts one paused step at a time.
- Turns a repetitive, error-prone manual loop into a single reviewable action with a safety net.
- Builds directly on existing AI conflict resolution / Resolve mode and paused-operation handling.
Validation
- Automatic rebase across a branch that conflicts at multiple steps resolves, stages, and continues to completion without manual intervention.
- A low-confidence or failed resolution stops automation and opens the Resolve panel with prior resolutions preserved.
- An externally-modified working tree aborts automation instead of overwriting changes.
- The end-of-run summary lists every file's strategy/confidence/rationale with before/after diffs.
- Undo restores the original branch tip and refuses when the branch has moved on.
- Cancelling mid-run aborts cleanly; the autostash-conflict case is surfaced before offering undo.
Risk / Regressions
- Incorrect resolutions could silently corrupt later steps — mitigated by escalating on low confidence rather than falling back to a fixed strategy.
- Undo interacting with autostash pop / dirty working trees.
- Concurrent external repo changes during the loop.
- Runaway loops on unexpected pause states — needs a step-cap backstop.
Builds on #5306.
Summary
Add an "automatic rebase" option that runs a rebase from start to finish, using AI to resolve conflicts at each paused step, then presents a reviewable summary of every conflict encountered and the strategy chosen — with a one-click undo.
Background / Motivation
GitLens can already start rebases and resolve the current set of conflicts with AI (Resolve mode, #5306). But on a multi-commit rebase the user must manually apply, stage, click Continue, and re-resolve at each paused step. There's no end-to-end automation, no consolidated summary of what the AI decided across the whole operation, and no way to undo a rebase once it has completed.
Proposed capability (user-facing)
Impact
Validation
Risk / Regressions
Builds on #5306.