src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.ts/NotebookExecutionService/resolveSourceActions
class NotebookExecutionService:	private async resolveSourceActions(notebook: INotebookTextModel, contextKeyService: IContextKeyService) {
		let kernel: INotebookKernel | undefined;
		const info = this._notebookKernelService.getMatchingKernel(notebook);
		if (info.all.length === 0) {
			// no kernel at all
			const sourceActions = this._notebookKernelService.getSourceActions(notebook, contextKeyService);
			const primaryActions = sourceActions.filter(action => action.isPrimary);
			const action = sourceActions.length === 1
				? sourceActions[0]
				: (primaryActions.length === 1 ? primaryActions[0] : undefined);

			if (action) {
				await action.runAction();
				kernel = this._notebookKernelService.getSelectedOrSuggestedKernel(notebook);
			}
		}

		return kernel;
	}