File tree Expand file tree Collapse file tree 1 file changed +27
-7
lines changed
packages/pyodide-kernel-extension/src Expand file tree Collapse file tree 1 file changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -105,13 +105,7 @@ const kernel: JupyterFrontEndPlugin<void> = {
105
105
106
106
const mountDrive = ! ! ( serviceWorkerManager ?. enabled || crossOriginIsolated ) ;
107
107
108
- if ( mountDrive ) {
109
- console . info ( 'Pyodide contents will be synced with Jupyter Contents' ) ;
110
- } else {
111
- console . warn ( 'Pyodide contents will NOT be synced with Jupyter Contents' ) ;
112
- }
113
-
114
- return new PyodideKernel ( {
108
+ const kernel = new PyodideKernel ( {
115
109
...options ,
116
110
pyodideUrl,
117
111
pipliteWheelUrl,
@@ -123,6 +117,32 @@ const kernel: JupyterFrontEndPlugin<void> = {
123
117
browsingContextId : serviceWorkerManager ?. browsingContextId ,
124
118
logger,
125
119
} ) ;
120
+
121
+ if ( mountDrive ) {
122
+ console . info ( 'Pyodide contents will be synced with Jupyter Contents' ) ;
123
+ } else {
124
+ const warningMessage =
125
+ 'Pyodide contents will NOT be synced with Jupyter Contents. ' +
126
+ 'For full functionality, try using a regular browser tab instead of private/incognito mode, ' +
127
+ 'especially in Firefox where this is a known limitation.' ;
128
+ console . warn ( warningMessage ) ;
129
+
130
+ // Wait for kernel to be ready before logging the warning
131
+ kernel . ready . then ( ( ) => {
132
+ if ( loggerRegistry ) {
133
+ void logger ( {
134
+ payload : {
135
+ type : 'text' ,
136
+ data : warningMessage ,
137
+ level : 'warning' ,
138
+ } ,
139
+ kernelId : options . id ,
140
+ } ) ;
141
+ }
142
+ } ) ;
143
+ }
144
+
145
+ return kernel ;
126
146
} ,
127
147
} ) ;
128
148
} ,
You can’t perform that action at this time.
0 commit comments