File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/vs/workbench/contrib/chat/browser Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ export interface IChatWidgetStyles {
5353 resultEditorBackground : string ;
5454}
5555
56+ const CHAT_RESPONSE_PENDING_AUDIO_CUE_LOOP_MS = 7000 ;
57+
5658export class ChatWidget extends Disposable implements IChatWidget {
5759 public static readonly CONTRIBS : { new ( ...args : [ IChatWidget , ...any ] ) : any } [ ] = [ ] ;
5860
@@ -391,13 +393,14 @@ export class ChatWidget extends Disposable implements IChatWidget {
391393 return ;
392394 }
393395 this . audioCueService . playAudioCue ( AudioCue . chatRequestSent , true ) ;
396+ const responsePendingAudioCue = this . audioCueService . playAudioCueLoop ( AudioCue . chatResponsePending , CHAT_RESPONSE_PENDING_AUDIO_CUE_LOOP_MS ) ;
394397 const input = query ?? editorValue ;
395- const cue = this . audioCueService . playAudioCueLoop ( AudioCue . chatResponsePending , 7000 ) ;
396398 const result = await this . chatService . sendRequest ( this . viewModel . sessionId , input ) ;
399+
397400 if ( result ) {
398401 this . inputPart . acceptInput ( query ) ;
399402 result . responseCompletePromise . then ( async ( ) => {
400- cue ?. dispose ( ) ;
403+ responsePendingAudioCue ?. dispose ( ) ;
401404 this . audioCueService . playRandomAudioCue ( AudioCueGroupId . chatResponseReceived , true ) ;
402405 const responses = this . viewModel ?. getItems ( ) . filter ( isResponseVM ) ;
403406 const lastResponse = responses ?. [ responses . length - 1 ] ;
You can’t perform that action at this time.
0 commit comments