File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ const kernelPlugin: JupyterLiteServerPlugin<void> = {
1919
2020 // print the app to console
2121 console . log ( "JupyterLite Embedded Kernel Plugin Activated. App:" , app ) ;
22+ // Get the current NotebookPanel instance if available
23+ // @ts -ignore: JupyterLite may expose notebook panel via global or app context
24+ const notebookPanel = ( window as any ) . notebookPanel || app . notebookPanel || null ;
25+ console . log ( "Notebook Panel:" , notebookPanel ) ;
2226
2327 app . router . post ( '/api/kernels/(.*)/interrupt' , async ( req , kernelId : string ) => {
2428 const kernel = activeKernels . get ( kernelId ) ;
@@ -73,7 +77,12 @@ const kernelPlugin: JupyterLiteServerPlugin<void> = {
7377 activeKernels . set ( kernel . id , kernel ) ;
7478
7579 // print the app to console
76- console . log ( "JupyterLite Embedded Kernel Plugin Later app show:" , app ) ;
80+ console . log ( "JupyterLite Embedded Kernel Plugin Later app show:" , app ) ;
81+
82+ // Get the current NotebookPanel instance if available
83+ // @ts -ignore: JupyterLite may expose notebook panel via global or app context
84+ const notebookPanel = ( window as any ) . notebookPanel || app . notebookPanel || null ;
85+ console . log ( "Notebook Panel Later:" , notebookPanel ) ;
7786
7887 return kernel ;
7988 }
You can’t perform that action at this time.
0 commit comments