chat: fix undo/redo skipping multiple no-edit requests#299330
Merged
connor4312 merged 1 commit intomainfrom Mar 5, 2026
Merged
chat: fix undo/redo skipping multiple no-edit requests#299330connor4312 merged 1 commit intomainfrom
connor4312 merged 1 commit intomainfrom
Conversation
- Fixes _willRedoToEpoch to advance one request at a time when there are no edit operations ahead, instead of jumping past all remaining requests - When redoing with no operations in the queue, now finds the next request-start checkpoint boundary and advances there, following the same single-step pattern as undo - Adds test case verifying undo and redo step through consecutive no-edit requests one at a time Fixes #275234 (Commit message generated by Copilot)
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @jriekenMatched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes chat editing timeline undo/redo behavior so redo does not skip across multiple consecutive “no-edit” requests, aligning redo’s stepping with undo. It also adds a regression test covering the consecutive no-edit request scenario.
Changes:
- Update
_willRedoToEpochto advance redo by request boundaries when there are no upcoming edit operations. - Ensure redo advances one request at a time even when the operation queue is empty.
- Add a test verifying undo/redo step through consecutive no-edit requests individually.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.ts |
Adjusts redo target epoch computation to step through request-start checkpoints when no operations remain. |
src/vs/workbench/contrib/chat/test/browser/chatEditing/chatEditingCheckpointTimeline.test.ts |
Adds coverage for undo/redo behavior across multiple no-edit requests. |
You can also share your feedback on Copilot code review. Take the survey.
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.ts
Show resolved
Hide resolved
Yoyokrazy
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #275234
(Commit message generated by Copilot)