FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix new suppress terminal setting by andyleejordan · Pull Request #5463 · PowerShell/vscode-powershell · GitHub

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

Filter by extension

Filter by extension .json  (1) .ts  (2) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@
"default": false,
"markdownDescription": "Do not show the startup banner in the PowerShell Extension Terminal."
},
Comment thread
andyleejordan marked this conversation as resolved.
"powershell.suppressTerminalStoppedNotification": {
"powershell.integratedConsole.suppressTerminalStoppedNotification": {
"type": "boolean",
"default": false,
"markdownDescription": "Do not show a notification when the PowerShell Extension Terminal has stopped."
Expand Down
12 changes: 4 additions & 8 deletions src/session.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1159,13 +1159,9 @@ Type 'help' to get help.
}

private async promptForRestart(): Promise<void> {
// Check user configuration before showing notification
const suppressNotification =
vscode.workspace
.getConfiguration("powershell")
.get<boolean>("suppressTerminalStoppedNotification") ?? false;

if (suppressNotification) {
if (
getSettings().integratedConsole.suppressTerminalStoppedNotification
) {
return;
}

Comment on lines +1162 to 1167

Copilot AI Apr 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This change drops support for the previous setting key (powershell.suppressTerminalStoppedNotification). Users who already set the old key will start seeing notifications again after updating. Consider adding a backward-compatible fallback (read both old + new keys), and/or a one-time migration that copies the old value into integratedConsole.suppressTerminalStoppedNotification.

Suggested change
if (
getSettings().integratedConsole.suppressTerminalStoppedNotification
) {
return;
}
const suppressTerminalStoppedNotification =
getSettings().integratedConsole
.suppressTerminalStoppedNotification;
const legacySuppressTerminalStoppedNotification = vscode.workspace
.getConfiguration("powershell")
.get<boolean>("suppressTerminalStoppedNotification");
if (
!suppressTerminalStoppedNotification &&
legacySuppressTerminalStoppedNotification
) {
await changeSetting(
"integratedConsole.suppressTerminalStoppedNotification",
true,
true,
this.logger,
);
return;
}
if (
suppressTerminalStoppedNotification ||
legacySuppressTerminalStoppedNotification
) {
return;
}

Copilot uses AI. Check for mistakes.
Expand All @@ -1186,7 +1182,7 @@ Type 'help' to get help.
prompt: "Don't Show Again",
action: async (): Promise<void> => {
await changeSetting(
"suppressTerminalStoppedNotification",
"integratedConsole.suppressTerminalStoppedNotification",
true,
true,
this.logger,
Expand Down
1 change: 1 addition & 0 deletions src/settings.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ class IntegratedConsoleSettings extends PartialSettings {
useLegacyReadLine = false;
forceClearScrollbackBuffer = false;
suppressStartupBanner = false;
suppressTerminalStoppedNotification = false;
startLocation = StartLocation.Panel;
}

Expand Down
Loading

Back | FazBrowse Home | New Git URL