Datalayer VS Code Extension - v0.0.17
    Preparing search index...

    Bridges kernel connections between VS Code and notebooks. Routes to WebSocket for native notebooks or webview messages for Datalayer notebooks.

    Implements

    • Disposable
    Index

    Constructors

    Methods

    • Broadcasts kernel selection to all registered webviews. Used when a runtime is selected that should apply to multiple documents.

      Parameters

      • runtime: RuntimeDTO

        Selected runtime to broadcast.

      Returns Promise<void>

    • Broadcasts kernel termination to all registered webviews. Used when a runtime is terminated that affects multiple documents.

      Returns Promise<void>

    • Connects a webview document (notebook or lexical) to a runtime. Sends runtime information to the webview for ServiceManager creation.

      NOTE: Caller should call sendKernelStartingMessage() BEFORE this method To minimize lag between selection and spinner appearance.

      Parameters

      • uri: Uri

        The target document identifier to look up.

      • runtime: RuntimeDTO

        Selected runtime.

      Returns Promise<void>

    • Connects a webview document to a local kernel (Python environment, Jupyter kernel, or Jupyter server). Starts the kernel and sends kernel information to the webview.

      Parameters

      • uri: Uri

        The target document identifier to look up.

      • kernelInfo: NativeKernelInfo

        Native kernel information.

      Returns Promise<void>

    • Connects a webview document (notebook or lexical) to Pyodide kernel. Sends Pyodide runtime information to the webview for in-browser Python execution.

      Parameters

      • uri: Uri

        The target document identifier to look up.

      Returns Promise<void>

    • Detects the type of notebook (native vs webview).

      Parameters

      • uri: Uri

        The target document identifier to look up.

      Returns "webview" | "native"

      Either "webview" for Datalayer notebooks or "native" for others.

    • Gets the current kernel info for a notebook.

      Parameters

      • uri: Uri

        Notebook URI.

      Returns Promise<unknown>

      Kernel information or undefined.

    • Handles kernel lifecycle commands.

      Parameters

      • uri: Uri

        Notebook URI.

      • command: "interrupt" | "restart" | "shutdown"

        Command to execute.

      Returns Promise<void>

    • Handles kernel-ready message from webview. Sends the pending kernel-selected message to complete kernel initialization.

      Parameters

      • uri: Uri

        Document URI.

      Returns Promise<void>

    • Registers a webview panel for kernel communication.

      Parameters

      • uri: Uri

        Notebook URI.

      • webview: WebviewPanel

        Webview panel.

      Returns void

    • Sends "kernel-starting" message to webview immediately. Used to trigger spinner before any async operations.

      Parameters

      • uri: Uri

        Document URI.

      • runtime: RuntimeDTO

        Selected runtime.

      Returns Promise<void>

    • Sends a kernel status update to a notebook.

      Parameters

      • uri: Uri

        Notebook URI.

      • status: "idle" | "busy" | "starting" | "restarting" | "dead"

        The current execution state to report.

      Returns Promise<void>