Theia API Documentation v1.65.0
    Preparing search index...
    • Resolves an external uri, such as a http: or https: link, from where the extension is running to a uri to the same resource on the client machine.

      This is a no-op if the extension is running on the client machine. Currently only supports https: and http: uris.

      If the extension is running remotely, this function automatically establishes a port forwarding tunnel from the local machine to target on the remote and returns a local uri to the tunnel. The lifetime of the port forwarding tunnel is managed by VS Code and the tunnel can be closed by the user.

      Extensions should not cache the result of asExternalUri as the resolved uri may become invalid due to a system or user action — for example, in remote cases, a user may close a port forwarding tunnel that was opened by asExternalUri.

      Note that uris passed through openExternal are automatically resolved and you should not call asExternalUri on them.

      Parameters

      Returns Thenable<Uri>

      A uri that can be used on the client machine.