microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.74k stars 28.72k forks source link

Find and Replace in closed notebook search #194931

Open andreamah opened 11 months ago

andreamah commented 11 months ago

Related to https://github.com/microsoft/vscode/issues/173726, it would be nice if we could replace results in closed notebooks.

andreamah commented 8 months ago

This seems to involve the following:

  1. Getting the full text for the notebook when we return the search results from the extension host.
  2. Turning this full text into a full NotebookTextModel https://github.com/microsoft/vscode/blob/6430865d4d548a0759b4ae151fc46de33dc0a887/[…]h/contrib/notebook/common/notebookEditorModelResolverService.ts
  3. Upon a replace, make the appropriate changes to the NotebookTextModel and use the ext host APIs to save these changes from the main thread.