From e14f03f29d4ea8bdd67320e312d87acbd49b1edd Mon Sep 17 00:00:00 2001 From: meganrogge Date: Tue, 20 Jun 2023 10:24:48 -0700 Subject: [PATCH] always cancel looping cue --- src/vs/workbench/contrib/chat/browser/chatWidget.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/chatWidget.ts b/src/vs/workbench/contrib/chat/browser/chatWidget.ts index b193b6b061b..ee5f6871d19 100644 --- a/src/vs/workbench/contrib/chat/browser/chatWidget.ts +++ b/src/vs/workbench/contrib/chat/browser/chatWidget.ts @@ -407,11 +407,12 @@ export class ChatWidget extends Disposable implements IChatWidget { if (result) { this.inputPart.acceptInput(query); result.responseCompletePromise.then(async () => { - const responses = this.viewModel?.getItems().filter(isResponseVM); const lastResponse = responses?.[responses.length - 1]; this._chatAccessibilityService.acceptResponse(lastResponse); }); + } else { + this._chatAccessibilityService.acceptResponse(); } } } @@ -518,7 +519,7 @@ export class ChatWidgetService implements IChatWidgetService { } -const CHAT_RESPONSE_PENDING_AUDIO_CUE_LOOP_MS = 7000; +const CHAT_RESPONSE_PENDING_AUDIO_CUE_LOOP_MS = 5000; export class ChatAccessibilityService extends Disposable implements IChatAccessibilityService { declare readonly _serviceBrand: undefined;