Skip to content

Commit 5ed76fd

Browse files
authored
Add skipChatRequestInProgressMessage context key and update shutdown veto logic (microsoft#259061)
1 parent 8c0b3c1 commit 5ed76fd

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/vs/workbench/contrib/chat/common/chatContextKeys.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export namespace ChatContextKeys {
6262
export const remoteJobCreating = new RawContextKey<boolean>('chatRemoteJobCreating', false, { type: 'boolean', description: localize('chatRemoteJobCreating', "True when a remote coding agent job is being created.") });
6363
export const hasRemoteCodingAgent = new RawContextKey<boolean>('hasRemoteCodingAgent', false, localize('hasRemoteCodingAgent', "Whether any remote coding agent is available"));
6464
export const enableRemoteCodingAgentPromptFileOverlay = new RawContextKey<boolean>('enableRemoteCodingAgentPromptFileOverlay', false, localize('enableRemoteCodingAgentPromptFileOverlay', "Whether the remote coding agent prompt file overlay feature is enabled"));
65+
export const skipChatRequestInProgressMessage = new RawContextKey<boolean>('chatSkipRequestInProgressMessage', false, { type: 'boolean', description: localize('chatSkipRequestInProgressMessage', "True when the chat request in progress message should be skipped.") });
6566

6667
export const Setup = {
6768
hidden: new RawContextKey<boolean>('chatSetupHidden', false, true), // True when chat setup is explicitly hidden.

src/vs/workbench/contrib/chat/electron-browser/chat.contribution.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ class ChatLifecycleHandler extends Disposable {
141141
@ILifecycleService lifecycleService: ILifecycleService,
142142
@IChatService private readonly chatService: IChatService,
143143
@IDialogService private readonly dialogService: IDialogService,
144-
@IViewsService private readonly viewsService: IViewsService
144+
@IViewsService private readonly viewsService: IViewsService,
145+
@IContextKeyService private readonly contextKeyService: IContextKeyService
145146
) {
146147
super();
147148

@@ -156,6 +157,10 @@ class ChatLifecycleHandler extends Disposable {
156157
return false;
157158
}
158159

160+
if (ChatContextKeys.skipChatRequestInProgressMessage.getValue(this.contextKeyService) === true) {
161+
return false;
162+
}
163+
159164
return this.doShouldVetoShutdown(reason);
160165
}
161166

0 commit comments

Comments
 (0)