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

Change back button behaviour #14346

Merged
merged 4 commits into from
Sep 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ export class RemoteNotebookKernelSourceSelector implements IRemoteNotebookKernel
token
).catch((ex) => traceError(`Failed to select a kernel`, ex));
if (result && result === InputFlowAction.back) {
if (selectedSource === defaultSelection) {
throw InputFlowAction.back;
}
return this.getRemoteServersFromProvider(provider, token, multiStep, state);
}
if (!result || result instanceof InputFlowAction) {
Expand All @@ -439,6 +442,9 @@ export class RemoteNotebookKernelSourceSelector implements IRemoteNotebookKernel
(ex) => traceError(`Failed to select a kernel`, ex)
);
if (result && result === InputFlowAction.back) {
if (selectedSource === defaultSelection) {
throw InputFlowAction.back;
}
return this.getRemoteServersFromProvider(provider, token, multiStep, state);
}
if (!result || result instanceof InputFlowAction) {
Expand Down Expand Up @@ -512,7 +518,12 @@ export class RemoteNotebookKernelSourceSelector implements IRemoteNotebookKernel
traceError(`Failed to select a kernel`, ex)
);
if (result && result === InputFlowAction.back) {
return this.selectRemoteServerFromRemoteKernelFinder(selectedSource, state, token);
// Do not go back to the previous command,
// We have no idea whta the previous command in the 3rd party extension does,
// Its possible we start a server, or make some http request or the like.
// Thus implicitly calling the action on the command is wrong, instead the user must chose this operation.
// return this.selectRemoteServerFromRemoteKernelFinder(selectedSource, state, token);
throw InputFlowAction.back;
}
if (!result || result instanceof InputFlowAction) {
throw new CancellationError();
Expand Down
Loading