mirror of https://github.com/microsoft/vscode.git
swap in new chat user action required sound: `MS45_01_ChatUserActionRequired_01_Upd`, set default value for setting to `auto` (#252508)
add MS45_01_ChatUserActionRequired_01_Upd
This commit is contained in:
parent
5a0d98d38b
commit
af52577640
Binary file not shown.
|
@ -760,7 +760,7 @@ const configuration: IConfigurationNode = {
|
|||
'type': 'string',
|
||||
'enum': ['auto', 'on', 'off'],
|
||||
'enumDescriptions': [
|
||||
localize('sound.enabled.autoWindow', "Enable sound when a screen reader is attached or when the current window is not focused."),
|
||||
localize('sound.enabled.autoWindow', "Enable sound when a screen reader is attached."),
|
||||
localize('sound.enabled.on', "Enable sound."),
|
||||
localize('sound.enabled.off', "Disable sound.")
|
||||
],
|
||||
|
@ -771,7 +771,7 @@ const configuration: IConfigurationNode = {
|
|||
},
|
||||
},
|
||||
default: {
|
||||
'sound': 'off',
|
||||
'sound': 'auto',
|
||||
'announcement': 'auto'
|
||||
},
|
||||
tags: ['accessibility']
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { getActiveDocument } from '../../../../base/browser/dom.js';
|
||||
import { renderStringAsPlaintext } from '../../../../base/browser/markdownRenderer.js';
|
||||
import { assertNever } from '../../../../base/common/assert.js';
|
||||
import { RunOnceScheduler } from '../../../../base/common/async.js';
|
||||
|
@ -380,7 +379,6 @@ export class LanguageModelToolsService extends Disposable implements ILanguageMo
|
|||
}
|
||||
|
||||
private playAccessibilitySignal(toolInvocations: ChatToolInvocation[]): void {
|
||||
const hasFocusedWindow = getActiveDocument().hasFocus();
|
||||
const autoApproved = this._configurationService.getValue('chat.tools.autoApprove');
|
||||
if (autoApproved) {
|
||||
return;
|
||||
|
@ -389,7 +387,7 @@ export class LanguageModelToolsService extends Disposable implements ILanguageMo
|
|||
if (!setting) {
|
||||
return;
|
||||
}
|
||||
const soundEnabled = setting.sound === 'on' || (setting.sound === 'auto' && (this._accessibilityService.isScreenReaderOptimized() || !hasFocusedWindow));
|
||||
const soundEnabled = setting.sound === 'on' || (setting.sound === 'auto' && (this._accessibilityService.isScreenReaderOptimized()));
|
||||
const announcementEnabled = this._accessibilityService.isScreenReaderOptimized() && setting.announcement === 'auto';
|
||||
if (soundEnabled || announcementEnabled) {
|
||||
this._accessibilitySignalService.playSignal(AccessibilitySignal.chatUserActionRequired, { customAlertMessage: this._instantiationService.invokeFunction(getToolConfirmationAlert, toolInvocations), userGesture: true, modality: !soundEnabled ? 'announcement' : undefined });
|
||||
|
|
Loading…
Reference in New Issue