src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts/isNotebookActionContext
function isNotebookActionContext(context?: unknown): context is INotebookActionContext {
	return !!context && !!(context as INotebookActionContext).notebookEditor;
}