src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.ts/NotebookKernelHistoryService/getKernels
class NotebookKernelHistoryService:	getKernels(notebook: INotebookTextModelLike): { selected: INotebookKernel | undefined; all: INotebookKernel[] } {
		const allAvailableKernels = this._notebookKernelService.getMatchingKernel(notebook);
		const allKernels = allAvailableKernels.all;
		const selectedKernel = allAvailableKernels.selected;
		const suggested = (allAvailableKernels.suggestions.length === 1 ? allAvailableKernels.suggestions[0] : undefined)
			?? (allAvailableKernels.all.length === 1) ? allAvailableKernels.all[0] : undefined;

		const mostRecentKernelIds = this._mostRecentKernelsMap[notebook.viewType] ? [...this._mostRecentKernelsMap[notebook.viewType].values()] : [];

		const all = mostRecentKernelIds.map(kernelId => allKernels.find(kernel => kernel.id === kernelId)).filter(kernel => !!kernel) as INotebookKernel[];

		return {
			selected: selectedKernel ?? suggested,
			all
		};
	}