Adds a shim for `Promise.withResolvers`. This is slightly reduces lines of code. More importantly it plays more nicely with TypeScript's type checking and lets us mark more vars const and properties readonly
This is a new service which extends IPtyService and provides additional methods
on the process that manages the connection to the pty host:
- IPtyService: Talk to the pty host, this may be direct via a message port of via
the main/server procs.
- IPtyHostService: Talk to the pty host management interfaces on the main/server
procs. These are no longer available as optional methods on IPtyService to be
clear about where they happen (eg. getProfiles).
Fixes#186935
- The issue is `_onWillShutdown` is called before `TerminalInputSerializer` serializes, so I added `shutdownPersistentProcessId`.
- When restoring the editor, it was using the wrong ID, so I added `getRevivedPtyNewId`.
* variables: allow resolving `extensionDir`
This allows us to fix https://github.com/microsoft/vscode-remote-release/issues/5516#issuecomment-911597917
It enables a new replacement in the format `${extensionDir:<id>}` which
will expand to the filesystem path where the extension is stored. This
involved churn, since now resolution is always synchronous (where before
the terminal took a synchronous-only path.)
Additionally, changes were needed to inject this information in the
variable resolver. As part of this I made the extension host resolver
(used by debug and tasks) its own extension host service.
* fixup! preserve object key order in resolution, add extensionDir support
* fixup! address pr comments
* fixup! address pr comments
* fixup! address pr comments
* config: fix config replacement only working for first variable per line
* fixup! fix unit tests