From c00184a4c1f0e262adc4053e0a58cd1d9bdc6fdb Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Tue, 24 Jan 2023 18:13:15 -0800 Subject: [PATCH] Fix #171385. Update kernel status on kernel creation/deletion. (#172339) --- .../contrib/notebook/browser/viewParts/notebookKernelView.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.ts b/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.ts index 2f57fb3d10ccb..8b814cfac04c2 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.ts @@ -155,6 +155,8 @@ export class NotebooKernelActionViewItem extends ActionViewItem { { label: false, icon: true } ); this._register(_editor.onDidChangeModel(this._update, this)); + this._register(_notebookKernelService.onDidAddKernel(this._update, this)); + this._register(_notebookKernelService.onDidRemoveKernel(this._update, this)); this._register(_notebookKernelService.onDidChangeNotebookAffinity(this._update, this)); this._register(_notebookKernelService.onDidChangeSelectedNotebooks(this._update, this)); this._register(_notebookKernelService.onDidChangeSourceActions(this._update, this));