diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 38bab66b2a7..eeac69bcee3 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1648,6 +1648,7 @@ declare module 'vscode' { readonly id?: string; label: string; description?: string; + detail?: string; isPreferred?: boolean; preloads?: Uri[]; executeCell(document: NotebookDocument, cell: NotebookCell): void; diff --git a/src/vs/workbench/api/common/extHostNotebook.ts b/src/vs/workbench/api/common/extHostNotebook.ts index 78944a62c23..47714ac961a 100644 --- a/src/vs/workbench/api/common/extHostNotebook.ts +++ b/src/vs/workbench/api/common/extHostNotebook.ts @@ -829,6 +829,7 @@ export class ExtHostNotebookKernelProviderAdapter extends Disposable { extension: this._extension.identifier, extensionLocation: this._extension.extensionLocation, description: kernel.description, + detail: kernel.detail, isPreferred: kernel.isPreferred, preloads: kernel.preloads }; diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/status/editorStatus.ts b/src/vs/workbench/contrib/notebook/browser/contrib/status/editorStatus.ts index 8227a956f7e..2c2c937e6cf 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/status/editorStatus.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/status/editorStatus.ts @@ -56,17 +56,16 @@ registerAction2(class extends Action2 { label: a.label, picked: a.id === activeKernel?.id, description: - (a as INotebookKernelInfo2).description - ? (a as INotebookKernelInfo2).description + a.description + ? a.description : a.extension.value + (a.id === activeKernel?.id ? nls.localize('currentActiveKernel', " (Currently Active)") : ''), + detail: a.detail, kernelProviderId: a.extension.value, run: async () => { editor.activeKernel = a; - if ((a as any).resolve) { - (a as INotebookKernelInfo2).resolve(editor.uri!, editor.getId(), tokenSource.token); - } + a.resolve(editor.uri!, editor.getId(), tokenSource.token); }, buttons: [{ iconClass: 'codicon-settings-gear', diff --git a/src/vs/workbench/contrib/notebook/browser/notebookServiceImpl.ts b/src/vs/workbench/contrib/notebook/browser/notebookServiceImpl.ts index 74881636cc3..ad28bde4973 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookServiceImpl.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookServiceImpl.ts @@ -579,6 +579,7 @@ export class NotebookService extends Disposable implements INotebookService, ICu id: dto.id, label: dto.label, description: dto.description, + detail: dto.detail, isPreferred: dto.isPreferred, preloads: dto.preloads, providerHandle: dto.providerHandle, diff --git a/src/vs/workbench/contrib/notebook/common/notebookCommon.ts b/src/vs/workbench/contrib/notebook/common/notebookCommon.ts index 6eb35535a00..64127dec611 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookCommon.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookCommon.ts @@ -762,6 +762,7 @@ export interface INotebookKernelInfoDto2 { extensionLocation: URI; providerHandle?: number; description?: string; + detail?: string; isPreferred?: boolean; preloads?: UriComponents[]; }