@codingame/monaco-vscode-chat-service-override 37.0.0 → 37.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +26 -5
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/agentHostEnablementService.js +1 -1
- package/vscode/src/vs/platform/agentHost/browser/agentHostProtocolClient.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.d.ts +74 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.js +90 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostSlashCommand.d.ts +8 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostSlashCommand.js +16 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +53 -53
- package/vscode/src/vs/platform/agentHost/common/agentHostWorkingDirectories.d.ts +16 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostWorkingDirectories.js +14 -0
- package/vscode/src/vs/platform/agentHost/common/agentMerge.js +7 -7
- package/vscode/src/vs/platform/agentHost/common/agentModelByokMeta.d.ts +24 -0
- package/vscode/src/vs/platform/agentHost/common/agentModelByokMeta.js +13 -0
- package/vscode/src/vs/platform/agentHost/common/agentModelNotices.d.ts +22 -0
- package/vscode/src/vs/platform/agentHost/common/agentModelNotices.js +21 -0
- package/vscode/src/vs/platform/agentHost/common/agentModelPricing.d.ts +114 -0
- package/vscode/src/vs/platform/agentHost/common/agentModelPricing.js +56 -0
- package/vscode/src/vs/platform/agentHost/common/changesetUri.js +15 -1
- package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.d.ts +73 -0
- package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.js +141 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.js +42 -1
- package/vscode/src/vs/platform/agentHost/common/meta/agentCustomizationMeta.d.ts +27 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentCustomizationMeta.js +14 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentEphemeralSessionMeta.d.ts +14 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentEphemeralSessionMeta.js +11 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +13 -13
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +4 -1
- package/vscode/src/vs/platform/agentHost/common/toolSearchConstants.d.ts +4 -0
- package/vscode/src/vs/platform/agentHost/common/toolSearchConstants.js +6 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +104 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +827 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +71 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +16 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +95 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +286 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.js +38 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatQuota.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatQuota.js +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +130 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +907 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js +28 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +167 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +46 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +356 -0
- package/vscode/src/vs/workbench/browser/chatChangesPill.js +2 -2
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +28 -28
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +2 -2
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +18 -18
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +4 -4
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +3 -3
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +6 -6
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +11 -11
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +11 -11
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +9 -9
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +5 -5
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +2 -2
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +7 -7
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +28 -28
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +93 -93
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginCommands.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.js +229 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.js +460 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHost.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHost.contribution.js +92 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAllowSignedOutWhenUsableContribution.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAllowSignedOutWhenUsableContribution.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.d.ts +142 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAuth.js +746 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.d.ts +77 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.js +474 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostConfigEditor.d.ts +169 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostConfigEditor.js +261 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.js +90 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostDownloadProgress.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostDownloadProgress.js +73 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostExistingSessionHarnessPickerEnablement.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostExistingSessionHarnessPickerEnablement.js +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.js +192 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.js +137 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.js +301 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.d.ts +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.js +96 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.d.ts +884 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.js +5870 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.js +129 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.js +221 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.d.ts +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.js +345 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettings.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettings.contribution.js +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettingsFileSystemProvider.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettingsFileSystemProvider.js +163 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.js +219 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSubagentProgress.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSubagentProgress.js +50 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.js +132 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.d.ts +79 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.js +161 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSubmitConfig.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSubmitConfig.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/copilotConfigSlashSubmitHandler.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/copilotConfigSlashSubmitHandler.js +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.js +205 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +51 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/externalSessionsFilterMenu.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHover.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +126 -126
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +44 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +138 -138
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +37 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCardList.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.js +146 -146
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationDashboard.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +40 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +76 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +116 -116
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.js +50 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +356 -356
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +38 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +124 -124
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +72 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +36 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +40 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPills.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +63 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.js +35 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +62 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimeline.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionChatPillOptions.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionPullRequestPill.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugEvents.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +253 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +300 -0
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +272 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +178 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +51 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +67 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +195 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +67 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +294 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +212 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +955 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +698 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +78 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +77 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +120 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +154 -154
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +92 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +335 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +235 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +1673 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +202 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +872 -0
- package/vscode/src/vs/workbench/contrib/chat/common/sessionChatPills.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +239 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.js +143 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +298 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +177 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +73 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +577 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +90 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +130 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +91 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +518 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +231 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +9 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +10 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +74 -74
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +11 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +8 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +4 -4
- package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.js +3 -3
- package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.d.ts +0 -30
- package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.js +0 -87
- package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.d.ts +0 -205
- package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.js +0 -1580
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
4
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
5
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
6
|
+
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
7
|
+
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
|
+
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
9
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
10
|
+
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
11
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
12
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
13
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
15
|
+
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
16
|
+
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
17
|
+
import { ChatRequestVariableSet } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
|
|
18
|
+
import { isByokModel } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/common/chatSelectedModel';
|
|
19
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
20
|
+
import { ChatAgentLocation, ChatModeKind, ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
21
|
+
import { ILanguageModelChatMetadata, COPILOT_VENDOR_ID, AUTO_RAW_MODEL_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
|
|
22
|
+
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
23
|
+
import { getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
24
|
+
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service';
|
|
25
|
+
import { ComputeAutomaticInstructions } from '../../promptSyntax/computeAutomaticInstructions.js';
|
|
26
|
+
import { mergeHooks } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema';
|
|
27
|
+
import { HookType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes';
|
|
28
|
+
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
29
|
+
import { isBuiltinAgent } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/utils/promptsServiceUtils';
|
|
30
|
+
import { ToolDataSource, VSCodeToolReference, isToolSet } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
31
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
32
|
+
import { ManageTodoListToolToolId } from './manageTodoListTool.js';
|
|
33
|
+
import { createToolSimpleTextResult } from './toolHelpers.js';
|
|
34
|
+
|
|
35
|
+
var RunSubagentTool_1;
|
|
36
|
+
const BaseModelDescription = `Launch a new agent to handle complex, multi-step tasks autonomously. This tool is good at researching complex questions, searching for code, and executing multi-step tasks. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries, use this agent to perform the search for you.
|
|
37
|
+
|
|
38
|
+
- Agents do not run async or in the background, you will wait for the agent\'s result.
|
|
39
|
+
- When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result.
|
|
40
|
+
- Each agent invocation is stateless. You will not be able to send additional messages to the agent, nor will the agent be able to communicate with you outside of its final report. Therefore, your prompt should contain a highly detailed task description for the agent to perform autonomously and you should specify exactly what information the agent should return back to you in its final and only message to you.
|
|
41
|
+
- The agent's outputs should generally be trusted
|
|
42
|
+
- Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.), since it is not aware of the user\'s intent
|
|
43
|
+
- If the user asks for a certain agent, you MUST provide that EXACT agent name (case-sensitive) to invoke that specific agent.`;
|
|
44
|
+
const RUN_SUBAGENT_MAX_NESTING_DEPTH = 5;
|
|
45
|
+
let RunSubagentTool = class RunSubagentTool extends Disposable {
|
|
46
|
+
static {
|
|
47
|
+
RunSubagentTool_1 = this;
|
|
48
|
+
}
|
|
49
|
+
static {
|
|
50
|
+
this.Id = "runSubagent";
|
|
51
|
+
}
|
|
52
|
+
constructor(
|
|
53
|
+
chatAgentService,
|
|
54
|
+
chatService,
|
|
55
|
+
languageModelToolsService,
|
|
56
|
+
languageModelsService,
|
|
57
|
+
logService,
|
|
58
|
+
configurationService,
|
|
59
|
+
promptsService,
|
|
60
|
+
instantiationService,
|
|
61
|
+
productService,
|
|
62
|
+
telemetryService
|
|
63
|
+
) {
|
|
64
|
+
super();
|
|
65
|
+
this.chatAgentService = chatAgentService;
|
|
66
|
+
this.chatService = chatService;
|
|
67
|
+
this.languageModelToolsService = languageModelToolsService;
|
|
68
|
+
this.languageModelsService = languageModelsService;
|
|
69
|
+
this.logService = logService;
|
|
70
|
+
this.configurationService = configurationService;
|
|
71
|
+
this.promptsService = promptsService;
|
|
72
|
+
this.instantiationService = instantiationService;
|
|
73
|
+
this.productService = productService;
|
|
74
|
+
this.telemetryService = telemetryService;
|
|
75
|
+
this._onDidUpdateToolData = this._register(( new Emitter()));
|
|
76
|
+
this.onDidUpdateToolData = this._onDidUpdateToolData.event;
|
|
77
|
+
this._resolvedModels = ( new Map());
|
|
78
|
+
this._sessionDepth = ( new Map());
|
|
79
|
+
this._register(
|
|
80
|
+
this.languageModelsService.onDidChangeLanguageModels(() => this._autoModelResolution = undefined)
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
getToolData() {
|
|
84
|
+
const modelDescription = BaseModelDescription;
|
|
85
|
+
const properties = {
|
|
86
|
+
prompt: {
|
|
87
|
+
type: "string",
|
|
88
|
+
description: "A detailed description of the task for the agent to perform"
|
|
89
|
+
},
|
|
90
|
+
description: {
|
|
91
|
+
type: "string",
|
|
92
|
+
description: "A short (3-5 word) description of the task"
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
properties.agentName = {
|
|
96
|
+
type: "string",
|
|
97
|
+
description: "Optional name of a specific agent to invoke. If not provided, uses the current agent."
|
|
98
|
+
};
|
|
99
|
+
properties.model = {
|
|
100
|
+
type: "string",
|
|
101
|
+
description: "Optional model for the subagent. Format: \"Model Name (Vendor)\", vendor is usually \"copilot\". Only use to enforce a specific model."
|
|
102
|
+
};
|
|
103
|
+
const inputSchema = {
|
|
104
|
+
type: "object",
|
|
105
|
+
properties,
|
|
106
|
+
required: ["prompt", "description"]
|
|
107
|
+
};
|
|
108
|
+
const runSubagentToolData = {
|
|
109
|
+
id: RunSubagentTool_1.Id,
|
|
110
|
+
toolReferenceName: VSCodeToolReference.runSubagent,
|
|
111
|
+
icon: ThemeIcon.fromId(Codicon.organization.id),
|
|
112
|
+
displayName: ( localize(10894, "Run Subagent")),
|
|
113
|
+
userDescription: ( localize(
|
|
114
|
+
10895,
|
|
115
|
+
"Run a task within an isolated subagent context to enable efficient organization of tasks and context window management."
|
|
116
|
+
)),
|
|
117
|
+
modelDescription: modelDescription,
|
|
118
|
+
source: ToolDataSource.Internal,
|
|
119
|
+
inputSchema: inputSchema
|
|
120
|
+
};
|
|
121
|
+
return runSubagentToolData;
|
|
122
|
+
}
|
|
123
|
+
async invoke(invocation, _countTokens, _progress, token) {
|
|
124
|
+
const args = invocation.parameters;
|
|
125
|
+
this.logService.debug(
|
|
126
|
+
`RunSubagentTool: Invoking with prompt: ${args.prompt.substring(0, 100)}...`
|
|
127
|
+
);
|
|
128
|
+
if (!invocation.context) {
|
|
129
|
+
throw ( new Error("toolInvocationToken is required for this tool"));
|
|
130
|
+
}
|
|
131
|
+
const model = this.chatService.getSession(invocation.context.sessionResource);
|
|
132
|
+
if (!model) {
|
|
133
|
+
throw ( new Error("Chat model not found for session"));
|
|
134
|
+
}
|
|
135
|
+
const request = model.getRequests().at(-1);
|
|
136
|
+
let subagentCredits;
|
|
137
|
+
const store = ( new DisposableStore());
|
|
138
|
+
try {
|
|
139
|
+
const defaultAgent = this.chatAgentService.getDefaultAgent(ChatAgentLocation.Chat, ChatModeKind.Agent);
|
|
140
|
+
if (!defaultAgent) {
|
|
141
|
+
return createToolSimpleTextResult("Error: No default agent available");
|
|
142
|
+
}
|
|
143
|
+
let modeModelId = invocation.modelId;
|
|
144
|
+
let modeTools = invocation.userSelectedTools;
|
|
145
|
+
let modeInstructions;
|
|
146
|
+
let subagent;
|
|
147
|
+
let resolvedModelName;
|
|
148
|
+
let modelSelectionSource = "mainModel";
|
|
149
|
+
const currentModeInstructions = request.modeInfo?.modeInstructions;
|
|
150
|
+
const subAgentName = this.normalizeRequestedAgentName(args.agentName);
|
|
151
|
+
const effectiveSubAgentName = subAgentName ?? currentModeInstructions?.name;
|
|
152
|
+
if (subAgentName) {
|
|
153
|
+
this.validateSubagentAllowed(subAgentName, currentModeInstructions);
|
|
154
|
+
subagent = await this.getSubAgentByName(subAgentName);
|
|
155
|
+
if (subagent) {
|
|
156
|
+
const cached = this._resolvedModels.get(invocation.callId);
|
|
157
|
+
if (cached) {
|
|
158
|
+
this._resolvedModels.delete(invocation.callId);
|
|
159
|
+
modeModelId = cached.modeModelId;
|
|
160
|
+
resolvedModelName = cached.resolvedModelName;
|
|
161
|
+
modelSelectionSource = cached.selectionSource;
|
|
162
|
+
} else {
|
|
163
|
+
const resolved = await this.resolveSubagentModel(subagent, invocation.modelId, args.model);
|
|
164
|
+
modeModelId = resolved.modeModelId;
|
|
165
|
+
resolvedModelName = resolved.resolvedModelName;
|
|
166
|
+
modelSelectionSource = resolved.selectionSource;
|
|
167
|
+
}
|
|
168
|
+
const modeCustomTools = subagent.tools;
|
|
169
|
+
if (modeCustomTools) {
|
|
170
|
+
const enablementMap = this.languageModelToolsService.toToolAndToolSetEnablementMap(modeCustomTools, undefined);
|
|
171
|
+
modeTools = {};
|
|
172
|
+
for (const [tool, enabled] of enablementMap) {
|
|
173
|
+
if (!isToolSet(tool)) {
|
|
174
|
+
modeTools[tool.id] = enabled;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
const instructions = subagent.agentInstructions;
|
|
179
|
+
modeInstructions = instructions && {
|
|
180
|
+
name: subAgentName,
|
|
181
|
+
content: instructions.content,
|
|
182
|
+
toolReferences: instructions.toolReferences.length ? this.languageModelToolsService.toToolReferences(instructions.toolReferences) : [],
|
|
183
|
+
allowedSubagents: subagent.agents,
|
|
184
|
+
metadata: instructions.metadata,
|
|
185
|
+
isBuiltin: isBuiltinAgent(subagent.source, subagent.uri, this.productService)
|
|
186
|
+
};
|
|
187
|
+
} else {
|
|
188
|
+
this._resolvedModels.delete(invocation.callId);
|
|
189
|
+
throw ( new Error(
|
|
190
|
+
`Requested agent '${subAgentName}' not found. Try again with the correct agent name, or omit agentName to use the current agent.`
|
|
191
|
+
));
|
|
192
|
+
}
|
|
193
|
+
} else {
|
|
194
|
+
modeInstructions = currentModeInstructions;
|
|
195
|
+
const cached = this._resolvedModels.get(invocation.callId);
|
|
196
|
+
if (cached) {
|
|
197
|
+
this._resolvedModels.delete(invocation.callId);
|
|
198
|
+
modeModelId = cached.modeModelId;
|
|
199
|
+
resolvedModelName = cached.resolvedModelName;
|
|
200
|
+
modelSelectionSource = cached.selectionSource;
|
|
201
|
+
} else {
|
|
202
|
+
const resolved = await this.resolveSubagentModel(undefined, invocation.modelId, args.model, currentModeInstructions);
|
|
203
|
+
modeModelId = resolved.modeModelId;
|
|
204
|
+
resolvedModelName = resolved.resolvedModelName;
|
|
205
|
+
modelSelectionSource = resolved.selectionSource;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
const markdownParts = [];
|
|
209
|
+
const subAgentInvocationId = invocation.chatStreamToolCallId ?? invocation.callId ?? `subagent-${generateUuid()}`;
|
|
210
|
+
let inEdit = false;
|
|
211
|
+
const progressCallback = parts => {
|
|
212
|
+
for (const part of parts) {
|
|
213
|
+
if (part.kind === "usage") {
|
|
214
|
+
if (typeof part.copilotCredits === "number" && Number.isFinite(part.copilotCredits) && part.copilotCredits >= 0) {
|
|
215
|
+
subagentCredits = Math.max(subagentCredits ?? 0, part.copilotCredits);
|
|
216
|
+
}
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
if (part.kind === "textEdit" || part.kind === "notebookEdit" || part.kind === "codeblockUri") {
|
|
220
|
+
if (part.kind === "codeblockUri" && !inEdit) {
|
|
221
|
+
inEdit = true;
|
|
222
|
+
model.acceptResponseProgress(request, {
|
|
223
|
+
kind: "markdownContent",
|
|
224
|
+
content: ( new MarkdownString("```\n"))
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
if (part.kind === "codeblockUri") {
|
|
228
|
+
model.acceptResponseProgress(request, {
|
|
229
|
+
...part,
|
|
230
|
+
subAgentInvocationId
|
|
231
|
+
});
|
|
232
|
+
} else {
|
|
233
|
+
model.acceptResponseProgress(request, part);
|
|
234
|
+
}
|
|
235
|
+
} else if (part.kind === "hook") {
|
|
236
|
+
model.acceptResponseProgress(request, {
|
|
237
|
+
...part,
|
|
238
|
+
subAgentInvocationId
|
|
239
|
+
});
|
|
240
|
+
} else if (part.kind === "markdownContent") {
|
|
241
|
+
if (inEdit) {
|
|
242
|
+
model.acceptResponseProgress(request, {
|
|
243
|
+
kind: "markdownContent",
|
|
244
|
+
content: ( new MarkdownString("\n```\n\n"))
|
|
245
|
+
});
|
|
246
|
+
inEdit = false;
|
|
247
|
+
}
|
|
248
|
+
markdownParts.push(part.content.value);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
const allowInvocationsFromSubagents = this.configurationService.getValue(ChatConfiguration.SubagentsAllowInvocationsFromSubagents) ?? false;
|
|
253
|
+
const maxDepth = allowInvocationsFromSubagents ? RUN_SUBAGENT_MAX_NESTING_DEPTH : 0;
|
|
254
|
+
const sessionKey = ( invocation.context.sessionResource.toString());
|
|
255
|
+
const currentDepth = this._sessionDepth.get(sessionKey) ?? 0;
|
|
256
|
+
const depthAllowed = currentDepth + 1 <= maxDepth;
|
|
257
|
+
if (!modeTools) {
|
|
258
|
+
modeTools = {};
|
|
259
|
+
}
|
|
260
|
+
const existingRunSubagentEnablement = modeTools[RunSubagentTool_1.Id];
|
|
261
|
+
if (existingRunSubagentEnablement !== false) {
|
|
262
|
+
modeTools[RunSubagentTool_1.Id] = depthAllowed;
|
|
263
|
+
}
|
|
264
|
+
modeTools[ManageTodoListToolToolId] = false;
|
|
265
|
+
modeTools["copilot_askQuestions"] = false;
|
|
266
|
+
if (maxDepth > 0) {
|
|
267
|
+
this.logService.debug(
|
|
268
|
+
`RunSubagentTool: Nested subagents enabling ${modeTools[RunSubagentTool_1.Id]}: session ${sessionKey}, currentDepth: ${currentDepth}, maxDepth: ${maxDepth}, allowInvocationsFromSubagents: ${allowInvocationsFromSubagents}`
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
const variableSet = ( new ChatRequestVariableSet());
|
|
272
|
+
if (this.configurationService.getValue(ChatConfiguration.CollectInstructionsInExtension) !== true) {
|
|
273
|
+
const computer = this.instantiationService.createInstance(
|
|
274
|
+
ComputeAutomaticInstructions,
|
|
275
|
+
ChatModeKind.Agent,
|
|
276
|
+
modeTools,
|
|
277
|
+
modeInstructions?.allowedSubagents,
|
|
278
|
+
getChatSessionType(invocation.context.sessionResource)
|
|
279
|
+
);
|
|
280
|
+
await computer.collect(variableSet, token);
|
|
281
|
+
}
|
|
282
|
+
let collectedHooks;
|
|
283
|
+
try {
|
|
284
|
+
const info = await this.promptsService.getHooks(token);
|
|
285
|
+
collectedHooks = info?.hooks;
|
|
286
|
+
} catch (error) {
|
|
287
|
+
this.logService.warn("[ChatService] Failed to collect hooks:", error);
|
|
288
|
+
}
|
|
289
|
+
if (subagent?.hooks) {
|
|
290
|
+
const remapped = {
|
|
291
|
+
...subagent.hooks
|
|
292
|
+
};
|
|
293
|
+
if (remapped[HookType.Stop]) {
|
|
294
|
+
const stopHooks = remapped[HookType.Stop];
|
|
295
|
+
remapped[HookType.SubagentStop] = remapped[HookType.SubagentStop] ? [...remapped[HookType.SubagentStop], ...stopHooks] : stopHooks;
|
|
296
|
+
remapped[HookType.Stop] = undefined;
|
|
297
|
+
}
|
|
298
|
+
collectedHooks = mergeHooks(collectedHooks, remapped);
|
|
299
|
+
}
|
|
300
|
+
const agentRequest = {
|
|
301
|
+
sessionResource: invocation.context.sessionResource,
|
|
302
|
+
requestId: invocation.callId ?? `subagent-${Date.now()}`,
|
|
303
|
+
agentId: defaultAgent.id,
|
|
304
|
+
message: args.prompt,
|
|
305
|
+
variables: {
|
|
306
|
+
variables: variableSet.asArray()
|
|
307
|
+
},
|
|
308
|
+
location: ChatAgentLocation.Chat,
|
|
309
|
+
subAgentInvocationId: subAgentInvocationId,
|
|
310
|
+
subAgentName: effectiveSubAgentName,
|
|
311
|
+
userSelectedModelId: modeModelId,
|
|
312
|
+
modelConfiguration: modeModelId ? this.languageModelsService.getModelConfiguration(modeModelId) : undefined,
|
|
313
|
+
userSelectedTools: modeTools,
|
|
314
|
+
modeInstructions,
|
|
315
|
+
parentRequestId: invocation.chatRequestId,
|
|
316
|
+
hooks: collectedHooks,
|
|
317
|
+
hasHooksEnabled: !!collectedHooks && ( ( Object.values(collectedHooks)).some(arr => arr && arr.length > 0))
|
|
318
|
+
};
|
|
319
|
+
store.add(this.languageModelToolsService.onDidInvokeTool(e => {
|
|
320
|
+
if (e.subagentInvocationId === subAgentInvocationId) {
|
|
321
|
+
markdownParts.length = 0;
|
|
322
|
+
}
|
|
323
|
+
}));
|
|
324
|
+
this.telemetryService.publicLog2("chat.subagentModelSelection", {
|
|
325
|
+
selectionSource: modelSelectionSource
|
|
326
|
+
});
|
|
327
|
+
this._sessionDepth.set(sessionKey, currentDepth + 1);
|
|
328
|
+
let result;
|
|
329
|
+
try {
|
|
330
|
+
result = await this.chatAgentService.invokeAgent(defaultAgent.id, agentRequest, progressCallback, [], token);
|
|
331
|
+
} finally {
|
|
332
|
+
const newDepth = (this._sessionDepth.get(sessionKey) ?? 1) - 1;
|
|
333
|
+
if (newDepth <= 0) {
|
|
334
|
+
this._sessionDepth.delete(sessionKey);
|
|
335
|
+
} else {
|
|
336
|
+
this._sessionDepth.set(sessionKey, newDepth);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
if (result?.errorDetails) {
|
|
340
|
+
return createToolSimpleTextResult(`Agent error: ${result.errorDetails.message}`);
|
|
341
|
+
}
|
|
342
|
+
const resultText = markdownParts.join("").replace(/^\n*```\n+```\n*/g, "").trim() || "Agent completed with no output";
|
|
343
|
+
if (invocation.toolSpecificData?.kind === "subagent") {
|
|
344
|
+
invocation.toolSpecificData.result = resultText;
|
|
345
|
+
invocation.toolSpecificData.modelName = resolvedModelName;
|
|
346
|
+
}
|
|
347
|
+
return {
|
|
348
|
+
content: [{
|
|
349
|
+
kind: "text",
|
|
350
|
+
value: resultText
|
|
351
|
+
}],
|
|
352
|
+
toolMetadata: {
|
|
353
|
+
subAgentInvocationId,
|
|
354
|
+
description: args.description,
|
|
355
|
+
agentName: agentRequest.subAgentName,
|
|
356
|
+
modelName: resolvedModelName
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
} catch (error) {
|
|
360
|
+
const errorMessage = `Error invoking subagent: ${error instanceof Error ? error.message : "Unknown error"}`;
|
|
361
|
+
this.logService.error(errorMessage, error);
|
|
362
|
+
return createToolSimpleTextResult(errorMessage);
|
|
363
|
+
} finally {
|
|
364
|
+
if (subagentCredits !== undefined) {
|
|
365
|
+
request.response?.setSubagentCopilotCredits(invocation.callId, subagentCredits);
|
|
366
|
+
if (invocation.toolSpecificData?.kind === "subagent") {
|
|
367
|
+
invocation.toolSpecificData.credits = subagentCredits;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
store.dispose();
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
async getSubAgentByName(name) {
|
|
374
|
+
const agents = await this.promptsService.getCustomAgents(CancellationToken.None);
|
|
375
|
+
return agents.find(agent => agent.name === name && agent.enabled);
|
|
376
|
+
}
|
|
377
|
+
checkMultiplierConstraint(modelId, mainModelId) {
|
|
378
|
+
if (!mainModelId || modelId === mainModelId) {
|
|
379
|
+
return {
|
|
380
|
+
exceeds: false
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
const mainModelMetadata = this.languageModelsService.lookupLanguageModel(mainModelId);
|
|
384
|
+
const modelMetadata = this.languageModelsService.lookupLanguageModel(modelId);
|
|
385
|
+
const mainMultiplier = mainModelMetadata?.multiplierNumeric;
|
|
386
|
+
const modelMultiplier = modelMetadata?.multiplierNumeric;
|
|
387
|
+
if (mainMultiplier !== undefined && modelMultiplier !== undefined && modelMultiplier > mainMultiplier) {
|
|
388
|
+
return {
|
|
389
|
+
exceeds: true,
|
|
390
|
+
reason: `exceeds the current model's cost tier (${modelMultiplier}x vs ${mainMultiplier}x)`
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
return {
|
|
394
|
+
exceeds: false
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
getAvailableModelsInfo(mainModelId) {
|
|
398
|
+
const models = ( this.languageModelsService.getLanguageModelIds().map(id => ({
|
|
399
|
+
id,
|
|
400
|
+
metadata: this.languageModelsService.lookupLanguageModel(id)
|
|
401
|
+
}))).filter(m => !!m.metadata && this.isSelectableForAgentMode(m.metadata));
|
|
402
|
+
if (models.length === 0) {
|
|
403
|
+
return "No models available.";
|
|
404
|
+
}
|
|
405
|
+
const available = [];
|
|
406
|
+
const unavailableDueToMultiplier = [];
|
|
407
|
+
for (const {
|
|
408
|
+
id,
|
|
409
|
+
metadata
|
|
410
|
+
} of models) {
|
|
411
|
+
const qualifiedName = ILanguageModelChatMetadata.asQualifiedName(metadata);
|
|
412
|
+
const check = this.checkMultiplierConstraint(id, mainModelId);
|
|
413
|
+
if (check.exceeds) {
|
|
414
|
+
unavailableDueToMultiplier.push(qualifiedName);
|
|
415
|
+
} else {
|
|
416
|
+
available.push(qualifiedName);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
const parts = [];
|
|
420
|
+
if (available.length > 0) {
|
|
421
|
+
parts.push(`Available models: ${available.join(", ")}`);
|
|
422
|
+
}
|
|
423
|
+
if (unavailableDueToMultiplier.length > 0) {
|
|
424
|
+
parts.push(
|
|
425
|
+
`Unavailable (exceeds current model's cost tier): ${unavailableDueToMultiplier.join(", ")}`
|
|
426
|
+
);
|
|
427
|
+
}
|
|
428
|
+
return parts.join(". ") || "No models available.";
|
|
429
|
+
}
|
|
430
|
+
async resolveSubagentModel(subagent, mainModelId, explicitModelQualifiedName, currentModeInstructions) {
|
|
431
|
+
let modeModelId = mainModelId;
|
|
432
|
+
let explicitModelResolved = false;
|
|
433
|
+
let usesAutoDefault = false;
|
|
434
|
+
let selectionSource = "mainModel";
|
|
435
|
+
const mainModelMetadata = mainModelId ? this.languageModelsService.lookupLanguageModel(mainModelId) : undefined;
|
|
436
|
+
if (explicitModelQualifiedName) {
|
|
437
|
+
const lm = this.languageModelsService.lookupLanguageModelByQualifiedName(explicitModelQualifiedName);
|
|
438
|
+
if (lm?.identifier) {
|
|
439
|
+
modeModelId = lm.identifier;
|
|
440
|
+
explicitModelResolved = true;
|
|
441
|
+
selectionSource = "explicitModel";
|
|
442
|
+
} else {
|
|
443
|
+
throw ( new Error(
|
|
444
|
+
`Requested model '${explicitModelQualifiedName}' not found. ${this.getAvailableModelsInfo(mainModelId)}`
|
|
445
|
+
));
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
if (subagent && !explicitModelResolved) {
|
|
449
|
+
const modeModelQualifiedNames = subagent.model;
|
|
450
|
+
if (modeModelQualifiedNames) {
|
|
451
|
+
const mainModelIsByok = !!mainModelMetadata && isByokModel(mainModelMetadata);
|
|
452
|
+
const skipCopilotFallbacks = mainModelIsByok && isBuiltinAgent(subagent.source, subagent.uri, this.productService);
|
|
453
|
+
for (const qualifiedName of modeModelQualifiedNames) {
|
|
454
|
+
const lmByQualifiedName = this.languageModelsService.lookupLanguageModelByQualifiedName(qualifiedName);
|
|
455
|
+
if (lmByQualifiedName?.identifier) {
|
|
456
|
+
if (skipCopilotFallbacks && lmByQualifiedName.metadata.vendor === COPILOT_VENDOR_ID) {
|
|
457
|
+
continue;
|
|
458
|
+
}
|
|
459
|
+
modeModelId = lmByQualifiedName.identifier;
|
|
460
|
+
selectionSource = "agentModel";
|
|
461
|
+
break;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
if (!explicitModelResolved && !subagent?.model?.length && (!mainModelId || (!!mainModelMetadata && !isByokModel(mainModelMetadata))) && this.configurationService.getValue(ChatConfiguration.SubagentsDefaultToAuto) === true && !(await this.inheritedAgentHasModel(subagent, currentModeInstructions))) {
|
|
467
|
+
const autoModelId = await this.resolveAutoModelId();
|
|
468
|
+
if (autoModelId) {
|
|
469
|
+
modeModelId = autoModelId;
|
|
470
|
+
usesAutoDefault = true;
|
|
471
|
+
selectionSource = "autoDefault";
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
if (modeModelId && !usesAutoDefault) {
|
|
475
|
+
const check = this.checkMultiplierConstraint(modeModelId, mainModelId);
|
|
476
|
+
if (check.exceeds) {
|
|
477
|
+
const modelMetadata = this.languageModelsService.lookupLanguageModel(modeModelId);
|
|
478
|
+
throw ( new Error(
|
|
479
|
+
`Requested model '${modelMetadata?.name}' ${check.reason}. ${this.getAvailableModelsInfo(mainModelId)}`
|
|
480
|
+
));
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
const resolvedModelMetadata = modeModelId ? this.languageModelsService.lookupLanguageModel(modeModelId) : undefined;
|
|
484
|
+
return {
|
|
485
|
+
modeModelId,
|
|
486
|
+
resolvedModelName: resolvedModelMetadata?.name,
|
|
487
|
+
selectionSource
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
async inheritedAgentHasModel(subagent, currentModeInstructions) {
|
|
491
|
+
if (subagent || !currentModeInstructions) {
|
|
492
|
+
return false;
|
|
493
|
+
}
|
|
494
|
+
const {
|
|
495
|
+
uri,
|
|
496
|
+
name
|
|
497
|
+
} = currentModeInstructions;
|
|
498
|
+
const agents = await this.promptsService.getCustomAgents(CancellationToken.None);
|
|
499
|
+
const currentAgent = agents.find(
|
|
500
|
+
agent => uri ? isEqual(agent.uri, uri) : agent.name === name && agent.enabled
|
|
501
|
+
);
|
|
502
|
+
return !!currentAgent?.model?.length;
|
|
503
|
+
}
|
|
504
|
+
isSelectableForAgentMode(metadata) {
|
|
505
|
+
return ILanguageModelChatMetadata.suitableForAgentMode(metadata) && metadata.isUserSelectable !== false && !metadata.targetChatSessionType;
|
|
506
|
+
}
|
|
507
|
+
findEligibleAutoModelId(modelIds) {
|
|
508
|
+
return modelIds.find(modelId => {
|
|
509
|
+
const metadata = this.languageModelsService.lookupLanguageModel(modelId);
|
|
510
|
+
return metadata?.vendor === COPILOT_VENDOR_ID && metadata.id === AUTO_RAW_MODEL_ID && this.isSelectableForAgentMode(metadata);
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
resolveAutoModelId() {
|
|
514
|
+
const cachedModelId = this.findEligibleAutoModelId(this.languageModelsService.getLanguageModelIds());
|
|
515
|
+
if (cachedModelId || this.languageModelsService.hasResolvedVendor(COPILOT_VENDOR_ID)) {
|
|
516
|
+
return Promise.resolve(cachedModelId);
|
|
517
|
+
}
|
|
518
|
+
this._autoModelResolution ??= this.activateAutoModel();
|
|
519
|
+
return this._autoModelResolution;
|
|
520
|
+
}
|
|
521
|
+
async activateAutoModel() {
|
|
522
|
+
try {
|
|
523
|
+
const modelIds = await this.languageModelsService.selectLanguageModels({
|
|
524
|
+
vendor: COPILOT_VENDOR_ID,
|
|
525
|
+
id: AUTO_RAW_MODEL_ID
|
|
526
|
+
});
|
|
527
|
+
return this.findEligibleAutoModelId(modelIds);
|
|
528
|
+
} catch (error) {
|
|
529
|
+
this.logService.warn(
|
|
530
|
+
"RunSubagentTool: Failed to resolve the Auto model, keeping the main model",
|
|
531
|
+
error
|
|
532
|
+
);
|
|
533
|
+
return undefined;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
async prepareToolInvocation(context, _token) {
|
|
537
|
+
const args = context.parameters;
|
|
538
|
+
const requestedAgentName = this.normalizeRequestedAgentName(args.agentName);
|
|
539
|
+
const currentModeInstructions = context.chatSessionResource ? this.getCurrentModeInstructions(context.chatSessionResource) : undefined;
|
|
540
|
+
if (requestedAgentName) {
|
|
541
|
+
this.validateSubagentAllowed(requestedAgentName, currentModeInstructions);
|
|
542
|
+
}
|
|
543
|
+
const subagent = requestedAgentName ? await this.getSubAgentByName(requestedAgentName) : undefined;
|
|
544
|
+
const resolved = await this.resolveSubagentModel(subagent, context.modelId, args.model, currentModeInstructions);
|
|
545
|
+
this._resolvedModels.set(context.toolCallId, resolved);
|
|
546
|
+
return {
|
|
547
|
+
invocationMessage: args.description,
|
|
548
|
+
toolSpecificData: {
|
|
549
|
+
kind: "subagent",
|
|
550
|
+
description: args.description,
|
|
551
|
+
agentName: subagent?.name ?? requestedAgentName ?? currentModeInstructions?.name,
|
|
552
|
+
prompt: args.prompt,
|
|
553
|
+
modelName: resolved.resolvedModelName
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
normalizeRequestedAgentName(agentName) {
|
|
558
|
+
const normalized = agentName?.trim();
|
|
559
|
+
return normalized ? normalized : undefined;
|
|
560
|
+
}
|
|
561
|
+
getCurrentModeInstructions(sessionResource) {
|
|
562
|
+
if (typeof this.chatService.getSession !== "function") {
|
|
563
|
+
return undefined;
|
|
564
|
+
}
|
|
565
|
+
const model = this.chatService.getSession(sessionResource);
|
|
566
|
+
return model?.getRequests().at(-1)?.modeInfo?.modeInstructions;
|
|
567
|
+
}
|
|
568
|
+
validateSubagentAllowed(subAgentName, currentModeInstructions) {
|
|
569
|
+
const allowedSubagents = currentModeInstructions?.allowedSubagents;
|
|
570
|
+
if (allowedSubagents && !allowedSubagents.includes("*") && !allowedSubagents.includes(subAgentName)) {
|
|
571
|
+
throw ( new Error(`Requested agent '${subAgentName}' is not allowed by the current agent.`));
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
};
|
|
575
|
+
RunSubagentTool = RunSubagentTool_1 = ( __decorate([( __param(0, IChatAgentService)), ( __param(1, IChatService)), ( __param(2, ILanguageModelToolsService)), ( __param(3, ILanguageModelsService)), ( __param(4, ILogService)), ( __param(5, IConfigurationService)), ( __param(6, IPromptsService)), ( __param(7, IInstantiationService)), ( __param(8, IProductService)), ( __param(9, ITelemetryService))], RunSubagentTool));
|
|
576
|
+
|
|
577
|
+
export { RUN_SUBAGENT_MAX_NESTING_DEPTH, RunSubagentTool };
|
package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { IToolData, IToolImpl, IToolInvocation, IToolResult, IToolInvocationPreparationContext, IPreparedToolInvocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
3
|
+
import { IChatArtifactsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/chatArtifactsService.service";
|
|
4
|
+
export declare const SetArtifactRulesToolId = "setArtifactRules";
|
|
5
|
+
export declare const SetArtifactRulesToolData: IToolData;
|
|
6
|
+
export declare class SetArtifactRulesTool implements IToolImpl {
|
|
7
|
+
private readonly _chatArtifactsService;
|
|
8
|
+
constructor(_chatArtifactsService: IChatArtifactsService);
|
|
9
|
+
prepareToolInvocation(_context: IToolInvocationPreparationContext, _token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
10
|
+
invoke(invocation: IToolInvocation, _countTokens: never, _progress: never, _token: CancellationToken): Promise<IToolResult>;
|
|
11
|
+
}
|