From 73560331c7475dcbb116536a55219813c5526f9d Mon Sep 17 00:00:00 2001 From: Sam Clark Date: Thu, 20 Feb 2025 08:40:52 -0600 Subject: [PATCH] Fixes unscoped observer of configuration changes --- .../components/topActionBarInterpretersManager.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/browser/parts/positronTopActionBar/components/topActionBarInterpretersManager.tsx b/src/vs/workbench/browser/parts/positronTopActionBar/components/topActionBarInterpretersManager.tsx index 89b750b9da2..dd479c0294f 100644 --- a/src/vs/workbench/browser/parts/positronTopActionBar/components/topActionBarInterpretersManager.tsx +++ b/src/vs/workbench/browser/parts/positronTopActionBar/components/topActionBarInterpretersManager.tsx @@ -17,7 +17,7 @@ import { PositronModalReactRenderer } from '../../../positronModalReactRenderer/ import { usePositronTopActionBarContext } from '../positronTopActionBarContext.js'; import { ILanguageRuntimeMetadata, LanguageRuntimeSessionMode } from '../../../../services/languageRuntime/common/languageRuntimeService.js'; import { InterpretersManagerModalPopup } from '../interpretersManagerModalPopup/interpretersManagerModalPopup.js'; -import { multipleConsoleSessionsFeatureEnabled } from '../../../../services/runtimeSession/common/positronMultipleConsoleSessionsFeatureFlag.js'; +import { multipleConsoleSessionsFeatureEnabled, USE_POSITRON_MULTIPLE_CONSOLE_SESSIONS_CONFIG_KEY } from '../../../../services/runtimeSession/common/positronMultipleConsoleSessionsFeatureFlag.js'; import { ActionBarCommandButton } from '../../../../../platform/positronActionBar/browser/components/actionBarCommandButton.js'; import { CommandCenter } from '../../../../../platform/commandCenter/common/commandCenter.js'; import { ILanguageRuntimeSession } from '../../../../services/runtimeSession/common/runtimeSessionService.js'; @@ -202,9 +202,11 @@ export const TopActionBarInterpretersManager = (props: TopActionBarInterpretersM const disposableStore = new DisposableStore(); disposableStore.add( context.configurationService.onDidChangeConfiguration((e) => { - setNewInterpretersManager( - multipleConsoleSessionsFeatureEnabled(context.configurationService) - ); + if (e.affectedKeys.has(USE_POSITRON_MULTIPLE_CONSOLE_SESSIONS_CONFIG_KEY)) { + setNewInterpretersManager( + multipleConsoleSessionsFeatureEnabled(context.configurationService) + ); + } }) );