@@ -61,9 +61,18 @@ export class MoveChatViewContribution implements IWorkbenchContribution {
61
61
}
62
62
63
63
private async initialize ( ) : Promise < void > {
64
+ const hidden = this . storageService . getBoolean ( MoveChatViewContribution . hideMovedChatWelcomeViewStorageKey , StorageScope . APPLICATION , false ) ;
65
+
66
+ // If the view is already hidden, then we just want to register keybindings.
67
+ if ( hidden ) {
68
+ this . registerKeybindings ( ) ;
69
+ return ;
70
+ }
71
+
64
72
await this . hideViewIfCopilotIsNotInstalled ( ) ;
65
73
this . updateContextKey ( ) ;
66
74
this . registerListeners ( ) ;
75
+ this . registerKeybindings ( ) ;
67
76
this . registerCommands ( ) ;
68
77
this . registerMovedChatWelcomeView ( ) ;
69
78
this . hideViewIfOldViewIsMovedFromDefaultLocation ( ) ;
@@ -116,15 +125,17 @@ export class MoveChatViewContribution implements IWorkbenchContribution {
116
125
this . storageService . onDidChangeValue ( StorageScope . APPLICATION , MoveChatViewContribution . hideMovedChatWelcomeViewStorageKey , new DisposableStore ( ) ) ( ( ) => this . updateContextKey ( ) ) ;
117
126
}
118
127
119
- private registerCommands ( ) : void {
128
+ private registerKeybindings ( ) : void {
120
129
KeybindingsRegistry . registerCommandAndKeybindingRule ( {
121
130
id : CHAT_SIDEBAR_OLD_VIEW_PANEL_ID ,
122
131
weight : KeybindingWeight . WorkbenchContrib ,
123
132
when : CONTEXT_CHAT_PANEL_PARTICIPANT_REGISTERED ,
124
133
primary : 0 ,
125
134
handler : accessor => showChatView ( accessor . get ( IViewsService ) )
126
135
} ) ;
136
+ }
127
137
138
+ private registerCommands ( ) : void {
128
139
CommandsRegistry . registerCommand ( {
129
140
id : '_chatMovedViewWelcomeView.ok' ,
130
141
handler : async ( accessor : ServicesAccessor ) => {
0 commit comments