@@ -18,10 +18,8 @@ import { RuntimeExitReason } from '../../../services/languageRuntime/common/lang
1818import { INotebookLanguageRuntimeSession , IRuntimeSessionService } from '../../../services/runtimeSession/common/runtimeSessionService.js' ;
1919import { NotebookEditorWidget } from '../../notebook/browser/notebookEditorWidget.js' ;
2020import { NOTEBOOK_KERNEL } from '../../notebook/common/notebookContextKeys.js' ;
21- import { isNotebookEditorInput } from '../../notebook/common/notebookEditorInput.js' ;
2221import { POSITRON_NOTEBOOK_EDITOR_CONTAINER_FOCUSED } from '../../positronNotebook/browser/ContextKeysManager.js' ;
23- import { POSITRON_NOTEBOOK_EDITOR_INPUT_ID } from '../../positronNotebook/common/positronNotebookCommon.js' ;
24- import { ActiveNotebookHasRunningRuntime } from '../common/activeRuntimeNotebookContextManager.js' ;
22+ import { ActiveNotebookHasRunningRuntime , isNotebookEditorInput } from '../common/activeRuntimeNotebookContextManager.js' ;
2523import { POSITRON_RUNTIME_NOTEBOOK_KERNELS_EXTENSION_ID } from '../common/runtimeNotebookKernelConfig.js' ;
2624
2725const category = localize2 ( 'positron.runtimeNotebookKernel.category' , "Notebook" ) ;
@@ -88,9 +86,7 @@ abstract class BaseRuntimeNotebookKernelAction extends Action2 {
8886 debugMessage : `Restart notebook kernel command ${ RuntimeNotebookKernelRestartAction . ID } executed` ,
8987 } ;
9088 const activeEditor = editorService . activeEditor ;
91- if ( ! ( isNotebookEditorInput ( activeEditor ) ||
92- // TODO: Wasn't there a function for this?
93- ( activeEditor ?. typeId === POSITRON_NOTEBOOK_EDITOR_INPUT_ID ) ) ) {
89+ if ( ! isNotebookEditorInput ( activeEditor ) ) {
9490 throw new Error ( 'No active notebook. This command should only be available when a notebook is active.' ) ;
9591 }
9692 notebookUri = activeEditor . resource ;
0 commit comments