Skip to content

Commit

Permalink
Fixes unscoped observer of configuration changes
Browse files Browse the repository at this point in the history
  • Loading branch information
samclark2015 committed Feb 20, 2025
1 parent a02b35d commit 7356033
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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)
);
}
})
);

Expand Down

0 comments on commit 7356033

Please sign in to comment.