Creates a new MessageHandler instance
Private_Counter for generating unique callback IDs
Private_Default timeout for requests (30 seconds)
Private_Map of callback ID to message handler functions
Private_Map of pending request IDs to promise resolvers
Private Static_Counter for generating unique request IDs
StaticinstanceSingleton instance of MessageHandler
Private_Handle incoming messages from the extension
Clear all pending requests (useful for cleanup)
Dispose the message handler and cleanup resources.
Register a callback for all incoming messages.
Message handler function
Disposable to unregister the handler
Register a callback to receive all messages from the extension. Returns a disposable to unregister the callback.
Function to call when messages are received
Disposable to unregister the callback
Send a message to the extension (fire and forget).
Message to send
Type-safe message handler with async/await support. Handles bidirectional communication between webview and extension.