Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ export class TerminalTelemetryContribution extends Disposable implements IWorkbe
shellIntegrationInjected: boolean;
shellIntegrationInjectionFailureReason: ShellIntegrationInjectionFailureReason | undefined;

imageAddonLoaded: boolean;

terminalSessionId: string;
};
type TerminalCreationTelemetryClassification = {
Expand All @@ -101,6 +103,8 @@ export class TerminalTelemetryContribution extends Disposable implements IWorkbe
shellIntegrationInjected: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the shell integration script was injected.' };
shellIntegrationInjectionFailureReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Info about shell integration injection.' };

imageAddonLoaded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the xterm.js image addon was loaded.' };

terminalSessionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The session ID of the terminal instance.' };
};
this._telemetryService.publicLog2<TerminalCreationTelemetryData, TerminalCreationTelemetryClassification>('terminal/createInstance', {
Expand All @@ -122,6 +126,7 @@ export class TerminalTelemetryContribution extends Disposable implements IWorkbe
shellIntegrationQuality: commandDetection?.hasRichCommandDetection ? 2 : commandDetection ? 1 : 0,
shellIntegrationInjected: instance.usedShellIntegrationInjection,
shellIntegrationInjectionFailureReason: instance.shellIntegrationInjectionFailureReason,
imageAddonLoaded: instance.xterm?.isImageAddonLoaded ?? false,
terminalSessionId: instance.sessionId,
});
}
Expand Down
13 changes: 13 additions & 0 deletions src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach

get isStdinDisabled(): boolean { return !!this.raw.options.disableStdin; }
get isGpuAccelerated(): boolean { return !!this._webglAddon; }
get isImageAddonLoaded(): boolean { return !!this._imageAddon; }

private readonly _onDidRequestRunCommand = this._register(new Emitter<{ command: ITerminalCommand; noNewLine?: boolean }>());
readonly onDidRequestRunCommand = this._onDidRequestRunCommand.event;
Expand Down Expand Up @@ -916,6 +917,18 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach
const AddonCtor = await this._xtermAddonLoader.importAddon('image');
this._imageAddon = new AddonCtor();
this.raw.loadAddon(this._imageAddon);
type TerminalImageAddonActivatedClassification = {
owner: 'anthonykim1';
comment: 'Tracks when the xterm.js image addon is loaded, including dynamic enablement';
};
this._telemetryService.publicLog2<{}, TerminalImageAddonActivatedClassification>('terminal/imageAddonActivated');
this._register(this._imageAddon.onImageAdded(() => {
type TerminalImageAddedClassification = {
owner: 'anthonykim1';
comment: 'Tracks when an image is added to the terminal via the image addon';
};
this._telemetryService.publicLog2<{}, TerminalImageAddedClassification>('terminal/imageAdded');
}));
}
} else {
try {
Expand Down
Loading