From cc41f037dc1e9d08640cf1e1ccf34c8b6edf94db Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 14 Jul 2025 16:42:10 +0200 Subject: [PATCH] chat - show confirmation title in notification (#255813) --- .../browser/chatContentParts/chatConfirmationWidget.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.ts b/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.ts index 9bad7c0adf1..2734d64f328 100644 --- a/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.ts +++ b/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as dom from '../../../../../base/browser/dom.js'; +import { renderStringAsPlaintext } from '../../../../../base/browser/markdownRenderer.js'; import { Button, ButtonWithDropdown, IButton, IButtonOptions } from '../../../../../base/browser/ui/button/button.js'; import { Action } from '../../../../../base/common/actions.js'; import { Emitter, Event } from '../../../../../base/common/event.js'; @@ -120,7 +121,7 @@ abstract class BaseChatConfirmationWidget extends Disposable { private readonly notification = this._register(new MutableDisposable()); constructor( - title: string | IMarkdownString, + private title: string | IMarkdownString, subtitle: string | IMarkdownString | undefined, buttons: IChatConfirmationButton[], @IInstantiationService protected readonly instantiationService: IInstantiationService, @@ -200,9 +201,10 @@ abstract class BaseChatConfirmationWidget extends Disposable { this._hostService.focus(targetWindow, { mode: FocusMode.Notify }); // Notify - const notification = await dom.triggerNotification(localize('notificationTitle', "Chat: Confirmation Required"), + const title = renderStringAsPlaintext(this.title); + const notification = await dom.triggerNotification(title ? localize('notificationTitle', "Chat: {0}", title) : localize('defaultTitle', "Chat: Confirmation Required"), { - detail: localize('notificationDetail', "The current chat session requires your confirmation to proceed"), + detail: localize('notificationDetail', "The current chat session requires your confirmation to proceed."), sticky: true } );