Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notebook. code action provider is called repeatedly for all cells #184028

Closed
jrieken opened this issue Jun 1, 2023 · 4 comments · Fixed by #184930 or #192248
Closed

notebook. code action provider is called repeatedly for all cells #184028

jrieken opened this issue Jun 1, 2023 · 4 comments · Fixed by #184930 or #192248
Assignees
Labels
insiders-released Patch has been released in VS Code Insiders

Comments

@jrieken
Copy link
Member

jrieken commented Jun 1, 2023

re #183855

  • registering a code action provider with kind notebook.source.normalizeVariableNames
  • it is being called for cells of the notebook

My understanding is that such a provider (kind=notebook...) is only ever called with the first cell and is always allowed to return a cross-cell edit (workspace edit)

Code sample with updated logging: https://github.com/microsoft/vscode-github-issue-notebooks/blob/5382aecd929e842309c6cd101bb76c9d125e3b24/src/extension/languageProvider.ts#L566

Logging (right after startup, no save invoked yet)

unhandledRejection {"name":"Canceled"}
unhandledRejection {"name":"Canceled"}
unhandledRejection {"name":"Canceled"}
unhandledRejection {"name":"Canceled"}
unhandledRejection {"name":"Canceled"}
unhandledRejection {"name":"Canceled"}
unhandledRejection {"name":"Canceled"}
unhandledRejection {"name":"Canceled"}
CREATED
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D which cell INDEX 1
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D which cell INDEX 3
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D which cell INDEX 4
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D which cell INDEX 1
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D which cell INDEX 3
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D which cell INDEX 4
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D which cell INDEX 1
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D which cell INDEX 3
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D which cell INDEX 4
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D which cell INDEX 1
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D which cell INDEX 3
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D which cell INDEX 4
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D which cell INDEX 1
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D which cell INDEX 3
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D which cell INDEX 4
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D which cell INDEX 1
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D which cell INDEX 3
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D which cell INDEX 4
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D which cell INDEX 1
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D which cell INDEX 3
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W3sZmlsZQ%3D%3D => 1
CALLED for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D which cell INDEX 4
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $repo -> $REPO
CONTEXT vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D, FILE: vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W1sZmlsZQ%3D%3D, RENAME $bar -> $BAR
RESULT for vscode-notebook-cell:/Users/jrieken/Code/vscode-github-issue-notebooks/samples/issues.github-issues#W4sZmlsZQ%3D%3D => 1

@Yoyokrazy
Copy link
Contributor

I'm planning on talking with Matt about this, I think this issue lies in the providers being called for every cell as each cell editor polls for CodeActions (prompted via the lightbulb, not sure the exact terminology here).

I'd like to figure out a way to filter notebook.xyz out of those CodeActions, as I think notebook CodeActions should for now be kept to only on save. There's some more exploration I'd like to do with how and when the user can be prompted with a notebook action.

@jrieken
Copy link
Member Author

jrieken commented Jun 2, 2023

I'd like to figure out a way to filter notebook.xyz out of those CodeActions, as I think notebook CodeActions should for now be kept to only on save.

That makes most sense to me. If I specifically target a notebook (via kind and/or selector) I want only be called for that notebook.

@Yoyokrazy
Copy link
Contributor

I'm wondering if there would be a good way to surface actions to the user for the notebook context. Showing them a lightbulb in the cells doesn't seem perfect, even if you only ever get a bulb in the currently focused cell.

If the end state of notebook CodeActions is to align with the standard editor experience, I don't think it should be fully restricted to save. Especially with format on run enabled, there's like plenty of users never explicitly saving their notebooks. Maybe a contribution to the toolbar? Might be made easier by the redesign of notebook toolbars potentially coming in the next iteration.

@vscodenpa vscodenpa added the unreleased Patch has not yet been released in VS Code Insiders label Jun 12, 2023
@vscodenpa vscodenpa added this to the June 2023 milestone Jun 12, 2023
@vscodenpa vscodenpa added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Jun 13, 2023
@jrieken jrieken reopened this Jun 22, 2023
@vscodenpa vscodenpa removed the insiders-released Patch has been released in VS Code Insiders label Jun 22, 2023
@jrieken
Copy link
Member Author

jrieken commented Jun 22, 2023

Just tried this again with e8b22318bfab2e52d5dbceee767e8b4bfe9b5300 insiders and my code action provider is still called for each and every cell in the notebook. You can reproduce this with the joh/civic-tahr branch on GHINB.

It registers itself via the 'notebook.source.normalizeVariableNames'-kind and to my understanding it should only every be called with the first cell and only when source actions are requested, like on save

@Yoyokrazy Yoyokrazy modified the milestones: June 2023, July 2023 Jun 26, 2023
@Yoyokrazy Yoyokrazy modified the milestones: July 2023, Backlog, August 2023 Jul 25, 2023
@Yoyokrazy Yoyokrazy modified the milestones: August 2023, September 2023 Aug 31, 2023
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Sep 18, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
insiders-released Patch has been released in VS Code Insiders
Projects
None yet
3 participants