Datalayer VS Code Extension - v0.0.9
    Preparing search index...
    • Creates a Runner instance for notebook webview with all notebook operations.

      Parameters

      • notebookToolOperations: any

        Notebook tool operations from @datalayer/jupyter-react

      • notebookId: string

        Unique identifier for the notebook document

      • executor: any

        DefaultExecutor instance for executing operations (NotebookDefaultExecutor)

      Returns WebviewRunner

      WebviewRunner configured with notebook operations

      import { notebookToolOperations, DefaultExecutor } from "@datalayer/jupyter-react";
      import { useNotebookStore2 } from "@datalayer/jupyter-react";

      const notebookStore = useNotebookStore2();
      const executor = new DefaultExecutor(notebookId, notebookStore);
      const runner = createNotebookRunner(notebookToolOperations, notebookId, executor);
      const result = await runner.execute("insertCell", {
      cellType: "code",
      source: "print('hello')"
      });