Path: blob/main/src/vs/workbench/contrib/chat/browser/chat.contribution.ts
5263 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { timeout } from '../../../../base/common/async.js';6import { Event } from '../../../../base/common/event.js';7import { MarkdownString, isMarkdownString } from '../../../../base/common/htmlContent.js';8import { Disposable, DisposableMap } from '../../../../base/common/lifecycle.js';9import { Schemas } from '../../../../base/common/network.js';10import { isMacintosh } from '../../../../base/common/platform.js';11import { PolicyCategory } from '../../../../base/common/policy.js';12import { registerEditorFeature } from '../../../../editor/common/editorFeatures.js';13import * as nls from '../../../../nls.js';14import { AccessibleViewRegistry } from '../../../../platform/accessibility/browser/accessibleViewRegistry.js';15import { registerAction2 } from '../../../../platform/actions/common/actions.js';16import { ICommandService } from '../../../../platform/commands/common/commands.js';17import { Extensions as ConfigurationExtensions, ConfigurationScope, IConfigurationNode, IConfigurationRegistry } from '../../../../platform/configuration/common/configurationRegistry.js';18import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js';19import { InstantiationType, registerSingleton } from '../../../../platform/instantiation/common/extensions.js';20import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';21import { McpAccessValue, McpAutoStartValue, mcpAccessConfig, mcpAutoStartConfig, mcpGalleryServiceEnablementConfig, mcpGalleryServiceUrlConfig, mcpAppsEnabledConfig } from '../../../../platform/mcp/common/mcpManagement.js';22import product from '../../../../platform/product/common/product.js';23import { Registry } from '../../../../platform/registry/common/platform.js';24import { EditorPaneDescriptor, IEditorPaneRegistry } from '../../../browser/editor.js';25import { Extensions, IConfigurationMigrationRegistry } from '../../../common/configuration.js';26import { IWorkbenchContribution, WorkbenchPhase, registerWorkbenchContribution2 } from '../../../common/contributions.js';27import { EditorExtensions, IEditorFactoryRegistry } from '../../../common/editor.js';28import { IWorkbenchAssignmentService } from '../../../services/assignment/common/assignmentService.js';29import { ChatEntitlement, IChatEntitlementService } from '../../../services/chat/common/chatEntitlementService.js';30import { IEditorResolverService, RegisteredEditorPriority } from '../../../services/editor/common/editorResolverService.js';31import { AddConfigurationType, AssistedTypes } from '../../mcp/browser/mcpCommandsAddConfiguration.js';32import { allDiscoverySources, discoverySourceSettingsLabel, mcpDiscoverySection, mcpServerSamplingSection } from '../../mcp/common/mcpConfiguration.js';33import { ChatAgentNameService, ChatAgentService, IChatAgentNameService, IChatAgentService } from '../common/participants/chatAgents.js';34import { CodeMapperService, ICodeMapperService } from '../common/editing/chatCodeMapperService.js';35import '../common/widget/chatColors.js';36import { IChatEditingService } from '../common/editing/chatEditingService.js';37import { IChatLayoutService } from '../common/widget/chatLayoutService.js';38import { ChatModeService, IChatMode, IChatModeService } from '../common/chatModes.js';39import { ChatResponseResourceFileSystemProvider } from '../common/widget/chatResponseResourceFileSystemProvider.js';40import { IChatService } from '../common/chatService/chatService.js';41import { ChatService } from '../common/chatService/chatServiceImpl.js';42import { IChatSessionsService } from '../common/chatSessionsService.js';43import { ChatSlashCommandService, IChatSlashCommandService } from '../common/participants/chatSlashCommands.js';44import { ChatTodoListService, IChatTodoListService } from '../common/tools/chatTodoListService.js';45import { ChatTransferService, IChatTransferService } from '../common/model/chatTransferService.js';46import { IChatVariablesService } from '../common/attachments/chatVariables.js';47import { ChatWidgetHistoryService, IChatWidgetHistoryService } from '../common/widget/chatWidgetHistoryService.js';48import { AgentsControlClickBehavior, ChatAgentLocation, ChatConfiguration, ChatModeKind } from '../common/constants.js';49import { ILanguageModelIgnoredFilesService, LanguageModelIgnoredFilesService } from '../common/ignoredFiles.js';50import { ILanguageModelsService, LanguageModelsService } from '../common/languageModels.js';51import { ILanguageModelStatsService, LanguageModelStatsService } from '../common/languageModelStats.js';52import { ILanguageModelToolsConfirmationService } from '../common/tools/languageModelToolsConfirmationService.js';53import { ILanguageModelToolsService } from '../common/tools/languageModelToolsService.js';54import { ChatPromptFilesExtensionPointHandler } from '../common/promptSyntax/chatPromptFilesContribution.js';55import { PromptsConfig } from '../common/promptSyntax/config/config.js';56import { INSTRUCTIONS_DEFAULT_SOURCE_FOLDER, INSTRUCTION_FILE_EXTENSION, LEGACY_MODE_DEFAULT_SOURCE_FOLDER, LEGACY_MODE_FILE_EXTENSION, PROMPT_DEFAULT_SOURCE_FOLDER, PROMPT_FILE_EXTENSION, DEFAULT_SKILL_SOURCE_FOLDERS, AGENTS_SOURCE_FOLDER, AGENT_FILE_EXTENSION, SKILL_FILENAME, CLAUDE_AGENTS_SOURCE_FOLDER, CLAUDE_RULES_SOURCE_FOLDER, DEFAULT_HOOK_FILE_PATHS } from '../common/promptSyntax/config/promptFileLocations.js';57import { PromptLanguageFeaturesProvider } from '../common/promptSyntax/promptFileContributions.js';58import { AGENT_DOCUMENTATION_URL, INSTRUCTIONS_DOCUMENTATION_URL, PROMPT_DOCUMENTATION_URL, SKILL_DOCUMENTATION_URL, HOOK_DOCUMENTATION_URL } from '../common/promptSyntax/promptTypes.js';59import { hookFileSchema, HOOK_SCHEMA_URI, HOOK_FILE_GLOB } from '../common/promptSyntax/hookSchema.js';60import { Extensions as JSONExtensions, IJSONContributionRegistry } from '../../../../platform/jsonschemas/common/jsonContributionRegistry.js';61import { IPromptsService } from '../common/promptSyntax/service/promptsService.js';62import { PromptsService } from '../common/promptSyntax/service/promptsServiceImpl.js';63import { LanguageModelToolsExtensionPointHandler } from '../common/tools/languageModelToolsContribution.js';64import { BuiltinToolsContribution } from '../common/tools/builtinTools/tools.js';65import { IVoiceChatService, VoiceChatService } from '../common/voiceChatService.js';66import { registerChatAccessibilityActions } from './actions/chatAccessibilityActions.js';67import { AgentChatAccessibilityHelp, EditsChatAccessibilityHelp, PanelChatAccessibilityHelp, QuickChatAccessibilityHelp } from './actions/chatAccessibilityHelp.js';68import { ACTION_ID_NEW_CHAT, ModeOpenChatGlobalAction, registerChatActions } from './actions/chatActions.js';69import { CodeBlockActionRendering, registerChatCodeBlockActions, registerChatCodeCompareBlockActions } from './actions/chatCodeblockActions.js';70import { ChatContextContributions } from './actions/chatContext.js';71import { registerChatContextActions } from './actions/chatContextActions.js';72import { registerChatCopyActions } from './actions/chatCopyActions.js';73import { registerChatDeveloperActions } from './actions/chatDeveloperActions.js';74import { ChatSubmitAction, registerChatExecuteActions } from './actions/chatExecuteActions.js';75import { registerChatFileTreeActions } from './actions/chatFileTreeActions.js';76import { ChatGettingStartedContribution } from './actions/chatGettingStarted.js';77import { registerChatExportActions } from './actions/chatImportExport.js';78import { registerLanguageModelActions } from './actions/chatLanguageModelActions.js';79import { registerMoveActions } from './actions/chatMoveActions.js';80import { registerNewChatActions } from './actions/chatNewActions.js';81import { registerChatPromptNavigationActions } from './actions/chatPromptNavigationActions.js';82import { registerChatQueueActions } from './actions/chatQueueActions.js';83import { registerQuickChatActions } from './actions/chatQuickInputActions.js';84import { ChatAgentRecommendation } from './actions/chatAgentRecommendationActions.js';85import { registerChatTitleActions } from './actions/chatTitleActions.js';86import { registerChatElicitationActions } from './actions/chatElicitationActions.js';87import { registerChatToolActions } from './actions/chatToolActions.js';88import { ChatTransferContribution } from './actions/chatTransfer.js';89import { registerChatCustomizationDiagnosticsAction } from './actions/chatCustomizationDiagnosticsAction.js';90import './agentSessions/agentSessions.contribution.js';91import { backgroundAgentDisplayName } from './agentSessions/agentSessions.js';92import { IAgentSessionsService } from './agentSessions/agentSessionsService.js';93import { IChatAccessibilityService, IChatCodeBlockContextProviderService, IChatWidgetService, IQuickChatService } from './chat.js';94import { ChatAccessibilityService } from './accessibility/chatAccessibilityService.js';95import './attachments/chatAttachmentModel.js';96import './widget/input/chatStatusWidget.js';97import { ChatAttachmentResolveService, IChatAttachmentResolveService } from './attachments/chatAttachmentResolveService.js';98import { ChatMarkdownAnchorService, IChatMarkdownAnchorService } from './widget/chatContentParts/chatMarkdownAnchorService.js';99import { ChatContextPickService, IChatContextPickService } from './attachments/chatContextPickService.js';100import { ChatInputBoxContentProvider } from './widget/input/editor/chatEditorInputContentProvider.js';101import { ChatEditingEditorAccessibility } from './chatEditing/chatEditingEditorAccessibility.js';102import { registerChatEditorActions } from './chatEditing/chatEditingEditorActions.js';103import { ChatEditingEditorContextKeys } from './chatEditing/chatEditingEditorContextKeys.js';104import { ChatEditingEditorOverlay } from './chatEditing/chatEditingEditorOverlay.js';105import { ChatEditingService } from './chatEditing/chatEditingServiceImpl.js';106import { ChatEditingNotebookFileSystemProviderContrib } from './chatEditing/notebook/chatEditingNotebookFileSystemProvider.js';107import { SimpleBrowserOverlay } from './attachments/simpleBrowserEditorOverlay.js';108import { ChatEditor, IChatEditorOptions } from './widgetHosts/editor/chatEditor.js';109import { ChatEditorInput, ChatEditorInputSerializer } from './widgetHosts/editor/chatEditorInput.js';110import { ChatLayoutService } from './widget/chatLayoutService.js';111import { ChatLanguageModelsDataContribution, LanguageModelsConfigurationService } from './languageModelsConfigurationService.js';112import './chatManagement/chatManagement.contribution.js';113import { agentSlashCommandToMarkdown, agentToMarkdown } from './widget/chatContentParts/chatMarkdownDecorationsRenderer.js';114import { ChatOutputRendererService, IChatOutputRendererService } from './chatOutputItemRenderer.js';115import { ChatCompatibilityNotifier, ChatExtensionPointHandler } from './chatParticipant.contribution.js';116import { ChatPasteProvidersFeature } from './widget/input/editor/chatPasteProviders.js';117import { QuickChatService } from './widgetHosts/chatQuick.js';118import { ChatResponseAccessibleView } from './accessibility/chatResponseAccessibleView.js';119import { ChatTerminalOutputAccessibleView } from './accessibility/chatTerminalOutputAccessibleView.js';120import { ChatSetupContribution, ChatTeardownContribution } from './chatSetup/chatSetupContributions.js';121import { ChatStatusBarEntry } from './chatStatus/chatStatusEntry.js';122import { ChatVariablesService } from './attachments/chatVariables.js';123import { ChatWidget } from './widget/chatWidget.js';124import { ChatCodeBlockContextProviderService } from './codeBlockContextProviderService.js';125import { ChatDynamicVariableModel } from './attachments/chatDynamicVariables.js';126import { ChatImplicitContextContribution } from './attachments/chatImplicitContext.js';127import './widget/input/editor/chatInputCompletions.js';128import './widget/input/editor/chatInputEditorContrib.js';129import './widget/input/editor/chatInputEditorHover.js';130import { LanguageModelToolsConfirmationService } from './tools/languageModelToolsConfirmationService.js';131import { LanguageModelToolsService, globalAutoApproveDescription } from './tools/languageModelToolsService.js';132import './promptSyntax/promptCodingAgentActionContribution.js';133import './promptSyntax/promptToolsCodeLensProvider.js';134import { showConfigureHooksQuickPick } from './promptSyntax/hookActions.js';135import { PromptUrlHandler } from './promptSyntax/promptUrlHandler.js';136import { ConfigureToolSets, UserToolSetsContributions } from './tools/toolSetsContribution.js';137import { ChatViewsWelcomeHandler } from './viewsWelcome/chatViewsWelcomeHandler.js';138import { ChatWidgetService } from './widget/chatWidgetService.js';139import { ILanguageModelsConfigurationService } from '../common/languageModelsConfiguration.js';140import { ChatWindowNotifier } from './chatWindowNotifier.js';141import { ChatRepoInfoContribution } from './chatRepoInfo.js';142import { VALID_PROMPT_FOLDER_PATTERN } from '../common/promptSyntax/utils/promptFilesLocator.js';143import { ChatTipService, IChatTipService } from './chatTipService.js';144import { ChatQueuePickerRendering } from './widget/input/chatQueuePickerActionItem.js';145import { PlanAgentDefaultModel } from './planAgentDefaultModel.js';146147const toolReferenceNameEnumValues: string[] = [];148const toolReferenceNameEnumDescriptions: string[] = [];149150// Register JSON schema for hook files151const jsonContributionRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution);152jsonContributionRegistry.registerSchema(HOOK_SCHEMA_URI, hookFileSchema);153jsonContributionRegistry.registerSchemaAssociation(HOOK_SCHEMA_URI, HOOK_FILE_GLOB);154155// Register configuration156const configurationRegistry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration);157configurationRegistry.registerConfiguration({158id: 'chatSidebar',159title: nls.localize('interactiveSessionConfigurationTitle', "Chat"),160type: 'object',161properties: {162'chat.fontSize': {163type: 'number',164description: nls.localize('chat.fontSize', "Controls the font size in pixels in chat messages."),165default: 13,166minimum: 6,167maximum: 100168},169'chat.fontFamily': {170type: 'string',171description: nls.localize('chat.fontFamily', "Controls the font family in chat messages."),172default: 'default'173},174'chat.editor.fontSize': {175type: 'number',176description: nls.localize('interactiveSession.editor.fontSize', "Controls the font size in pixels in chat codeblocks."),177default: isMacintosh ? 12 : 14,178},179'chat.editor.fontFamily': {180type: 'string',181description: nls.localize('interactiveSession.editor.fontFamily', "Controls the font family in chat codeblocks."),182default: 'default'183},184'chat.editor.fontWeight': {185type: 'string',186description: nls.localize('interactiveSession.editor.fontWeight', "Controls the font weight in chat codeblocks."),187default: 'default'188},189'chat.editor.wordWrap': {190type: 'string',191description: nls.localize('interactiveSession.editor.wordWrap', "Controls whether lines should wrap in chat codeblocks."),192default: 'off',193enum: ['on', 'off']194},195'chat.editor.lineHeight': {196type: 'number',197description: nls.localize('interactiveSession.editor.lineHeight', "Controls the line height in pixels in chat codeblocks. Use 0 to compute the line height from the font size."),198default: 0199},200[ChatConfiguration.AgentsControlClickBehavior]: {201type: 'string',202enum: [AgentsControlClickBehavior.Default, AgentsControlClickBehavior.Cycle, AgentsControlClickBehavior.Focus],203enumDescriptions: [204nls.localize('chat.agentsControl.clickBehavior.default', "Clicking chat icon toggles chat visibility."),205nls.localize('chat.agentsControl.clickBehavior.cycle', "Clicking chat icon cycles through: show chat, maximize chat, hide chat. This requires chat to be contained in the secondary sidebar."),206nls.localize('chat.agentsControl.clickBehavior.focus', "Clicking chat icon focuses the chat view and maximizes it if located in the secondary sidebar.")207],208markdownDescription: nls.localize('chat.agentsControl.clickBehavior', "Controls the behavior when clicking on the chat icon in the command center."),209default: product.quality !== 'stable' ? AgentsControlClickBehavior.Cycle : AgentsControlClickBehavior.Default,210tags: ['experimental']211},212[ChatConfiguration.AgentStatusEnabled]: {213type: 'boolean',214markdownDescription: nls.localize('chat.agentsControl.enabled', "Controls whether the 'Agent Status' indicator is shown in the title bar command center. Enabling this setting will automatically enable {0}. The unread/in-progress session indicators require {1} to be enabled.", '`#window.commandCenter#`', '`#chat.viewSessions.enabled#`'),215default: true,216tags: ['experimental']217},218[ChatConfiguration.UnifiedAgentsBar]: {219type: 'boolean',220markdownDescription: nls.localize('chat.unifiedAgentsBar.enabled', "Replaces the command center search box with a unified chat and search widget."),221default: false,222tags: ['experimental']223},224[ChatConfiguration.AgentSessionProjectionEnabled]: {225type: 'boolean',226markdownDescription: nls.localize('chat.agentSessionProjection.enabled', "Controls whether Agent Session Projection mode is enabled for reviewing agent sessions in a focused workspace."),227default: false,228tags: ['experimental'],229},230'chat.implicitContext.enabled': {231type: 'object',232description: nls.localize('chat.implicitContext.enabled.1', "Enables automatically using the active editor as chat context for specified chat locations."),233additionalProperties: {234type: 'string',235enum: ['never', 'first', 'always'],236description: nls.localize('chat.implicitContext.value', "The value for the implicit context."),237enumDescriptions: [238nls.localize('chat.implicitContext.value.never', "Implicit context is never enabled."),239nls.localize('chat.implicitContext.value.first', "Implicit context is enabled for the first interaction."),240nls.localize('chat.implicitContext.value.always', "Implicit context is always enabled.")241]242},243default: {244'panel': 'always',245}246},247'chat.implicitContext.suggestedContext': {248type: 'boolean',249markdownDescription: nls.localize('chat.implicitContext.suggestedContext', "Controls whether the new implicit context flow is shown. In Ask and Edit modes, the context will automatically be included. When using an agent, context will be suggested as an attachment. Selections are always included as context."),250default: true,251},252'chat.editing.autoAcceptDelay': {253type: 'number',254markdownDescription: nls.localize('chat.editing.autoAcceptDelay', "Delay after which changes made by chat are automatically accepted. Values are in seconds, `0` means disabled and `100` seconds is the maximum."),255default: 0,256minimum: 0,257maximum: 100258},259'chat.editing.confirmEditRequestRemoval': {260type: 'boolean',261scope: ConfigurationScope.APPLICATION,262markdownDescription: nls.localize('chat.editing.confirmEditRequestRemoval', "Whether to show a confirmation before removing a request and its associated edits."),263default: true,264},265'chat.editing.confirmEditRequestRetry': {266type: 'boolean',267scope: ConfigurationScope.APPLICATION,268markdownDescription: nls.localize('chat.editing.confirmEditRequestRetry', "Whether to show a confirmation before retrying a request and its associated edits."),269default: true,270},271'chat.editing.explainChanges.enabled': {272type: 'boolean',273markdownDescription: nls.localize('chat.editing.explainChanges.enabled', "Controls whether the Explain button in the Chat panel and the Explain Changes context menu in the SCM view are shown. This is an experimental feature."),274default: false,275tags: ['experimental'],276experiment: {277mode: 'auto'278}279},280'chat.tips.enabled': {281type: 'boolean',282description: nls.localize('chat.tips.enabled', "Controls whether tips are shown above user messages in chat. This is an experimental feature."),283default: false,284tags: ['experimental'],285experiment: {286mode: 'auto'287}288},289'chat.confettiOnThumbsUp': {290type: 'boolean',291description: nls.localize('chat.confettiOnThumbsUp', "Controls whether a confetti animation is shown when clicking the thumbs up button on a chat response."),292default: false,293},294'chat.experimental.detectParticipant.enabled': {295type: 'boolean',296deprecationMessage: nls.localize('chat.experimental.detectParticipant.enabled.deprecated', "This setting is deprecated. Please use `chat.detectParticipant.enabled` instead."),297description: nls.localize('chat.experimental.detectParticipant.enabled', "Enables chat participant autodetection for panel chat."),298default: null299},300'chat.detectParticipant.enabled': {301type: 'boolean',302description: nls.localize('chat.detectParticipant.enabled', "Enables chat participant autodetection for panel chat."),303default: true304},305[ChatConfiguration.InlineReferencesStyle]: {306type: 'string',307enum: ['box', 'link'],308enumDescriptions: [309nls.localize('chat.inlineReferences.style.box', "Display file and symbol references as boxed widgets with icons."),310nls.localize('chat.inlineReferences.style.link', "Display file and symbol references as simple blue links without icons.")311],312description: nls.localize('chat.inlineReferences.style', "Controls how file and symbol references are displayed in chat messages."),313default: 'box'314},315[ChatConfiguration.EditorAssociations]: {316type: 'object',317markdownDescription: nls.localize('chat.editorAssociations', "Configure [glob patterns](https://aka.ms/vscode-glob-patterns) to editors for opening files from chat (for example `\"*.md\": \"vscode.markdown.preview.editor\"`)."),318additionalProperties: {319type: 'string'320},321default: {322}323},324'chat.notifyWindowOnConfirmation': {325type: 'boolean',326description: nls.localize('chat.notifyWindowOnConfirmation', "Controls whether a chat session should present the user with an OS notification when a confirmation is needed while the window is not in focus. This includes a window badge as well as notification toast."),327default: true,328},329[ChatConfiguration.GlobalAutoApprove]: {330default: false,331markdownDescription: globalAutoApproveDescription.value,332type: 'boolean',333scope: ConfigurationScope.APPLICATION_MACHINE,334tags: ['experimental'],335policy: {336name: 'ChatToolsAutoApprove',337category: PolicyCategory.InteractiveSession,338minimumVersion: '1.99',339value: (policyData) => policyData.chat_preview_features_enabled === false ? false : undefined,340localization: {341description: {342key: 'autoApprove2.description',343value: nls.localize('autoApprove2.description', 'Global auto approve also known as "YOLO mode" disables manual approval completely for all tools in all workspaces, allowing the agent to act fully autonomously. This is extremely dangerous and is *never* recommended, even containerized environments like Codespaces and Dev Containers have user keys forwarded into the container that could be compromised.\n\nThis feature disables critical security protections and makes it much easier for an attacker to compromise the machine.')344}345},346}347},348[ChatConfiguration.AutoApproveEdits]: {349default: {350'**/*': true,351'**/.vscode/*.json': false,352'**/.git/**': false,353'**/{package.json,server.xml,build.rs,web.config,.gitattributes,.env}': false,354'**/*.{code-workspace,csproj,fsproj,vbproj,vcxproj,proj,targets,props}': false,355'**/*.lock': false, // yarn.lock, bun.lock, etc.356'**/*-lock.{yaml,json}': false, // pnpm-lock.yaml, package-lock.json357},358markdownDescription: nls.localize('chat.tools.autoApprove.edits', "Controls whether edits made by chat are automatically approved. The default is to approve all edits except those made to certain files which have the potential to cause immediate unintended side-effects, such as `**/.vscode/*.json`.\n\nSet to `true` to automatically approve edits to matching files, `false` to always require explicit approval. The last pattern matching a given file will determine whether the edit is automatically approved."),359type: 'object',360additionalProperties: {361type: 'boolean',362}363},364[ChatConfiguration.AutoApprovedUrls]: {365default: {},366markdownDescription: nls.localize('chat.tools.fetchPage.approvedUrls', "Controls which URLs are automatically approved when requested by chat tools. Keys are URL patterns and values can be `true` to approve both requests and responses, `false` to deny, or an object with `approveRequest` and `approveResponse` properties for granular control.\n\nExamples:\n- `\"https://example.com\": true` - Approve all requests to example.com\n- `\"https://*.example.com\": true` - Approve all requests to any subdomain of example.com\n- `\"https://example.com/api/*\": { \"approveRequest\": true, \"approveResponse\": false }` - Approve requests but not responses for example.com/api paths"),367type: 'object',368additionalProperties: {369oneOf: [370{ type: 'boolean' },371{372type: 'object',373properties: {374approveRequest: { type: 'boolean' },375approveResponse: { type: 'boolean' }376}377}378]379}380},381[ChatConfiguration.EligibleForAutoApproval]: {382default: {},383markdownDescription: nls.localize('chat.tools.eligibleForAutoApproval', 'Controls which tools are eligible for automatic approval. Tools set to \'false\' will always present a confirmation and will never offer the option to auto-approve. The default behavior (or setting a tool to \'true\') may result in the tool offering auto-approval options.'),384type: 'object',385propertyNames: {386enum: toolReferenceNameEnumValues,387enumDescriptions: toolReferenceNameEnumDescriptions,388},389additionalProperties: {390type: 'boolean',391},392examples: [393{394'fetch': false,395'runTask': false396}397],398policy: {399name: 'ChatToolsEligibleForAutoApproval',400category: PolicyCategory.InteractiveSession,401minimumVersion: '1.107',402localization: {403description: {404key: 'chat.tools.eligibleForAutoApproval',405value: nls.localize('chat.tools.eligibleForAutoApproval', 'Controls which tools are eligible for automatic approval. Tools set to \'false\' will always present a confirmation and will never offer the option to auto-approve. The default behavior (or setting a tool to \'true\') may result in the tool offering auto-approval options.')406}407},408}409},410'chat.sendElementsToChat.enabled': {411default: true,412description: nls.localize('chat.sendElementsToChat.enabled', "Controls whether elements can be sent to chat from the Simple Browser."),413type: 'boolean',414tags: ['preview']415},416'chat.sendElementsToChat.attachCSS': {417default: true,418markdownDescription: nls.localize('chat.sendElementsToChat.attachCSS', "Controls whether CSS of the selected element will be added to the chat. {0} must be enabled.", '`#chat.sendElementsToChat.enabled#`'),419type: 'boolean',420tags: ['preview']421},422'chat.sendElementsToChat.attachImages': {423default: true,424markdownDescription: nls.localize('chat.sendElementsToChat.attachImages', "Controls whether a screenshot of the selected element will be added to the chat. {0} must be enabled.", '`#chat.sendElementsToChat.enabled#`'),425type: 'boolean',426tags: ['experimental']427},428'chat.undoRequests.restoreInput': {429default: true,430markdownDescription: nls.localize('chat.undoRequests.restoreInput', "Controls whether the input of the chat should be restored when an undo request is made. The input will be filled with the text of the request that was restored."),431type: 'boolean',432},433'chat.editRequests': {434markdownDescription: nls.localize('chat.editRequests', "Enables editing of requests in the chat. This allows you to change the request content and resubmit it to the model."),435type: 'string',436enum: ['inline', 'hover', 'input', 'none'],437default: 'inline',438},439[ChatConfiguration.ChatViewSessionsEnabled]: {440type: 'boolean',441default: true,442description: nls.localize('chat.viewSessions.enabled', "Show chat agent sessions when chat is empty or to the side when chat view is wide enough."),443},444[ChatConfiguration.ChatViewSessionsOrientation]: {445type: 'string',446enum: ['stacked', 'sideBySide'],447enumDescriptions: [448nls.localize('chat.viewSessions.orientation.stacked', "Display chat sessions vertically stacked above the chat input unless a chat session is visible."),449nls.localize('chat.viewSessions.orientation.sideBySide', "Display chat sessions side by side if space is sufficient, otherwise fallback to stacked above the chat input unless a chat session is visible.")450],451default: 'sideBySide',452description: nls.localize('chat.viewSessions.orientation', "Controls the orientation of the chat agent sessions view when it is shown alongside the chat."),453},454[ChatConfiguration.ChatViewProgressBadgeEnabled]: {455type: 'boolean',456default: false,457description: nls.localize('chat.viewProgressBadge.enabled', "Show a progress badge on the chat view when an agent session is in progress that is opened in that view."),458},459[ChatConfiguration.NotifyWindowOnResponseReceived]: {460type: 'boolean',461default: true,462description: nls.localize('chat.notifyWindowOnResponseReceived', "Controls whether a chat session should present the user with an OS notification when a response is received while the window is not in focus. This includes a window badge as well as notification toast."),463},464'chat.checkpoints.enabled': {465type: 'boolean',466default: true,467description: nls.localize('chat.checkpoints.enabled', "Enables checkpoints in chat. Checkpoints allow you to restore the chat to a previous state."),468},469'chat.checkpoints.showFileChanges': {470type: 'boolean',471description: nls.localize('chat.checkpoints.showFileChanges', "Controls whether to show chat checkpoint file changes."),472default: false473},474[mcpAccessConfig]: {475type: 'string',476description: nls.localize('chat.mcp.access', "Controls access to installed Model Context Protocol servers."),477enum: [478McpAccessValue.None,479McpAccessValue.Registry,480McpAccessValue.All481],482enumDescriptions: [483nls.localize('chat.mcp.access.none', "No access to MCP servers."),484nls.localize('chat.mcp.access.registry', "Allows access to MCP servers installed from the registry that VS Code is connected to."),485nls.localize('chat.mcp.access.any', "Allow access to any installed MCP server.")486],487default: McpAccessValue.All,488policy: {489name: 'ChatMCP',490category: PolicyCategory.InteractiveSession,491minimumVersion: '1.99',492value: (policyData) => {493if (policyData.mcp === false) {494return McpAccessValue.None;495}496if (policyData.mcpAccess === 'registry_only') {497return McpAccessValue.Registry;498}499return undefined;500},501localization: {502description: {503key: 'chat.mcp.access',504value: nls.localize('chat.mcp.access', "Controls access to installed Model Context Protocol servers.")505},506enumDescriptions: [507{508key: 'chat.mcp.access.none', value: nls.localize('chat.mcp.access.none', "No access to MCP servers."),509},510{511key: 'chat.mcp.access.registry', value: nls.localize('chat.mcp.access.registry', "Allows access to MCP servers installed from the registry that VS Code is connected to."),512},513{514key: 'chat.mcp.access.any', value: nls.localize('chat.mcp.access.any', "Allow access to any installed MCP server.")515}516]517},518}519},520[mcpAutoStartConfig]: {521type: 'string',522description: nls.localize('chat.mcp.autostart', "Controls whether MCP servers should be automatically started when the chat messages are submitted."),523default: McpAutoStartValue.NewAndOutdated,524enum: [525McpAutoStartValue.Never,526McpAutoStartValue.OnlyNew,527McpAutoStartValue.NewAndOutdated528],529enumDescriptions: [530nls.localize('chat.mcp.autostart.never', "Never automatically start MCP servers."),531nls.localize('chat.mcp.autostart.onlyNew', "Only automatically start new MCP servers that have never been run."),532nls.localize('chat.mcp.autostart.newAndOutdated', "Automatically start new and outdated MCP servers that are not yet running.")533],534tags: ['experimental'],535},536[mcpAppsEnabledConfig]: {537type: 'boolean',538description: nls.localize('chat.mcp.ui.enabled', "Controls whether MCP servers can provide custom UI for tool invocations."),539default: true,540tags: ['experimental'],541},542[mcpServerSamplingSection]: {543type: 'object',544description: nls.localize('chat.mcp.serverSampling', "Configures which models are exposed to MCP servers for sampling (making model requests in the background). This setting can be edited in a graphical way under the `{0}` command.", 'MCP: ' + nls.localize('mcp.list', 'List Servers')),545scope: ConfigurationScope.RESOURCE,546additionalProperties: {547type: 'object',548properties: {549allowedDuringChat: {550type: 'boolean',551description: nls.localize('chat.mcp.serverSampling.allowedDuringChat', "Whether this server is make sampling requests during its tool calls in a chat session."),552default: true,553},554allowedOutsideChat: {555type: 'boolean',556description: nls.localize('chat.mcp.serverSampling.allowedOutsideChat', "Whether this server is allowed to make sampling requests outside of a chat session."),557default: false,558},559allowedModels: {560type: 'array',561items: {562type: 'string',563description: nls.localize('chat.mcp.serverSampling.model', "A model the MCP server has access to."),564},565}566}567},568},569[AssistedTypes[AddConfigurationType.NuGetPackage].enabledConfigKey]: {570type: 'boolean',571description: nls.localize('chat.mcp.assisted.nuget.enabled.description', "Enables NuGet packages for AI-assisted MCP server installation. Used to install MCP servers by name from the central registry for .NET packages (NuGet.org)."),572default: false,573tags: ['experimental'],574experiment: {575mode: 'startup'576}577},578[ChatConfiguration.Edits2Enabled]: {579type: 'boolean',580description: nls.localize('chat.edits2Enabled', "Enable the new Edits mode that is based on tool-calling. When this is enabled, models that don't support tool-calling are unavailable for Edits mode."),581default: false,582},583[ChatConfiguration.ExtensionToolsEnabled]: {584type: 'boolean',585description: nls.localize('chat.extensionToolsEnabled', "Enable using tools contributed by third-party extensions."),586default: true,587policy: {588name: 'ChatAgentExtensionTools',589category: PolicyCategory.InteractiveSession,590minimumVersion: '1.99',591localization: {592description: {593key: 'chat.extensionToolsEnabled',594value: nls.localize('chat.extensionToolsEnabled', "Enable using tools contributed by third-party extensions.")595}596},597}598},599[ChatConfiguration.AgentEnabled]: {600type: 'boolean',601description: nls.localize('chat.agent.enabled.description', "When enabled, agent mode can be activated from chat and tools in agentic contexts with side effects can be used."),602default: true,603order: 1,604policy: {605name: 'ChatAgentMode',606category: PolicyCategory.InteractiveSession,607minimumVersion: '1.99',608value: (policyData) => policyData.chat_agent_enabled === false ? false : undefined,609localization: {610description: {611key: 'chat.agent.enabled.description',612value: nls.localize('chat.agent.enabled.description', "When enabled, agent mode can be activated from chat and tools in agentic contexts with side effects can be used."),613}614}615}616},617[ChatConfiguration.PlanAgentDefaultModel]: {618type: 'string',619description: nls.localize('chat.planAgent.defaultModel.description', "Select the default language model to use for the Plan agent from the available providers."),620default: '',621enum: PlanAgentDefaultModel.modelIds,622enumItemLabels: PlanAgentDefaultModel.modelLabels,623markdownEnumDescriptions: PlanAgentDefaultModel.modelDescriptions624},625[ChatConfiguration.RequestQueueingEnabled]: {626type: 'boolean',627description: nls.localize('chat.requestQueuing.enabled.description', "When enabled, allows queuing additional messages while a request is in progress and steering the current request with a new message."),628default: true,629tags: ['experimental'],630},631[ChatConfiguration.RequestQueueingDefaultAction]: {632type: 'string',633enum: ['queue', 'steer'],634enumDescriptions: [635nls.localize('chat.requestQueuing.defaultAction.queue', "Queue the message to send after the current request completes."),636nls.localize('chat.requestQueuing.defaultAction.steer', "Steer the current request by sending the message immediately, signaling the current request to yield."),637],638description: nls.localize('chat.requestQueuing.defaultAction.description', "Controls which action is the default for the queue button when a request is in progress."),639default: 'steer',640},641[ChatConfiguration.EditModeHidden]: {642type: 'boolean',643description: nls.localize('chat.editMode.hidden', "When enabled, hides the Edit mode from the chat mode picker."),644default: false,645tags: ['experimental'],646experiment: {647mode: 'auto'648}649},650[ChatConfiguration.AlternativeToolAction]: {651type: 'boolean',652description: nls.localize('chat.alternativeToolAction', "When enabled, shows the Configure Tools action in the mode picker dropdown on hover instead of in the chat input."),653default: false,654tags: ['experimental'],655experiment: {656mode: 'auto'657}658},659[ChatConfiguration.EnableMath]: {660type: 'boolean',661description: nls.localize('chat.mathEnabled.description', "Enable math rendering in chat responses using KaTeX."),662default: true,663},664[ChatConfiguration.ShowCodeBlockProgressAnimation]: {665type: 'boolean',666description: nls.localize('chat.codeBlock.showProgressAnimation.description', "When applying edits, show a progress animation in the code block pill. If disabled, shows the progress percentage instead."),667default: true,668tags: ['experimental'],669},670['chat.statusWidget.sku']: {671type: 'string',672enum: ['free', 'anonymous'],673enumDescriptions: [674nls.localize('chat.statusWidget.sku.free', "Show status widget for free tier users."),675nls.localize('chat.statusWidget.sku.anonymous', "Show status widget for anonymous users.")676],677description: nls.localize('chat.statusWidget.enabled.description', "Controls which user type should see the status widget in new chat sessions when quota is exceeded."),678default: undefined,679tags: ['experimental', 'advanced'],680experiment: {681mode: 'auto'682}683},684[mcpDiscoverySection]: {685type: 'object',686properties: Object.fromEntries(allDiscoverySources.map(k => [k, { type: 'boolean', description: discoverySourceSettingsLabel[k] }])),687additionalProperties: false,688default: Object.fromEntries(allDiscoverySources.map(k => [k, false])),689markdownDescription: nls.localize('mcp.discovery.enabled', "Configures discovery of Model Context Protocol servers from configuration from various other applications."),690},691[mcpGalleryServiceEnablementConfig]: {692type: 'boolean',693default: false,694tags: ['preview'],695description: nls.localize('chat.mcp.gallery.enabled', "Enables the default Marketplace for Model Context Protocol (MCP) servers."),696included: product.quality === 'stable'697},698[mcpGalleryServiceUrlConfig]: {699type: 'string',700description: nls.localize('mcp.gallery.serviceUrl', "Configure the MCP Gallery service URL to connect to"),701default: '',702scope: ConfigurationScope.APPLICATION,703tags: ['usesOnlineServices', 'advanced'],704included: false,705policy: {706name: 'McpGalleryServiceUrl',707category: PolicyCategory.InteractiveSession,708minimumVersion: '1.101',709value: (policyData) => policyData.mcpRegistryUrl,710localization: {711description: {712key: 'mcp.gallery.serviceUrl',713value: nls.localize('mcp.gallery.serviceUrl', "Configure the MCP Gallery service URL to connect to"),714}715}716},717},718[PromptsConfig.INSTRUCTIONS_LOCATION_KEY]: {719type: 'object',720title: nls.localize(721'chat.instructions.config.locations.title',722"Instructions File Locations",723),724markdownDescription: nls.localize(725'chat.instructions.config.locations.description',726"Specify location(s) of instructions files (`*{0}`) that can be attached in Chat sessions. [Learn More]({1}).\n\nRelative paths are resolved from the root folder(s) of your workspace.",727INSTRUCTION_FILE_EXTENSION,728INSTRUCTIONS_DOCUMENTATION_URL,729),730default: {731[INSTRUCTIONS_DEFAULT_SOURCE_FOLDER]: true,732[CLAUDE_RULES_SOURCE_FOLDER]: true,733},734additionalProperties: { type: 'boolean' },735propertyNames: {736pattern: VALID_PROMPT_FOLDER_PATTERN,737patternErrorMessage: nls.localize('chat.instructionsLocations.invalidPath', "Paths must be relative or start with '~/'. Absolute paths and '\\' separators are not supported. Glob patterns are deprecated and will be removed in future versions."),738},739restricted: true,740tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions'],741examples: [742{743[INSTRUCTIONS_DEFAULT_SOURCE_FOLDER]: true,744[CLAUDE_RULES_SOURCE_FOLDER]: true,745},746{747[INSTRUCTIONS_DEFAULT_SOURCE_FOLDER]: true,748'/Users/vscode/repos/instructions': true,749},750],751},752[PromptsConfig.PROMPT_LOCATIONS_KEY]: {753type: 'object',754title: nls.localize(755'chat.reusablePrompts.config.locations.title',756"Prompt File Locations",757),758markdownDescription: nls.localize(759'chat.reusablePrompts.config.locations.description',760"Specify location(s) of reusable prompt files (`*{0}`) that can be run in Chat sessions. [Learn More]({1}).\n\nRelative paths are resolved from the root folder(s) of your workspace.",761PROMPT_FILE_EXTENSION,762PROMPT_DOCUMENTATION_URL,763),764default: {765[PROMPT_DEFAULT_SOURCE_FOLDER]: true,766},767additionalProperties: { type: 'boolean' },768unevaluatedProperties: { type: 'boolean' },769propertyNames: {770pattern: VALID_PROMPT_FOLDER_PATTERN,771patternErrorMessage: nls.localize('chat.promptFileLocations.invalidPath', "Paths must be relative or start with '~/'. Absolute paths and '\\' separators are not supported. Glob patterns are deprecated and will be removed in future versions."),772},773restricted: true,774tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions'],775examples: [776{777[PROMPT_DEFAULT_SOURCE_FOLDER]: true,778},779{780[PROMPT_DEFAULT_SOURCE_FOLDER]: true,781'/Users/vscode/repos/prompts': true,782},783],784},785[PromptsConfig.MODE_LOCATION_KEY]: {786type: 'object',787title: nls.localize(788'chat.mode.config.locations.title',789"Mode File Locations",790),791markdownDescription: nls.localize(792'chat.mode.config.locations.description',793"Specify location(s) of custom chat mode files (`*{0}`). [Learn More]({1}).\n\nRelative paths are resolved from the root folder(s) of your workspace.",794LEGACY_MODE_FILE_EXTENSION,795AGENT_DOCUMENTATION_URL,796),797default: {798[LEGACY_MODE_DEFAULT_SOURCE_FOLDER]: true,799},800deprecationMessage: nls.localize('chat.mode.config.locations.deprecated', "This setting is deprecated and will be removed in future releases. Chat modes are now called custom agents and are located in `.github/agents`"),801additionalProperties: { type: 'boolean' },802unevaluatedProperties: { type: 'boolean' },803restricted: true,804tags: ['experimental', 'prompts', 'reusable prompts', 'prompt snippets', 'instructions'],805examples: [806{807[LEGACY_MODE_DEFAULT_SOURCE_FOLDER]: true,808},809{810[LEGACY_MODE_DEFAULT_SOURCE_FOLDER]: true,811'/Users/vscode/repos/chatmodes': true,812},813],814},815[PromptsConfig.AGENTS_LOCATION_KEY]: {816type: 'object',817title: nls.localize(818'chat.agents.config.locations.title',819"Agent File Locations",820),821markdownDescription: nls.localize(822'chat.agents.config.locations.description',823"Specify location(s) of custom agent files (`*{0}`). [Learn More]({1}).\n\nRelative paths are resolved from the root folder(s) of your workspace.",824AGENT_FILE_EXTENSION,825AGENT_DOCUMENTATION_URL,826),827default: {828[AGENTS_SOURCE_FOLDER]: true,829[CLAUDE_AGENTS_SOURCE_FOLDER]: true,830},831additionalProperties: { type: 'boolean' },832propertyNames: {833pattern: VALID_PROMPT_FOLDER_PATTERN,834patternErrorMessage: nls.localize('chat.agentLocations.invalidPath', "Paths must be relative or start with '~/'. Absolute paths and '\\' separators are not supported."),835},836restricted: true,837tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions'],838examples: [839{840[AGENTS_SOURCE_FOLDER]: true,841},842{843[AGENTS_SOURCE_FOLDER]: true,844'my-agents': true,845'../shared-agents': true,846'~/.copilot/agents': true,847},848],849},850[PromptsConfig.USE_AGENT_MD]: {851type: 'boolean',852title: nls.localize('chat.useAgentMd.title', "Use AGENTS.md file",),853markdownDescription: nls.localize('chat.useAgentMd.description', "Controls whether instructions from `AGENTS.md` file found in a workspace roots are attached to all chat requests.",),854default: true,855restricted: true,856disallowConfigurationDefault: true,857tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions']858},859[PromptsConfig.USE_NESTED_AGENT_MD]: {860type: 'boolean',861title: nls.localize('chat.useNestedAgentMd.title', "Use nested AGENTS.md files",),862markdownDescription: nls.localize('chat.useNestedAgentMd.description', "Controls whether instructions from nested `AGENTS.md` files found in the workspace are listed in all chat requests. The language model can load these skills on-demand if the `read` tool is available.",),863default: false,864restricted: true,865disallowConfigurationDefault: true,866tags: ['experimental', 'prompts', 'reusable prompts', 'prompt snippets', 'instructions']867},868[PromptsConfig.USE_CLAUDE_MD]: {869type: 'boolean',870title: nls.localize('chat.useClaudeMd.title', "Use CLAUDE.md file",),871markdownDescription: nls.localize('chat.useClaudeMd.description', "Controls whether instructions from `CLAUDE.md` file found in workspace roots, .claude and ~/.claude folder are attached to all chat requests.",),872default: true,873restricted: true,874disallowConfigurationDefault: true,875tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions']876},877[PromptsConfig.USE_AGENT_SKILLS]: {878type: 'boolean',879title: nls.localize('chat.useAgentSkills.title', "Use Agent skills",),880markdownDescription: nls.localize('chat.useAgentSkills.description', "Controls whether skills are provided as specialized capabilities to the chat requests. Skills are loaded from the folders configured in `#chat.agentSkillsLocations#`. The language model can load these skills on-demand if the `read` tool is available. Learn more about [Agent Skills](https://aka.ms/vscode-agent-skills).",),881default: true,882restricted: true,883disallowConfigurationDefault: true,884tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions']885},886[PromptsConfig.USE_SKILL_ADHERENCE_PROMPT]: {887type: 'boolean',888title: nls.localize('chat.useSkillAdherencePrompt.title', "Use Skill Adherence Prompt",),889markdownDescription: nls.localize('chat.useSkillAdherencePrompt.description', "Controls whether a stronger skill adherence prompt is used that encourages the model to immediately invoke skills when relevant rather than just announcing them."),890default: false,891restricted: true,892disallowConfigurationDefault: true,893tags: ['experimental', 'prompts', 'reusable prompts', 'prompt snippets', 'instructions'],894experiment: {895mode: 'auto'896}897},898[PromptsConfig.INCLUDE_APPLYING_INSTRUCTIONS]: {899type: 'boolean',900title: nls.localize('chat.includeApplyingInstructions.title', "Include Applying Instructions",),901markdownDescription: nls.localize('chat.includeApplyingInstructions.description', "Controls whether instructions with a matching 'applyTo' attribute are automatically included in chat requests.",),902default: true,903restricted: true,904disallowConfigurationDefault: true,905tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions']906},907[PromptsConfig.INCLUDE_REFERENCED_INSTRUCTIONS]: {908type: 'boolean',909title: nls.localize('chat.includeReferencedInstructions.title', "Include Referenced Instructions",),910markdownDescription: nls.localize('chat.includeReferencedInstructions.description', "Controls whether referenced instructions are automatically included in chat requests.",),911default: false,912restricted: true,913disallowConfigurationDefault: true,914tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions']915},916[PromptsConfig.SKILLS_LOCATION_KEY]: {917type: 'object',918title: nls.localize('chat.agentSkillsLocations.title', "Agent Skills Locations",),919markdownDescription: nls.localize(920'chat.agentSkillsLocations.description',921"Specify location(s) of agent skills (`{0}`) that can be used in Chat Sessions. [Learn More]({1}).\n\nEach path should contain skill subfolders with SKILL.md files (e.g., add `my-skills` if you have `my-skills/skillA/SKILL.md`). Relative paths are resolved from the root folder(s) of your workspace.",922SKILL_FILENAME,923SKILL_DOCUMENTATION_URL,924),925default: {926...DEFAULT_SKILL_SOURCE_FOLDERS.map((folder) => ({ [folder.path]: true })).reduce((acc, curr) => ({ ...acc, ...curr }), {}),927},928additionalProperties: { type: 'boolean' },929propertyNames: {930pattern: VALID_PROMPT_FOLDER_PATTERN,931patternErrorMessage: nls.localize('chat.agentSkillsLocations.invalidPath', "Paths must be relative or start with '~/'. Absolute paths and '\\' separators are not supported."),932},933restricted: true,934tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions'],935examples: [936{937[DEFAULT_SKILL_SOURCE_FOLDERS[0].path]: true,938},939{940[DEFAULT_SKILL_SOURCE_FOLDERS[0].path]: true,941'my-skills': true,942'../shared-skills': true,943'~/.custom/skills': true,944},945],946},947[PromptsConfig.HOOKS_LOCATION_KEY]: {948type: 'object',949title: nls.localize('chat.hookFilesLocations.title', "Hook File Locations",),950markdownDescription: nls.localize(951'chat.hookFilesLocations.description',952"Specify paths to hook configuration files that define custom shell commands to execute at strategic points in an agent's workflow. [Learn More]({0}).\n\nRelative paths are resolved from the root folder(s) of your workspace. Supports Copilot hooks (`*.json`) and Claude Code hooks (`settings.json`, `settings.local.json`).",953HOOK_DOCUMENTATION_URL,954),955default: {956...DEFAULT_HOOK_FILE_PATHS.map((f) => ({ [f.path]: true })).reduce((acc, curr) => ({ ...acc, ...curr }), {}),957},958additionalProperties: { type: 'boolean' },959propertyNames: {960pattern: VALID_PROMPT_FOLDER_PATTERN,961patternErrorMessage: nls.localize('chat.hookFilesLocations.invalidPath', "Paths must be relative or start with '~/'. Absolute paths and '\\' separators are not supported."),962},963restricted: true,964tags: ['prompts', 'hooks', 'agent'],965examples: [966{967[DEFAULT_HOOK_FILE_PATHS[0].path]: true,968},969{970[DEFAULT_HOOK_FILE_PATHS[0].path]: true,971'custom-hooks/hooks.json': true,972},973],974},975[PromptsConfig.USE_CHAT_HOOKS]: {976type: 'boolean',977title: nls.localize('chat.useChatHooks.title', "Use Chat Hooks",),978markdownDescription: nls.localize('chat.useChatHooks.description', "Controls whether chat hooks are executed at strategic points during an agent's workflow. Hooks are loaded from the files configured in `#chat.hookFilesLocations#`.",),979default: true,980restricted: true,981disallowConfigurationDefault: true,982tags: ['prompts', 'hooks', 'agent']983},984[PromptsConfig.PROMPT_FILES_SUGGEST_KEY]: {985type: 'object',986scope: ConfigurationScope.RESOURCE,987title: nls.localize(988'chat.promptFilesRecommendations.title',989"Prompt File Recommendations",990),991markdownDescription: nls.localize(992'chat.promptFilesRecommendations.description',993"Configure which prompt files to recommend in the chat welcome view. Each key is a prompt file name, and the value can be `true` to always recommend, `false` to never recommend, or a [when clause](https://aka.ms/vscode-when-clause) expression like `resourceExtname == .js` or `resourceLangId == markdown`.",994),995default: {},996additionalProperties: {997oneOf: [998{ type: 'boolean' },999{ type: 'string' }1000]1001},1002tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions'],1003examples: [1004{1005'plan': true,1006'a11y-audit': 'resourceExtname == .html',1007'document': 'resourceLangId == markdown'1008}1009],1010},1011[ChatConfiguration.TodosShowWidget]: {1012type: 'boolean',1013default: true,1014description: nls.localize('chat.tools.todos.showWidget', "Controls whether to show the todo list widget above the chat input. When enabled, the widget displays todo items created by the agent and updates as progress is made."),1015},1016[ChatConfiguration.ThinkingStyle]: {1017type: 'string',1018default: 'fixedScrolling',1019enum: ['collapsed', 'collapsedPreview', 'fixedScrolling'],1020enumDescriptions: [1021nls.localize('chat.agent.thinkingMode.collapsed', "Thinking parts will be collapsed by default."),1022nls.localize('chat.agent.thinkingMode.collapsedPreview', "Thinking parts will be expanded first, then collapse once we reach a part that is not thinking."),1023nls.localize('chat.agent.thinkingMode.fixedScrolling', "Show thinking in a fixed-height streaming panel that auto-scrolls; click header to expand to full height."),1024],1025description: nls.localize('chat.agent.thinkingStyle', "Controls how thinking is rendered."),1026tags: ['experimental'],1027},1028[ChatConfiguration.ThinkingGenerateTitles]: {1029type: 'boolean',1030default: true,1031description: nls.localize('chat.agent.thinking.generateTitles', "Controls whether to use an LLM to generate summary titles for thinking sections."),1032tags: ['experimental'],1033},1034'chat.agent.thinking.collapsedTools': {1035type: 'string',1036default: 'always',1037enum: ['off', 'withThinking', 'always'],1038enumDescriptions: [1039nls.localize('chat.agent.thinking.collapsedTools.off', "Tool calls are shown separately, not collapsed into thinking."),1040nls.localize('chat.agent.thinking.collapsedTools.withThinking', "Tool calls are collapsed into thinking sections when thinking is present."),1041nls.localize('chat.agent.thinking.collapsedTools.always', "Tool calls are always collapsed, even without thinking."),1042],1043markdownDescription: nls.localize('chat.agent.thinking.collapsedTools', "Controls how tool calls are displayed in relation to thinking sections."),1044tags: ['experimental'],1045},1046[ChatConfiguration.TerminalToolsInThinking]: {1047type: 'boolean',1048default: true,1049markdownDescription: nls.localize('chat.agent.thinking.terminalTools', "When enabled, terminal tool calls are displayed inside the thinking dropdown with a simplified view."),1050tags: ['experimental'],1051},1052[ChatConfiguration.AutoExpandToolFailures]: {1053type: 'boolean',1054default: true,1055markdownDescription: nls.localize('chat.tools.autoExpandFailures', "When enabled, tool failures are automatically expanded in the chat UI to show error details."),1056},1057[ChatConfiguration.AIDisabled]: {1058type: 'boolean',1059description: nls.localize('chat.disableAIFeatures', "Disable and hide built-in AI features provided by GitHub Copilot, including chat and inline suggestions."),1060default: false,1061scope: ConfigurationScope.WINDOW1062},1063'chat.allowAnonymousAccess': { // TODO@bpasero remove me eventually1064type: 'boolean',1065description: nls.localize('chat.allowAnonymousAccess', "Controls whether anonymous access is allowed in chat."),1066default: false,1067tags: ['experimental'],1068experiment: {1069mode: 'auto'1070}1071},1072[ChatConfiguration.RestoreLastPanelSession]: {1073type: 'boolean',1074description: nls.localize('chat.restoreLastPanelSession', "Controls whether the last session is restored in panel after restart."),1075default: false1076},1077[ChatConfiguration.ExitAfterDelegation]: {1078type: 'boolean',1079description: nls.localize('chat.exitAfterDelegation', "Controls whether the chat panel automatically exits after delegating a request to another session."),1080default: true,1081tags: ['preview'],1082},1083'chat.extensionUnification.enabled': {1084type: 'boolean',1085description: nls.localize('chat.extensionUnification.enabled', "Enables the unification of GitHub Copilot extensions. When enabled, all GitHub Copilot functionality is served from the GitHub Copilot Chat extension. When disabled, the GitHub Copilot and GitHub Copilot Chat extensions operate independently."),1086default: true,1087tags: ['experimental'],1088experiment: {1089mode: 'auto'1090}1091},1092[ChatConfiguration.SubagentToolCustomAgents]: {1093type: 'boolean',1094description: nls.localize('chat.subagentTool.customAgents', "Whether the runSubagent tool is able to use custom agents. When enabled, the tool can take the name of a custom agent, but it must be given the exact name of the agent."),1095default: false,1096tags: ['experimental'],1097experiment: {1098mode: 'auto'1099}1100}1101}1102});1103Registry.as<IEditorPaneRegistry>(EditorExtensions.EditorPane).registerEditorPane(1104EditorPaneDescriptor.create(1105ChatEditor,1106ChatEditorInput.EditorID,1107nls.localize('chat', "Chat")1108),1109[1110new SyncDescriptor(ChatEditorInput)1111]1112);1113Registry.as<IConfigurationMigrationRegistry>(Extensions.ConfigurationMigration).registerConfigurationMigrations([1114{1115key: 'chat.experimental.detectParticipant.enabled',1116migrateFn: (value, _accessor) => ([1117['chat.experimental.detectParticipant.enabled', { value: undefined }],1118['chat.detectParticipant.enabled', { value: value !== false }]1119])1120},1121{1122key: 'chat.useClaudeSkills',1123migrateFn: (value, _accessor) => ([1124['chat.useClaudeSkills', { value: undefined }],1125['chat.useAgentSkills', { value }]1126])1127},1128{1129key: mcpDiscoverySection,1130migrateFn: (value: unknown) => {1131if (typeof value === 'boolean') {1132return { value: Object.fromEntries(allDiscoverySources.map(k => [k, value])) };1133}11341135return { value };1136}1137},1138]);11391140class ChatResolverContribution extends Disposable {11411142static readonly ID = 'workbench.contrib.chatResolver';11431144private readonly _editorRegistrations = this._register(new DisposableMap<string>());11451146constructor(1147@IChatSessionsService chatSessionsService: IChatSessionsService,1148@IEditorResolverService private readonly editorResolverService: IEditorResolverService,1149@IInstantiationService private readonly instantiationService: IInstantiationService,1150) {1151super();11521153this._registerEditor(Schemas.vscodeChatEditor);1154this._registerEditor(Schemas.vscodeLocalChatSession);11551156this._register(chatSessionsService.onDidChangeContentProviderSchemes((e) => {1157for (const scheme of e.added) {1158this._registerEditor(scheme);1159}1160for (const scheme of e.removed) {1161this._editorRegistrations.deleteAndDispose(scheme);1162}1163}));11641165for (const scheme of chatSessionsService.getContentProviderSchemes()) {1166this._registerEditor(scheme);1167}1168}11691170private _registerEditor(scheme: string): void {1171this._editorRegistrations.set(scheme, this.editorResolverService.registerEditor(`${scheme}:**/**`,1172{1173id: ChatEditorInput.EditorID,1174label: nls.localize('chat', "Chat"),1175priority: RegisteredEditorPriority.builtin1176},1177{1178singlePerResource: true,1179canSupportResource: resource => resource.scheme === scheme,1180},1181{1182createEditorInput: ({ resource, options }) => {1183return {1184editor: this.instantiationService.createInstance(ChatEditorInput, resource, options as IChatEditorOptions),1185options1186};1187}1188}1189));1190}1191}11921193class ChatAgentSettingContribution extends Disposable implements IWorkbenchContribution {11941195static readonly ID = 'workbench.contrib.chatAgentSetting';11961197constructor(1198@IWorkbenchAssignmentService private readonly experimentService: IWorkbenchAssignmentService,1199@IChatEntitlementService private readonly entitlementService: IChatEntitlementService,1200) {1201super();1202this.registerMaxRequestsSetting();1203this.registerBackgroundAgentDisplayName();1204}120512061207private registerMaxRequestsSetting(): void {1208let lastNode: IConfigurationNode | undefined;1209const registerMaxRequestsSetting = () => {1210const treatmentId = this.entitlementService.entitlement === ChatEntitlement.Free ?1211'chatAgentMaxRequestsFree' :1212'chatAgentMaxRequestsPro';1213this.experimentService.getTreatment<number>(treatmentId).then((value) => {1214const defaultValue = value ?? (this.entitlementService.entitlement === ChatEntitlement.Free ? 25 : 25);1215const node: IConfigurationNode = {1216id: 'chatSidebar',1217title: nls.localize('interactiveSessionConfigurationTitle', "Chat"),1218type: 'object',1219properties: {1220'chat.agent.maxRequests': {1221type: 'number',1222markdownDescription: nls.localize('chat.agent.maxRequests', "The maximum number of requests to allow per-turn when using an agent. When the limit is reached, will ask to confirm to continue."),1223default: defaultValue,1224order: 2,1225},1226}1227};1228configurationRegistry.updateConfigurations({ remove: lastNode ? [lastNode] : [], add: [node] });1229lastNode = node;1230});1231};1232this._register(Event.runAndSubscribe(Event.debounce(this.entitlementService.onDidChangeEntitlement, () => { }, 1000), () => registerMaxRequestsSetting()));1233}12341235private registerBackgroundAgentDisplayName(): void {1236this.experimentService.getTreatment<string>('backgroundAgentDisplayName').then((value) => {1237if (value) {1238backgroundAgentDisplayName.set(value, undefined);1239}1240});1241}1242}124312441245/**1246* Given builtin and custom modes, returns only the custom mode IDs that should have actions registered.1247* Custom modes whose names conflict with builtin modes are excluded.1248* If there are name collisions among custom modes, the later mode in the list wins.1249*/1250function getCustomModesWithUniqueNames(builtinModes: readonly IChatMode[], customModes: readonly IChatMode[]): Set<string> {1251const customModeIds = new Set<string>();1252const builtinNames = new Set(builtinModes.map(mode => mode.name.get()));1253const customNameToId = new Map<string, string>();12541255for (const mode of customModes) {1256const modeName = mode.name.get();12571258// Skip custom modes that conflict with builtin mode names1259if (builtinNames.has(modeName)) {1260continue;1261}12621263// If there is a name collision among custom modes, the later one in the list wins1264const existingId = customNameToId.get(modeName);1265if (existingId) {1266customModeIds.delete(existingId);1267}12681269customNameToId.set(modeName, mode.id);1270customModeIds.add(mode.id);1271}12721273return customModeIds;1274}12751276/**1277* Workbench contribution to register actions for custom chat modes via events1278*/1279class ChatAgentActionsContribution extends Disposable implements IWorkbenchContribution {12801281static readonly ID = 'workbench.contrib.chatAgentActions';12821283private readonly _modeActionDisposables = new DisposableMap<string>();12841285constructor(1286@IChatModeService private readonly chatModeService: IChatModeService,1287) {1288super();1289this._store.add(this._modeActionDisposables);12901291// Register actions for existing custom modes (avoiding name collisions)1292const { builtin, custom } = this.chatModeService.getModes();1293const currentModeIds = getCustomModesWithUniqueNames(builtin, custom);1294for (const mode of custom) {1295if (currentModeIds.has(mode.id)) {1296this._registerModeAction(mode);1297}1298}12991300// Listen for custom mode changes by tracking snapshots1301this._register(this.chatModeService.onDidChangeChatModes(() => {1302const { builtin, custom } = this.chatModeService.getModes();1303const currentModeIds = getCustomModesWithUniqueNames(builtin, custom);13041305// Remove modes that no longer exist and those replaced by modes later in the list with same name1306for (const modeId of this._modeActionDisposables.keys()) {1307if (!currentModeIds.has(modeId)) {1308this._modeActionDisposables.deleteAndDispose(modeId);1309}1310}13111312// Register new modes1313for (const mode of custom) {1314if (currentModeIds.has(mode.id) && !this._modeActionDisposables.has(mode.id)) {1315this._registerModeAction(mode);1316}1317}1318}));1319}13201321private _registerModeAction(mode: IChatMode): void {1322const actionClass = class extends ModeOpenChatGlobalAction {1323constructor() {1324super(mode);1325}1326};1327this._modeActionDisposables.set(mode.id, registerAction2(actionClass));1328}1329}13301331class ToolReferenceNamesContribution extends Disposable implements IWorkbenchContribution {13321333static readonly ID = 'workbench.contrib.toolReferenceNames';13341335constructor(1336@ILanguageModelToolsService private readonly _languageModelToolsService: ILanguageModelToolsService,1337) {1338super();1339this._updateToolReferenceNames();1340this._register(this._languageModelToolsService.onDidChangeTools(() => this._updateToolReferenceNames()));1341}13421343private _updateToolReferenceNames(): void {1344const tools =1345Array.from(this._languageModelToolsService.getAllToolsIncludingDisabled())1346.filter((tool): tool is typeof tool & { toolReferenceName: string } => typeof tool.toolReferenceName === 'string')1347.sort((a, b) => a.toolReferenceName.localeCompare(b.toolReferenceName));1348toolReferenceNameEnumValues.length = 0;1349toolReferenceNameEnumDescriptions.length = 0;1350for (const tool of tools) {1351toolReferenceNameEnumValues.push(tool.toolReferenceName);1352toolReferenceNameEnumDescriptions.push(nls.localize(1353'chat.toolReferenceName.description',1354"{0} - {1}",1355tool.toolReferenceName,1356tool.userDescription || tool.displayName1357));1358}1359configurationRegistry.notifyConfigurationSchemaUpdated({1360id: 'chatSidebar',1361properties: {1362[ChatConfiguration.EligibleForAutoApproval]: {}1363}1364});1365}1366}13671368AccessibleViewRegistry.register(new ChatTerminalOutputAccessibleView());1369AccessibleViewRegistry.register(new ChatResponseAccessibleView());1370AccessibleViewRegistry.register(new PanelChatAccessibilityHelp());1371AccessibleViewRegistry.register(new QuickChatAccessibilityHelp());1372AccessibleViewRegistry.register(new EditsChatAccessibilityHelp());1373AccessibleViewRegistry.register(new AgentChatAccessibilityHelp());13741375registerEditorFeature(ChatInputBoxContentProvider);13761377class ChatSlashStaticSlashCommandsContribution extends Disposable {13781379static readonly ID = 'workbench.contrib.chatSlashStaticSlashCommands';13801381constructor(1382@IChatSlashCommandService slashCommandService: IChatSlashCommandService,1383@ICommandService commandService: ICommandService,1384@IChatAgentService chatAgentService: IChatAgentService,1385@IChatWidgetService chatWidgetService: IChatWidgetService,1386@IInstantiationService instantiationService: IInstantiationService,1387@IAgentSessionsService agentSessionsService: IAgentSessionsService,1388) {1389super();1390this._store.add(slashCommandService.registerSlashCommand({1391command: 'clear',1392detail: nls.localize('clear', "Start a new chat and archive the current one"),1393sortText: 'z2_clear',1394executeImmediately: true,1395locations: [ChatAgentLocation.Chat]1396}, async (_prompt, _progress, _history, _location, sessionResource) => {1397agentSessionsService.getSession(sessionResource)?.setArchived(true);1398commandService.executeCommand(ACTION_ID_NEW_CHAT);1399}));1400this._store.add(slashCommandService.registerSlashCommand({1401command: 'hooks',1402detail: nls.localize('hooks', "Configure hooks"),1403sortText: 'z3_hooks',1404executeImmediately: true,1405silent: true,1406locations: [ChatAgentLocation.Chat]1407}, async () => {1408await instantiationService.invokeFunction(showConfigureHooksQuickPick);1409}));1410this._store.add(slashCommandService.registerSlashCommand({1411command: 'agents',1412detail: nls.localize('agents', "Configure custom agents"),1413sortText: 'z3_agents',1414executeImmediately: true,1415silent: true,1416locations: [ChatAgentLocation.Chat]1417}, async () => {1418await commandService.executeCommand('workbench.action.chat.configure.customagents');1419}));1420this._store.add(slashCommandService.registerSlashCommand({1421command: 'skills',1422detail: nls.localize('skills', "Configure skills"),1423sortText: 'z3_skills',1424executeImmediately: true,1425silent: true,1426locations: [ChatAgentLocation.Chat]1427}, async () => {1428await commandService.executeCommand('workbench.action.chat.configure.skills');1429}));1430this._store.add(slashCommandService.registerSlashCommand({1431command: 'instructions',1432detail: nls.localize('instructions', "Configure instructions"),1433sortText: 'z3_instructions',1434executeImmediately: true,1435silent: true,1436locations: [ChatAgentLocation.Chat]1437}, async () => {1438await commandService.executeCommand('workbench.action.chat.configure.instructions');1439}));1440this._store.add(slashCommandService.registerSlashCommand({1441command: 'prompts',1442detail: nls.localize('prompts', "Configure prompt files"),1443sortText: 'z3_prompts',1444executeImmediately: true,1445silent: true,1446locations: [ChatAgentLocation.Chat]1447}, async () => {1448await commandService.executeCommand('workbench.action.chat.configure.prompts');1449}));1450this._store.add(slashCommandService.registerSlashCommand({1451command: 'help',1452detail: '',1453sortText: 'z1_help',1454executeImmediately: true,1455locations: [ChatAgentLocation.Chat],1456modes: [ChatModeKind.Ask]1457}, async (prompt, progress, _history, _location, sessionResource) => {1458const defaultAgent = chatAgentService.getDefaultAgent(ChatAgentLocation.Chat);1459const agents = chatAgentService.getAgents();14601461// Report prefix1462if (defaultAgent?.metadata.helpTextPrefix) {1463if (isMarkdownString(defaultAgent.metadata.helpTextPrefix)) {1464progress.report({ content: defaultAgent.metadata.helpTextPrefix, kind: 'markdownContent' });1465} else {1466progress.report({ content: new MarkdownString(defaultAgent.metadata.helpTextPrefix), kind: 'markdownContent' });1467}1468progress.report({ content: new MarkdownString('\n\n'), kind: 'markdownContent' });1469}14701471// Report agent list1472const agentText = (await Promise.all(agents1473.filter(a => !a.isDefault && !a.isCore)1474.filter(a => a.locations.includes(ChatAgentLocation.Chat))1475.map(async a => {1476const description = a.description ? `- ${a.description}` : '';1477const agentMarkdown = instantiationService.invokeFunction(accessor => agentToMarkdown(a, sessionResource, true, accessor));1478const agentLine = `- ${agentMarkdown} ${description}`;1479const commandText = a.slashCommands.map(c => {1480const description = c.description ? `- ${c.description}` : '';1481return `\t* ${agentSlashCommandToMarkdown(a, c, sessionResource)} ${description}`;1482}).join('\n');14831484return (agentLine + '\n' + commandText).trim();1485}))).join('\n');1486progress.report({ content: new MarkdownString(agentText, { isTrusted: { enabledCommands: [ChatSubmitAction.ID] } }), kind: 'markdownContent' });14871488// Report help text ending1489if (defaultAgent?.metadata.helpTextPostfix) {1490progress.report({ content: new MarkdownString('\n\n'), kind: 'markdownContent' });1491if (isMarkdownString(defaultAgent.metadata.helpTextPostfix)) {1492progress.report({ content: defaultAgent.metadata.helpTextPostfix, kind: 'markdownContent' });1493} else {1494progress.report({ content: new MarkdownString(defaultAgent.metadata.helpTextPostfix), kind: 'markdownContent' });1495}1496}14971498// Without this, the response will be done before it renders and so it will not stream. This ensures that if the response starts1499// rendering during the next 200ms, then it will be streamed. Once it starts streaming, the whole response streams even after1500// it has received all response data has been received.1501await timeout(200);1502}));1503}1504}1505Registry.as<IEditorFactoryRegistry>(EditorExtensions.EditorFactory).registerEditorSerializer(ChatEditorInput.TypeID, ChatEditorInputSerializer);15061507registerWorkbenchContribution2(ChatResolverContribution.ID, ChatResolverContribution, WorkbenchPhase.BlockStartup);1508registerWorkbenchContribution2(ChatLanguageModelsDataContribution.ID, ChatLanguageModelsDataContribution, WorkbenchPhase.BlockRestore);1509registerWorkbenchContribution2(ChatSlashStaticSlashCommandsContribution.ID, ChatSlashStaticSlashCommandsContribution, WorkbenchPhase.Eventually);15101511registerWorkbenchContribution2(ChatExtensionPointHandler.ID, ChatExtensionPointHandler, WorkbenchPhase.BlockStartup);1512registerWorkbenchContribution2(LanguageModelToolsExtensionPointHandler.ID, LanguageModelToolsExtensionPointHandler, WorkbenchPhase.BlockRestore);1513registerWorkbenchContribution2(ChatPromptFilesExtensionPointHandler.ID, ChatPromptFilesExtensionPointHandler, WorkbenchPhase.BlockRestore);1514registerWorkbenchContribution2(ChatCompatibilityNotifier.ID, ChatCompatibilityNotifier, WorkbenchPhase.Eventually);1515registerWorkbenchContribution2(CodeBlockActionRendering.ID, CodeBlockActionRendering, WorkbenchPhase.BlockRestore);1516registerWorkbenchContribution2(ChatImplicitContextContribution.ID, ChatImplicitContextContribution, WorkbenchPhase.Eventually);1517registerWorkbenchContribution2(ChatViewsWelcomeHandler.ID, ChatViewsWelcomeHandler, WorkbenchPhase.BlockStartup);1518registerWorkbenchContribution2(ChatGettingStartedContribution.ID, ChatGettingStartedContribution, WorkbenchPhase.Eventually);1519registerWorkbenchContribution2(ChatSetupContribution.ID, ChatSetupContribution, WorkbenchPhase.BlockRestore);1520registerWorkbenchContribution2(ChatTeardownContribution.ID, ChatTeardownContribution, WorkbenchPhase.AfterRestored);1521registerWorkbenchContribution2(ChatStatusBarEntry.ID, ChatStatusBarEntry, WorkbenchPhase.BlockRestore);1522registerWorkbenchContribution2(BuiltinToolsContribution.ID, BuiltinToolsContribution, WorkbenchPhase.Eventually);1523registerWorkbenchContribution2(ChatAgentSettingContribution.ID, ChatAgentSettingContribution, WorkbenchPhase.AfterRestored);1524registerWorkbenchContribution2(ChatAgentActionsContribution.ID, ChatAgentActionsContribution, WorkbenchPhase.Eventually);1525registerWorkbenchContribution2(ToolReferenceNamesContribution.ID, ToolReferenceNamesContribution, WorkbenchPhase.AfterRestored);1526registerWorkbenchContribution2(ChatAgentRecommendation.ID, ChatAgentRecommendation, WorkbenchPhase.Eventually);1527registerWorkbenchContribution2(ChatEditingEditorAccessibility.ID, ChatEditingEditorAccessibility, WorkbenchPhase.AfterRestored);1528registerWorkbenchContribution2(ChatQueuePickerRendering.ID, ChatQueuePickerRendering, WorkbenchPhase.BlockRestore);1529registerWorkbenchContribution2(ChatEditingEditorOverlay.ID, ChatEditingEditorOverlay, WorkbenchPhase.AfterRestored);1530registerWorkbenchContribution2(SimpleBrowserOverlay.ID, SimpleBrowserOverlay, WorkbenchPhase.AfterRestored);1531registerWorkbenchContribution2(ChatEditingEditorContextKeys.ID, ChatEditingEditorContextKeys, WorkbenchPhase.AfterRestored);1532registerWorkbenchContribution2(ChatTransferContribution.ID, ChatTransferContribution, WorkbenchPhase.BlockRestore);1533registerWorkbenchContribution2(ChatContextContributions.ID, ChatContextContributions, WorkbenchPhase.AfterRestored);1534registerWorkbenchContribution2(ChatResponseResourceFileSystemProvider.ID, ChatResponseResourceFileSystemProvider, WorkbenchPhase.AfterRestored);1535registerWorkbenchContribution2(PromptUrlHandler.ID, PromptUrlHandler, WorkbenchPhase.BlockRestore);1536registerWorkbenchContribution2(ChatEditingNotebookFileSystemProviderContrib.ID, ChatEditingNotebookFileSystemProviderContrib, WorkbenchPhase.BlockStartup);1537registerWorkbenchContribution2(UserToolSetsContributions.ID, UserToolSetsContributions, WorkbenchPhase.Eventually);1538registerWorkbenchContribution2(PromptLanguageFeaturesProvider.ID, PromptLanguageFeaturesProvider, WorkbenchPhase.Eventually);1539registerWorkbenchContribution2(ChatWindowNotifier.ID, ChatWindowNotifier, WorkbenchPhase.AfterRestored);1540registerWorkbenchContribution2(ChatRepoInfoContribution.ID, ChatRepoInfoContribution, WorkbenchPhase.Eventually);15411542registerChatActions();1543registerChatAccessibilityActions();1544registerChatCopyActions();1545registerChatCustomizationDiagnosticsAction();1546registerChatCodeBlockActions();1547registerChatCodeCompareBlockActions();1548registerChatFileTreeActions();1549registerChatPromptNavigationActions();1550registerChatTitleActions();1551registerChatExecuteActions();1552registerChatQueueActions();1553registerQuickChatActions();1554registerChatExportActions();1555registerMoveActions();1556registerNewChatActions();1557registerChatContextActions();1558registerChatDeveloperActions();1559registerChatEditorActions();1560registerChatElicitationActions();1561registerChatToolActions();1562registerLanguageModelActions();1563registerAction2(ConfigureToolSets);1564registerEditorFeature(ChatPasteProvidersFeature);156515661567registerSingleton(IChatTransferService, ChatTransferService, InstantiationType.Delayed);1568registerSingleton(IChatService, ChatService, InstantiationType.Delayed);1569registerSingleton(IChatWidgetService, ChatWidgetService, InstantiationType.Delayed);1570registerSingleton(IQuickChatService, QuickChatService, InstantiationType.Delayed);1571registerSingleton(IChatAccessibilityService, ChatAccessibilityService, InstantiationType.Delayed);1572registerSingleton(IChatWidgetHistoryService, ChatWidgetHistoryService, InstantiationType.Delayed);1573registerSingleton(ILanguageModelsConfigurationService, LanguageModelsConfigurationService, InstantiationType.Delayed);1574registerSingleton(ILanguageModelsService, LanguageModelsService, InstantiationType.Delayed);1575registerSingleton(ILanguageModelStatsService, LanguageModelStatsService, InstantiationType.Delayed);1576registerSingleton(IChatSlashCommandService, ChatSlashCommandService, InstantiationType.Delayed);1577registerSingleton(IChatAgentService, ChatAgentService, InstantiationType.Delayed);1578registerSingleton(IChatAgentNameService, ChatAgentNameService, InstantiationType.Delayed);1579registerSingleton(IChatVariablesService, ChatVariablesService, InstantiationType.Delayed);1580registerSingleton(ILanguageModelToolsService, LanguageModelToolsService, InstantiationType.Delayed);1581registerSingleton(ILanguageModelToolsConfirmationService, LanguageModelToolsConfirmationService, InstantiationType.Delayed);1582registerSingleton(IVoiceChatService, VoiceChatService, InstantiationType.Delayed);1583registerSingleton(IChatCodeBlockContextProviderService, ChatCodeBlockContextProviderService, InstantiationType.Delayed);1584registerSingleton(ICodeMapperService, CodeMapperService, InstantiationType.Delayed);1585registerSingleton(IChatEditingService, ChatEditingService, InstantiationType.Delayed);1586registerSingleton(IChatMarkdownAnchorService, ChatMarkdownAnchorService, InstantiationType.Delayed);1587registerSingleton(ILanguageModelIgnoredFilesService, LanguageModelIgnoredFilesService, InstantiationType.Delayed);1588registerSingleton(IPromptsService, PromptsService, InstantiationType.Delayed);1589registerSingleton(IChatContextPickService, ChatContextPickService, InstantiationType.Delayed);1590registerSingleton(IChatModeService, ChatModeService, InstantiationType.Delayed);1591registerSingleton(IChatAttachmentResolveService, ChatAttachmentResolveService, InstantiationType.Delayed);1592registerSingleton(IChatTodoListService, ChatTodoListService, InstantiationType.Delayed);1593registerSingleton(IChatOutputRendererService, ChatOutputRendererService, InstantiationType.Delayed);1594registerSingleton(IChatLayoutService, ChatLayoutService, InstantiationType.Delayed);1595registerSingleton(IChatTipService, ChatTipService, InstantiationType.Delayed);15961597ChatWidget.CONTRIBS.push(ChatDynamicVariableModel);159815991600