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
Support for Notebook
CodeAction Kind
#183457
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me in overall, only concern is we are adding the notebook type into Monaco editor. We might want to keep it in workbench/contrib/notebook
.
// https://github.com/microsoft/vscode/issues/179213 | ||
|
||
export class NotebookCodeActionKind { | ||
// can only return MULTI CELL workspaceEdits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debt: could the comment be a docstring?
@@ -152,6 +154,9 @@ class CodeActionOnSaveParticipant implements IStoredFileWorkingCopySaveParticipa | |||
}); | |||
} | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: extra spacing
re: #179213
Add in proposed api for the new CodeActionKind of
Notebook
Formally support notebook codeactions on save for ipynb notebook files. Notebook Save Participants first call the providers for the first cell of the notebook, running all notebook specific actions across the entire notebook. Once they resolve, providers are called for all cells in the notebook, performing source level actions on each cell in parallel.
As stated in the proposed api, any CodeAction with the
Notebook
will only be called for the first cell of the notebook, and all CodeActions not with that kind must only apply edits to the single cell that they are passed.