
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
import { localize } from '../../../../nls.js';
import { ConfigurationScope, Extensions } from '../../../../platform/configuration/common/configurationRegistry.js';
import { Registry } from '../../../../platform/registry/common/platform.js';
import { RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
import { workbenchConfigurationNodeBase, Extensions as Extensions$1 } from '../../../common/configuration.js';
import { AccessibilitySignal } from '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';
import { AccessibilityVoiceSettingId, SPEECH_LANGUAGES } from '../../speech/common/speechService.js';
import { ISpeechService } from '../../speech/common/speechService.service.js';
import { Disposable } from '../../../../base/common/lifecycle.js';
import { Event } from '../../../../base/common/event.js';
import { isDefined } from '../../../../base/common/types.js';

const accessibilityHelpIsShown = ( new RawContextKey("accessibilityHelpIsShown", false, true));
const accessibleViewIsShown = ( new RawContextKey("accessibleViewIsShown", false, true));
const accessibleViewSupportsNavigation = ( new RawContextKey("accessibleViewSupportsNavigation", false, true));
const accessibleViewVerbosityEnabled = ( new RawContextKey("accessibleViewVerbosityEnabled", false, true));
const accessibleViewGoToSymbolSupported = ( new RawContextKey("accessibleViewGoToSymbolSupported", false, true));
const accessibleViewOnLastLine = ( new RawContextKey("accessibleViewOnLastLine", false, true));
const accessibleViewCurrentProviderId = ( new RawContextKey("accessibleViewCurrentProviderId", undefined, undefined));
const accessibleViewInCodeBlock = ( new RawContextKey("accessibleViewInCodeBlock", undefined, undefined));
const accessibleViewContainsCodeBlocks = ( new RawContextKey("accessibleViewContainsCodeBlocks", undefined, undefined));
const accessibleViewHasUnassignedKeybindings = ( new RawContextKey("accessibleViewHasUnassignedKeybindings", undefined, undefined));
const accessibleViewHasAssignedKeybindings = ( new RawContextKey("accessibleViewHasAssignedKeybindings", undefined, undefined));
var AccessibilityWorkbenchSettingId;
(function(AccessibilityWorkbenchSettingId) {
    AccessibilityWorkbenchSettingId["DimUnfocusedEnabled"] = "accessibility.dimUnfocused.enabled";
    AccessibilityWorkbenchSettingId["DimUnfocusedOpacity"] = "accessibility.dimUnfocused.opacity";
    AccessibilityWorkbenchSettingId["HideAccessibleView"] = "accessibility.hideAccessibleView";
    AccessibilityWorkbenchSettingId["AccessibleViewCloseOnKeyPress"] = "accessibility.accessibleView.closeOnKeyPress";
    AccessibilityWorkbenchSettingId["VerboseChatProgressUpdates"] = "accessibility.verboseChatProgressUpdates";
    AccessibilityWorkbenchSettingId["ShowChatCheckmarks"] = "accessibility.chat.showCheckmarks";
})(AccessibilityWorkbenchSettingId || (AccessibilityWorkbenchSettingId = {}));
var ViewDimUnfocusedOpacityProperties;
(function(ViewDimUnfocusedOpacityProperties) {
    ViewDimUnfocusedOpacityProperties[ViewDimUnfocusedOpacityProperties["Default"] = 0.75] = "Default";
    ViewDimUnfocusedOpacityProperties[ViewDimUnfocusedOpacityProperties["Minimum"] = 0.2] = "Minimum";
    ViewDimUnfocusedOpacityProperties[ViewDimUnfocusedOpacityProperties["Maximum"] = 1] = "Maximum";
})(
    ViewDimUnfocusedOpacityProperties || (ViewDimUnfocusedOpacityProperties = {})
);
var AccessibilityVerbositySettingId;
(function(AccessibilityVerbositySettingId) {
    AccessibilityVerbositySettingId["Terminal"] = "accessibility.verbosity.terminal";
    AccessibilityVerbositySettingId["DiffEditor"] = "accessibility.verbosity.diffEditor";
    AccessibilityVerbositySettingId["MergeEditor"] = "accessibility.verbosity.mergeEditor";
    AccessibilityVerbositySettingId["Chat"] = "accessibility.verbosity.panelChat";
    AccessibilityVerbositySettingId["InlineChat"] = "accessibility.verbosity.inlineChat";
    AccessibilityVerbositySettingId["TerminalInlineChat"] = "accessibility.verbosity.terminalChat";
    AccessibilityVerbositySettingId["TerminalChatOutput"] = "accessibility.verbosity.terminalChatOutput";
    AccessibilityVerbositySettingId["InlineCompletions"] = "accessibility.verbosity.inlineCompletions";
    AccessibilityVerbositySettingId["KeybindingsEditor"] = "accessibility.verbosity.keybindingsEditor";
    AccessibilityVerbositySettingId["Notebook"] = "accessibility.verbosity.notebook";
    AccessibilityVerbositySettingId["Editor"] = "accessibility.verbosity.editor";
    AccessibilityVerbositySettingId["Hover"] = "accessibility.verbosity.hover";
    AccessibilityVerbositySettingId["Notification"] = "accessibility.verbosity.notification";
    AccessibilityVerbositySettingId["EmptyEditorHint"] = "accessibility.verbosity.emptyEditorHint";
    AccessibilityVerbositySettingId["ReplEditor"] = "accessibility.verbosity.replEditor";
    AccessibilityVerbositySettingId["Comments"] = "accessibility.verbosity.comments";
    AccessibilityVerbositySettingId["DiffEditorActive"] = "accessibility.verbosity.diffEditorActive";
    AccessibilityVerbositySettingId["Debug"] = "accessibility.verbosity.debug";
    AccessibilityVerbositySettingId["Walkthrough"] = "accessibility.verbosity.walkthrough";
    AccessibilityVerbositySettingId["SourceControl"] = "accessibility.verbosity.sourceControl";
    AccessibilityVerbositySettingId["Find"] = "accessibility.verbosity.find";
})(AccessibilityVerbositySettingId || (AccessibilityVerbositySettingId = {}));
const baseVerbosityProperty = {
    type: "boolean",
    default: true,
    tags: ["accessibility"]
};
const accessibilityConfigurationNodeBase = ( Object.freeze({
    id: "accessibility",
    title: ( localize(4329, "Accessibility")),
    type: "object"
}));
const soundFeatureBase = {
    "type": "string",
    "enum": ["auto", "on", "off"],
    "default": "auto",
    "enumDescriptions": [( localize(4330, "Enable sound when a screen reader is attached.")), ( localize(4331, "Enable sound.")), ( localize(4332, "Disable sound."))],
    tags: ["accessibility"]
};
const signalFeatureBase = {
    "type": "object",
    "tags": ["accessibility"],
    additionalProperties: false,
    default: {
        sound: "auto",
        announcement: "auto"
    }
};
const announcementFeatureBase = {
    "type": "string",
    "enum": ["auto", "off"],
    "default": "auto",
    "enumDescriptions": [( localize(
        4333,
        "Enable announcement, will only play when in screen reader optimized mode."
    )), ( localize(4334, "Disable announcement."))],
    tags: ["accessibility"]
};
const defaultNoAnnouncement = {
    "type": "object",
    "tags": ["accessibility"],
    additionalProperties: false,
    "default": {
        "sound": "auto"
    }
};
const configuration = {
    ...accessibilityConfigurationNodeBase,
    scope: ConfigurationScope.RESOURCE,
    properties: {
        [AccessibilityVerbositySettingId.Terminal]: {
            description: ( localize(
                4335,
                "Provide information about how to access the terminal accessibility help menu when the terminal is focused."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.DiffEditor]: {
            description: ( localize(
                4336,
                "Provide information about how to navigate changes in the diff editor when it is focused."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Chat]: {
            description: ( localize(
                4337,
                "Provide information about how to access the chat help menu when the chat input is focused."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.InlineChat]: {
            description: ( localize(
                4338,
                "Provide information about how to access the inline editor chat accessibility help menu and alert with hints that describe how to use the feature when the input is focused."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.TerminalChatOutput]: {
            description: ( localize(
                4339,
                "Provide information about how to open the chat terminal output in the Accessible View."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.InlineCompletions]: {
            description: ( localize(
                4340,
                "Provide information about how to access the inline completions hover and Accessible View."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.KeybindingsEditor]: {
            description: ( localize(
                4341,
                "Provide information about how to change a keybinding in the keybindings editor when a row is focused."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Notebook]: {
            description: ( localize(
                4342,
                "Provide information about how to focus the cell container or inner editor when a notebook cell is focused."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Hover]: {
            description: ( localize(
                4343,
                "Provide information about how to open the hover in an Accessible View."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Notification]: {
            description: ( localize(
                4344,
                "Provide information about how to open the notification in an Accessible View."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.EmptyEditorHint]: {
            description: ( localize(
                4345,
                "Provide information about relevant actions in an empty text editor."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.ReplEditor]: {
            description: ( localize(
                4346,
                "Provide information about how to access the REPL editor accessibility help menu when the REPL editor is focused."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Comments]: {
            description: ( localize(
                4347,
                "Provide information about actions that can be taken in the comment widget or in a file which contains comments."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.DiffEditorActive]: {
            description: ( localize(4348, "Indicate when a diff editor becomes the active editor.")),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Debug]: {
            description: ( localize(
                4349,
                "Provide information about how to access the debug console accessibility help dialog when the debug console or run and debug viewlet is focused. Note that a reload of the window is required for this to take effect."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Walkthrough]: {
            description: ( localize(
                4350,
                "Provide information about how to open the walkthrough in an Accessible View."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityWorkbenchSettingId.AccessibleViewCloseOnKeyPress]: {
            markdownDescription: ( localize(
                4351,
                "On keypress, close the Accessible View and focus the element from which it was invoked."
            )),
            type: "boolean",
            default: true
        },
        [AccessibilityVerbositySettingId.SourceControl]: {
            description: ( localize(
                4352,
                "Provide information about how to access the source control accessibility help menu when the input is focused."
            )),
            ...baseVerbosityProperty
        },
        [AccessibilityVerbositySettingId.Find]: {
            description: ( localize(
                4353,
                "Provide information about how to access the find accessibility help menu when the find input is focused."
            )),
            ...baseVerbosityProperty
        },
        "accessibility.signalOptions.volume": {
            "description": ( localize(4354, "The volume of the sounds in percent (0-100).")),
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "default": 70,
            "tags": ["accessibility"]
        },
        "accessibility.signalOptions.debouncePositionChanges": {
            "description": ( localize(4355, "Whether or not position changes should be debounced")),
            "type": "boolean",
            "default": false,
            "tags": ["accessibility"]
        },
        "accessibility.signalOptions.experimental.delays.general": {
            "type": "object",
            "description": "Delays for all signals besides error and warning at position",
            "additionalProperties": false,
            "properties": {
                "announcement": {
                    "description": ( localize(4356, "The delay in milliseconds before an announcement is made.")),
                    "type": "number",
                    "minimum": 0,
                    "default": 3000
                },
                "sound": {
                    "description": ( localize(4357, "The delay in milliseconds before a sound is played.")),
                    "type": "number",
                    "minimum": 0,
                    "default": 400
                }
            },
            "tags": ["accessibility"]
        },
        "accessibility.signalOptions.experimental.delays.warningAtPosition": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "announcement": {
                    "description": ( localize(
                        4358,
                        "The delay in milliseconds before an announcement is made when there's a warning at the position."
                    )),
                    "type": "number",
                    "minimum": 0,
                    "default": 3000
                },
                "sound": {
                    "description": ( localize(
                        4359,
                        "The delay in milliseconds before a sound is played when there's a warning at the position."
                    )),
                    "type": "number",
                    "minimum": 0,
                    "default": 1000
                }
            },
            "tags": ["accessibility"]
        },
        "accessibility.signalOptions.experimental.delays.errorAtPosition": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "announcement": {
                    "description": ( localize(
                        4360,
                        "The delay in milliseconds before an announcement is made when there's an error at the position."
                    )),
                    "type": "number",
                    "minimum": 0,
                    "default": 3000
                },
                "sound": {
                    "description": ( localize(
                        4361,
                        "The delay in milliseconds before a sound is played when there's an error at the position."
                    )),
                    "type": "number",
                    "minimum": 0,
                    "default": 1000
                }
            },
            "tags": ["accessibility"]
        },
        "accessibility.signals.lineHasBreakpoint": {
            ...signalFeatureBase,
            "description": ( localize(
                4362,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the active line has a breakpoint."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4363, "Plays a sound when the active line has a breakpoint.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4364, "Announces when the active line has a breakpoint.")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.lineHasInlineSuggestion": {
            ...defaultNoAnnouncement,
            "description": ( localize(
                4365,
                "Plays a sound / audio cue when the active line has an inline suggestion."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4366, "Plays a sound when the active line has an inline suggestion.")),
                    ...soundFeatureBase,
                    "default": "off"
                }
            }
        },
        "accessibility.signals.nextEditSuggestion": {
            ...signalFeatureBase,
            "description": ( localize(
                4367,
                "Plays a signal - sound / audio cue and/or announcement (alert) when there is a next edit suggestion."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4368, "Plays a sound when there is a next edit suggestion.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4369, "Announces when there is a next edit suggestion.")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.lineHasError": {
            ...signalFeatureBase,
            "description": ( localize(
                4370,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the active line has an error."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4371, "Plays a sound when the active line has an error.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4372, "Announces when the active line has an error.")),
                    ...announcementFeatureBase,
                    default: "off"
                }
            }
        },
        "accessibility.signals.lineHasFoldedArea": {
            ...signalFeatureBase,
            "description": ( localize(
                4373,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - the active line has a folded area that can be unfolded."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(
                        4374,
                        "Plays a sound when the active line has a folded area that can be unfolded."
                    )),
                    ...soundFeatureBase,
                    default: "off"
                },
                "announcement": {
                    "description": ( localize(
                        4375,
                        "Announces when the active line has a folded area that can be unfolded."
                    )),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.lineHasWarning": {
            ...signalFeatureBase,
            "description": ( localize(
                4376,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the active line has a warning."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4377, "Plays a sound when the active line has a warning.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4378, "Announces when the active line has a warning.")),
                    ...announcementFeatureBase,
                    default: "off"
                }
            }
        },
        "accessibility.signals.positionHasError": {
            ...signalFeatureBase,
            "description": ( localize(
                4379,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the active line has a warning."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4380, "Plays a sound when the active line has a warning.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4381, "Announces when the active line has a warning.")),
                    ...announcementFeatureBase,
                    default: "on"
                }
            }
        },
        "accessibility.signals.positionHasWarning": {
            ...signalFeatureBase,
            "description": ( localize(
                4382,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the active line has a warning."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4383, "Plays a sound when the active line has a warning.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4384, "Announces when the active line has a warning.")),
                    ...announcementFeatureBase,
                    default: "on"
                }
            }
        },
        "accessibility.signals.onDebugBreak": {
            ...signalFeatureBase,
            "description": ( localize(
                4385,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the debugger stopped on a breakpoint."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4386, "Plays a sound when the debugger stopped on a breakpoint.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4387, "Announces when the debugger stopped on a breakpoint.")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.noInlayHints": {
            ...signalFeatureBase,
            "description": ( localize(
                4388,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when trying to read a line with inlay hints that has no inlay hints."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(
                        4389,
                        "Plays a sound when trying to read a line with inlay hints that has no inlay hints."
                    )),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(
                        4390,
                        "Announces when trying to read a line with inlay hints that has no inlay hints."
                    )),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.taskCompleted": {
            ...signalFeatureBase,
            "description": ( localize(
                4391,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a task is completed."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4392, "Plays a sound when a task is completed.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4393, "Announces when a task is completed.")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.taskFailed": {
            ...signalFeatureBase,
            "description": ( localize(
                4394,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a task fails (non-zero exit code)."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4395, "Plays a sound when a task fails (non-zero exit code).")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4396, "Announces when a task fails (non-zero exit code).")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.terminalCommandFailed": {
            ...signalFeatureBase,
            "description": ( localize(
                4397,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a terminal command fails (non-zero exit code) or when a command with such an exit code is navigated to in the accessible view."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(
                        4398,
                        "Plays a sound when a terminal command fails (non-zero exit code) or when a command with such an exit code is navigated to in the accessible view."
                    )),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(
                        4399,
                        "Announces when a terminal command fails (non-zero exit code) or when a command with such an exit code is navigated to in the accessible view."
                    )),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.terminalCommandSucceeded": {
            ...signalFeatureBase,
            "description": ( localize(
                4400,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a terminal command succeeds (zero exit code) or when a command with such an exit code is navigated to in the accessible view."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(
                        4401,
                        "Plays a sound when a terminal command succeeds (zero exit code) or when a command with such an exit code is navigated to in the accessible view."
                    )),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(
                        4402,
                        "Announces when a terminal command succeeds (zero exit code) or when a command with such an exit code is navigated to in the accessible view."
                    )),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.terminalQuickFix": {
            ...signalFeatureBase,
            "description": ( localize(
                4403,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when terminal Quick Fixes are available."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4404, "Plays a sound when terminal Quick Fixes are available.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4405, "Announces when terminal Quick Fixes are available.")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.terminalBell": {
            ...signalFeatureBase,
            "description": ( localize(
                4406,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when the terminal bell is ringing."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4407, "Plays a sound when the terminal bell is ringing.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4408, "Announces when the terminal bell is ringing.")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.diffLineInserted": {
            ...defaultNoAnnouncement,
            "description": ( localize(
                4409,
                "Plays a sound / audio cue when the focus moves to an inserted line in Accessible Diff Viewer mode or to the next/previous change."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(
                        4410,
                        "Plays a sound when the focus moves to an inserted line in Accessible Diff Viewer mode or to the next/previous change."
                    )),
                    ...soundFeatureBase
                }
            }
        },
        "accessibility.signals.diffLineModified": {
            ...defaultNoAnnouncement,
            "description": ( localize(
                4411,
                "Plays a sound / audio cue when the focus moves to an modified line in Accessible Diff Viewer mode or to the next/previous change."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(
                        4412,
                        "Plays a sound when the focus moves to a modified line in Accessible Diff Viewer mode or to the next/previous change."
                    )),
                    ...soundFeatureBase
                }
            }
        },
        "accessibility.signals.diffLineDeleted": {
            ...defaultNoAnnouncement,
            "description": ( localize(
                4413,
                "Plays a sound / audio cue when the focus moves to an deleted line in Accessible Diff Viewer mode or to the next/previous change."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(
                        4414,
                        "Plays a sound when the focus moves to an deleted line in Accessible Diff Viewer mode or to the next/previous change."
                    )),
                    ...soundFeatureBase
                }
            }
        },
        "accessibility.signals.chatEditModifiedFile": {
            ...defaultNoAnnouncement,
            "description": ( localize(
                4415,
                "Plays a sound / audio cue when revealing a file with changes from chat edits"
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4416, "Plays a sound when revealing a file with changes from chat edits")),
                    ...soundFeatureBase
                }
            }
        },
        "accessibility.signals.notebookCellCompleted": {
            ...signalFeatureBase,
            "description": ( localize(
                4417,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a notebook cell execution is successfully completed."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(
                        4418,
                        "Plays a sound when a notebook cell execution is successfully completed."
                    )),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(
                        4419,
                        "Announces when a notebook cell execution is successfully completed."
                    )),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.notebookCellFailed": {
            ...signalFeatureBase,
            "description": ( localize(
                4420,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a notebook cell execution fails."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4421, "Plays a sound when a notebook cell execution fails.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4422, "Announces when a notebook cell execution fails.")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.progress": {
            ...signalFeatureBase,
            "description": ( localize(
                4423,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - on loop while progress is occurring."
            )),
            "default": {
                "sound": "auto",
                "announcement": "off"
            },
            "properties": {
                "sound": {
                    "description": ( localize(4424, "Plays a sound on loop while progress is occurring.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4425, "Alerts on loop while progress is occurring.")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.chatRequestSent": {
            ...signalFeatureBase,
            "description": ( localize(
                4426,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a chat request is made."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4427, "Plays a sound when a chat request is made.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4428, "Announces when a chat request is made.")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.chatResponseReceived": {
            ...defaultNoAnnouncement,
            "description": ( localize(4429, "Plays a sound / audio cue when the response has been received.")),
            "properties": {
                "sound": {
                    "description": ( localize(4430, "Plays a sound on when the response has been received.")),
                    ...soundFeatureBase
                }
            }
        },
        "accessibility.signals.codeActionTriggered": {
            ...defaultNoAnnouncement,
            "description": ( localize(4431, "Plays a sound / audio cue - when a code action has been triggered.")),
            "properties": {
                "sound": {
                    "description": ( localize(4432, "Plays a sound when a code action has been triggered.")),
                    ...soundFeatureBase
                }
            }
        },
        "accessibility.signals.codeActionApplied": {
            ...defaultNoAnnouncement,
            "description": ( localize(4433, "Plays a sound / audio cue when the code action has been applied.")),
            "properties": {
                "sound": {
                    "description": ( localize(4434, "Plays a sound when the code action has been applied.")),
                    ...soundFeatureBase
                }
            }
        },
        "accessibility.signals.voiceRecordingStarted": {
            ...defaultNoAnnouncement,
            "description": ( localize(4435, "Plays a sound / audio cue when the voice recording has started.")),
            "properties": {
                "sound": {
                    "description": ( localize(4436, "Plays a sound when the voice recording has started.")),
                    ...soundFeatureBase
                }
            },
            "default": {
                "sound": "on"
            }
        },
        "accessibility.signals.voiceRecordingStopped": {
            ...defaultNoAnnouncement,
            "description": ( localize(4437, "Plays a sound / audio cue when the voice recording has stopped.")),
            "properties": {
                "sound": {
                    "description": ( localize(4438, "Plays a sound when the voice recording has stopped.")),
                    ...soundFeatureBase,
                    default: "off"
                }
            }
        },
        "accessibility.signals.clear": {
            ...signalFeatureBase,
            "description": ( localize(
                4439,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a feature is cleared (for example, the terminal, Debug Console, or Output channel)."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4440, "Plays a sound when a feature is cleared.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4441, "Announces when a feature is cleared.")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.editsUndone": {
            ...signalFeatureBase,
            "description": ( localize(
                4442,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when edits have been undone."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4443, "Plays a sound when edits have been undone.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4444, "Announces when edits have been undone.")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.editsKept": {
            ...signalFeatureBase,
            "description": ( localize(
                4445,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when edits are kept."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4446, "Plays a sound when edits are kept.")),
                    ...soundFeatureBase
                },
                "announcement": {
                    "description": ( localize(4447, "Announces when edits are kept.")),
                    ...announcementFeatureBase
                }
            }
        },
        "accessibility.signals.save": {
            "type": "object",
            "tags": ["accessibility"],
            additionalProperties: false,
            "markdownDescription": ( localize(
                4448,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a file is saved."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4449, "Plays a sound when a file is saved.")),
                    "type": "string",
                    "enum": ["userGesture", "always", "never"],
                    "default": "never",
                    "enumDescriptions": [( localize(4450, "Plays the sound when a user explicitly saves a file.")), ( localize(4451, "Plays the sound whenever a file is saved, including auto save.")), ( localize(4452, "Never plays the sound."))]
                },
                "announcement": {
                    "description": ( localize(4453, "Announces when a file is saved.")),
                    "type": "string",
                    "enum": ["userGesture", "always", "never"],
                    "default": "never",
                    "enumDescriptions": [( localize(4454, "Announces when a user explicitly saves a file.")), ( localize(4455, "Announces whenever a file is saved, including auto save.")), ( localize(4456, "Never plays the announcement."))]
                }
            },
            default: {
                "sound": "never",
                "announcement": "never"
            }
        },
        "accessibility.signals.format": {
            "type": "object",
            "tags": ["accessibility"],
            additionalProperties: false,
            "markdownDescription": ( localize(
                4457,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when a file or notebook is formatted."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4458, "Plays a sound when a file or notebook is formatted.")),
                    "type": "string",
                    "enum": ["userGesture", "always", "never"],
                    "default": "never",
                    "enumDescriptions": [( localize(4459, "Plays the sound when a user explicitly formats a file.")), ( localize(
                        4460,
                        "Plays the sound whenever a file is formatted, including if it is set to format on save, type, or, paste, or run of a cell."
                    )), ( localize(4461, "Never plays the sound."))]
                },
                "announcement": {
                    "description": ( localize(4462, "Announces when a file or notebook is formatted.")),
                    "type": "string",
                    "enum": ["userGesture", "always", "never"],
                    "default": "never",
                    "enumDescriptions": [( localize(4463, "Announces when a user explicitly formats a file.")), ( localize(
                        4464,
                        "Announces whenever a file is formatted, including if it is set to format on save, type, or, paste, or run of a cell."
                    )), ( localize(4465, "Never announces."))]
                }
            },
            default: {
                "sound": "never",
                "announcement": "never"
            }
        },
        "accessibility.signals.chatUserActionRequired": {
            ...signalFeatureBase,
            "markdownDescription": ( localize(
                4466,
                "Plays a signal - sound (audio cue) and/or announcement (alert) - when user action is required in the chat."
            )),
            "properties": {
                "sound": {
                    "description": ( localize(4467, "Plays a sound when user action is required in the chat.")),
                    "type": "string",
                    "enum": ["auto", "on", "off"],
                    "enumDescriptions": [( localize(4468, "Enable sound when a screen reader is attached.")), ( localize(4331, "Enable sound.")), ( localize(4332, "Disable sound."))]
                },
                "announcement": {
                    "description": ( localize(
                        4469,
                        "Announces when a user action is required in the chat - including information about the action and how to take it."
                    )),
                    ...announcementFeatureBase
                }
            },
            default: {
                "sound": "auto",
                "announcement": "auto"
            },
            tags: ["accessibility"]
        },
        "accessibility.underlineLinks": {
            "type": "boolean",
            "description": ( localize(4470, "Controls whether links should be underlined in the workbench.")),
            "default": false
        },
        "accessibility.debugWatchVariableAnnouncements": {
            "type": "boolean",
            "description": ( localize(
                4471,
                "Controls whether variable changes should be announced in the debug watch view."
            )),
            "default": true
        },
        "accessibility.replEditor.readLastExecutionOutput": {
            "type": "boolean",
            "description": ( localize(
                4472,
                "Controls whether the output from an execution in the native REPL will be announced."
            )),
            "default": true
        },
        "accessibility.replEditor.autoFocusReplExecution": {
            type: "string",
            enum: ["none", "input", "lastExecution"],
            default: "input",
            description: ( localize(
                4473,
                "Control whether focus should automatically be sent to the REPL when code is executed."
            ))
        },
        "accessibility.windowTitleOptimized": {
            "type": "boolean",
            "default": true,
            "markdownDescription": ( localize(
                4474,
                "Controls whether the {0} should be optimized for screen readers when in screen reader mode. When enabled, the window title will have {1} appended to the end.",
                "`#window.title#`",
                "`activeEditorState`"
            ))
        },
        "accessibility.openChatEditedFiles": {
            "type": "boolean",
            "default": false,
            "markdownDescription": ( localize(
                4475,
                "Controls whether files should be opened when the chat agent has applied edits to them."
            ))
        },
        "accessibility.verboseChatProgressUpdates": {
            "type": "boolean",
            "default": true,
            "markdownDescription": ( localize(
                4476,
                "Controls whether verbose progress announcements should be made when a chat request is in progress, including information like searched text for <search term> with X results, created file <file_name>, or read file <file path>."
            ))
        }
    }
};
function registerAccessibilityConfiguration() {
    const registry = ( Registry.as(Extensions.Configuration));
    registry.registerConfiguration(configuration);
    registry.registerConfiguration({
        ...workbenchConfigurationNodeBase,
        properties: {
            [AccessibilityWorkbenchSettingId.DimUnfocusedEnabled]: {
                description: ( localize(
                    4477,
                    "Whether to dim unfocused editors and terminals, which makes it more clear where typed input will go to. This works with the majority of editors with the notable exceptions of those that utilize iframes like notebooks and extension webview editors."
                )),
                type: "boolean",
                default: false,
                tags: ["accessibility"],
                scope: ConfigurationScope.APPLICATION
            },
            [AccessibilityWorkbenchSettingId.DimUnfocusedOpacity]: {
                markdownDescription: ( localize(
                    4478,
                    "The opacity fraction (0.2 to 1.0) to use for unfocused editors and terminals. This will only take effect when {0} is enabled.",
                    `\`#${AccessibilityWorkbenchSettingId.DimUnfocusedEnabled}#\``
                )),
                type: "number",
                minimum: ViewDimUnfocusedOpacityProperties.Minimum,
                maximum: ViewDimUnfocusedOpacityProperties.Maximum,
                default: ViewDimUnfocusedOpacityProperties.Default,
                tags: ["accessibility"],
                scope: ConfigurationScope.APPLICATION
            },
            [AccessibilityWorkbenchSettingId.HideAccessibleView]: {
                description: ( localize(4479, "Controls whether the Accessible View is hidden.")),
                type: "boolean",
                default: false,
                tags: ["accessibility"]
            },
            [AccessibilityWorkbenchSettingId.VerboseChatProgressUpdates]: {
                "type": "boolean",
                "default": true,
                "markdownDescription": ( localize(
                    4476,
                    "Controls whether verbose progress announcements should be made when a chat request is in progress, including information like searched text for <search term> with X results, created file <file_name>, or read file <file path>."
                ))
            },
            [AccessibilityWorkbenchSettingId.ShowChatCheckmarks]: {
                "type": "boolean",
                "default": false,
                "tags": ["accessibility"],
                "markdownDescription": ( localize(
                    4480,
                    "Controls whether checkmark icons are shown on completed tool calls and other collapsible items in chat responses."
                ))
            }
        }
    });
}
const SpeechTimeoutDefault = 0;
let DynamicSpeechAccessibilityConfiguration = class DynamicSpeechAccessibilityConfiguration extends Disposable {
    static {
        this.ID = "workbench.contrib.dynamicSpeechAccessibilityConfiguration";
    }
    constructor(speechService) {
        super();
        this.speechService = speechService;
        this._register(Event.runAndSubscribe(
            speechService.onDidChangeHasSpeechProvider,
            () => this.updateConfiguration()
        ));
    }
    updateConfiguration() {
        if (!this.speechService.hasSpeechProvider) {
            return;
        }
        const languages = this.getLanguages();
        const languagesSorted = ( Object.keys(languages)).sort((langA, langB) => {
            return languages[langA].name.localeCompare(languages[langB].name);
        });
        const registry = ( Registry.as(Extensions.Configuration));
        registry.registerConfiguration({
            ...accessibilityConfigurationNodeBase,
            properties: {
                [AccessibilityVoiceSettingId.SpeechTimeout]: {
                    "markdownDescription": ( localize(
                        4481,
                        "The duration in milliseconds that voice speech recognition remains active after you stop speaking. For example in a chat session, the transcribed text is submitted automatically after the timeout is met. Set to `0` to disable this feature."
                    )),
                    "type": "number",
                    "default": SpeechTimeoutDefault,
                    "minimum": 0,
                    "tags": ["accessibility"]
                },
                [AccessibilityVoiceSettingId.IgnoreCodeBlocks]: {
                    "markdownDescription": ( localize(4482, "Whether to ignore code snippets in text-to-speech synthesis.")),
                    "type": "boolean",
                    "default": false,
                    "tags": ["accessibility"]
                },
                [AccessibilityVoiceSettingId.SpeechLanguage]: {
                    "markdownDescription": ( localize(
                        4483,
                        "The language that text-to-speech and speech-to-text should use. Select `auto` to use the configured display language if possible. Note that not all display languages maybe supported by speech recognition and synthesizers."
                    )),
                    "type": "string",
                    "enum": languagesSorted,
                    "default": "auto",
                    "tags": ["accessibility"],
                    "enumDescriptions": ( languagesSorted.map(key => languages[key].name)),
                    "enumItemLabels": ( languagesSorted.map(key => languages[key].name))
                },
                [AccessibilityVoiceSettingId.AutoSynthesize]: {
                    "type": "string",
                    "enum": ["on", "off"],
                    "enumDescriptions": [( localize(
                        4484,
                        "Enable the feature. When a screen reader is enabled, note that this will disable aria updates."
                    )), ( localize(4485, "Disable the feature."))],
                    "markdownDescription": ( localize(
                        4486,
                        "Whether a textual response should automatically be read out aloud when speech was used as input. For example in a chat session, a response is automatically synthesized when voice was used as chat request."
                    )),
                    "default": "off",
                    "tags": ["accessibility"]
                }
            }
        });
    }
    getLanguages() {
        return {
            ["auto"]: {
                name: ( localize(4487, "Auto (Use Display Language)"))
            },
            ...SPEECH_LANGUAGES
        };
    }
};
DynamicSpeechAccessibilityConfiguration = ( __decorate([( __param(0, ISpeechService))], DynamicSpeechAccessibilityConfiguration));
( Registry.as(Extensions$1.ConfigurationMigration)).registerConfigurationMigrations([{
    key: "audioCues.volume",
    migrateFn: (value, accessor) => {
        return [["accessibility.signalOptions.volume", {
            value
        }], ["audioCues.volume", {
            value: undefined
        }]];
    }
}]);
( Registry.as(Extensions$1.ConfigurationMigration)).registerConfigurationMigrations([{
    key: "audioCues.debouncePositionChanges",
    migrateFn: value => {
        return [["accessibility.signalOptions.debouncePositionChanges", {
            value
        }], ["audioCues.debouncePositionChanges", {
            value: undefined
        }]];
    }
}]);
( Registry.as(Extensions$1.ConfigurationMigration)).registerConfigurationMigrations([{
    key: "accessibility.signalOptions",
    migrateFn: (value, accessor) => {
        const delayGeneral = getDelaysFromConfig(accessor, "general");
        const delayError = getDelaysFromConfig(accessor, "errorAtPosition");
        const delayWarning = getDelaysFromConfig(accessor, "warningAtPosition");
        const volume = getVolumeFromConfig(accessor);
        const debouncePositionChanges = getDebouncePositionChangesFromConfig(accessor);
        const result = [];
        if (!!volume) {
            result.push(["accessibility.signalOptions.volume", {
                value: volume
            }]);
        }
        if (!!delayGeneral) {
            result.push(["accessibility.signalOptions.experimental.delays.general", {
                value: delayGeneral
            }]);
        }
        if (!!delayError) {
            result.push(["accessibility.signalOptions.experimental.delays.errorAtPosition", {
                value: delayError
            }]);
        }
        if (!!delayWarning) {
            result.push(["accessibility.signalOptions.experimental.delays.warningAtPosition", {
                value: delayWarning
            }]);
        }
        if (!!debouncePositionChanges) {
            result.push(["accessibility.signalOptions.debouncePositionChanges", {
                value: debouncePositionChanges
            }]);
        }
        result.push(["accessibility.signalOptions", {
            value: undefined
        }]);
        return result;
    }
}]);
( Registry.as(Extensions$1.ConfigurationMigration)).registerConfigurationMigrations([{
    key: "accessibility.signals.sounds.volume",
    migrateFn: value => {
        return [["accessibility.signalOptions.volume", {
            value
        }], ["accessibility.signals.sounds.volume", {
            value: undefined
        }]];
    }
}]);
( Registry.as(Extensions$1.ConfigurationMigration)).registerConfigurationMigrations([{
    key: "accessibility.signals.debouncePositionChanges",
    migrateFn: value => {
        return [["accessibility.signalOptions.debouncePositionChanges", {
            value
        }], ["accessibility.signals.debouncePositionChanges", {
            value: undefined
        }]];
    }
}]);
function getDelaysFromConfig(accessor, type) {
    return accessor(`accessibility.signalOptions.experimental.delays.${type}`) || accessor("accessibility.signalOptions")?.["experimental.delays"]?.[`${type}`] || accessor("accessibility.signalOptions")?.["delays"]?.[`${type}`];
}
function getVolumeFromConfig(accessor) {
    return accessor("accessibility.signalOptions.volume") || accessor("accessibility.signalOptions")?.volume || accessor("accessibility.signals.sounds.volume") || accessor("audioCues.volume");
}
function getDebouncePositionChangesFromConfig(accessor) {
    return accessor("accessibility.signalOptions.debouncePositionChanges") || accessor("accessibility.signalOptions")?.debouncePositionChanges || accessor("accessibility.signals.debouncePositionChanges") || accessor("audioCues.debouncePositionChanges");
}
( Registry.as(Extensions$1.ConfigurationMigration)).registerConfigurationMigrations([{
    key: AccessibilityVoiceSettingId.AutoSynthesize,
    migrateFn: value => {
        let newValue;
        if (value === true) {
            newValue = "on";
        } else if (value === false) {
            newValue = "off";
        } else {
            return [];
        }
        return [[AccessibilityVoiceSettingId.AutoSynthesize, {
            value: newValue
        }]];
    }
}]);
( Registry.as(Extensions$1.ConfigurationMigration)).registerConfigurationMigrations([{
    key: "accessibility.signals.chatResponsePending",
    migrateFn: (value, accessor) => {
        return [["accessibility.signals.progress", {
            value
        }], ["accessibility.signals.chatResponsePending", {
            value: undefined
        }]];
    }
}]);
( Registry.as(Extensions$1.ConfigurationMigration)).registerConfigurationMigrations(( AccessibilitySignal.allAccessibilitySignals.map(item => item.legacySoundSettingsKey ? ({
    key: item.legacySoundSettingsKey,
    migrateFn: (sound, accessor) => {
        const configurationKeyValuePairs = [];
        const legacyAnnouncementSettingsKey = item.legacyAnnouncementSettingsKey;
        let announcement;
        if (legacyAnnouncementSettingsKey) {
            announcement = accessor(legacyAnnouncementSettingsKey) ?? undefined;
            if (announcement !== undefined && typeof announcement !== "string") {
                announcement = announcement ? "auto" : "off";
            }
        }
        configurationKeyValuePairs.push([`${item.legacySoundSettingsKey}`, {
            value: undefined
        }]);
        configurationKeyValuePairs.push([`${item.settingsKey}`, {
            value: announcement !== undefined ? {
                announcement,
                sound
            } : {
                sound
            }
        }]);
        return configurationKeyValuePairs;
    }
}) : undefined)).filter(isDefined));
( Registry.as(Extensions$1.ConfigurationMigration)).registerConfigurationMigrations(( AccessibilitySignal.allAccessibilitySignals.filter(i => !!i.legacyAnnouncementSettingsKey && !!i.legacySoundSettingsKey).map(item => ({
    key: item.legacyAnnouncementSettingsKey,
    migrateFn: (announcement, accessor) => {
        const configurationKeyValuePairs = [];
        const sound = accessor(item.settingsKey)?.sound || accessor(item.legacySoundSettingsKey);
        if (announcement !== undefined && typeof announcement !== "string") {
            announcement = announcement ? "auto" : "off";
        }
        configurationKeyValuePairs.push([`${item.settingsKey}`, {
            value: announcement !== undefined ? {
                announcement,
                sound
            } : {
                sound
            }
        }]);
        configurationKeyValuePairs.push([`${item.legacyAnnouncementSettingsKey}`, {
            value: undefined
        }]);
        configurationKeyValuePairs.push([`${item.legacySoundSettingsKey}`, {
            value: undefined
        }]);
        return configurationKeyValuePairs;
    }
}))));

export { AccessibilityVerbositySettingId, AccessibilityVoiceSettingId, AccessibilityWorkbenchSettingId, DynamicSpeechAccessibilityConfiguration, SpeechTimeoutDefault, ViewDimUnfocusedOpacityProperties, accessibilityConfigurationNodeBase, accessibilityHelpIsShown, accessibleViewContainsCodeBlocks, accessibleViewCurrentProviderId, accessibleViewGoToSymbolSupported, accessibleViewHasAssignedKeybindings, accessibleViewHasUnassignedKeybindings, accessibleViewInCodeBlock, accessibleViewIsShown, accessibleViewOnLastLine, accessibleViewSupportsNavigation, accessibleViewVerbosityEnabled, announcementFeatureBase, registerAccessibilityConfiguration, soundFeatureBase };
