align notebook agent change save behavior with text files#307730
Open
align notebook agent change save behavior with text files#307730
Conversation
Collaborator
amunger
commented
Apr 3, 2026
- auto save after making a change to a notebook file
- prevent normal auto saving while a change is streaming in
Contributor
📬 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 aligns chat-driven notebook editing behavior with how text-file chat edits behave in the workbench: it disables normal auto-save while incremental edits are streaming in, and triggers an auto-save once the final edit batch has been applied.
Changes:
- Track “waiting for last edits” for notebooks during streamed agent edits to temporarily disable normal auto-save.
- Auto-save the notebook (skipping save participants) after the final notebook edit batch is applied.
- Add a unit test asserting the final-edit auto-save behavior.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.ts |
Sets _waitsForLastEdits during streaming and triggers an AUTO save (skipping save participants) on the final edit batch for non-untitled notebooks. |
src/vs/workbench/contrib/chat/test/browser/chatEditing/chatEditingModifiedNotebookEntry.test.ts |
Adds coverage verifying the notebook entry invokes save({ reason: AUTO, skipSaveParticipants: true }) on the final edit batch. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
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.