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

Extension API: Throwing a CancellationError does not dismiss the kernel picker. #16469

Open
kevineger opened this issue Feb 28, 2025 · 0 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@kevineger
Copy link

Originally reported this bug / brought it up in #16434 (comment). Figured opening a standalone issue is best.


I've got a couple commands which ultimately don't resolve kernels (e.g. Open documentation and Upgrade account).

Image

The API docs say Returning undefined or null will result in the previous UI being displayed for back-style behaviour ... and If however users exit the UI or workflow ... extensions are then expected to throw a CancellationError, else the previous UI will be once again.

In handling these non-resolving commands, I've tried both returning undefined, null and throwing a CancellationError, but it's not dismissing the picker. Instead the picker stays stuck in a pending/loading state.

Image

Seems to be an issue only in handleCommand since throwing a CancellationError in provideCommands dismisses the kernel picker as expected.

Am I doing something wrong? Or misinterpreting the API?

@kevineger kevineger added the bug Issue identified by VS Code Team member as probable bug label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants