Skip to content

Commit 4a2401c

Browse files
Add setting to disable incessant PowerShell Extension Terminal Stopped notifications
1 parent f3ee736 commit 4a2401c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,11 @@
10371037
"default": false,
10381038
"markdownDescription": "Do not show the startup banner in the PowerShell Extension Terminal."
10391039
},
1040+
"powershell.showTerminalStoppedNotification": {
1041+
"type": "boolean",
1042+
"default": true,
1043+
"markdownDescription": "Show a notification when the PowerShell Extension terminal has stopped."
1044+
},
10401045
"powershell.integratedConsole.showOnStartup": {
10411046
"type": "boolean",
10421047
"default": true,

src/session.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,15 @@ Type 'help' to get help.
11331133
}
11341134

11351135
private async promptForRestart(): Promise<void> {
1136+
// Check user configuration before showing notification
1137+
const showNotifications = vscode.workspace
1138+
.getConfiguration("powershell")
1139+
.get<boolean>("showTerminalStoppedNotification", true);
1140+
1141+
if (!showNotifications) {
1142+
// User opted out — silently skip the notification
1143+
return;
1144+
}
11361145
await this.logger.writeAndShowErrorWithActions(
11371146
"The PowerShell Extension Terminal has stopped, would you like to restart it? IntelliSense and other features will not work without it!",
11381147
[

0 commit comments

Comments
 (0)