From 4bd127c2f64fefd3a6b577ab553d2bd087fbc06a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 6 Aug 2025 10:47:46 +0200 Subject: [PATCH] Cancel button clashes with dialog message (fix #258529) (#260002) * Cancel button clashes with dialog message (fix #258529) * :lipstick: --- .../contrib/chat/electron-browser/chat.contribution.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/chat/electron-browser/chat.contribution.ts b/src/vs/workbench/contrib/chat/electron-browser/chat.contribution.ts index d445d8f1674..9579793a07d 100644 --- a/src/vs/workbench/contrib/chat/electron-browser/chat.contribution.ts +++ b/src/vs/workbench/contrib/chat/electron-browser/chat.contribution.ts @@ -169,25 +169,27 @@ class ChatLifecycleHandler extends Disposable { showChatView(this.viewsService); let message: string; + let detail: string; switch (reason) { case ShutdownReason.CLOSE: message = localize('closeTheWindow.message', "A chat request is in progress. Are you sure you want to close the window?"); + detail = localize('closeTheWindow.detail', "The chat request will stop if you close the window."); break; case ShutdownReason.LOAD: message = localize('changeWorkspace.message', "A chat request is in progress. Are you sure you want to change the workspace?"); + detail = localize('changeWorkspace.detail', "The chat request will stop if you change the workspace."); break; case ShutdownReason.RELOAD: message = localize('reloadTheWindow.message', "A chat request is in progress. Are you sure you want to reload the window?"); + detail = localize('reloadTheWindow.detail', "The chat request will stop if you reload the window."); break; default: message = isMacintosh ? localize('quit.message', "A chat request is in progress. Are you sure you want to quit?") : localize('exit.message', "A chat request is in progress. Are you sure you want to exit?"); + detail = isMacintosh ? localize('quit.detail', "The chat request will stop if you quit.") : localize('exit.detail', "The chat request will stop if you exit."); break; } - const result = await this.dialogService.confirm({ - message, - detail: localize('quit.detail', "The chat request will be cancelled if you continue.") - }); + const result = await this.dialogService.confirm({ message, detail }); return !result.confirmed; }