Creates a new SmartDynamicControllerManager instance.
VS Code extension context for managing subscriptions
Datalayer SDK client for API communication
Authentication provider for managing user login state
Private Readonly_Map of notebook URIs to active WebSocket kernel clients
Private Readonly_Authentication provider for managing auth state
Private Readonly_VS Code extension context for accessing API and managing subscriptions
Private Readonly_Map of notebook controller IDs to VS Code NotebookController instances
Private_Flag to track if this manager has been disposed
Private_Counter for execution order tracking across cells
Private Readonly_Bridge for managing kernel connections and webview communication
Private Readonly_Map of notebook URIs to their selected runtimes
Private Readonly_Event emitter fired when a runtime is created or selected
Private Readonly_Map of notebook URIs to active Pyodide kernel clients
Private Readonly_Map of controller IDs to runtime DTOs for reverse lookup
Private Readonly_Datalayer SDK client for API communication
Private_Guard flag to prevent re-entry during runtime selection
ReadonlyonEvent that fires when a runtime is created or selected, allows tree view refresh
PrivatecreateCreates the main "Datalayer Platform" controller. This controller acts as an entry point for runtime selection. When selected, it immediately shows the runtime picker.
PrivatecreateCreates the Pyodide controller for offline Python execution. This controller works with native .ipynb files without requiring server connectivity.
Disposes of all resources.
PrivateensureCreates or gets a runtime-specific controller.
PrivateexecuteExecutes a single cell via WebSocket.
PrivateexecuteExecutes cells with the specified runtime.
Cells to execute
The notebook document
The runtime to use
OptionalexecutingController: NotebookControllerThe controller that is actually executing (might be Platform or Runtime controller)
PrivateexecuteExecutes cells using Pyodide kernel (browser-based Python). Creates kernel on-demand and reuses it for the notebook lifetime.
Cells to execute
Notebook document
Pyodide controller
PrivategetGets the unique controller ID for a specific runtime.
The runtime DTO to get the controller ID for
The unique controller identifier string
Cleans up on notebook close.
Refreshes all controllers based on current authentication and available runtimes. Creates controllers for existing runtimes that don't have controllers yet. Removes controllers for runtimes that no longer exist.
PrivateselectShows runtime selector dialog and returns the selected runtime. Prompts for login if not authenticated.
The selected runtime DTO, or undefined if user cancels or not authenticated
Selects or switches a runtime for a specific notebook. This can be called anytime, even if Platform controller is already selected.
The notebook to select runtime for
PrivateshowShows runtime selector and switches to selected runtime. This is the main method for switching runtimes.
Manages notebook controllers with a main selector and runtime-specific controllers.