Skip to content

Commit 035dc5a

Browse files
authored
fixes issue where dismissing the view in one window doesn't apply in all windows (microsoft#232157)
1 parent a77b2c2 commit 035dc5a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/vs/workbench/contrib/chat/browser/chatMovedView.contribution.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { Codicon } from '../../../../base/common/codicons.js';
7-
import { IDisposable } from '../../../../base/common/lifecycle.js';
7+
import { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';
88
import { URI } from '../../../../base/common/uri.js';
99
import { localize, localize2 } from '../../../../nls.js';
1010
import { CommandsRegistry } from '../../../../platform/commands/common/commands.js';
@@ -61,6 +61,7 @@ export class MoveChatViewContribution implements IWorkbenchContribution {
6161
private async initialize(): Promise<void> {
6262
await this.hideViewIfCopilotIsNotInstalled();
6363
this.updateContextKey();
64+
this.registerListeners();
6465
this.registerCommands();
6566
this.registerMovedChatWelcomeView();
6667
this.hideViewIfOldViewIsInSecondarySidebar();
@@ -96,6 +97,10 @@ export class MoveChatViewContribution implements IWorkbenchContribution {
9697
this.showWelcomeViewCtx.set(!hidden);
9798
}
9899

100+
private registerListeners(): void {
101+
this.storageService.onDidChangeValue(StorageScope.APPLICATION, MoveChatViewContribution.hideMovedChatWelcomeViewStorageKey, new DisposableStore())(() => this.updateContextKey());
102+
}
103+
99104
private registerCommands(): void {
100105
KeybindingsRegistry.registerCommandAndKeybindingRule({
101106
id: CHAT_SIDEBAR_OLD_VIEW_PANEL_ID,

0 commit comments

Comments
 (0)