"use strict";
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfigKey = exports.XTabProviderId = exports.AzureAuthMode = exports.AuthPermissionMode = exports.AuthProviderId = exports.HARD_TOOL_LIMIT = exports.ConfigurationMigrationRegistry = exports.globalConfigRegistry = exports.AbstractConfigurationService = exports.IConfigurationService = exports.CopilotConfigPrefix = void 0;
exports.getAllConfigKeys = getAllConfigKeys;
exports.registerNextEditProviderId = registerNextEditProviderId;
const services_1 = require("../../../util/common/services");
const errors_1 = require("../../../util/vs/base/common/errors");
const event_1 = require("../../../util/vs/base/common/event");
const lifecycle_1 = require("../../../util/vs/base/common/lifecycle");
const objects = __importStar(require("../../../util/vs/base/common/objects"));
const observable_1 = require("../../../util/vs/base/common/observable");
const types = __importStar(require("../../../util/vs/base/common/types"));
const packagejson_1 = require("../../env/common/packagejson");
const importFilteringOptions_1 = require("../../inlineEdits/common/dataTypes/importFilteringOptions");
const jointCompletionsProviderOptions_1 = require("../../inlineEdits/common/dataTypes/jointCompletionsProviderOptions");
const triggerOptions = __importStar(require("../../inlineEdits/common/dataTypes/triggerOptions"));
const xtabHistoryOptions = __importStar(require("../../inlineEdits/common/dataTypes/xtabHistoryOptions"));
const xtabPromptOptions = __importStar(require("../../inlineEdits/common/dataTypes/xtabPromptOptions"));
const xtabPromptOptions_1 = require("../../inlineEdits/common/dataTypes/xtabPromptOptions");
const responseProcessor_1 = require("../../inlineEdits/common/responseProcessor");
const alternativeContentFormat_1 = require("../../notebook/common/alternativeContentFormat");
const validator_1 = require("./validator");
exports.CopilotConfigPrefix = 'github.copilot';
exports.IConfigurationService = (0, services_1.createServiceIdentifier)('IConfigurationService');
class AbstractConfigurationService extends lifecycle_1.Disposable {
    constructor(copilotTokenStore) {
        super();
        this._onDidChangeConfiguration = this._register(new event_1.Emitter());
        this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;
        this._isInternal = false;
        this.observables = new Map();
        if (copilotTokenStore) {
            this._register(copilotTokenStore.onDidStoreUpdate(() => {
                this._setUserInfo({
                    isInternal: !!copilotTokenStore.copilotToken?.isInternal
                });
            }));
        }
    }
    getConfigMixedWithDefaults(key) {
        if (key.options?.valueIgnoredForExternals && !this._isInternal) {
            return this.getDefaultValue(key);
        }
        const userValue = this.getConfig(key);
        // if user doesn't override the setting, return the default
        if (userValue === undefined) {
            return this.getDefaultValue(key);
        }
        // if user overrides the setting and the setting is an object, combine default with user value, with the preference to user settings
        if (types.isObject(userValue) && types.isObject(key.defaultValue)) {
            // If default is an object apply the default and then apply the setting
            return { ...key.defaultValue, ...userValue };
        }
        return userValue;
    }
    getDefaultValue(key) {
        const defaultValueFromConfig = this.getDefaultValueForConfig(key);
        // Preserve legacy behavior for settings whose code default is undefined.
        // VS Code may return type-default sentinels (false/0/''/null/undefined) from inspect().defaultValue,
        // which should not override an intentional undefined default in code.
        const isTypeDefaultSentinel = defaultValueFromConfig === undefined || defaultValueFromConfig === null || defaultValueFromConfig === false || defaultValueFromConfig === 0 || defaultValueFromConfig === '';
        if (key.defaultValue === undefined && isTypeDefaultSentinel) {
            return key.defaultValue;
        }
        if (defaultValueFromConfig !== undefined) {
            return defaultValueFromConfig;
        }
        return key.defaultValue;
    }
    _setUserInfo(userInfo) {
        if (this._isInternal === userInfo.isInternal) {
            // no change
            return;
        }
        const internalChanged = this._isInternal !== userInfo.isInternal;
        this._isInternal = userInfo.isInternal;
        // collect potential affected settings
        const potentialAffectedKeys = new Set();
        for (const config of exports.globalConfigRegistry.configs.values()) {
            if (internalChanged && config.options?.valueIgnoredForExternals) {
                potentialAffectedKeys.add(config.fullyQualifiedId);
            }
        }
        if (potentialAffectedKeys.size > 0) {
            // fire a fake change event to refresh potential affected settings
            this._onDidChangeConfiguration.fire({
                affectsConfiguration: (section) => {
                    // Check for exact match or prefix match with dot separator
                    for (const key of potentialAffectedKeys) {
                        if (key === section || key.startsWith(section + '.') || section.startsWith(key + '.')) {
                            return true;
                        }
                    }
                    return false;
                }
            });
        }
    }
    updateExperimentBasedConfiguration(treatments) {
        if (treatments.length === 0) {
            return;
        }
        this._onDidChangeConfiguration.fire({ affectsConfiguration: () => true });
    }
    getConfigObservable(key) {
        return this._getObservable_$show2FramesUp(key, () => this.getConfig(key));
    }
    getExperimentBasedConfigObservable(key, experimentationService) {
        return this._getObservable_$show2FramesUp(key, () => this.getExperimentBasedConfig(key, experimentationService));
    }
    _getObservable_$show2FramesUp(key, getValue) {
        let observable = this.observables.get(key.id);
        if (!observable) {
            observable = (0, observable_1.observableFromEventOpts)({ debugName: () => `Configuration Key "${key.id}"` }, (handleChange) => this._register(this.onDidChangeConfiguration(e => {
                if (e.affectsConfiguration(key.fullyQualifiedId)) {
                    handleChange(e);
                }
            })), getValue);
            this.observables.set(key.id, observable);
        }
        return observable;
    }
    /**
     * Checks if the key is configured by the user in any of the configuration scopes.
     */
    isConfigured(key, scope) {
        const inspect = this.inspectConfig(key, scope);
        const isConfigured = (inspect?.globalValue !== undefined
            || inspect?.globalLanguageValue !== undefined
            || inspect?.workspaceFolderValue !== undefined
            || inspect?.workspaceFolderLanguageValue !== undefined
            || inspect?.workspaceValue !== undefined
            || inspect?.workspaceLanguageValue !== undefined);
        return isConfigured;
    }
    getDefaultValueForConfig(key) {
        return undefined;
    }
}
exports.AbstractConfigurationService = AbstractConfigurationService;
let packageJsonDefaults = undefined;
function getPackageJsonDefaults() {
    if (!packageJsonDefaults) {
        packageJsonDefaults = new Map();
        // Use the information in packageJson
        const config = packagejson_1.packageJson.contributes.configuration;
        const propertyGroups = config.map((c) => c.properties);
        const configProps = Object.assign({}, ...propertyGroups);
        for (const key in configProps) {
            packageJsonDefaults.set(key, configProps[key].default);
        }
    }
    return packageJsonDefaults;
}
function toBaseConfig(key, defaultValue, options) {
    const fullyQualifiedId = `${exports.CopilotConfigPrefix}.${key}`;
    const fullyQualifiedOldId = options?.oldKey ? `${exports.CopilotConfigPrefix}.${options.oldKey}` : undefined;
    const packageJsonDefaults = getPackageJsonDefaults();
    const isPublic = packageJsonDefaults.has(fullyQualifiedId);
    const packageJsonDefaultValue = packageJsonDefaults.get(fullyQualifiedId);
    if (isPublic) {
        // make sure the default in the code matches the default in packageJson
        if (!objects.equals(defaultValue, packageJsonDefaultValue)) {
            throw new errors_1.BugIndicatingError(`The default value for setting ${key} is different in packageJson and in code`);
        }
    }
    if (isPublic && options?.valueIgnoredForExternals) {
        throw new errors_1.BugIndicatingError(`The setting ${key} is public, it therefore cannot be restricted to internal!`);
    }
    const advancedSubKey = fullyQualifiedId.startsWith('github.copilot.advanced.') ? fullyQualifiedId.substring('github.copilot.advanced.'.length) : undefined;
    return { id: key, oldId: options?.oldKey, isPublic, fullyQualifiedId, fullyQualifiedOldId, advancedSubKey, defaultValue, options };
}
class ConfigRegistry {
    constructor() {
        /**
         * A map of all registered configs, keyed by their full id, eg `github.copilot.advanced.debug.overrideProxyUrl`.
         */
        this.configs = new Map();
    }
    registerConfig(config) {
        this.configs.set(config.fullyQualifiedId, config);
    }
}
exports.globalConfigRegistry = new ConfigRegistry();
class ConfigurationMigrationRegistryImpl {
    constructor() {
        this.migrations = [];
        this._onDidRegisterConfigurationMigrations = new event_1.Emitter();
        this.onDidRegisterConfigurationMigration = this._onDidRegisterConfigurationMigrations.event;
    }
    registerConfigurationMigrations(configurationMigrations) {
        this.migrations.push(...configurationMigrations);
        this._onDidRegisterConfigurationMigrations.fire(configurationMigrations);
    }
}
exports.ConfigurationMigrationRegistry = new ConfigurationMigrationRegistryImpl();
function defineSetting(key, configType, defaultValue, validator, options, expOptions) {
    if (configType === 1 /* ConfigType.ExperimentBased */) {
        const value = { ...toBaseConfig(key, defaultValue, options), configType: 1 /* ConfigType.ExperimentBased */, experimentName: expOptions?.experimentName, validator };
        if (value.advancedSubKey) {
            // This is a `github.copilot.advanced.*` setting
            throw new errors_1.BugIndicatingError('Shared settings cannot be experiment based');
        }
        exports.globalConfigRegistry.registerConfig(value);
        return value;
    }
    const value = { ...toBaseConfig(key, defaultValue, options), configType: 0 /* ConfigType.Simple */, validator };
    exports.globalConfigRegistry.registerConfig(value);
    return value;
}
function defineTeamInternalSetting(key, configType, defaultValue, validator, options, expOptions) {
    options = { ...options, valueIgnoredForExternals: true };
    return configType === 0 /* ConfigType.Simple */ ? defineSetting(key, configType, defaultValue, validator, options) : defineSetting(key, configType, defaultValue, validator, options, expOptions);
}
function migrateSetting(newKey, oldKey) {
    exports.ConfigurationMigrationRegistry.registerConfigurationMigrations([{
            key: `${exports.CopilotConfigPrefix}.${oldKey}`,
            migrateFn: async (migrationValue) => {
                return [
                    [`${exports.CopilotConfigPrefix}.${newKey}`, { value: migrationValue }],
                    [`${exports.CopilotConfigPrefix}.${oldKey}`, { value: undefined }]
                ];
            }
        }]);
}
function defineAndMigrateSetting(oldKey, newKey, defaultValue, options) {
    migrateSetting(newKey, oldKey);
    return defineSetting(newKey, 0 /* ConfigType.Simple */, defaultValue, undefined, { ...options, oldKey });
}
function defineAndMigrateExpSetting(oldKey, newKey, defaultValue, options, expOptions) {
    migrateSetting(newKey, oldKey);
    return defineSetting(newKey, 1 /* ConfigType.ExperimentBased */, defaultValue, undefined, { ...options, oldKey }, expOptions);
}
// Max CAPI tool count limit
exports.HARD_TOOL_LIMIT = 128;
var AuthProviderId;
(function (AuthProviderId) {
    AuthProviderId["GitHub"] = "github";
    AuthProviderId["GitHubEnterprise"] = "github-enterprise";
    AuthProviderId["Microsoft"] = "microsoft";
})(AuthProviderId || (exports.AuthProviderId = AuthProviderId = {}));
var AuthPermissionMode;
(function (AuthPermissionMode) {
    AuthPermissionMode["Default"] = "default";
    AuthPermissionMode["Minimal"] = "minimal";
})(AuthPermissionMode || (exports.AuthPermissionMode = AuthPermissionMode = {}));
var AzureAuthMode;
(function (AzureAuthMode) {
    AzureAuthMode["EntraId"] = "entraId";
    AzureAuthMode["ApiKey"] = "apiKey";
})(AzureAuthMode || (exports.AzureAuthMode = AzureAuthMode = {}));
(function (AzureAuthMode) {
    /** Microsoft authentication provider ID for VS Code authentication API */
    AzureAuthMode.MICROSOFT_AUTH_PROVIDER = 'microsoft';
    /** Azure Cognitive Services scope for Entra ID authentication */
    AzureAuthMode.COGNITIVE_SERVICES_SCOPE = 'https://cognitiveservices.azure.com/.default';
})(AzureAuthMode || (exports.AzureAuthMode = AzureAuthMode = {}));
exports.XTabProviderId = 'XtabProvider';
var ConfigKey;
(function (ConfigKey) {
    /**
     * These settings are defined in the completions extensions and shared.
     *
     * We should not change the names of these settings without coordinating with Completions extension.
    */
    let Shared;
    (function (Shared) {
        /** Allows for overriding the base domain we use for making requests to the CAPI. This helps CAPI devs develop against a local instance. */
        Shared.DebugOverrideProxyUrl = defineSetting('advanced.debug.overrideProxyUrl', 0 /* ConfigType.Simple */, undefined);
        Shared.DebugOverrideCAPIUrl = defineSetting('advanced.debug.overrideCapiUrl', 0 /* ConfigType.Simple */, undefined);
        Shared.DebugUseNodeFetchFetcher = defineSetting('advanced.debug.useNodeFetchFetcher', 0 /* ConfigType.Simple */, true);
        Shared.DebugUseNodeFetcher = defineSetting('advanced.debug.useNodeFetcher', 0 /* ConfigType.Simple */, false);
        Shared.DebugUseElectronFetcher = defineSetting('advanced.debug.useElectronFetcher', 0 /* ConfigType.Simple */, true);
        Shared.AuthProvider = defineSetting('advanced.authProvider', 0 /* ConfigType.Simple */, AuthProviderId.GitHub);
        Shared.AuthPermissions = defineSetting('advanced.authPermissions', 0 /* ConfigType.Simple */, AuthPermissionMode.Default);
    })(Shared = ConfigKey.Shared || (ConfigKey.Shared = {}));
    /**
     * Advanced settings that are available for all users to configure.
     */
    let Advanced;
    (function (Advanced) {
        /** Allows forcing a particular model.
         * Note: this should not be used while self-hosting because it might lead to
         * a fundamental different experience compared to our end-users.
        */
        Advanced.DebugPromptOverrideString = defineSetting('chat.debug.promptOverrideString', 0 /* ConfigType.Simple */, null);
        Advanced.DebugPromptOverrideFile = defineSetting('chat.debug.promptOverrideFile', 0 /* ConfigType.Simple */, null);
        Advanced.WorkspacePrototypeAdoCodeSearchEndpointOverride = defineAndMigrateSetting('chat.advanced.workspace.prototypeAdoCodeSearchEndpointOverride', 'chat.workspace.prototypeAdoCodeSearchEndpointOverride', '');
        Advanced.FeedbackOnChange = defineAndMigrateSetting('chat.advanced.feedback.onChange', 'chat.feedback.onChange', false);
        Advanced.ReviewIntent = defineAndMigrateSetting('chat.advanced.review.intent', 'chat.review.intent', false);
        /** Enable the new notebook priorities experiment */
        Advanced.NotebookSummaryExperimentEnabled = defineAndMigrateSetting('chat.advanced.notebook.summaryExperimentEnabled', 'chat.notebook.summaryExperimentEnabled', false);
        /** Enable filtering variables by cell document symbols */
        Advanced.NotebookVariableFilteringEnabled = defineAndMigrateSetting('chat.advanced.notebook.variableFilteringEnabled', 'chat.notebook.variableFilteringEnabled', false);
        Advanced.TerminalToDebuggerPatterns = defineAndMigrateSetting('chat.advanced.debugTerminalCommandPatterns', 'chat.debugTerminalCommandPatterns', []);
        Advanced.WorkspaceRecordingEnabled = defineAndMigrateSetting('chat.advanced.localWorkspaceRecording.enabled', 'chat.localWorkspaceRecording.enabled', false);
        Advanced.EditRecordingEnabled = defineAndMigrateSetting('chat.advanced.editRecording.enabled', 'chat.editRecording.enabled', false);
        Advanced.CodeSearchAgentEnabled = defineAndMigrateSetting('chat.advanced.codesearch.agent.enabled', 'chat.codesearch.agent.enabled', true);
        Advanced.AgentTemperature = defineAndMigrateSetting('chat.advanced.agent.temperature', 'chat.agent.temperature', undefined);
        Advanced.EnableUserPreferences = defineAndMigrateSetting('chat.advanced.enableUserPreferences', 'chat.enableUserPreferences', false);
        Advanced.SummarizeAgentConversationHistoryThreshold = defineAndMigrateSetting('chat.advanced.summarizeAgentConversationHistoryThreshold', 'chat.summarizeAgentConversationHistoryThreshold', undefined);
        Advanced.AgentHistorySummarizationMode = defineAndMigrateSetting('chat.advanced.agentHistorySummarizationMode', 'chat.agentHistorySummarizationMode', undefined);
        Advanced.UseResponsesApiTruncation = defineAndMigrateSetting('chat.advanced.useResponsesApiTruncation', 'chat.useResponsesApiTruncation', false);
        Advanced.OmitBaseAgentInstructions = defineAndMigrateSetting('chat.advanced.omitBaseAgentInstructions', 'chat.omitBaseAgentInstructions', false);
        Advanced.CLIShowExternalSessions = defineSetting('chat.cli.showExternalSessions', 0 /* ConfigType.Simple */, true);
        Advanced.CLIPlanExitModeEnabled = defineSetting('chat.cli.planExitMode.enabled', 0 /* ConfigType.Simple */, true);
        Advanced.CLIAutoModelEnabled = defineSetting('chat.cli.autoModel.enabled', 0 /* ConfigType.Simple */, false);
        Advanced.CLIModelDetailsEnabled = defineSetting('chat.agent.modelDetails.enabled', 0 /* ConfigType.Simple */, true);
        Advanced.CLIPlanCommandEnabled = defineSetting('chat.cli.planCommand.enabled', 0 /* ConfigType.Simple */, true);
        Advanced.CLIChatLazyLoadSessionItem = defineSetting('chat.cli.lazyLoadSessionItem.enabled', 0 /* ConfigType.Simple */, true);
        Advanced.CLIAIGenerateBranchNames = defineSetting('chat.cli.aiGenerateBranchNames.enabled', 0 /* ConfigType.Simple */, true);
        Advanced.CLIForkSessionsEnabled = defineSetting('chat.cli.forkSessions.enabled', 0 /* ConfigType.Simple */, true);
        Advanced.CLIMCPServerEnabled = defineAndMigrateSetting('chat.advanced.cli.mcp.enabled', 'chat.cli.mcp.enabled', true);
        Advanced.CLIBranchSupport = defineSetting('chat.cli.branchSupport.enabled', 0 /* ConfigType.Simple */, false);
        Advanced.CLIIsolationOption = defineSetting('chat.cli.isolationOption.enabled', 0 /* ConfigType.Simple */, true);
        Advanced.CLIAutoCommitEnabled = defineSetting('chat.cli.autoCommit.enabled', 0 /* ConfigType.Simple */, true);
        Advanced.CLISessionController = defineSetting('chat.cli.sessionController.enabled', 0 /* ConfigType.Simple */, false);
        Advanced.CLIThinkingEffortEnabled = defineSetting('chat.cli.thinkingEffort.enabled', 0 /* ConfigType.Simple */, true);
        Advanced.CLIRemoteEnabled = defineSetting('chat.cli.remote.enabled', 0 /* ConfigType.Simple */, true);
        Advanced.CLISessionControllerForSessionsApp = defineSetting('chat.cli.sessionControllerForSessionsApp.enabled', 0 /* ConfigType.Simple */, false);
        Advanced.CLITerminalLinks = defineSetting('chat.cli.terminalLinks.enabled', 0 /* ConfigType.Simple */, true);
        Advanced.RequestLoggerMaxEntries = defineAndMigrateSetting('chat.advanced.debug.requestLogger.maxEntries', 'chat.debug.requestLogger.maxEntries', 100);
        // Experiment-based settings
        /** Uses new expanded project labels */
        Advanced.ProjectLabelsExpanded = defineAndMigrateExpSetting('chat.advanced.projectLabels.expanded', 'chat.projectLabels.expanded', false);
        /** Add project labels in default agent */
        Advanced.ProjectLabelsChat = defineAndMigrateExpSetting('chat.advanced.projectLabels.chat', 'chat.projectLabels.chat', false);
        /** Add project labels in default agent */
        Advanced.ProjectLabelsInline = defineAndMigrateExpSetting('chat.advanced.projectLabels.inline', 'chat.projectLabels.inline', false);
        Advanced.WorkspaceMaxLocalIndexSize = defineAndMigrateExpSetting('chat.advanced.workspace.maxLocalIndexSize', 'chat.workspace.maxLocalIndexSize', 100_000);
        Advanced.WorkspaceEnableCodeSearch = defineAndMigrateExpSetting('chat.advanced.workspace.enableCodeSearch', 'chat.workspace.enableCodeSearch', true);
        Advanced.WorkspaceEnableCodeSearchExternalIngest = defineSetting('chat.workspace.codeSearchExternalIngest.enabled', 1 /* ConfigType.ExperimentBased */, true, undefined, undefined, { experimentName: 'copilotchat.config.chat.advanced.workspace.codeSearchExternalIngest.enabled' });
        Advanced.WorkspacePreferredEmbeddingsModel = defineAndMigrateExpSetting('chat.advanced.workspace.preferredEmbeddingsModel', 'chat.workspace.preferredEmbeddingsModel', '');
        Advanced.NotebookAlternativeDocumentFormat = defineAndMigrateExpSetting('chat.advanced.notebook.alternativeFormat', 'chat.notebook.alternativeFormat', alternativeContentFormat_1.AlternativeNotebookFormat.xml);
        Advanced.UseAlternativeNESNotebookFormat = defineAndMigrateExpSetting('chat.advanced.notebook.alternativeNESFormat.enabled', 'chat.notebook.alternativeNESFormat.enabled', false);
        Advanced.InlineChatReasoningEffort = defineSetting('chat.inlineChat.reasoningEffort', 1 /* ConfigType.ExperimentBased */, 'low');
        Advanced.InlineChatEnableThinking = defineSetting('chat.inlineChat.enableThinking', 1 /* ConfigType.ExperimentBased */, false);
        Advanced.InstantApplyShortModelName = defineAndMigrateExpSetting('chat.advanced.instantApply.shortContextModelName', 'chat.instantApply.shortContextModelName', "gpt-4o-instant-apply-full-ft-v66-short" /* CHAT_MODEL.SHORT_INSTANT_APPLY */);
        Advanced.InstantApplyShortContextLimit = defineAndMigrateExpSetting('chat.advanced.instantApply.shortContextLimit', 'chat.instantApply.shortContextLimit', 8000);
        Advanced.PromptFileContext = defineAndMigrateExpSetting('chat.advanced.promptFileContextProvider.enabled', 'chat.promptFileContextProvider.enabled', true);
        Advanced.DefaultToolsGrouped = defineAndMigrateExpSetting('chat.advanced.tools.defaultToolsGrouped', 'chat.tools.defaultToolsGrouped', false);
        Advanced.Gpt5AlternativePatch = defineAndMigrateExpSetting('chat.advanced.gpt5AlternativePatch', 'chat.gpt5AlternativePatch', false);
        Advanced.SearchSubagentToolEnabled = defineSetting('chat.searchSubagent.enabled', 1 /* ConfigType.ExperimentBased */, false);
        /** Use the agentic proxy for the search subagent tool */
        Advanced.SearchSubagentUseAgenticProxy = defineSetting('chat.searchSubagent.useAgenticProxy', 1 /* ConfigType.ExperimentBased */, false);
        /** Model to use for the search subagent. When useAgenticProxy is true, defaults to 'vscode-agentic-search-router-a'. When false, defaults to the main agent model. */
        Advanced.SearchSubagentModel = defineSetting('chat.searchSubagent.model', 1 /* ConfigType.ExperimentBased */, '');
        /** Maximum number of tool calls the search subagent can make */
        Advanced.SearchSubagentToolCallLimit = defineSetting('chat.searchSubagent.toolCallLimit', 1 /* ConfigType.ExperimentBased */, 4);
        /** Enable the thoroughness parameter on the search subagent tool, which adjusts turn limits based on requested thoroughness */
        Advanced.SearchSubagentThoroughnessEnabled = defineSetting('chat.searchSubagent.thoroughnessEnabled', 1 /* ConfigType.ExperimentBased */, false);
        Advanced.ExecutionSubagentToolEnabled = defineSetting('chat.executionSubagent.enabled', 1 /* ConfigType.ExperimentBased */, false);
        Advanced.SkillToolEnabled = defineSetting('chat.skillTool.enabled', 1 /* ConfigType.ExperimentBased */, false);
        /** When enabled, the get_changed_files tool is available to the agent. */
        Advanced.GetChangedFilesToolEnabled = defineSetting('chat.getChangedFilesTool.enabled', 1 /* ConfigType.ExperimentBased */, false);
        /** Model to use for the execution subagent */
        /** Use the agentic proxy for the execution subagent */
        Advanced.ExecutionSubagentUseAgenticProxy = defineSetting('chat.executionSubagent.useAgenticProxy', 1 /* ConfigType.ExperimentBased */, false);
        /** Model to use for the execution subagent. When useAgenticProxy is true, defaults to 'exec-subagent-router-a'. When false, defaults to the main agent model. */
        Advanced.ExecutionSubagentModel = defineSetting('chat.executionSubagent.model', 1 /* ConfigType.ExperimentBased */, '');
        /** Maximum number of tool calls the execution subagent can make */
        Advanced.ExecutionSubagentToolCallLimit = defineSetting('chat.executionSubagent.toolCallLimit', 1 /* ConfigType.ExperimentBased */, 10);
        /** When enabled, the main agent's manage_todo_list tool is disabled and a background copilot-utility-small model maintains the todo list instead. */
        Advanced.BackgroundTodoAgentEnabled = defineSetting('chat.agent.backgroundTodoAgent.enabled', 1 /* ConfigType.ExperimentBased */, false);
        Advanced.InlineEditsTriggerOnEditorChangeAfterSeconds = defineAndMigrateExpSetting('chat.advanced.inlineEdits.triggerOnEditorChangeAfterSeconds', 'chat.inlineEdits.triggerOnEditorChangeAfterSeconds', 10);
        Advanced.InlineEditsNextCursorPredictionDisplayLine = defineAndMigrateExpSetting('chat.advanced.inlineEdits.nextCursorPrediction.displayLine', 'chat.inlineEdits.nextCursorPrediction.displayLine', true);
        Advanced.InlineEditsNextCursorPredictionCurrentFileMaxTokens = defineAndMigrateExpSetting('chat.advanced.inlineEdits.nextCursorPrediction.currentFileMaxTokens', 'chat.inlineEdits.nextCursorPrediction.currentFileMaxTokens', 3000);
        Advanced.InlineEditsRenameSymbolSuggestions = defineSetting('chat.inlineEdits.renameSymbolSuggestions', 1 /* ConfigType.ExperimentBased */, true);
        Advanced.InlineEditsPreferredModel = defineSetting('nextEditSuggestions.preferredModel', 1 /* ConfigType.ExperimentBased */, 'none');
        Advanced.InlineEditsAggressiveness = defineSetting('nextEditSuggestions.eagerness', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.AggressivenessSetting.Default, xtabPromptOptions.AggressivenessSetting.VALIDATOR);
        Advanced.DiagnosticsContextProvider = defineAndMigrateExpSetting('chat.advanced.inlineEdits.diagnosticsContextProvider.enabled', 'chat.inlineEdits.diagnosticsContextProvider.enabled', false);
        Advanced.ChatSessionContextProvider = defineSetting('chat.inlineEdits.chatSessionContextProvider.enabled', 1 /* ConfigType.ExperimentBased */, false);
        Advanced.Gemini3MultiReplaceString = defineSetting('chat.edits.gemini3MultiReplaceString', 1 /* ConfigType.ExperimentBased */, false);
        Advanced.BatchReplaceStringDescriptions = defineSetting('chat.edits.batchReplaceStringDescriptions', 1 /* ConfigType.ExperimentBased */, false);
        Advanced.AgentOmitFileAttachmentContents = defineSetting('chat.agent.omitFileAttachmentContents', 1 /* ConfigType.ExperimentBased */, false);
        /**
         * Settings for switch between old tools and new skills
         */
        Advanced.InstallExtensionSkillEnabled = defineSetting('chat.installExtensionSkill.enabled', 1 /* ConfigType.ExperimentBased */, false);
        Advanced.ProjectSetupInfoSkillEnabled = defineSetting('chat.projectSetupInfoSkill.enabled', 1 /* ConfigType.ExperimentBased */, false);
        /**
         * When enabled, large tool results (above the threshold in bytes) are written to disk
         * instead of being included directly in the prompt. This helps manage context window usage.
         */
        Advanced.LargeToolResultsToDiskEnabled = defineSetting('chat.agent.largeToolResultsToDisk.enabled', 1 /* ConfigType.ExperimentBased */, true);
        /**
         * The size threshold in bytes above which tool results are written to disk.
         * Only applies when LargeToolResultsToDiskEnabled is true.
         */
        Advanced.LargeToolResultsToDiskThreshold = defineSetting('chat.agent.largeToolResultsToDisk.thresholdBytes', 1 /* ConfigType.ExperimentBased */, 8 * 1024);
        /** Simulate GitHub authentication failures for testing. Can't be TeamInternal because we lose these flags as part of testing. */
        Advanced.DebugGitHubAuthFailWith = defineSetting('chat.debug.githubAuthFailWith', 0 /* ConfigType.Simple */, null);
        // Agent debug logging settings — fileLogging.enabled is the canonical toggle
        /** @deprecated Use ChatDebugFileLogging instead. Kept during experiment transition. */
        Advanced.AgentDebugLogEnabled = defineAndMigrateExpSetting('agentDebugLog.enabled', 'chat.agentDebugLog.enabled', false);
        Advanced.ChatDebugFileLogging = defineAndMigrateExpSetting('chat.chatDebug.fileLogging.enabled', 'chat.agentDebugLog.fileLogging.enabled', false);
        Advanced.ChatDebugFileLoggingFlushInterval = defineAndMigrateSetting('chat.chatDebug.fileLogging.flushIntervalMs', 'chat.agentDebugLog.fileLogging.flushIntervalMs', 4000);
        Advanced.ChatDebugFileLoggingMaxRetainedSessionLogs = defineSetting('chat.agentDebugLog.fileLogging.maxRetainedSessionLogs', 1 /* ConfigType.ExperimentBased */, 50);
        Advanced.ChatDebugFileLoggingMaxSessionLogSizeMB = defineSetting('chat.agentDebugLog.fileLogging.maxSessionLogSizeMB', 1 /* ConfigType.ExperimentBased */, 100);
        // OTel settings
        Advanced.OTelEnabled = defineSetting('chat.otel.enabled', 0 /* ConfigType.Simple */, false);
        Advanced.OTelExporterType = defineSetting('chat.otel.exporterType', 0 /* ConfigType.Simple */, 'otlp-http');
        Advanced.OTelOtlpEndpoint = defineSetting('chat.otel.otlpEndpoint', 0 /* ConfigType.Simple */, 'http://localhost:4318');
        Advanced.OTelCaptureContent = defineSetting('chat.otel.captureContent', 0 /* ConfigType.Simple */, false);
        Advanced.OTelMaxAttributeSizeChars = defineSetting('chat.otel.maxAttributeSizeChars', 0 /* ConfigType.Simple */, 0);
        Advanced.OTelOutfile = defineSetting('chat.otel.outfile', 0 /* ConfigType.Simple */, '');
        Advanced.OTelDbSpanExporter = defineSetting('chat.otel.dbSpanExporter.enabled', 0 /* ConfigType.Simple */, false);
        /** Internal: override reasoning/thinking effort sent to model APIs (e.g. Responses API, Messages API). Used by evals. */
        Advanced.ReasoningEffortOverride = defineSetting('chat.reasoningEffortOverride', 0 /* ConfigType.Simple */, null);
        /** Enable extended (1 hour) prompt cache TTL on tools and system blocks for the Anthropic Messages API. Applied to Claude Opus 4.5/4.6/4.7 and Sonnet 4.5/4.6 variants. */
        Advanced.AnthropicExtendedCacheTtl = defineSetting('chat.anthropic.promptCaching.extendedTtl', 1 /* ConfigType.ExperimentBased */, false);
        /** Enable extended (1 hour) prompt cache TTL on the rolling message-level breakpoints (last cacheable user/tool-result blocks) for the Anthropic Messages API. Same model/location/subagent gating as {@link AnthropicExtendedCacheTtl}. */
        Advanced.AnthropicExtendedCacheTtlMessages = defineSetting('chat.anthropic.promptCaching.extendedTtlMessages', 1 /* ConfigType.ExperimentBased */, false);
        /** Freeze the customizations-index variable (the `<instructions>`/`<skills>`/`<agents>` block) at the first turn of a conversation and reuse it on subsequent turns. Prevents the system prompt cache from being invalidated by per-turn churn — e.g. the active mode swapping which subagent entry appears in `<agents>`, or async experimentation flipping a `when`-gated skill. */
        Advanced.FreezeCustomizationsIndex = defineSetting('chat.freezeCustomizationsIndex', 1 /* ConfigType.ExperimentBased */, true);
        Advanced.InlineEditsXtabProviderModelConfiguration = (() => {
            const oldKey = 'chat.advanced.inlineEdits.xtabProvider.modelConfiguration';
            const newKey = 'chat.inlineEdits.xtabProvider.modelConfiguration';
            migrateSetting(newKey, oldKey);
            return defineSetting(newKey, 0 /* ConfigType.Simple */, null, xtabPromptOptions.MODEL_CONFIGURATION_VALIDATOR, { oldKey });
        })();
    })(Advanced = ConfigKey.Advanced || (ConfigKey.Advanced = {}));
    /**
     * Internal settings those only team members can configure
     * Features should only be in this list temporarily, moving on to experimental to be accessible to early adopters.
    */
    let TeamInternal;
    (function (TeamInternal) {
        /** Allows forcing a particular context window size.
         * This setting doesn't validate values so large windows may not be supported by the model.
         * Note: this should not be used while self-hosting because it might lead to
         * a fundamental different experience compared to our end-users.
         */
        TeamInternal.DebugOverrideChatMaxTokenNum = defineTeamInternalSetting('chat.advanced.debug.overrideChatMaxTokenNum', 0 /* ConfigType.Simple */, 0);
        /** Allow reporting issue when clicking on the Unhelpful button
         * Requires a window reload to take effect
         */
        TeamInternal.DebugReportFeedback = defineTeamInternalSetting('chat.advanced.debug.reportFeedback', 0 /* ConfigType.Simple */, false);
        TeamInternal.DisableRepoInfoTelemetry = defineTeamInternalSetting('chat.advanced.debug.disableRepoInfoTelemetry', 0 /* ConfigType.Simple */, false);
        TeamInternal.InlineEditsIgnoreCompletionsDisablement = defineTeamInternalSetting('chat.advanced.inlineEdits.ignoreCompletionsDisablement', 0 /* ConfigType.Simple */, false, (0, validator_1.vBoolean)());
        TeamInternal.InlineEditsModelPickerEnabled = defineTeamInternalSetting('chat.advanced.inlineEdits.modelPicker.enabled', 1 /* ConfigType.ExperimentBased */, false, (0, validator_1.vBoolean)());
        TeamInternal.InlineEditsUseSlashModels = defineTeamInternalSetting('chat.advanced.inlineEdits.useSlashModels', 1 /* ConfigType.ExperimentBased */, true);
        TeamInternal.InlineEditsLogContextRecorderEnabled = defineTeamInternalSetting('chat.advanced.inlineEdits.logContextRecorder.enabled', 0 /* ConfigType.Simple */, false);
        TeamInternal.InlineEditsHideInternalInterface = defineTeamInternalSetting('chat.advanced.inlineEdits.hideInternalInterface', 0 /* ConfigType.Simple */, false, (0, validator_1.vBoolean)());
        TeamInternal.InlineEditsLogCancelledRequests = defineTeamInternalSetting('chat.advanced.inlineEdits.logCancelledRequests', 0 /* ConfigType.Simple */, false, (0, validator_1.vBoolean)());
        TeamInternal.InlineEditsNextCursorPredictionUrl = defineTeamInternalSetting('chat.advanced.inlineEdits.nextCursorPrediction.url', 0 /* ConfigType.Simple */, undefined, (0, validator_1.vString)());
        TeamInternal.InlineEditsNextCursorPredictionApiKey = defineTeamInternalSetting('chat.advanced.inlineEdits.nextCursorPrediction.apiKey', 0 /* ConfigType.Simple */, undefined, (0, validator_1.vString)());
        TeamInternal.InlineEditsXtabProviderUrl = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.url', 0 /* ConfigType.Simple */, undefined, (0, validator_1.vString)());
        TeamInternal.InlineEditsXtabProviderApiKey = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.apiKey', 0 /* ConfigType.Simple */, undefined, (0, validator_1.vString)());
        TeamInternal.InlineEditsNextCursorPredictionLintOptions = defineTeamInternalSetting('chat.advanced.inlineEdits.nextCursorPrediction.lintOptions', 0 /* ConfigType.Simple */, undefined, xtabPromptOptions.LINT_OPTIONS_VALIDATOR);
        TeamInternal.InlineEditsInlineCompletionsEnabled = defineTeamInternalSetting('chat.advanced.inlineEdits.inlineCompletions.enabled', 0 /* ConfigType.Simple */, true, (0, validator_1.vBoolean)());
        TeamInternal.InlineEditsInlineCompletionsAdvanced = defineTeamInternalSetting('chat.advanced.inlineEdits.inlineCompletions.advancedDetection', 1 /* ConfigType.ExperimentBased */, true, (0, validator_1.vBoolean)());
        /**
         * When enabled, a cached NES suggestion that was once rendered as an inline
         * (ghost text at cursor) suggestion will not be re-served from cache unless
         * it can again be rendered as an inline suggestion. The cache entry is not
         * evicted — it is simply gated until the cursor returns to an
         * inline-renderable position.
         */
        TeamInternal.InlineEditsNesMimicGhostTextBehavior = defineTeamInternalSetting('chat.advanced.inlineEdits.nesMimicGhostTextBehavior', 1 /* ConfigType.ExperimentBased */, false, (0, validator_1.vBoolean)());
        TeamInternal.InlineEditsXtabProviderUsePrediction = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.usePrediction', 1 /* ConfigType.ExperimentBased */, true, (0, validator_1.vBoolean)());
        TeamInternal.InlineEditsXtabLanguageContextEnabledLanguages = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.languageContext.enabledLanguages', 0 /* ConfigType.Simple */, xtabPromptOptions_1.LANGUAGE_CONTEXT_ENABLED_LANGUAGES);
        TeamInternal.InlineEditsXtabLanguageContextTraitsPosition = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.languageContext.traitsPosition', 1 /* ConfigType.ExperimentBased */, 'before');
        TeamInternal.InlineEditsDiagnosticsExplorationEnabled = defineTeamInternalSetting('chat.advanced.inlineEdits.inlineEditsDiagnosticsExplorationEnabled', 0 /* ConfigType.Simple */, false);
        TeamInternal.InternalWelcomeHintEnabled = defineTeamInternalSetting('chat.advanced.welcomePageHint.enabled', 0 /* ConfigType.Simple */, false);
        TeamInternal.InlineChatUseCodeMapper = defineTeamInternalSetting('chat.advanced.inlineChat.useCodeMapper', 0 /* ConfigType.Simple */, false);
        TeamInternal.EnablePromptRendererTracing = defineTeamInternalSetting('chat.advanced.promptRenderer.trace', 0 /* ConfigType.Simple */, false);
        // Backed by Experiments
        TeamInternal.DebugCollectFetcherTelemetry = defineTeamInternalSetting('chat.advanced.debug.collectFetcherTelemetry', 1 /* ConfigType.ExperimentBased */, true);
        TeamInternal.DebugShowNetworkStatus = defineTeamInternalSetting('chat.advanced.debug.showNetworkStatus', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.GeminiFunctionCallingMode = defineTeamInternalSetting('chat.advanced.gemini.functionCallingMode', 1 /* ConfigType.ExperimentBased */, 'validated');
        TeamInternal.ModelProviderPreference = defineTeamInternalSetting('chat.advanced.modelProviderPreference', 0 /* ConfigType.Simple */, undefined, (0, validator_1.vString)());
        TeamInternal.UseVSCodeTelemetryLibForGH = defineTeamInternalSetting('chat.advanced.telemetry.useVSCodeTelemetryLibForGH', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.DebugExpUseNodeFetchFetcher = defineTeamInternalSetting('chat.advanced.debug.useNodeFetchFetcher', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.DebugExpUseNodeFetcher = defineTeamInternalSetting('chat.advanced.debug.useNodeFetcher', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.DebugExpUseElectronFetcher = defineTeamInternalSetting('chat.advanced.debug.useElectronFetcher', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsAsyncCompletions = defineTeamInternalSetting('chat.advanced.inlineEdits.asyncCompletions', 1 /* ConfigType.ExperimentBased */, true);
        TeamInternal.InlineEditsEagerBackupRequest = defineTeamInternalSetting('chat.advanced.inlineEdits.eagerBackupRequest', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.InlineEditsDebounceUseCoreRequestTime = defineTeamInternalSetting('chat.advanced.inlineEdits.debounceUseCoreRequestTime', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.InlineEditsYieldToCopilot = defineTeamInternalSetting('chat.advanced.inlineEdits.yieldToCopilot', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.InlineEditsExcludedProviders = defineTeamInternalSetting('chat.advanced.inlineEdits.excludedProviders', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsEnableGhCompletionsProvider = defineTeamInternalSetting('chat.advanced.inlineEdits.githubCompletionsProvider.enabled', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.InlineEditsCompletionsUrl = defineTeamInternalSetting('chat.advanced.inlineEdits.completionsProvider.url', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsDebounce = defineTeamInternalSetting('chat.advanced.inlineEdits.debounce', 1 /* ConfigType.ExperimentBased */, 100);
        TeamInternal.InlineEditsCacheCursorDistanceCheck = defineTeamInternalSetting('chat.advanced.inlineEdits.cacheCursorDistanceCheck', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.InlineEditsCacheDelay = defineTeamInternalSetting('chat.advanced.inlineEdits.cacheDelay', 1 /* ConfigType.ExperimentBased */, 200);
        TeamInternal.InlineEditsSubsequentCacheDelay = defineTeamInternalSetting('chat.advanced.inlineEdits.subsequentCacheDelay', 1 /* ConfigType.ExperimentBased */, 0);
        TeamInternal.InlineEditsSpeculativeRequestDelay = defineTeamInternalSetting('chat.advanced.inlineEdits.speculativeRequestDelay', 1 /* ConfigType.ExperimentBased */, 0);
        TeamInternal.InlineEditsRebasedCacheDelay = defineTeamInternalSetting('chat.advanced.inlineEdits.rebasedCacheDelay', 1 /* ConfigType.ExperimentBased */, 0);
        TeamInternal.InlineEditsAbsorbSubsequenceTyping = defineTeamInternalSetting('chat.advanced.inlineEdits.absorbSubsequenceTyping', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.InlineEditsReverseAgreement = defineTeamInternalSetting('chat.advanced.inlineEdits.reverseAgreement', 1 /* ConfigType.ExperimentBased */, true);
        TeamInternal.InlineEditsMaxImperfectAgreementLength = defineTeamInternalSetting('chat.advanced.inlineEdits.maxImperfectAgreementLength', 1 /* ConfigType.ExperimentBased */, 5, (0, validator_1.vNumber)());
        TeamInternal.InlineEditsBackoffDebounceEnabled = defineTeamInternalSetting('chat.advanced.inlineEdits.backoffDebounceEnabled', 1 /* ConfigType.ExperimentBased */, true);
        TeamInternal.InlineEditsExtraDebounceEndOfLine = defineTeamInternalSetting('chat.advanced.inlineEdits.extraDebounceEndOfLine', 1 /* ConfigType.ExperimentBased */, 2000);
        TeamInternal.InlineEditsSpeculativeRequests = defineTeamInternalSetting('chat.advanced.inlineEdits.speculativeRequests', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions_1.SpeculativeRequestsEnablement.Off, xtabPromptOptions_1.SpeculativeRequestsEnablement.VALIDATOR);
        TeamInternal.InlineEditsSpeculativeRequestsCursorPlacement = defineTeamInternalSetting('chat.advanced.inlineEdits.speculativeRequestsCursorPlacement', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions_1.SpeculativeRequestsCursorPlacement.AfterEditApplied, xtabPromptOptions_1.SpeculativeRequestsCursorPlacement.VALIDATOR);
        TeamInternal.InlineEditsSpeculativeRequestsAutoExpandEditWindowLines = defineTeamInternalSetting('chat.advanced.inlineEdits.speculativeRequestsAutoExpandEditWindowLines', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions_1.SpeculativeRequestsAutoExpandEditWindowLines.Off, xtabPromptOptions_1.SpeculativeRequestsAutoExpandEditWindowLines.VALIDATOR);
        TeamInternal.InlineEditsExtraDebounceInlineSuggestion = defineTeamInternalSetting('chat.advanced.inlineEdits.extraDebounceInlineSuggestion', 1 /* ConfigType.ExperimentBased */, 0);
        TeamInternal.InlineEditsDebounceOnSelectionChange = defineTeamInternalSetting('chat.advanced.inlineEdits.debounceOnSelectionChange', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsTriggerOnEditorChangeStrategy = defineTeamInternalSetting('chat.advanced.inlineEdits.triggerOnEditorChangeStrategy', 1 /* ConfigType.ExperimentBased */, triggerOptions.DocumentSwitchTriggerStrategy.AfterAcceptance, triggerOptions.DocumentSwitchTriggerStrategy.VALIDATOR);
        TeamInternal.InlineEditsProviderId = defineTeamInternalSetting('chat.advanced.inlineEdits.providerId', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsUnification = defineTeamInternalSetting('chat.advanced.inlineEdits.unification', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.InlineEditsNextCursorPredictionModelName = defineTeamInternalSetting('chat.advanced.inlineEdits.nextCursorPrediction.modelName', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsNextCursorPredictionUseEndpointProvider = defineTeamInternalSetting('chat.advanced.inlineEdits.nextCursorPrediction.useEndpointProvider', 0 /* ConfigType.Simple */, false, (0, validator_1.vBoolean)());
        TeamInternal.InlineEditsNextCursorPredictionMaxResponseTokens = defineTeamInternalSetting('chat.advanced.inlineEdits.nextCursorPrediction.maxResponseTokens', 1 /* ConfigType.ExperimentBased */, 40);
        TeamInternal.InlineEditsNextCursorPredictionLintOptionsString = defineTeamInternalSetting('chat.advanced.inlineEdits.nextCursorPrediction.lintOptionsString', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsXtabProviderModelConfigurationString = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.modelConfigurationString', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsXtabProviderDefaultModelConfigurationString = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.defaultModelConfigurationString', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsXtabProviderUseVaryingLinesAbove = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.useVaryingLinesAbove', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsXtabProviderNLinesAbove = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.nLinesAbove', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsXtabProviderNLinesBelow = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.nLinesBelow', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsAutoExpandEditWindowLines = defineTeamInternalSetting('chat.advanced.inlineEdits.autoExpandEditWindowLines', 1 /* ConfigType.ExperimentBased */, 10);
        TeamInternal.InlineEditsXtabNRecentlyViewedDocuments = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.nRecentlyViewedDocuments', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.recentlyViewedDocuments.nDocuments);
        TeamInternal.InlineEditsXtabRecentlyViewedDocumentsMaxTokens = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.recentlyViewedDocuments.maxTokens', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.recentlyViewedDocuments.maxTokens);
        TeamInternal.InlineEditsXtabRecentlyViewedIncludeLineNumbers = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.recentlyViewedDocuments.includeLineNumbers', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.recentlyViewedDocuments.includeLineNumbers);
        TeamInternal.InlineEditsNextCursorPredictionRecentSnippetsIncludeLineNumbers = defineTeamInternalSetting('chat.advanced.inlineEdits.nextCursorPrediction.recentSnippets.includeLineNumbers', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.IncludeLineNumbersOption.None);
        TeamInternal.InlineEditsXtabDiffNEntries = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.diffNEntries', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.diffHistory.nEntries);
        TeamInternal.InlineEditsXtabDiffMaxTokens = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.diffMaxTokens', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.diffHistory.maxTokens);
        TeamInternal.InlineEditsXtabDiffMergeStrategy = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.diffMergeStrategy', 1 /* ConfigType.ExperimentBased */, xtabHistoryOptions.DiffHistoryMergeStrategy.SameStartLine, xtabHistoryOptions.DiffHistoryMergeStrategy.VALIDATOR);
        TeamInternal.InlineEditsXtabDiffMergeLineGap = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.diffMergeLineGap', 1 /* ConfigType.ExperimentBased */, 0, (0, validator_1.vNumber)());
        TeamInternal.InlineEditsXtabDiffMergeSplitAfterMs = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.diffMergeSplitAfterMs', 1 /* ConfigType.ExperimentBased */, 100, (0, validator_1.vNumber)());
        TeamInternal.InlineEditsXtabProviderEmitFastCursorLineChange = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.emitFastCursorLineChange', 1 /* ConfigType.ExperimentBased */, "additiveOnly" /* ResponseProcessor.EmitFastCursorLineChange.AdditiveOnly */);
        TeamInternal.InlineEditsXtabIncludeViewedFiles = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.includeViewedFiles', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.recentlyViewedDocuments.includeViewedFiles);
        TeamInternal.InlineEditsXtabRecentlyViewedClippingStrategy = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.recentlyViewedDocuments.clippingStrategy', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.recentlyViewedDocuments.clippingStrategy, xtabPromptOptions.RecentFileClippingStrategy.VALIDATOR);
        TeamInternal.InlineEditsXtabPageSize = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.pageSize', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.pagedClipping.pageSize);
        TeamInternal.InlineEditsXtabEditWindowMaxTokens = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.editWindowMaxTokens', 1 /* ConfigType.ExperimentBased */, 2000);
        TeamInternal.InlineEditsXtabIncludeTagsInCurrentFile = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.includeTagsInCurrentFile', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.currentFile.includeTags);
        TeamInternal.InlineEditsXtabIncludeLineNumbersInCurrentFile = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.includeLineNumbersInCurrentFile', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.currentFile.includeLineNumbers);
        TeamInternal.InlineEditsXtabIncludeCursorTagInCurrentFile = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.includeCursorTagInCurrentFile', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.currentFile.includeCursorTag);
        TeamInternal.InlineEditsXtabCurrentFileMaxTokens = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.currentFileMaxTokens', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.currentFile.maxTokens);
        TeamInternal.InlineEditsXtabPrioritizeAboveCursor = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.currentFile.prioritizeAboveCursor', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.currentFile.prioritizeAboveCursor);
        TeamInternal.InlineEditsXtabDiffOnlyForDocsInPrompt = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.diffOnlyForDocsInPrompt', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.diffHistory.onlyForDocsInPrompt);
        TeamInternal.InlineEditsXtabDiffUseRelativePaths = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.diffUseRelativePaths', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.diffHistory.useRelativePaths);
        TeamInternal.InlineEditsXtabNNonSignificantLinesToConverge = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.nNonSignificantLinesToConverge', 1 /* ConfigType.ExperimentBased */, responseProcessor_1.ResponseProcessor.DEFAULT_DIFF_PARAMS.nLinesToConverge);
        TeamInternal.InlineEditsXtabNSignificantLinesToConverge = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.nSignificantLinesToConverge', 1 /* ConfigType.ExperimentBased */, responseProcessor_1.ResponseProcessor.DEFAULT_DIFF_PARAMS.nSignificantLinesToConverge);
        TeamInternal.InlineEditsXtabEarlyCursorLineDivergenceCancellation = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.earlyCursorLineDivergenceCancellation', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions_1.EarlyDivergenceCancellationMode.Off, xtabPromptOptions_1.EarlyDivergenceCancellationMode.VALIDATOR);
        TeamInternal.InlineEditsXtabLanguageContextEnabled = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.languageContext.enabled', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.languageContext.enabled);
        TeamInternal.InlineEditsXtabLanguageContextMaxTokens = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.languageContext.maxTokens', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.languageContext.maxTokens);
        TeamInternal.InlineEditsXtabIncludeNeighborFiles = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.neighborFiles.enabled', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.neighborFiles.enabled);
        TeamInternal.InlineEditsXtabNeighborFilesMaxTokens = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.neighborFiles.maxTokens', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.DEFAULT_OPTIONS.neighborFiles.maxTokens);
        TeamInternal.InlineEditsXtabGlobalBudgetEnabled = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.globalBudget.enabled', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.InlineEditsXtabGlobalBudgetTotalTokens = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.globalBudget.totalTokens', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions.GlobalBudgetOptions.DEFAULT_TOTAL_TOKENS);
        TeamInternal.InlineEditsXtabMaxMergeConflictLines = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.maxMergeConflictLines', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsXtabOnlyMergeConflictLines = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.onlyMergeConflictLines', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.InlineEditsXtabDuplicateAdditionsMode = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.diffPatch.duplicateAdditionsMode', 1 /* ConfigType.ExperimentBased */, xtabPromptOptions_1.DuplicateAdditionsMode.Off, xtabPromptOptions_1.DuplicateAdditionsMode.VALIDATOR);
        TeamInternal.InlineEditsXtabAggressivenessLevel = defineTeamInternalSetting('chat.advanced.inlineEdits.xtabProvider.aggressivenessLevel', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsAggressivenessLowMinResponseTimeMs = defineTeamInternalSetting('chat.advanced.inlineEdits.aggressiveness.lowMinResponseTimeMs', 1 /* ConfigType.ExperimentBased */, 1500);
        TeamInternal.InlineEditsAggressivenessMediumMinResponseTimeMs = defineTeamInternalSetting('chat.advanced.inlineEdits.aggressiveness.mediumMinResponseTimeMs', 1 /* ConfigType.ExperimentBased */, 700);
        TeamInternal.InlineEditsAggressivenessHighDebounceMs = defineTeamInternalSetting('chat.advanced.inlineEdits.aggressiveness.highDebounceMs', 1 /* ConfigType.ExperimentBased */, 0);
        TeamInternal.InlineEditsUserHappinessScoreConfigurationString = defineTeamInternalSetting('chat.advanced.inlineEdits.adaptiveAggressivenessConfigurationString', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.InlineEditsUndoInsertionFiltering = defineTeamInternalSetting('chat.advanced.inlineEdits.undoInsertionFiltering', 1 /* ConfigType.ExperimentBased */, 'v1');
        TeamInternal.InlineEditsFilterOutEditsWithSubstrings = defineTeamInternalSetting('chat.advanced.inlineEdits.filterOutEditsWithSubstrings', 1 /* ConfigType.ExperimentBased */, '<|current_file_content|>,<|/current_file_content|>,<|diff_marker|>');
        TeamInternal.InlineEditsAllowImportChanges = defineTeamInternalSetting('chat.advanced.inlineEdits.allowImportChanges', 1 /* ConfigType.ExperimentBased */, importFilteringOptions_1.ImportChanges.None, importFilteringOptions_1.ImportChanges.VALIDATOR);
        TeamInternal.InlineEditsIgnoreWhenSuggestVisible = defineTeamInternalSetting('chat.advanced.inlineEdits.ignoreWhenSuggestVisible', 1 /* ConfigType.ExperimentBased */, true);
        TeamInternal.InlineEditsJointCompletionsProviderEnabled = defineTeamInternalSetting('chat.advanced.inlineEdits.jointCompletionsProvider.enabled', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.InlineEditsJointCompletionsProviderStrategy = defineTeamInternalSetting('chat.advanced.inlineEdits.jointCompletionsProvider.strategy', 1 /* ConfigType.ExperimentBased */, jointCompletionsProviderOptions_1.JointCompletionsProviderStrategy.Regular);
        TeamInternal.InlineEditsJointCompletionsProviderTriggerChangeStrategy = defineTeamInternalSetting('chat.advanced.inlineEdits.jointCompletionsProvider.triggerChangeStrategy', 1 /* ConfigType.ExperimentBased */, jointCompletionsProviderOptions_1.JointCompletionsProviderTriggerChangeStrategy.NoTriggerOnCompletionsRequestInFlight);
        TeamInternal.InstantApplyModelName = defineTeamInternalSetting('chat.advanced.instantApply.modelName', 1 /* ConfigType.ExperimentBased */, "gpt-4o-instant-apply-full-ft-v66" /* CHAT_MODEL.GPT4OPROXY */);
        TeamInternal.VerifyTextDocumentChanges = defineTeamInternalSetting('chat.advanced.inlineEdits.verifyTextDocumentChanges', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.UseAutoModeRouting = defineTeamInternalSetting('chat.advanced.useAutoModeRouter', 1 /* ConfigType.ExperimentBased */, false);
        /** Controls which `routing_method` value is sent to the auto-intent-service per request
         * when `UseAutoModeRouting` is enabled.
         * '' (empty/default) = omit `routing_method` and use the server default.
         * 'binary' = binary classifier v1.
         * 'hydra' = HYDRA multi-head capability matching.
         * For experiments, this setting selects the routing method only when router usage is enabled;
         * it does not by itself determine whether the router is called. */
        TeamInternal.AutoModeRoutingMethod = defineTeamInternalSetting('chat.advanced.autoModeRoutingMethod', 1 /* ConfigType.ExperimentBased */, '', undefined, undefined, { experimentName: 'copilotchat.autoModeRoutingMethod' });
        /** Inline Completions */
        TeamInternal.InlineCompletionsDefaultDiagnosticsOptions = defineTeamInternalSetting('chat.advanced.inlineCompletions.defaultDiagnosticsOptionsString', 1 /* ConfigType.ExperimentBased */, undefined);
        TeamInternal.RecordExpectedEditEnabled = defineTeamInternalSetting('chat.advanced.inlineEdits.recordExpectedEdit.enabled', 0 /* ConfigType.Simple */, false);
        TeamInternal.RecordExpectedEditOnReject = defineTeamInternalSetting('chat.advanced.inlineEdits.recordExpectedEdit.onReject', 0 /* ConfigType.Simple */, false);
        TeamInternal.ReadFileCodeFences = defineTeamInternalSetting('chat.advanced.readFileCodeFences', 1 /* ConfigType.ExperimentBased */, false);
        // TODO: @sandy081 - These should be moved away from this namespace
        TeamInternal.EnableReadFileV2 = defineSetting('chat.advanced.enableReadFileV2', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.AskAgent = defineSetting('chat.advanced.enableAskAgent', 1 /* ConfigType.ExperimentBased */, false);
        TeamInternal.RetryNetworkErrors = defineSetting('chat.advanced.enableRetryNetworkErrors', 1 /* ConfigType.ExperimentBased */, true);
        TeamInternal.RetryServerErrorStatusCodes = defineSetting('chat.advanced.retryServerErrorStatusCodes', 1 /* ConfigType.ExperimentBased */, '500,502');
        TeamInternal.FallbackNodeFetchOnNetworkProcessCrash = defineSetting('chat.advanced.enableFallbackNodeFetchOnNetworkProcessCrash', 1 /* ConfigType.ExperimentBased */, true);
        TeamInternal.ChatRequestPowerSaveBlocker = defineTeamInternalSetting('chat.advanced.chatRequestPowerSaveBlocker', 1 /* ConfigType.ExperimentBased */, true);
        /** Enable WebSocket transport for Responses API requests. When enabled, uses a persistent WebSocket connection per conversation instead of individual HTTP requests. */
        TeamInternal.ResponsesApiWebSocketEnabled = defineTeamInternalSetting('chat.advanced.responsesApi.webSocket.enabled', 1 /* ConfigType.ExperimentBased */, true);
        TeamInternal.DebugSimulateWebSocketResponse = defineTeamInternalSetting('chat.advanced.debug.simulateWebSocketResponse', 0 /* ConfigType.Simple */, '');
    })(TeamInternal = ConfigKey.TeamInternal || (ConfigKey.TeamInternal = {}));
    /**
     * Deprecated settings that are no longer in use.
     */
    let Deprecated;
    (function (Deprecated) {
        /** Model override for Plan agent — migrated to core `chat.planAgent.defaultModel` */
        Deprecated.PlanAgentModel = defineSetting('chat.planAgent.model', 0 /* ConfigType.Simple */, '');
        Deprecated.OllamaEndpoint = defineSetting('chat.byok.ollamaEndpoint', 0 /* ConfigType.Simple */, 'http://localhost:11434');
        Deprecated.AzureModels = defineSetting('chat.azureModels', 0 /* ConfigType.Simple */, {});
        Deprecated.CustomOAIModels = defineSetting('chat.customOAIModels', 0 /* ConfigType.Simple */, {});
        Deprecated.AzureAuthType = defineSetting('chat.azureAuthType', 0 /* ConfigType.Simple */, AzureAuthMode.EntraId);
    })(Deprecated = ConfigKey.Deprecated || (ConfigKey.Deprecated = {}));
    ConfigKey.Enable = defineSetting('enable', 0 /* ConfigType.Simple */, {
        '*': true,
        'plaintext': false,
        'markdown': false,
        'scminput': false
    });
    ConfigKey.selectedCompletionsModel = defineSetting('selectedCompletionModel', 0 /* ConfigType.Simple */, '');
    ConfigKey.RateLimitAutoSwitchToAuto = defineSetting('chat.rateLimitAutoSwitchToAuto', 0 /* ConfigType.Simple */, false, (0, validator_1.vBoolean)());
    /** Use the Messages API instead of Chat Completions when supported */
    ConfigKey.UseAnthropicMessagesApi = defineSetting('chat.anthropic.useMessagesApi', 1 /* ConfigType.ExperimentBased */, true);
    /** Context editing mode for Anthropic Messages API. 'off' disables context editing. */
    ConfigKey.AnthropicContextEditingMode = defineSetting('chat.anthropic.contextEditing.mode', 1 /* ConfigType.ExperimentBased */, 'off');
    /** Configure reasoning summary style sent to Responses API */
    ConfigKey.ResponsesApiReasoningSummary = defineSetting('chat.responsesApiReasoningSummary', 1 /* ConfigType.ExperimentBased */, 'detailed');
    /** Enable context_management sent to Responses API */
    ConfigKey.ResponsesApiContextManagementEnabled = defineSetting('chat.responsesApiContextManagement.enabled', 1 /* ConfigType.ExperimentBased */, false);
    /** Enable client-side prompt_cache_key (conversationId:modelFamily) sent to Responses API */
    ConfigKey.ResponsesApiPromptCacheKeyEnabled = defineSetting('chat.responsesApi.promptCacheKey.enabled', 1 /* ConfigType.ExperimentBased */, false);
    /** Enable updated prompt for 5.3Codex model */
    ConfigKey.Updated53CodexPromptEnabled = defineSetting('chat.updated53CodexPrompt.enabled', 1 /* ConfigType.ExperimentBased */, true);
    /** Enable updated prompt for Claude Opus 4.7 model */
    ConfigKey.Claude47OpusPromptEnabled = defineSetting('chat.claude47OpusPrompt.enabled', 1 /* ConfigType.ExperimentBased */, false);
    /** Enable get_changed_files tool for GPT-5.5 models */
    ConfigKey.EnableGpt55GetChangedFilesTool = defineSetting('chat.gpt55GetChangedFilesTool.enabled', 1 /* ConfigType.ExperimentBased */, true);
    /** Enable read_file tool for GPT-5.5 models */
    ConfigKey.EnableGpt55ReadFileTool = defineSetting('chat.gpt55ReadFileTool.enabled', 1 /* ConfigType.ExperimentBased */, true);
    /** Enable economical search and edit instructions for GPT-5.5 models */
    ConfigKey.EnableGpt55EconomicalSearchAndEdit = defineSetting('chat.gpt55EconomicalSearchAndEdit.enabled', 1 /* ConfigType.ExperimentBased */, false);
    /** Enable GPT-5.4 large prompt sections for GPT-5.5 models */
    ConfigKey.EnableGpt55LargePromptSections = defineSetting('chat.gpt55LargePromptSections.enabled', 1 /* ConfigType.ExperimentBased */, false);
    ConfigKey.EnableChatImageUpload = defineSetting('chat.imageUpload.enabled', 1 /* ConfigType.ExperimentBased */, true);
    /** Enable Anthropic web search tool for BYOK Claude models */
    ConfigKey.AnthropicWebSearchToolEnabled = defineSetting('chat.anthropic.tools.websearch.enabled', 1 /* ConfigType.ExperimentBased */, false);
    /** Maximum number of web searches allowed per request */
    ConfigKey.AnthropicWebSearchMaxUses = defineSetting('chat.anthropic.tools.websearch.maxUses', 0 /* ConfigType.Simple */, 5);
    /** List of domains to restrict web search results to */
    ConfigKey.AnthropicWebSearchAllowedDomains = defineSetting('chat.anthropic.tools.websearch.allowedDomains', 0 /* ConfigType.Simple */, []);
    /** List of domains to exclude from web search results */
    ConfigKey.AnthropicWebSearchBlockedDomains = defineSetting('chat.anthropic.tools.websearch.blockedDomains', 0 /* ConfigType.Simple */, []);
    /** User location for personalizing web search results */
    ConfigKey.AnthropicWebSearchUserLocation = defineSetting('chat.anthropic.tools.websearch.userLocation', 0 /* ConfigType.Simple */, null);
    /** User provided code generation instructions for the chat */
    ConfigKey.CodeGenerationInstructions = defineSetting('chat.codeGeneration.instructions', 0 /* ConfigType.Simple */, []);
    ConfigKey.TestGenerationInstructions = defineSetting('chat.testGeneration.instructions', 0 /* ConfigType.Simple */, []);
    ConfigKey.CommitMessageGenerationInstructions = defineSetting('chat.commitMessageGeneration.instructions', 0 /* ConfigType.Simple */, []);
    ConfigKey.PullRequestDescriptionGenerationInstructions = defineSetting('chat.pullRequestDescriptionGeneration.instructions', 0 /* ConfigType.Simple */, []);
    /** Whether new flows around setting up tests are enabled */
    ConfigKey.SetupTests = defineSetting('chat.setupTests.enabled', 0 /* ConfigType.Simple */, true);
    /** Whether the Copilot TypeScript context provider is enabled and if how */
    ConfigKey.TypeScriptLanguageContext = defineSetting('chat.languageContext.typescript.enabled', 1 /* ConfigType.ExperimentBased */, true);
    ConfigKey.TypeScriptLanguageContextMode = defineSetting('chat.languageContext.typescript.items', 1 /* ConfigType.ExperimentBased */, 'double');
    ConfigKey.TypeScriptLanguageContextIncludeDocumentation = defineSetting('chat.languageContext.typescript.includeDocumentation', 1 /* ConfigType.ExperimentBased */, false);
    ConfigKey.TypeScriptLanguageContextCacheTimeout = defineSetting('chat.languageContext.typescript.cacheTimeout', 1 /* ConfigType.ExperimentBased */, 500);
    ConfigKey.TypeScriptLanguageContextFix = defineSetting('chat.languageContext.fix.typescript.enabled', 1 /* ConfigType.ExperimentBased */, false);
    ConfigKey.TypeScriptLanguageContextInline = defineSetting('chat.languageContext.inline.typescript.enabled', 1 /* ConfigType.ExperimentBased */, false);
    ConfigKey.UseInstructionFiles = defineSetting('chat.codeGeneration.useInstructionFiles', 0 /* ConfigType.Simple */, true);
    ConfigKey.ReviewAgent = defineSetting('chat.reviewAgent.enabled', 0 /* ConfigType.Simple */, true);
    ConfigKey.CodeFeedback = defineSetting('chat.reviewSelection.enabled', 0 /* ConfigType.Simple */, true);
    ConfigKey.CodeFeedbackInstructions = defineSetting('chat.reviewSelection.instructions', 0 /* ConfigType.Simple */, []);
    ConfigKey.UseProjectTemplates = defineSetting('chat.useProjectTemplates', 0 /* ConfigType.Simple */, true);
    ConfigKey.ExplainScopeSelection = defineSetting('chat.scopeSelection', 0 /* ConfigType.Simple */, false);
    ConfigKey.EnableCodeActions = defineSetting('editor.enableCodeActions', 0 /* ConfigType.Simple */, true);
    ConfigKey.LocaleOverride = defineSetting('chat.localeOverride', 0 /* ConfigType.Simple */, 'auto');
    ConfigKey.TerminalChatLocation = defineSetting('chat.terminalChatLocation', 0 /* ConfigType.Simple */, 'chatView');
    ConfigKey.AutomaticRenameSuggestions = defineSetting('renameSuggestions.triggerAutomatically', 0 /* ConfigType.Simple */, true);
    ConfigKey.TerminalToDebuggerEnabled = defineSetting('chat.copilotDebugCommand.enabled', 0 /* ConfigType.Simple */, true);
    ConfigKey.CodeSearchAgentEnabled = defineSetting('chat.codesearch.enabled', 0 /* ConfigType.Simple */, false);
    ConfigKey.ClaudeAgentEnabled = defineSetting('chat.claudeAgent.enabled', 0 /* ConfigType.Simple */, true);
    ConfigKey.ClaudeAgentAllowDangerouslySkipPermissions = defineSetting('chat.claudeAgent.allowDangerouslySkipPermissions', 0 /* ConfigType.Simple */, false);
    ConfigKey.ClaudeAgentAllowAutoPermissions = defineSetting('chat.claudeAgent.allowAutoPermissions', 1 /* ConfigType.ExperimentBased */, false);
    ConfigKey.InlineEditsEnabled = defineSetting('nextEditSuggestions.enabled', 1 /* ConfigType.ExperimentBased */, true);
    ConfigKey.InlineEditsEnableDiagnosticsProvider = defineSetting('nextEditSuggestions.fixes', 1 /* ConfigType.ExperimentBased */, true);
    ConfigKey.InlineEditsAllowWhitespaceOnlyChanges = defineSetting('nextEditSuggestions.allowWhitespaceOnlyChanges', 1 /* ConfigType.ExperimentBased */, true);
    /** Because of migration the value returned may be `boolean | "onlyWithEdit" | "jump" | undefined` */
    ConfigKey.InlineEditsNextCursorPredictionEnabled = defineSetting('nextEditSuggestions.extendedRange', 1 /* ConfigType.ExperimentBased */, false, undefined, { oldKey: 'chat.advanced.inlineEdits.nextCursorPrediction.enabled' });
    ConfigKey.NewWorkspaceCreationAgentEnabled = defineSetting('chat.newWorkspaceCreation.enabled', 0 /* ConfigType.Simple */, true);
    ConfigKey.NewWorkspaceUseContext7 = defineSetting('chat.newWorkspace.useContext7', 0 /* ConfigType.Simple */, false);
    ConfigKey.SummarizeAgentConversationHistory = defineSetting('chat.summarizeAgentConversationHistory.enabled', 0 /* ConfigType.Simple */, true);
    ConfigKey.VirtualToolThreshold = defineSetting('chat.virtualTools.threshold', 1 /* ConfigType.ExperimentBased */, exports.HARD_TOOL_LIMIT);
    ConfigKey.CurrentEditorAgentContext = defineSetting('chat.agent.currentEditorContext.enabled', 0 /* ConfigType.Simple */, true);
    /** BYOK  */
    ConfigKey.AutoFixDiagnostics = defineSetting('chat.agent.autoFix', 1 /* ConfigType.ExperimentBased */, false);
    ConfigKey.NotebookFollowCellExecution = defineSetting('chat.notebook.followCellExecution.enabled', 0 /* ConfigType.Simple */, false);
    ConfigKey.UseAlternativeNESNotebookFormat = defineSetting('chat.notebook.enhancedNextEditSuggestions.enabled', 1 /* ConfigType.ExperimentBased */, false);
    ConfigKey.CustomInstructionsInSystemMessage = defineSetting('chat.customInstructionsInSystemMessage', 0 /* ConfigType.Simple */, true);
    ConfigKey.EnableAlternateGptPrompt = defineSetting('chat.alternateGptPrompt.enabled', 1 /* ConfigType.ExperimentBased */, false);
    ConfigKey.EnableAlternateGeminiModelFPrompt = defineSetting('chat.alternateGeminiModelFPrompt.enabled', 1 /* ConfigType.ExperimentBased */, false);
    ConfigKey.EnableOrganizationCustomAgents = defineSetting('chat.organizationCustomAgents.enabled', 0 /* ConfigType.Simple */, true);
    ConfigKey.EnableOrganizationInstructions = defineSetting('chat.organizationInstructions.enabled', 0 /* ConfigType.Simple */, true);
    ConfigKey.CompletionsFetcher = defineSetting('chat.completionsFetcher', 1 /* ConfigType.ExperimentBased */, undefined);
    ConfigKey.NextEditSuggestionsFetcher = defineSetting('chat.nesFetcher', 1 /* ConfigType.ExperimentBased */, undefined);
    ConfigKey.GitHubMcpEnabled = defineSetting('chat.githubMcpServer.enabled', 1 /* ConfigType.ExperimentBased */, false);
    ConfigKey.GitHubMcpToolsets = defineSetting('chat.githubMcpServer.toolsets', 0 /* ConfigType.Simple */, ['default']);
    ConfigKey.GitHubMcpReadonly = defineSetting('chat.githubMcpServer.readonly', 0 /* ConfigType.Simple */, false);
    ConfigKey.GitHubMcpLockdown = defineSetting('chat.githubMcpServer.lockdown', 0 /* ConfigType.Simple */, false);
    ConfigKey.GitHubMcpChannel = defineSetting('chat.githubMcpServer.channel', 0 /* ConfigType.Simple */, 'stable');
    ConfigKey.BackgroundAgentEnabled = defineSetting('chat.backgroundAgent.enabled', 0 /* ConfigType.Simple */, true);
    ConfigKey.CloudAgentEnabled = defineSetting('chat.cloudAgent.enabled', 0 /* ConfigType.Simple */, true);
    ConfigKey.AdditionalReadAccessPaths = defineSetting('chat.additionalReadAccessPaths', 0 /* ConfigType.Simple */, []);
    ConfigKey.SwitchAgentEnabled = defineSetting('chat.switchAgent.enabled', 1 /* ConfigType.ExperimentBased */, false);
    /** Additional tools to enable for the Plan agent (additive to base tools) */
    ConfigKey.PlanAgentAdditionalTools = defineSetting('chat.planAgent.additionalTools', 0 /* ConfigType.Simple */, []);
    /** Model override for Implement agent (empty = use default) */
    ConfigKey.ImplementAgentModel = defineSetting('chat.implementAgent.model', 0 /* ConfigType.Simple */, '');
    /** Additional tools to enable for the Ask agent (additive to base tools) */
    ConfigKey.AskAgentAdditionalTools = defineSetting('chat.askAgent.additionalTools', 0 /* ConfigType.Simple */, []);
    /** Model override for Ask agent (empty = use default) */
    ConfigKey.AskAgentModel = defineSetting('chat.askAgent.model', 0 /* ConfigType.Simple */, '');
    /** Whether the Explore (Code Research) subagent is enabled */
    ConfigKey.ExploreAgentEnabled = defineSetting('chat.exploreAgent.enabled', 1 /* ConfigType.ExperimentBased */, true);
    /** Model override for Explore (Code Research) agent — reads from core `chat.exploreAgent.defaultModel` */
    ConfigKey.ExploreAgentModel = defineSetting('chat.exploreAgent.model', 0 /* ConfigType.Simple */, '');
    ConfigKey.ViewImageToolEnabled = defineSetting('chat.tools.viewImage.enabled', 1 /* ConfigType.ExperimentBased */, true);
    /** Enable local session search index — tracks sessions locally and enables chronicle commands.*/
    ConfigKey.LocalIndexEnabled = defineSetting('chat.localIndex.enabled', 1 /* ConfigType.ExperimentBased */, false);
})(ConfigKey || (exports.ConfigKey = ConfigKey = {}));
function getAllConfigKeys() {
    return Object.values(ConfigKey).flatMap(namespace => Object.values(namespace).map(setting => setting.fullyQualifiedId));
}
const nextEditProviderIds = [];
function registerNextEditProviderId(providerId) {
    nextEditProviderIds.push(providerId);
    return providerId;
}
//# sourceMappingURL=configurationService.js.map