mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Merge pull request #186445 from microsoft/merogge/fix-time
play cue after response takes 1 second to bypass user gesture rule
This commit is contained in:
commit
44de2d0c2a
|
@ -39,7 +39,7 @@ export function getAccessibilityHelpText(accessor: ServicesAccessor, type: 'pane
|
|||
content.push(localize('inlineChat.explain', "When a request is prefixed with /explain, a response will explain the code in the current selection and the chat view will be focused."));
|
||||
content.push(localize('inlineChat.toolbar', "Use tab to reach conditional parts like commands, status, message responses and more."));
|
||||
}
|
||||
content.push(localize('chat.audioCues', "Audio cues can be changed via settings with a prefix of audioCues.chat. By default, if a request takes more than 5 seconds, you will hear an audio cue indicating that progress is still occurring."));
|
||||
content.push(localize('chat.audioCues', "Audio cues can be changed via settings with a prefix of audioCues.chat. By default, if a request takes more than a second, you will hear an audio cue indicating that progress is still occurring."));
|
||||
return content.join('\n');
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import { IChatAccessibilityService } from 'vs/workbench/contrib/chat/browser/cha
|
|||
import { IChatResponseViewModel } from 'vs/workbench/contrib/chat/common/chatViewModel';
|
||||
|
||||
const CHAT_RESPONSE_PENDING_AUDIO_CUE_LOOP_MS = 5000;
|
||||
const CHAT_RESPONSE_PENDING_ALLOWANCE_MS = 1000;
|
||||
export class ChatAccessibilityService extends Disposable implements IChatAccessibilityService {
|
||||
|
||||
declare readonly _serviceBrand: undefined;
|
||||
|
@ -25,7 +26,7 @@ export class ChatAccessibilityService extends Disposable implements IChatAccessi
|
|||
if (!this._hasReceivedRequest) {
|
||||
this._responsePendingAudioCue = this._audioCueService.playAudioCueLoop(AudioCue.chatResponsePending, CHAT_RESPONSE_PENDING_AUDIO_CUE_LOOP_MS);
|
||||
}
|
||||
}, CHAT_RESPONSE_PENDING_AUDIO_CUE_LOOP_MS));
|
||||
}, CHAT_RESPONSE_PENDING_ALLOWANCE_MS));
|
||||
}
|
||||
acceptRequest(): void {
|
||||
this._audioCueService.playAudioCue(AudioCue.chatRequestSent, true);
|
||||
|
|
Loading…
Reference in a new issue