The kernel/runtime selected message from extension
Callback to update runtime state (from useRuntimeManager)
OptionalupdateStore: RuntimeSelectCallbackOptional callback to update editor-specific store
OptionalsetKernelInitializing: KernelInitializingCallbackOptional callback to clear initialization state
Handler for kernel-selected and runtime-selected messages. Extracts runtime from message and calls the selection callback.
For Pyodide and Datalayer cloud runtimes, the spinner is kept visible until the kernel monitoring code detects the kernel is ready (status='idle'). For local/remote kernels, the spinner is cleared immediately since they're ready as soon as they're selected.