simplify notebook kernel service

This commit is contained in:
Johannes Rieken
2021-04-20 16:29:05 +02:00
parent 454b741257
commit d9e4b98387
7 changed files with 75 additions and 51 deletions

View File

@@ -133,7 +133,7 @@ export class MainThreadNotebookKernels implements MainThreadNotebookKernelsShape
if (!editor.hasModel()) {
return;
}
const kernel = this._notebookKernelService.getBoundKernel(editor.viewModel.notebookDocument);
const { bound: kernel } = this._notebookKernelService.getNotebookKernels(editor.viewModel.notebookDocument);
if (!kernel) {
return;
}
@@ -163,7 +163,7 @@ export class MainThreadNotebookKernels implements MainThreadNotebookKernelsShape
if (!editor.hasModel()) {
continue;
}
if (this._notebookKernelService.getBoundKernel(editor.viewModel.notebookDocument) !== kernel) {
if (this._notebookKernelService.getNotebookKernels(editor.viewModel.notebookDocument).bound !== kernel) {
// different kernel
continue;
}