From 30d7f1a6dc5e66bc9fb45ce5bc978994b42fb35c Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Thu, 9 Apr 2026 09:54:25 -0700 Subject: [PATCH] Fix new suppress terminal setting Behaviorally it was working, but it wasn't showing up in the settings. We also hadn't mapped it into our (pointless IMHO) `Settings` class, or put it under the "correct" section of `integratedConsole`. To be honest, it's open work to migrate away from `getSettings()` and to just using the VS Code APIs directly, but we shouldn't do it now. --- package.json | 2 +- src/session.ts | 12 ++++-------- src/settings.ts | 1 + 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 6158f48dfc..6881897aec 100644 --- a/package.json +++ b/package.json @@ -1047,7 +1047,7 @@ "default": false, "markdownDescription": "Do not show the startup banner in the PowerShell Extension Terminal." }, - "powershell.suppressTerminalStoppedNotification": { + "powershell.integratedConsole.suppressTerminalStoppedNotification": { "type": "boolean", "default": false, "markdownDescription": "Do not show a notification when the PowerShell Extension Terminal has stopped." diff --git a/src/session.ts b/src/session.ts index 2908f6d27f..2f9e65f04f 100644 --- a/src/session.ts +++ b/src/session.ts @@ -1159,13 +1159,9 @@ Type 'help' to get help. } private async promptForRestart(): Promise { - // Check user configuration before showing notification - const suppressNotification = - vscode.workspace - .getConfiguration("powershell") - .get("suppressTerminalStoppedNotification") ?? false; - - if (suppressNotification) { + if ( + getSettings().integratedConsole.suppressTerminalStoppedNotification + ) { return; } @@ -1186,7 +1182,7 @@ Type 'help' to get help. prompt: "Don't Show Again", action: async (): Promise => { await changeSetting( - "suppressTerminalStoppedNotification", + "integratedConsole.suppressTerminalStoppedNotification", true, true, this.logger, diff --git a/src/settings.ts b/src/settings.ts index 93e9c672f0..75c3673b2c 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -133,6 +133,7 @@ class IntegratedConsoleSettings extends PartialSettings { useLegacyReadLine = false; forceClearScrollbackBuffer = false; suppressStartupBanner = false; + suppressTerminalStoppedNotification = false; startLocation = StartLocation.Panel; }