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
ReadonlyonEvent that fires when a runtime is created or selected, allows tree view refresh
PrivatecreateCreates the Pyodide controller for offline Python execution. This controller works with native .ipynb files without requiring server connectivity.
Disposes of all resources.
Creates 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
Get a controller by ID. Used by DatalayerRuntimeSelector to access controllers for QuickPick display.
Controller ID to retrieve
The controller or undefined if not found
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.
Selects or switches a runtime for a specific notebook. This can be called anytime to select or switch runtimes.
The notebook to select runtime for
Manages notebook controllers with a main selector and runtime-specific controllers.