@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,132 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { OS } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
4
|
+
import { Disposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
6
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
7
|
+
import { IAgentHostService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service';
|
|
8
|
+
import { IAgentHostEnablementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostEnablementService.service';
|
|
9
|
+
import { AgentHostConfigKey } from '../../../../../../platform/agentHost/common/agentHostCustomizationConfig.js';
|
|
10
|
+
import { CopilotCliConfigKey, AgentHostCustomTerminalToolEnabledSettingId } from '@codingame/monaco-vscode-katex-common/vscode/vs/platform/agentHost/common/copilotCliConfig';
|
|
11
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
12
|
+
import { IDefaultAccountService } from '@codingame/monaco-vscode-api/vscode/vs/platform/defaultAccount/common/defaultAccount.service';
|
|
13
|
+
import { TerminalSettingId } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal';
|
|
14
|
+
import { ITerminalProfileService, ITerminalProfileResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminal.service';
|
|
15
|
+
import { IAgentHostTerminalService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/agentHostTerminalService.service';
|
|
16
|
+
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
17
|
+
import { AgentHostRootConfigForwarder } from './agentHostRootConfigForwarder.js';
|
|
18
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
19
|
+
|
|
20
|
+
const AGENT_HOST_SHELL_DEPENDENT_SETTINGS = [
|
|
21
|
+
TerminalSettingId.AgentHostProfileLinux,
|
|
22
|
+
TerminalSettingId.AgentHostProfileMacOs,
|
|
23
|
+
TerminalSettingId.AgentHostProfileWindows,
|
|
24
|
+
TerminalSettingId.DefaultProfileLinux,
|
|
25
|
+
TerminalSettingId.DefaultProfileMacOs,
|
|
26
|
+
TerminalSettingId.DefaultProfileWindows,
|
|
27
|
+
TerminalSettingId.ProfilesLinux,
|
|
28
|
+
TerminalSettingId.ProfilesMacOs,
|
|
29
|
+
TerminalSettingId.ProfilesWindows
|
|
30
|
+
];
|
|
31
|
+
let AgentHostTerminalContribution = class AgentHostTerminalContribution extends Disposable {
|
|
32
|
+
static {
|
|
33
|
+
this.ID = "workbench.contrib.agentHostTerminal";
|
|
34
|
+
}
|
|
35
|
+
constructor(
|
|
36
|
+
_agentHostService,
|
|
37
|
+
_agentHostTerminalService,
|
|
38
|
+
_configurationService,
|
|
39
|
+
_terminalProfileService,
|
|
40
|
+
_terminalProfileResolverService,
|
|
41
|
+
_defaultAccountService,
|
|
42
|
+
_agentHostEnablementService,
|
|
43
|
+
environmentService
|
|
44
|
+
) {
|
|
45
|
+
super();
|
|
46
|
+
this._agentHostService = _agentHostService;
|
|
47
|
+
this._agentHostTerminalService = _agentHostTerminalService;
|
|
48
|
+
this._configurationService = _configurationService;
|
|
49
|
+
this._terminalProfileService = _terminalProfileService;
|
|
50
|
+
this._terminalProfileResolverService = _terminalProfileResolverService;
|
|
51
|
+
this._defaultAccountService = _defaultAccountService;
|
|
52
|
+
this._agentHostEnablementService = _agentHostEnablementService;
|
|
53
|
+
this._localEntry = this._register(( new MutableDisposable()));
|
|
54
|
+
this._conditionalListeners = this._register(( new MutableDisposable()));
|
|
55
|
+
const defaultShellKey = {
|
|
56
|
+
key: AgentHostConfigKey.DefaultShell,
|
|
57
|
+
computeValue: () => this._resolveDefaultShell(),
|
|
58
|
+
registerTriggers: (store, push) => {
|
|
59
|
+
store.add(this._configurationService.onDidChangeConfiguration(e => {
|
|
60
|
+
if (( AGENT_HOST_SHELL_DEPENDENT_SETTINGS.some(s => e.affectsConfiguration(s)))) {
|
|
61
|
+
push();
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
64
|
+
store.add(this._terminalProfileService.onDidChangeAvailableProfiles(() => push()));
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const keys = [...(environmentService.remoteAuthority ? [] : [defaultShellKey]), {
|
|
68
|
+
key: CopilotCliConfigKey.EnableCustomTerminalTool,
|
|
69
|
+
computeValue: () => this._configurationService.getValue(AgentHostCustomTerminalToolEnabledSettingId) === true,
|
|
70
|
+
registerTriggers: (store, push) => {
|
|
71
|
+
store.add(this._configurationService.onDidChangeConfiguration(e => {
|
|
72
|
+
if (e.affectsConfiguration(AgentHostCustomTerminalToolEnabledSettingId)) {
|
|
73
|
+
push();
|
|
74
|
+
}
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
key: AgentHostConfigKey.GithubEnterpriseUri,
|
|
79
|
+
computeValue: () => {
|
|
80
|
+
const provider = this._defaultAccountService.getDefaultAccountAuthenticationProvider();
|
|
81
|
+
return provider.enterprise ? this._defaultAccountService.resolveGitHubUrl("").replace(/\/+$/, "") : "";
|
|
82
|
+
},
|
|
83
|
+
registerTriggers: (store, push) => {
|
|
84
|
+
store.add(this._defaultAccountService.onDidChangeDefaultAccount(() => push()));
|
|
85
|
+
}
|
|
86
|
+
}];
|
|
87
|
+
this._forwarder = this._register(( new AgentHostRootConfigForwarder(keys, this._agentHostService)));
|
|
88
|
+
this._register(autorun(
|
|
89
|
+
reader => this._updateEnabled(this._agentHostEnablementService.enabled.read(reader))
|
|
90
|
+
));
|
|
91
|
+
}
|
|
92
|
+
_updateEnabled(enabled) {
|
|
93
|
+
if (enabled) {
|
|
94
|
+
if (!this._conditionalListeners.value) {
|
|
95
|
+
const store = ( new DisposableStore());
|
|
96
|
+
store.add(this._agentHostService.onAgentHostStart(() => this._registerLocalEntry()));
|
|
97
|
+
this._conditionalListeners.value = store;
|
|
98
|
+
this._registerLocalEntry();
|
|
99
|
+
this._forwarder.start();
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
this._conditionalListeners.value = undefined;
|
|
103
|
+
this._localEntry.value = undefined;
|
|
104
|
+
this._forwarder.stop();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
_registerLocalEntry() {
|
|
108
|
+
if (!this._localEntry.value) {
|
|
109
|
+
this._localEntry.value = this._agentHostTerminalService.registerEntry({
|
|
110
|
+
name: ( localize(6114, "Local")),
|
|
111
|
+
address: "__local__",
|
|
112
|
+
getConnection: () => this._agentHostService
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
async _resolveDefaultShell() {
|
|
117
|
+
let profile;
|
|
118
|
+
try {
|
|
119
|
+
profile = await this._terminalProfileResolverService.getDefaultProfile({
|
|
120
|
+
remoteAuthority: undefined,
|
|
121
|
+
os: OS,
|
|
122
|
+
allowAgentHostShell: true
|
|
123
|
+
});
|
|
124
|
+
} catch {
|
|
125
|
+
return undefined;
|
|
126
|
+
}
|
|
127
|
+
return profile.path || undefined;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
AgentHostTerminalContribution = ( __decorate([( __param(0, IAgentHostService)), ( __param(1, IAgentHostTerminalService)), ( __param(2, IConfigurationService)), ( __param(3, ITerminalProfileService)), ( __param(4, ITerminalProfileResolverService)), ( __param(5, IDefaultAccountService)), ( __param(6, IAgentHostEnablementService)), ( __param(7, IWorkbenchEnvironmentService))], AgentHostTerminalContribution));
|
|
131
|
+
|
|
132
|
+
export { AgentHostTerminalContribution };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
|
+
import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
6
|
+
import { AGENT_HOST_ENABLED_CONTEXT_KEY } from '@codingame/monaco-vscode-katex-common/vscode/vs/platform/agentHost/common/agentHostEnablementService';
|
|
7
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
8
|
+
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
9
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
10
|
+
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
11
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
12
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
13
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
14
|
+
import { isMarshalledAgentSessionContext, isAgentSession } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
|
|
15
|
+
import { AgentSessionSettingsSchemaRegistrar, AgentSessionSettingsFileSystemProvider, AGENT_SESSION_SETTINGS_SCHEME, agentSessionSettingsUri } from './agentSessionSettingsFileSystemProvider.js';
|
|
16
|
+
import { toAgentHostBackendSessionUri } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionUri';
|
|
17
|
+
|
|
18
|
+
let AgentSessionSettingsContribution = class AgentSessionSettingsContribution extends Disposable {
|
|
19
|
+
static {
|
|
20
|
+
this.ID = "workbench.contrib.chat.agentSessionSettingsEditor";
|
|
21
|
+
}
|
|
22
|
+
constructor(fileService, instantiationService, labelService) {
|
|
23
|
+
super();
|
|
24
|
+
const schemaRegistrar = this._register(instantiationService.createInstance(AgentSessionSettingsSchemaRegistrar));
|
|
25
|
+
const provider = this._register(
|
|
26
|
+
instantiationService.createInstance(AgentSessionSettingsFileSystemProvider, schemaRegistrar)
|
|
27
|
+
);
|
|
28
|
+
this._register(fileService.registerProvider(AGENT_SESSION_SETTINGS_SCHEME, provider));
|
|
29
|
+
this._register(labelService.registerFormatter({
|
|
30
|
+
scheme: AGENT_SESSION_SETTINGS_SCHEME,
|
|
31
|
+
formatting: {
|
|
32
|
+
label: ( localize(6115, "Session Settings")),
|
|
33
|
+
separator: "/"
|
|
34
|
+
}
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
AgentSessionSettingsContribution = ( __decorate([( __param(0, IFileService)), ( __param(1, IInstantiationService)), ( __param(2, ILabelService))], AgentSessionSettingsContribution));
|
|
39
|
+
registerWorkbenchContribution2(
|
|
40
|
+
AgentSessionSettingsContribution.ID,
|
|
41
|
+
AgentSessionSettingsContribution,
|
|
42
|
+
WorkbenchPhase.AfterRestored
|
|
43
|
+
);
|
|
44
|
+
const LOCAL_AGENT_HOST_SESSION_TYPE_RE = /^agent-host-/;
|
|
45
|
+
const agentSessionSettingsPrecondition = ( ContextKeyExpr.and(ChatContextKeys.enabled, AGENT_HOST_ENABLED_CONTEXT_KEY));
|
|
46
|
+
function resolveSelectedSession(context) {
|
|
47
|
+
if (isMarshalledAgentSessionContext(context)) {
|
|
48
|
+
return context.session;
|
|
49
|
+
}
|
|
50
|
+
if (isAgentSession(context)) {
|
|
51
|
+
return context;
|
|
52
|
+
}
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
registerAction2(class OpenAgentSessionSettingsAction extends Action2 {
|
|
56
|
+
constructor() {
|
|
57
|
+
super({
|
|
58
|
+
id: "workbench.action.chat.openAgentSessionSettings",
|
|
59
|
+
title: ( localize2(6116, "Open Session Settings")),
|
|
60
|
+
menu: [{
|
|
61
|
+
id: MenuId.AgentSessionsContext,
|
|
62
|
+
group: "3_settings",
|
|
63
|
+
order: 2,
|
|
64
|
+
when: ( ContextKeyExpr.and(agentSessionSettingsPrecondition, ( ContextKeyExpr.regex(ChatContextKeys.agentSessionType.key, LOCAL_AGENT_HOST_SESSION_TYPE_RE))))
|
|
65
|
+
}]
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
async run(accessor, context) {
|
|
69
|
+
const session = resolveSelectedSession(context);
|
|
70
|
+
if (!session) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const backendSession = toAgentHostBackendSessionUri(session.resource);
|
|
74
|
+
if (!backendSession) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const editorService = accessor.get(IEditorService);
|
|
78
|
+
await editorService.openEditor({
|
|
79
|
+
resource: agentSessionSettingsUri(backendSession),
|
|
80
|
+
options: {
|
|
81
|
+
pinned: true
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { IDisposable, IReference } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
5
|
+
import { IAgentHostService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service";
|
|
6
|
+
import { SessionState } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
|
|
7
|
+
import { IAgentSubscription } from "../../../../../../platform/agentHost/common/state/agentSubscription.js";
|
|
8
|
+
import { AbstractAgentHostConfigFileSystemProvider, AbstractAgentHostConfigSchemaRegistrar, AgentHostConfigPropertyFilter, IAgentHostConfigLike, IAgentHostSettingsLocale } from "./agentHostConfigEditor.js";
|
|
9
|
+
/** Scheme for the synthetic editor-window agent-host session settings file. */
|
|
10
|
+
export declare const AGENT_SESSION_SETTINGS_SCHEME = "agent-session-settings";
|
|
11
|
+
/**
|
|
12
|
+
* Build the URI used to open the settings file for a backend agent-host
|
|
13
|
+
* session in the editor window.
|
|
14
|
+
*
|
|
15
|
+
* URI shape: `agent-session-settings://{provider}/{rawId}.jsonc`, where
|
|
16
|
+
* `provider`/`rawId` are the scheme/path of the backend AHP session URI
|
|
17
|
+
* (see {@link toAgentHostBackendSessionUri}), so the URI round-trips back to
|
|
18
|
+
* the backend session without any additional lookup.
|
|
19
|
+
*/
|
|
20
|
+
export declare function agentSessionSettingsUri(backendSession: URI): URI;
|
|
21
|
+
interface ISessionSettingsContext {
|
|
22
|
+
readonly backendSession: URI;
|
|
23
|
+
}
|
|
24
|
+
interface ISessionSettingsTarget {
|
|
25
|
+
readonly backendSession: URI;
|
|
26
|
+
readonly ref: IReference<IAgentSubscription<SessionState>>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Filesystem provider serving synthetic JSONC documents representing the
|
|
30
|
+
* session-mutable config values of a selected agent-host session in the
|
|
31
|
+
* editor window. Unlike the sessions-window's provider-keyed equivalent,
|
|
32
|
+
* there is no `ISessionsProvidersService` to resolve a target from - the
|
|
33
|
+
* backend AHP session URI is encoded directly in the settings URI (see
|
|
34
|
+
* {@link agentSessionSettingsUri}).
|
|
35
|
+
*
|
|
36
|
+
* Every {@link _resolveTarget} call acquires a fresh, scoped reference via
|
|
37
|
+
* {@link IAgentHostService.getSubscription} and {@link _releaseTarget}
|
|
38
|
+
* releases exactly that reference - there is no provider-local cache or
|
|
39
|
+
* refcount map. `stat`/`readFile`/`writeFile` hold their reference only for
|
|
40
|
+
* the duration of the call; a `watch` holds its reference until the caller
|
|
41
|
+
* disposes it. Multiple concurrent references to the same backend session
|
|
42
|
+
* are deduped and refcounted by {@link IAgentHostService} itself.
|
|
43
|
+
*/
|
|
44
|
+
export declare class AgentSessionSettingsFileSystemProvider extends AbstractAgentHostConfigFileSystemProvider<ISessionSettingsContext, ISessionSettingsTarget> {
|
|
45
|
+
private readonly _schemaRegistrar;
|
|
46
|
+
private readonly _agentHostService;
|
|
47
|
+
private readonly _configurationService;
|
|
48
|
+
protected readonly _schemeLabel = "agent-session-settings";
|
|
49
|
+
protected readonly _traceTag = "AgentSessionSettings";
|
|
50
|
+
protected readonly _locale: IAgentHostSettingsLocale;
|
|
51
|
+
constructor(_schemaRegistrar: AgentSessionSettingsSchemaRegistrar, _agentHostService: IAgentHostService, _configurationService: IConfigurationService, logService: ILogService);
|
|
52
|
+
protected _parseUri(resource: URI): ISessionSettingsContext | undefined;
|
|
53
|
+
protected _resolveTarget(ctx: ISessionSettingsContext): ISessionSettingsTarget;
|
|
54
|
+
protected _releaseTarget(target: ISessionSettingsTarget): void;
|
|
55
|
+
protected _serialize(target: ISessionSettingsTarget): string;
|
|
56
|
+
protected _watchChanges(target: ISessionSettingsTarget, _ctx: ISessionSettingsContext, fire: () => void): IDisposable;
|
|
57
|
+
protected _ensureSchemaRegistered(target: ISessionSettingsTarget): void;
|
|
58
|
+
protected _hasConfig(target: ISessionSettingsTarget): boolean;
|
|
59
|
+
protected _replaceConfig(target: ISessionSettingsTarget, ctx: ISessionSettingsContext, values: Record<string, unknown>): Promise<void>;
|
|
60
|
+
protected _describeForTrace(ctx: ISessionSettingsContext): string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Keeps the JSON schema registered for an open `agent-session-settings://...`
|
|
64
|
+
* document. Reads the current config via
|
|
65
|
+
* {@link IAgentHostService.getSubscriptionUnmanaged}, which returns the live
|
|
66
|
+
* value of the {@link AgentSessionSettingsFileSystemProvider}'s own managed
|
|
67
|
+
* subscription for the same backend session (already acquired by the time
|
|
68
|
+
* `readFile` calls {@link ensureRegistered}) - the registrar itself never
|
|
69
|
+
* acquires a subscription.
|
|
70
|
+
*/
|
|
71
|
+
export declare class AgentSessionSettingsSchemaRegistrar extends AbstractAgentHostConfigSchemaRegistrar<URI> {
|
|
72
|
+
private readonly _agentHostService;
|
|
73
|
+
constructor(_agentHostService: IAgentHostService);
|
|
74
|
+
protected _propertyFilter(): AgentHostConfigPropertyFilter;
|
|
75
|
+
protected _settingsUri(backendSession: URI): string;
|
|
76
|
+
protected _schemaId(backendSession: URI): string;
|
|
77
|
+
protected _getConfig(backendSession: URI): IAgentHostConfigLike | undefined;
|
|
78
|
+
}
|
|
79
|
+
export {};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
|
|
4
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
5
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
7
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
8
|
+
import { IAgentHostService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service';
|
|
9
|
+
import { ActionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/actions';
|
|
10
|
+
import { StateComponents } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
11
|
+
import { isAutoApprovePolicyRestricted, normalizeSessionConfigValue } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/common/agentHostConfigPolicy';
|
|
12
|
+
import { AbstractAgentHostConfigFileSystemProvider, serializeAgentHostConfigDocument, AbstractAgentHostConfigSchemaRegistrar } from './agentHostConfigEditor.js';
|
|
13
|
+
|
|
14
|
+
const AGENT_SESSION_SETTINGS_SCHEME = "agent-session-settings";
|
|
15
|
+
const SUBSCRIPTION_OWNER = "AgentSessionSettingsEditor";
|
|
16
|
+
function agentSessionSettingsUri(backendSession) {
|
|
17
|
+
const rawId = backendSession.path.startsWith("/") ? backendSession.path.substring(1) : backendSession.path;
|
|
18
|
+
return ( URI.from({
|
|
19
|
+
scheme: AGENT_SESSION_SETTINGS_SCHEME,
|
|
20
|
+
authority: backendSession.scheme,
|
|
21
|
+
path: `/${rawId}.jsonc`
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
function parseSessionSettingsUri(uri) {
|
|
25
|
+
if (uri.scheme !== AGENT_SESSION_SETTINGS_SCHEME || !uri.authority) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
let rawId = uri.path.startsWith("/") ? uri.path.substring(1) : uri.path;
|
|
29
|
+
const lastDot = rawId.lastIndexOf(".");
|
|
30
|
+
if (lastDot > 0) {
|
|
31
|
+
rawId = rawId.substring(0, lastDot);
|
|
32
|
+
}
|
|
33
|
+
if (!rawId) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
backendSession: ( URI.from({
|
|
38
|
+
scheme: uri.authority,
|
|
39
|
+
path: `/${rawId}`
|
|
40
|
+
}))
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
const sessionSettingsPropertyFilter = (_key, schema) => {
|
|
44
|
+
const s = schema;
|
|
45
|
+
return s.sessionMutable === true && s.readOnly !== true;
|
|
46
|
+
};
|
|
47
|
+
const sessionSettingsLocale = {
|
|
48
|
+
get header() {
|
|
49
|
+
return localize(6117, "Session settings for this agent host session.");
|
|
50
|
+
},
|
|
51
|
+
get saveHint() {
|
|
52
|
+
return localize(
|
|
53
|
+
6118,
|
|
54
|
+
"Edit values below and save to apply. Unknown or non-mutable properties are ignored."
|
|
55
|
+
);
|
|
56
|
+
},
|
|
57
|
+
get parseError() {
|
|
58
|
+
return localize(6119, "Failed to parse agent session settings as JSON.");
|
|
59
|
+
},
|
|
60
|
+
get notObject() {
|
|
61
|
+
return localize(6120, "Agent session settings must be a JSON object.");
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
function readSessionConfig(state) {
|
|
65
|
+
if (!state || state instanceof Error || !state.config) {
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
return state.config;
|
|
69
|
+
}
|
|
70
|
+
let AgentSessionSettingsFileSystemProvider = class AgentSessionSettingsFileSystemProvider extends AbstractAgentHostConfigFileSystemProvider {
|
|
71
|
+
constructor(_schemaRegistrar, _agentHostService, _configurationService, logService) {
|
|
72
|
+
super(logService);
|
|
73
|
+
this._schemaRegistrar = _schemaRegistrar;
|
|
74
|
+
this._agentHostService = _agentHostService;
|
|
75
|
+
this._configurationService = _configurationService;
|
|
76
|
+
this._schemeLabel = AGENT_SESSION_SETTINGS_SCHEME;
|
|
77
|
+
this._traceTag = "AgentSessionSettings";
|
|
78
|
+
this._locale = sessionSettingsLocale;
|
|
79
|
+
}
|
|
80
|
+
_parseUri(resource) {
|
|
81
|
+
return parseSessionSettingsUri(resource);
|
|
82
|
+
}
|
|
83
|
+
_resolveTarget(ctx) {
|
|
84
|
+
const ref = this._agentHostService.getSubscription(StateComponents.Session, ctx.backendSession, SUBSCRIPTION_OWNER);
|
|
85
|
+
return {
|
|
86
|
+
backendSession: ctx.backendSession,
|
|
87
|
+
ref
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
_releaseTarget(target) {
|
|
91
|
+
target.ref.dispose();
|
|
92
|
+
}
|
|
93
|
+
_serialize(target) {
|
|
94
|
+
return serializeAgentHostConfigDocument(
|
|
95
|
+
readSessionConfig(target.ref.object.value),
|
|
96
|
+
sessionSettingsPropertyFilter,
|
|
97
|
+
sessionSettingsLocale
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
_watchChanges(target, _ctx, fire) {
|
|
101
|
+
return target.ref.object.onDidChange(() => fire());
|
|
102
|
+
}
|
|
103
|
+
_ensureSchemaRegistered(target) {
|
|
104
|
+
this._schemaRegistrar.ensureRegistered(target.backendSession);
|
|
105
|
+
}
|
|
106
|
+
_hasConfig(target) {
|
|
107
|
+
return readSessionConfig(target.ref.object.value) !== undefined;
|
|
108
|
+
}
|
|
109
|
+
async _replaceConfig(target, ctx, values) {
|
|
110
|
+
const current = readSessionConfig(target.ref.object.value);
|
|
111
|
+
if (!current) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const policyRestricted = isAutoApprovePolicyRestricted(this._configurationService);
|
|
115
|
+
const nextValues = {};
|
|
116
|
+
for (const [key, schema] of Object.entries(current.schema.properties)) {
|
|
117
|
+
if (sessionSettingsPropertyFilter(key, schema)) {
|
|
118
|
+
if (Object.hasOwn(values, key)) {
|
|
119
|
+
nextValues[key] = normalizeSessionConfigValue(key, values[key], policyRestricted);
|
|
120
|
+
}
|
|
121
|
+
} else if (Object.hasOwn(current.values, key)) {
|
|
122
|
+
nextValues[key] = current.values[key];
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (equals(nextValues, current.values)) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this._agentHostService.dispatch(( ctx.backendSession.toString()), {
|
|
129
|
+
type: ActionType.SessionConfigChanged,
|
|
130
|
+
config: nextValues,
|
|
131
|
+
replace: true
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
_describeForTrace(ctx) {
|
|
135
|
+
return `session ${( ctx.backendSession.toString())}`;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
AgentSessionSettingsFileSystemProvider = ( __decorate([( __param(1, IAgentHostService)), ( __param(2, IConfigurationService)), ( __param(3, ILogService))], AgentSessionSettingsFileSystemProvider));
|
|
139
|
+
let AgentSessionSettingsSchemaRegistrar = class AgentSessionSettingsSchemaRegistrar extends AbstractAgentHostConfigSchemaRegistrar {
|
|
140
|
+
constructor(_agentHostService) {
|
|
141
|
+
super();
|
|
142
|
+
this._agentHostService = _agentHostService;
|
|
143
|
+
}
|
|
144
|
+
_propertyFilter() {
|
|
145
|
+
return sessionSettingsPropertyFilter;
|
|
146
|
+
}
|
|
147
|
+
_settingsUri(backendSession) {
|
|
148
|
+
return ( agentSessionSettingsUri(backendSession).toString());
|
|
149
|
+
}
|
|
150
|
+
_schemaId(backendSession) {
|
|
151
|
+
const rawId = backendSession.path.startsWith("/") ? backendSession.path.substring(1) : backendSession.path;
|
|
152
|
+
return `vscode://schemas/agent-session-settings/${backendSession.scheme}/${rawId}.jsonc`;
|
|
153
|
+
}
|
|
154
|
+
_getConfig(backendSession) {
|
|
155
|
+
const sub = this._agentHostService.getSubscriptionUnmanaged(StateComponents.Session, backendSession);
|
|
156
|
+
return readSessionConfig(sub?.value);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
AgentSessionSettingsSchemaRegistrar = ( __decorate([( __param(0, IAgentHostService))], AgentSessionSettingsSchemaRegistrar));
|
|
160
|
+
|
|
161
|
+
export { AGENT_SESSION_SETTINGS_SCHEME, AgentSessionSettingsFileSystemProvider, AgentSessionSettingsSchemaRegistrar, agentSessionSettingsUri };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { IAgentHostService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service";
|
|
3
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
+
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
5
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
6
|
+
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
7
|
+
import { IAgentHostSessionWorkingDirectoryResolver } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.service";
|
|
8
|
+
import { IAgentHostUntitledProvisionalSessionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.service";
|
|
9
|
+
export interface IApplyAgentHostSubmitConfigServices {
|
|
10
|
+
readonly agentHostService: IAgentHostService;
|
|
11
|
+
readonly provisionalService: IAgentHostUntitledProvisionalSessionService;
|
|
12
|
+
readonly workingDirectoryResolver: IAgentHostSessionWorkingDirectoryResolver;
|
|
13
|
+
readonly workspaceContextService: IWorkspaceContextService;
|
|
14
|
+
readonly configurationService: IConfigurationService;
|
|
15
|
+
readonly dialogService: IDialogService;
|
|
16
|
+
readonly storageService: IStorageService;
|
|
17
|
+
}
|
|
18
|
+
export declare function applyAgentHostSubmitConfig(sessionResource: URI, config: Readonly<Record<string, string>>, services: IApplyAgentHostSubmitConfigServices): Promise<boolean>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
import { applyAgentHostCompletionAction } from '../../agentHostCompletionAction.js';
|
|
3
|
+
import { applyAgentHostSessionConfigChange } from './applyAgentHostSessionConfig.js';
|
|
4
|
+
|
|
5
|
+
async function applyAgentHostSubmitConfig(sessionResource, config, services) {
|
|
6
|
+
let applied = false;
|
|
7
|
+
const confirmed = await applyAgentHostCompletionAction({ applyConfig: config }, services.dialogService, services.storageService, async (config) => {
|
|
8
|
+
applied = await applyAgentHostSessionConfigChange(sessionResource, config, services);
|
|
9
|
+
});
|
|
10
|
+
return confirmed && applied;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { applyAgentHostSubmitConfig };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IAgentHostService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service";
|
|
3
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
+
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
5
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
6
|
+
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
7
|
+
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
8
|
+
import { IChatSubmitRequestHandlerService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatSubmitRequestHandlerService.service";
|
|
9
|
+
import { IAgentHostSessionWorkingDirectoryResolver } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.service";
|
|
10
|
+
import { IAgentHostUntitledProvisionalSessionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.service";
|
|
11
|
+
export interface ICopilotConfigSlashSubmitResolution {
|
|
12
|
+
readonly applyConfig: Readonly<Record<string, string>>;
|
|
13
|
+
readonly strippedPrompt: string;
|
|
14
|
+
}
|
|
15
|
+
/** Resolves a typed Copilot config slash command into a config change. */
|
|
16
|
+
export declare function resolveCopilotConfigSlashSubmit(input: string): ICopilotConfigSlashSubmitResolution | undefined;
|
|
17
|
+
export declare class CopilotConfigSlashSubmitHandlerContribution extends Disposable implements IWorkbenchContribution {
|
|
18
|
+
private readonly _agentHostService;
|
|
19
|
+
private readonly _provisionalService;
|
|
20
|
+
private readonly _workingDirectoryResolver;
|
|
21
|
+
private readonly _workspaceContextService;
|
|
22
|
+
private readonly _configurationService;
|
|
23
|
+
private readonly _dialogService;
|
|
24
|
+
private readonly _storageService;
|
|
25
|
+
static readonly ID = "workbench.contrib.chat.copilotConfigSlashSubmitHandler";
|
|
26
|
+
constructor(submitRequestHandlerService: IChatSubmitRequestHandlerService, _agentHostService: IAgentHostService, _provisionalService: IAgentHostUntitledProvisionalSessionService, _workingDirectoryResolver: IAgentHostSessionWorkingDirectoryResolver, _workspaceContextService: IWorkspaceContextService, _configurationService: IConfigurationService, _dialogService: IDialogService, _storageService: IStorageService);
|
|
27
|
+
private _tryHandle;
|
|
28
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { parseLeadingSlashCommand } from '../../../../../../platform/agentHost/common/agentHostSlashCommand.js';
|
|
5
|
+
import { resolveCopilotConfigSlashCommandOnSend } from '../../../../../../platform/agentHost/common/copilotConfigSlashCommands.js';
|
|
6
|
+
import { IAgentHostService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service';
|
|
7
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
|
+
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
9
|
+
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
10
|
+
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
11
|
+
import { IChatSubmitRequestHandlerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatSubmitRequestHandlerService.service';
|
|
12
|
+
import { SessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
13
|
+
import { getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
14
|
+
import { IAgentHostSessionWorkingDirectoryResolver } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.service';
|
|
15
|
+
import { IAgentHostUntitledProvisionalSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.service';
|
|
16
|
+
import { applyAgentHostSubmitConfig } from './applyAgentHostSubmitConfig.js';
|
|
17
|
+
|
|
18
|
+
function resolveCopilotConfigSlashSubmit(input) {
|
|
19
|
+
const slashCommand = parseLeadingSlashCommand(input);
|
|
20
|
+
return slashCommand ? resolveCopilotConfigSlashCommandOnSend(slashCommand.command, slashCommand.rawRest) : undefined;
|
|
21
|
+
}
|
|
22
|
+
let CopilotConfigSlashSubmitHandlerContribution = class CopilotConfigSlashSubmitHandlerContribution extends Disposable {
|
|
23
|
+
static {
|
|
24
|
+
this.ID = "workbench.contrib.chat.copilotConfigSlashSubmitHandler";
|
|
25
|
+
}
|
|
26
|
+
constructor(
|
|
27
|
+
submitRequestHandlerService,
|
|
28
|
+
_agentHostService,
|
|
29
|
+
_provisionalService,
|
|
30
|
+
_workingDirectoryResolver,
|
|
31
|
+
_workspaceContextService,
|
|
32
|
+
_configurationService,
|
|
33
|
+
_dialogService,
|
|
34
|
+
_storageService
|
|
35
|
+
) {
|
|
36
|
+
super();
|
|
37
|
+
this._agentHostService = _agentHostService;
|
|
38
|
+
this._provisionalService = _provisionalService;
|
|
39
|
+
this._workingDirectoryResolver = _workingDirectoryResolver;
|
|
40
|
+
this._workspaceContextService = _workspaceContextService;
|
|
41
|
+
this._configurationService = _configurationService;
|
|
42
|
+
this._dialogService = _dialogService;
|
|
43
|
+
this._storageService = _storageService;
|
|
44
|
+
this._register(submitRequestHandlerService.register({
|
|
45
|
+
id: "copilot.configSlash",
|
|
46
|
+
tryHandle: request => this._tryHandle(request)
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
async _tryHandle(request) {
|
|
50
|
+
if (getChatSessionType(request.sessionResource) !== SessionType.AgentHostCopilot) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
const configAction = resolveCopilotConfigSlashSubmit(request.input);
|
|
54
|
+
if (!configAction) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
await applyAgentHostSubmitConfig(request.sessionResource, configAction.applyConfig, {
|
|
58
|
+
agentHostService: this._agentHostService,
|
|
59
|
+
provisionalService: this._provisionalService,
|
|
60
|
+
workingDirectoryResolver: this._workingDirectoryResolver,
|
|
61
|
+
workspaceContextService: this._workspaceContextService,
|
|
62
|
+
configurationService: this._configurationService,
|
|
63
|
+
dialogService: this._dialogService,
|
|
64
|
+
storageService: this._storageService
|
|
65
|
+
});
|
|
66
|
+
return !configAction.strippedPrompt;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
CopilotConfigSlashSubmitHandlerContribution = ( __decorate([( __param(0, IChatSubmitRequestHandlerService)), ( __param(1, IAgentHostService)), ( __param(2, IAgentHostUntitledProvisionalSessionService)), ( __param(3, IAgentHostSessionWorkingDirectoryResolver)), ( __param(4, IWorkspaceContextService)), ( __param(5, IConfigurationService)), ( __param(6, IDialogService)), ( __param(7, IStorageService))], CopilotConfigSlashSubmitHandlerContribution));
|
|
70
|
+
|
|
71
|
+
export { CopilotConfigSlashSubmitHandlerContribution, resolveCopilotConfigSlashSubmit };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { ILinkPresentationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dataChannel/common/dataChannel.service";
|
|
3
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
4
|
+
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
5
|
+
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
6
|
+
import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service";
|
|
7
|
+
import { IChatRequestOriginService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatRequestOrigin.service";
|
|
8
|
+
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
9
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
10
|
+
import { ISessionSummaryHoverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHoverService.service";
|
|
11
|
+
/**
|
|
12
|
+
* Editor-window counterpart to the Agents window's
|
|
13
|
+
* `OpenSessionLinkOpenerContribution`: handles `agent-host-session://` links
|
|
14
|
+
* surfaced by the `create_session` / `create_chat` server tools, so the linked
|
|
15
|
+
* session title also works in the regular editor-window chat.
|
|
16
|
+
*
|
|
17
|
+
* The link carries the backend session URI (`<provider>:/<rawId>`); sessions
|
|
18
|
+
* created from an editor-window chat run on the window's ambient/local host,
|
|
19
|
+
* whose client scheme is `agent-host-<provider>`. We rebuild that client
|
|
20
|
+
* resource and open it through {@link IChatWidgetService.openSession}.
|
|
21
|
+
*
|
|
22
|
+
* Also registers an {@link IChatRequestOriginService} opener that reuses {@link _open} for delegated request-origin links (e.g. "Sent from another chat").
|
|
23
|
+
*
|
|
24
|
+
* Registered only from the workbench's electron-browser chat contribution (never
|
|
25
|
+
* loaded by the Agents window), so it never competes with the Agents-window
|
|
26
|
+
* opener.
|
|
27
|
+
*/
|
|
28
|
+
export declare class AgentHostOpenSessionLinkOpenerContribution extends Disposable implements IWorkbenchContribution {
|
|
29
|
+
private readonly _chatWidgetService;
|
|
30
|
+
private readonly _chatSessionsService;
|
|
31
|
+
static readonly ID = "workbench.chat.agentHostOpenSessionLinkOpener";
|
|
32
|
+
constructor(openerService: IOpenerService, _chatWidgetService: IChatWidgetService, _chatSessionsService: IChatSessionsService, requestOriginService: IChatRequestOriginService, linkPresentationService: ILinkPresentationService, logService: ILogService, sessionSummaryHoverService: ISessionSummaryHoverService, pathService: IPathService);
|
|
33
|
+
private _findChatSessionItem;
|
|
34
|
+
private _open;
|
|
35
|
+
}
|