Skip to content

Commit

Permalink
Merge pull request microsoft#227250 from microsoft/tyriar/226992
Browse files Browse the repository at this point in the history
Don't show initial hint for extension or feature terminals
  • Loading branch information
Tyriar authored Aug 30, 2024
2 parents 03dc550 + f1b7363 commit d31f3f1
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class TerminalInitialHintContribution extends Disposable implements ITerm
private _xterm: IXtermTerminal & { raw: RawXtermTerminal } | undefined;

constructor(
private readonly _instance: Pick<ITerminalInstance, 'capabilities'> | IDetachedTerminalInstance,
private readonly _instance: Pick<ITerminalInstance, 'capabilities' | 'shellLaunchConfig'> | IDetachedTerminalInstance,
processManager: ITerminalProcessManager | ITerminalProcessInfo | undefined,
widgetManager: TerminalWidgetManager | undefined,
@IInstantiationService private readonly _instantiationService: IInstantiationService,
Expand All @@ -110,11 +110,16 @@ export class TerminalInitialHintContribution extends Disposable implements ITerm
}

xtermOpen(xterm: IXtermTerminal & { raw: RawXtermTerminal }): void {
// Don't show is the terminal was launched by an extension or a feature like debug
if ('shellLaunchConfig' in this._instance && (this._instance.shellLaunchConfig.isExtensionOwnedTerminal || this._instance.shellLaunchConfig.isFeatureTerminal)) {
return;
}
// Don't show if disabled
if (this._storageService.getBoolean(Constants.InitialHintHideStorageKey, StorageScope.APPLICATION, false)) {
return;
}
// Only show for the first terminal
if (this._terminalGroupService.instances.length + this._terminalEditorService.instances.length !== 1) {
// only show for the first terminal
return;
}
this._xterm = xterm;
Expand Down

0 comments on commit d31f3f1

Please sign in to comment.