diff --git a/package.json b/package.json index 041bd56bbf9d5..74cd4c06040f8 100644 --- a/package.json +++ b/package.json @@ -89,6 +89,7 @@ "vscode-textmate": "8.0.0", "xterm": "5.2.0-beta.10", "xterm-addon-canvas": "0.4.0-beta.6", + "xterm-addon-image": "0.3.1", "xterm-addon-search": "0.11.0", "xterm-addon-serialize": "0.9.0", "xterm-addon-unicode11": "0.5.0", diff --git a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts index 0a8a1eea68bcb..1c3725a8710a3 100644 --- a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts +++ b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts @@ -9,6 +9,7 @@ import type { ISearchOptions, SearchAddon as SearchAddonType } from 'xterm-addon import type { Unicode11Addon as Unicode11AddonType } from 'xterm-addon-unicode11'; import type { WebglAddon as WebglAddonType } from 'xterm-addon-webgl'; import type { SerializeAddon as SerializeAddonType } from 'xterm-addon-serialize'; +import { ImageAddon } from 'xterm-addon-image'; import { IXtermCore } from 'vs/workbench/contrib/terminal/browser/xterm-private'; import { ConfigurationTarget, IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { TerminalConfigHelper } from 'vs/workbench/contrib/terminal/browser/terminalConfigHelper'; @@ -129,6 +130,7 @@ export class XtermTerminal extends DisposableStore implements IXtermTerminal, II private _shellIntegrationAddon: ShellIntegrationAddon; private _decorationAddon: DecorationAddon; + private _imageAddon: ImageAddon; // Optional addons private _canvasAddon?: CanvasAddonType; @@ -255,6 +257,8 @@ export class XtermTerminal extends DisposableStore implements IXtermTerminal, II this._decorationAddon = this._instantiationService.createInstance(DecorationAddon, this._capabilities); this._decorationAddon.onDidRequestRunCommand(e => this._onDidRequestRunCommand.fire(e)); this.raw.loadAddon(this._decorationAddon); + this._imageAddon = this._instantiationService.createInstance(ImageAddon); + this.raw.loadAddon(this._imageAddon); this._shellIntegrationAddon = this._instantiationService.createInstance(ShellIntegrationAddon, disableShellIntegrationReporting, this._telemetryService); this.raw.loadAddon(this._shellIntegrationAddon); } diff --git a/yarn.lock b/yarn.lock index ad0fc4d516148..433487fee598d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11717,6 +11717,11 @@ xterm-addon-canvas@0.4.0-beta.6: resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.6.tgz#f8cb09ef980f1fa9d73f067e00f7a879c374ad68" integrity sha512-x5OY0VOJxqvXdyXpW9aug3vaeQX/+r7TZk13MujReuJRLRAjCHaH6ep6g9ZOVlqa8VCBWPwmm/eXH05SGUbnQQ== +xterm-addon-image@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/xterm-addon-image/-/xterm-addon-image-0.3.1.tgz#970b4003d1239b541ace7643f4f7e72a7f90a07d" + integrity sha512-7wLkYAoMCMwcvOhzqVlMK1wRHPQa1ZiFRdJ82oQVdnkp0ktV2LNmNu0JPu6H0Fr0eUfxUmcrqwhI9BMiZuPyrw== + xterm-addon-search@0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0.tgz#2a00ff7f9848f6140e7c4d1782486b0b18b06e0d"