Bridge executor - sends messages to extension host via webview API. Used by webviews that need to communicate with extension host.
const vscode = acquireVsCodeApi();const executor = new BridgeExecutor(notebookId, vscode);await executor.execute("notebook.insertCell", { cellType: "code", source: "print('hi')" }); Copy
const vscode = acquireVsCodeApi();const executor = new BridgeExecutor(notebookId, vscode);await executor.execute("notebook.insertCell", { cellType: "code", source: "print('hi')" });
Private
Execute a command by sending message to VS Code extension host
Operation command (e.g., "notebook.insertCell")
Command arguments
Result from extension host
Bridge executor - sends messages to extension host via webview API. Used by webviews that need to communicate with extension host.
Example