In some cases it is necessary to register multiple handlers for the same message type in the VS Code extension (not in the webview). The change includes the following:
Store an array of message handlers for each message type.
Add a parameter to filter by sender, for example to register a handler only for a specific webview instance.
Return a Disposable that can be used to remove a message handler when it's no longer needed.
Webview registration returns information on the message participant (webview id) that can be used for filtering)
Requests can be handled only if there is exactly one message handler for which the configured sender matches the incoming message.
In some cases it is necessary to register multiple handlers for the same message type in the VS Code extension (not in the webview). The change includes the following: