Skip to content

Add chat.editing.revealNextChangeOnResolve setting to control auto-jump after keep/undo#303473

Merged
jrieken merged 3 commits intomainfrom
copilot/add-option-to-disable-auto-jump
Mar 20, 2026
Merged

Add chat.editing.revealNextChangeOnResolve setting to control auto-jump after keep/undo#303473
jrieken merged 3 commits intomainfrom
copilot/add-option-to-disable-auto-jump

Conversation

Copy link
Contributor

Copilot AI commented Mar 20, 2026

After keeping or undoing a chat edit (file-level or hunk-level), VS Code automatically jumps to the next change. This adds a chat.editing.revealNextChangeOnResolve boolean setting (default true) to let users disable that behavior and stay in place.

  • constants.ts: Add RevealNextChangeOnResolve to ChatConfiguration enum
  • chat.contribution.ts: Register the setting
  • chatEditingEditorActions.ts: Guard openNextOrPreviousChange calls in KeepOrUndoAction and AcceptRejectHunkAction on the new setting

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Add option to disable auto 'Jump to next edit' after approving edits Add chat.editing.autoNavigation setting to control auto-jump after keep/undo Mar 20, 2026
Copilot AI requested a review from jrieken March 20, 2026 11:29
@jrieken
Copy link
Member

jrieken commented Mar 20, 2026

@copilot I like. How about a better settings name. Instead of chat.editing.autoNavigation I have something with chat.editing.revalNextChangeOnBla in mind. Just no good idea for bla which can be Keep or Undo. Maybe onKeepUndo but also have an idea please

Copy link
Contributor Author

Copilot AI commented Mar 20, 2026

@copilot I like. How about a better settings name. Instead of chat.editing.autoNavigation I have something with chat.editing.revalNextChangeOnBla in mind. Just no good idea for bla which can be Keep...

Renamed to chat.editing.revealNextChangeOnResolve — "resolve" covers both Keep and Undo since both actions resolve a change. Done in 7846f89.

Copilot AI changed the title Add chat.editing.autoNavigation setting to control auto-jump after keep/undo Add chat.editing.revealNextChangeOnResolve setting to control auto-jump after keep/undo Mar 20, 2026
@jrieken jrieken marked this pull request as ready for review March 20, 2026 12:06
Copilot AI review requested due to automatic review settings March 20, 2026 12:06
@jrieken jrieken enabled auto-merge March 20, 2026 12:07
@jrieken jrieken review requested due to automatic review settings March 20, 2026 12:07
@jrieken
Copy link
Member

jrieken commented Mar 20, 2026

@copilot Generate me copy paste friendly steps to verify for this change

Copy link
Contributor Author

Copilot AI commented Mar 20, 2026

@copilot Generate me copy paste friendly steps to verify for this change

Verify default behavior (setting enabled):

  1. Open a workspace and start a chat editing session that produces changes across multiple files
  2. Open the diff editor for one of the modified files
  3. Click Keep (file-level) → editor should auto-jump to the next changed file
  4. Undo the keep, then click Undo (file-level) → editor should auto-jump to the next changed file
  5. For hunk-level: accept/reject individual hunks until none remain in the file → editor should auto-jump to the next changed file

Verify disabled behavior:

  1. Open Settings and set chat.editing.revealNextChangeOnResolve to false
  2. Start a new chat editing session with changes across multiple files
  3. Open the diff editor for one of the modified files
  4. Click Keep (file-level) → editor should stay on the current file, no auto-jump
  5. Undo the keep, then click Undo (file-level) → editor should stay on the current file
  6. For hunk-level: accept/reject all hunks until none remain → editor should stay on the current file, no auto-jump to the next file

Verify setting registration:

  1. Open Settings UI and search for revealNextChangeOnResolve
  2. Setting should appear under "Chat > Editing" with a checkbox, default checked

Copilot AI requested a review from jrieken March 20, 2026 13:22
@jrieken jrieken merged commit dd7c043 into main Mar 20, 2026
24 checks passed
@jrieken jrieken deleted the copilot/add-option-to-disable-auto-jump branch March 20, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Option to disable auto “Jump to next edit” after approving a Copilot/AI edit

3 participants