Fix notebook kernel selection and auto-kernel-start (#254)

* Fix bug: cannot select kernel. Properly plug-in kernelspecs middleware to redux store configuration

* Properly auto-launch kernel with nteract's epic

* Keep kernel lazy start for notebook viewer

* Add unit tets
This commit is contained in:
Laurent Nguyen
2020-10-07 08:39:04 +02:00
committed by GitHub
parent 86d3f0d35d
commit 7dd046a15d
7 changed files with 102 additions and 110 deletions

View File

@@ -234,7 +234,13 @@ export class NotebookClientV2 {
console.error(`${title}: ${message}`);
};
this.store = configureStore(initialState, params.contentProvider, traceErrorFct, [cacheKernelSpecsMiddleware]);
this.store = configureStore(
initialState,
params.contentProvider,
traceErrorFct,
[cacheKernelSpecsMiddleware],
!params.isReadOnly
);
// Additional configuration
this.store.dispatch(configOption("editorType").action(params.cellEditorType ?? "monaco"));