Skip to content

align notebook agent change save behavior with text files#307730

Open
amunger wants to merge 2 commits intomainfrom
aamunger/saveNotebookChanges
Open

align notebook agent change save behavior with text files#307730
amunger wants to merge 2 commits intomainfrom
aamunger/saveNotebookChanges

Conversation

@amunger
Copy link
Copy Markdown
Collaborator

@amunger 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

@amunger amunger requested review from DonJayamanne and Copilot April 3, 2026 21:32
@vs-code-engineering
Copy link
Copy Markdown
Contributor

vs-code-engineering bot commented Apr 3, 2026

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@jrieken

Matched files:

  • src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.ts

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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.

2 participants