Creates a new LexicalProvider with collaboration and completion support.
Extension context for resource access.
Protected Readonly_Map of request ID to response callbacks for request/response message pattern.
Protected Readonly_VS Code extension context providing access to storage, subscriptions, etc.
Protected Readonly_Message router for handling webview messages and routing to appropriate handlers.
Protected Readonly_Network bridge service for HTTP/WebSocket communication between extension and webview.
Protected Readonly_Event emitter for document changes. Subclasses should fire this event when documents change.
Protected Readonly_Map of webview panels to their Runner instances. Runners handle tool execution via the BridgeExecutor pattern.
Protected Readonly_Runtime bridge service for managing runtime lifecycle and selection.
ReadonlyonEvent for document changes (required by CustomEditorProvider interface).
Creates a backup of a custom document for crash recovery.
Lexical document to backup.
Backup context with destination URI.
Cancellation token for aborting the backup.
Promise resolving to backup descriptor with cleanup function.
ProtectedgetGets the URI for a lexical document.
The lexical document to extract the URI from.
The document URI identifying the file location.
ProtectedgetGets the Runner for a specific webview panel.
The webview panel to look up the runner for.
The Runner instance, or undefined if not initialized.
Initializes auth listener for userInfo updates. Called after extension activation, passing authProvider directly to avoid circular dependency.
Auth provider instance to listen for state changes.
ProtectedinitializeInitializes a Runner for a webview panel. Subclasses should call this in their resolveCustomEditor implementation.
The Runner uses a BridgeExecutor to send tool execution requests to the webview, where they are executed by the webview's own Runner with DefaultExecutor.
The webview panel to create a Runner for.
The created Runner instance.
ProtectedonHandles messages received from the webview. Delegates to the message router for all message types.
The webview panel that sent the message.
The document associated with the webview.
The structured message from the webview.
Opens a custom document for the lexical editor.
Document URI to open.
Context including backup information.
OptionalbackupId?: stringOptional backup identifier for restoration.
Cancellation token for aborting the operation.
Promise resolving to the lexical document.
ProtectedpostPosts a message to the webview without expecting a response.
Target webview panel to send the message to.
Message type identifier for routing.
Message payload data.
Optionalid: stringOptional message identifier for tracking.
ProtectedpostPosts a message to the webview and waits for a response. Uses the request/response pattern with requestId tracking.
Target webview panel to send the message to.
Message type identifier for routing.
Message payload data.
Promise resolving to the webview response.
Refreshes collaboration config for all active webviews. Called when auth state changes (login/logout) to update usernames.
ProtectedregisterRegisters lexical-specific message handlers. Overrides base class to add lexical-specific handlers.
Resolves a custom editor by setting up the webview and initializing collaboration.
The lexical document to display.
The webview panel for the editor.
Cancellation token for aborting the operation.
Promise that resolves when the editor is ready.
Reverts a custom document to its last saved state.
Lexical document to revert.
Cancellation token for aborting the revert.
Promise that resolves when the revert is complete.
Saves a custom document to its original location.
Lexical document to persist.
Cancellation token for aborting the save.
Promise that resolves when the save is complete.
Saves a custom document to a new location.
Lexical document to save.
Target URI for the saved copy.
Cancellation token for aborting the save.
Promise that resolves when the save is complete.
Sends a message to a specific Lexical webview identified by document URI.
Document URI identifying the target webview.
Message object to post to the webview.
Sends a message to a specific Lexical webview and waits for a response.
Document URI identifying the target webview.
Message object to post to the webview.
Unique ID to correlate the response with this request.
Promise resolving to the webview's response.
StaticgetGets the singleton instance of LexicalProvider for message routing.
The LexicalProvider instance or undefined if not created.
StaticregisterRegisters the Lexical editor provider and commands with VS Code.
Extension context for resource management.
Disposable for cleanup.
Custom editor provider for Lexical documents. Handles webview lifecycle management, document state synchronization, and collaboration features for rich text editing.