Skip to content

Commit 165faf8

Browse files
committed
Polish shell integration failure hover
Fixes microsoft#153440
1 parent ade80ca commit 165faf8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/vs/workbench/contrib/terminal/browser/terminalInstance.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ import { IPreferencesService } from 'vs/workbench/services/preferences/common/pr
8585
import type { IMarker, ITerminalAddon, Terminal as XTermTerminal } from 'xterm';
8686
import { IOpenerService } from 'vs/platform/opener/common/opener';
8787
import { IGenericMarkProperties } from 'vs/platform/terminal/common/terminalProcess';
88+
import { ICommandService } from 'vs/platform/commands/common/commands';
8889

8990
const enum Constants {
9091
/**
@@ -378,7 +379,8 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
378379
@IWorkspaceTrustRequestService private readonly _workspaceTrustRequestService: IWorkspaceTrustRequestService,
379380
@IHistoryService private readonly _historyService: IHistoryService,
380381
@ITelemetryService private readonly _telemetryService: ITelemetryService,
381-
@IOpenerService private readonly _openerService: IOpenerService
382+
@IOpenerService private readonly _openerService: IOpenerService,
383+
@ICommandService private readonly _commandService: ICommandService
382384
) {
383385
super();
384386

@@ -1729,13 +1731,19 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
17291731
id: TerminalStatus.ShellIntegrationAttentionNeeded,
17301732
severity: Severity.Warning,
17311733
icon: Codicon.warning,
1732-
tooltip: (`${exitMessage} ` ?? '') + nls.localize('launchFailed.exitCodeOnlyShellIntegration', 'Disabling shell integration with {0} might help.', '`terminal.integrated.shellIntegration.enabled`'),
1734+
tooltip: (`${exitMessage} ` ?? '') + nls.localize('launchFailed.exitCodeOnlyShellIntegration', 'Disabling shell integration in user settings might help.'),
17331735
hoverActions: [{
17341736
commandId: TerminalCommandId.ShellIntegrationLearnMore,
1735-
label: nls.localize('shellIntegration.learnMore', "Learn more"),
1737+
label: nls.localize('shellIntegration.learnMore', "Learn more about shell integration"),
17361738
run: () => {
17371739
this._openerService.open('https://code.visualstudio.com/docs/editor/integrated-terminal#_shell-integration');
17381740
}
1741+
}, {
1742+
commandId: 'workbench.action.openSettings',
1743+
label: nls.localize('shellIntegration.openSettings', "Open user settings"),
1744+
run: () => {
1745+
this._commandService.executeCommand('workbench.action.openSettings', 'terminal.integrated.shellIntegration.enabled');
1746+
}
17391747
}]
17401748
});
17411749
this._telemetryService.publicLog2<{}, { owner: 'meganrogge'; comment: 'Indicates the process exited when created with shell integration args' }>('terminal/shellIntegrationFailureProcessExit');

0 commit comments

Comments
 (0)