The application name of the editor, like 'Eclipse Theia'.
The application root folder from which the editor is running.
The system clipboard.
Indicates that this is a fresh install of the application.
true
if within the first day of installation otherwise false
.
Indicates whether the users has telemetry enabled. Can be observed to determine if the extension should send telemetry.
Represents the preferred user-language, like de-CH
, fr
, or en-US
.
The current log level of the editor.
A unique identifier for the computer.
The name of a remote. Defined by extensions, popular samples are wsl
for the Windows
Subsystem for Linux or ssh-remote
for remotes using a secure shell.
Note that the value is undefined
when there is no remote extension host but that the
value is defined in all extension hosts (local and remote) in case a remote extension host
exists. Use Extension.extensionKind to know if
a specific extension runs remote or not.
A unique identifier for the current session. Changes each time the editor is started.
The detected default shell for the extension host.
The UI kind property indicates from which UI extensions are accessed from. For example, extensions could be accessed from a desktop application or a web browser.
The custom uri scheme the editor registers to in the operating system.
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.
A uri that can be used on the client machine.
Creates a new telemetry logger.
The telemetry sender that is used by the telemetry logger.
Options for the telemetry logger.
A new telemetry logger
Gets environment variable value by name.
name of environment variable to get
value of the given environment variable name or undefined if there is no such variable.
Gets query parameter value by name.
name of query parameter to get.
value of the given query parameter or undefined if there is no such variable.
Returns all query parameters of current IDE.
An Event which fires when the log level of the editor changes.
An Event which fires when the user enabled or disables telemetry.
true
if the user has enabled telemetry or false
if the user has disabled telemetry.
Opens an external item, e.g. a http(s) or mailto-link, using the default application.
Note that showTextDocument
is the right
way to open a text document inside the editor, not this function.
The uri that should be opened.
A promise indicating if open was successful.
The hosted location of the application On desktop this is 'desktop' In the web this is the specified embedder i.e. 'github.dev', 'codespaces', or 'web' if the embedder does not provide that information