@@ -10,7 +10,7 @@ import { IInstantiationService } from '../../../../../platform/instantiation/com
1010import { IChatProgressRenderableResponseContent } from '../../common/chatModel.js' ;
1111import { IChatElicitationRequest } from '../../common/chatService.js' ;
1212import { IChatAccessibilityService } from '../chat.js' ;
13- import { ChatConfirmationWidget , SimpleChatConfirmationWidget } from './chatConfirmationWidget.js' ;
13+ import { ChatConfirmationWidget } from './chatConfirmationWidget.js' ;
1414import { IChatContentPart , IChatContentPartRenderContext } from './chatContentParts.js' ;
1515
1616export class ChatElicitationContentPart extends Disposable implements IChatContentPart {
@@ -40,8 +40,6 @@ export class ChatElicitationContentPart extends Disposable implements IChatConte
4040
4141 this . _register ( confirmationWidget . onDidChangeHeight ( ( ) => this . _onDidChangeHeight . fire ( ) ) ) ;
4242
43- const messageToRender = this . getMessageToRender ( elicitation ) ;
44-
4543 this . _register ( confirmationWidget . onDidClick ( async e => {
4644 if ( e . data ) {
4745 await elicitation . accept ( ) ;
@@ -50,15 +48,15 @@ export class ChatElicitationContentPart extends Disposable implements IChatConte
5048 }
5149
5250 confirmationWidget . setShowButtons ( false ) ;
53- confirmationWidget . updateMessage ( messageToRender ) ;
51+ confirmationWidget . updateMessage ( this . getMessageToRender ( elicitation ) ) ;
5452
5553 this . _onDidChangeHeight . fire ( ) ;
5654 } ) ) ;
5755
58-
5956 this . chatAccessibilityService . acceptElicitation ( elicitation ) ;
6057 this . domNode = confirmationWidget . domNode ;
6158 this . domNode . tabIndex = 0 ;
59+ const messageToRender = this . getMessageToRender ( elicitation ) ;
6260 this . domNode . ariaLabel = elicitation . title + ' ' + ( typeof messageToRender === 'string' ? messageToRender : messageToRender . value || '' ) ;
6361 }
6462
0 commit comments