@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,10 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IChatStatusItemService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.service";
|
|
3
|
+
import { IExtHostContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers";
|
|
4
|
+
import { ChatStatusItemDto, MainThreadChatStatusShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
5
|
+
export declare class MainThreadChatStatus extends Disposable implements MainThreadChatStatusShape {
|
|
6
|
+
private readonly _chatStatusItemService;
|
|
7
|
+
constructor(_extHostContext: IExtHostContext, _chatStatusItemService: IChatStatusItemService);
|
|
8
|
+
$setEntry(id: string, entry: ChatStatusItemDto): void;
|
|
9
|
+
$disposeEntry(id: string): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 { IChatStatusItemService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.service';
|
|
5
|
+
import { extHostNamedCustomer } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers';
|
|
6
|
+
import { MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
|
+
|
|
8
|
+
let MainThreadChatStatus = class MainThreadChatStatus extends Disposable {
|
|
9
|
+
constructor(_extHostContext, _chatStatusItemService) {
|
|
10
|
+
super();
|
|
11
|
+
this._chatStatusItemService = _chatStatusItemService;
|
|
12
|
+
}
|
|
13
|
+
$setEntry(id, entry) {
|
|
14
|
+
this._chatStatusItemService.setOrUpdateEntry({
|
|
15
|
+
id,
|
|
16
|
+
label: entry.title,
|
|
17
|
+
description: entry.description,
|
|
18
|
+
detail: entry.detail,
|
|
19
|
+
tooltip: entry.tooltip
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
$disposeEntry(id) {
|
|
23
|
+
this._chatStatusItemService.deleteEntry(id);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
MainThreadChatStatus = __decorate([extHostNamedCustomer(MainContext.MainThreadChatStatus), ( __param(1, IChatStatusItemService))], MainThreadChatStatus);
|
|
27
|
+
|
|
28
|
+
export { MainThreadChatStatus };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { ExtensionIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
|
|
4
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
5
|
+
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
6
|
+
import { IToolInvocation, IToolProgressStep, IToolResult } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
7
|
+
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
8
|
+
import { IExtHostContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers";
|
|
9
|
+
import { Dto, SerializableObjectWithBuffers } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/proxyIdentifier";
|
|
10
|
+
import { IToolDataDto, IToolDefinitionDto, MainThreadLanguageModelToolsShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
11
|
+
export declare class MainThreadLanguageModelTools extends Disposable implements MainThreadLanguageModelToolsShape {
|
|
12
|
+
private readonly _languageModelToolsService;
|
|
13
|
+
private readonly _logService;
|
|
14
|
+
private readonly _productService;
|
|
15
|
+
private readonly _proxy;
|
|
16
|
+
private readonly _tools;
|
|
17
|
+
private readonly _runningToolCalls;
|
|
18
|
+
constructor(extHostContext: IExtHostContext, _languageModelToolsService: ILanguageModelToolsService, _logService: ILogService, _productService: IProductService);
|
|
19
|
+
private getToolDtos;
|
|
20
|
+
$getTools(): Promise<IToolDataDto[]>;
|
|
21
|
+
$invokeTool(dto: Dto<IToolInvocation>, token?: CancellationToken): Promise<Dto<IToolResult> | SerializableObjectWithBuffers<Dto<IToolResult>>>;
|
|
22
|
+
$acceptToolProgress(callId: string, progress: IToolProgressStep): void;
|
|
23
|
+
$countTokensForInvocation(callId: string, input: string, token: CancellationToken): Promise<number>;
|
|
24
|
+
$registerTool(id: string, hasHandleToolStream: boolean): void;
|
|
25
|
+
$registerToolWithDefinition(extensionId: ExtensionIdentifier, definition: IToolDefinitionDto, hasHandleToolStream: boolean): void;
|
|
26
|
+
$unregisterTool(name: string): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
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 { Disposable, DisposableMap, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
6
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
7
|
+
import { isUriComponents, URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
8
|
+
import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
9
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
10
|
+
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
11
|
+
import { toToolSetKey } from '../../contrib/chat/common/tools/languageModelToolsContribution.js';
|
|
12
|
+
import { toolResultHasBuffers, ToolDataSource, ToolSet } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
13
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
14
|
+
import { extHostNamedCustomer } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers';
|
|
15
|
+
import { SerializableObjectWithBuffers } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/proxyIdentifier';
|
|
16
|
+
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
17
|
+
|
|
18
|
+
let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Disposable {
|
|
19
|
+
constructor(extHostContext, _languageModelToolsService, _logService, _productService) {
|
|
20
|
+
super();
|
|
21
|
+
this._languageModelToolsService = _languageModelToolsService;
|
|
22
|
+
this._logService = _logService;
|
|
23
|
+
this._productService = _productService;
|
|
24
|
+
this._tools = this._register(( new DisposableMap()));
|
|
25
|
+
this._runningToolCalls = ( new Map());
|
|
26
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostLanguageModelTools));
|
|
27
|
+
this._register(
|
|
28
|
+
this._languageModelToolsService.onDidChangeTools(e => this._proxy.$onDidChangeTools(this.getToolDtos()))
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
getToolDtos() {
|
|
32
|
+
const fullReferenceNameMap = this._languageModelToolsService.getFullReferenceNameMap();
|
|
33
|
+
return ( Array.from(this._languageModelToolsService.getAllToolsIncludingDisabled()).map(tool => ({
|
|
34
|
+
id: tool.id,
|
|
35
|
+
displayName: tool.displayName,
|
|
36
|
+
toolReferenceName: tool.toolReferenceName,
|
|
37
|
+
legacyToolReferenceFullNames: tool.legacyToolReferenceFullNames,
|
|
38
|
+
fullReferenceName: fullReferenceNameMap.get(tool) ?? undefined,
|
|
39
|
+
tags: tool.tags,
|
|
40
|
+
userDescription: tool.userDescription,
|
|
41
|
+
modelDescription: tool.modelDescription,
|
|
42
|
+
inputSchema: tool.inputSchema,
|
|
43
|
+
source: tool.source
|
|
44
|
+
})));
|
|
45
|
+
}
|
|
46
|
+
async $getTools() {
|
|
47
|
+
return this.getToolDtos();
|
|
48
|
+
}
|
|
49
|
+
async $invokeTool(dto, token) {
|
|
50
|
+
const result = await this._languageModelToolsService.invokeTool(
|
|
51
|
+
revive(dto),
|
|
52
|
+
(input, token) => this._proxy.$countTokensForInvocation(dto.callId, input, token),
|
|
53
|
+
token ?? CancellationToken.None
|
|
54
|
+
);
|
|
55
|
+
const out = {
|
|
56
|
+
content: result.content,
|
|
57
|
+
toolMetadata: result.toolMetadata,
|
|
58
|
+
toolResultError: result.toolResultError
|
|
59
|
+
};
|
|
60
|
+
return toolResultHasBuffers(result) ? ( new SerializableObjectWithBuffers(out)) : out;
|
|
61
|
+
}
|
|
62
|
+
$acceptToolProgress(callId, progress) {
|
|
63
|
+
this._runningToolCalls.get(callId)?.progress.report(progress);
|
|
64
|
+
}
|
|
65
|
+
$countTokensForInvocation(callId, input, token) {
|
|
66
|
+
const fn = this._runningToolCalls.get(callId);
|
|
67
|
+
if (!fn) {
|
|
68
|
+
throw ( new Error(`Tool invocation call ${callId} not found`));
|
|
69
|
+
}
|
|
70
|
+
return fn.countTokens(input, token);
|
|
71
|
+
}
|
|
72
|
+
$registerTool(id, hasHandleToolStream) {
|
|
73
|
+
const disposable = this._languageModelToolsService.registerToolImplementation(id, {
|
|
74
|
+
invoke: async (dto, countTokens, progress, token) => {
|
|
75
|
+
try {
|
|
76
|
+
this._runningToolCalls.set(dto.callId, {
|
|
77
|
+
countTokens,
|
|
78
|
+
progress
|
|
79
|
+
});
|
|
80
|
+
const resultSerialized = await this._proxy.$invokeTool(dto, token);
|
|
81
|
+
const resultDto = resultSerialized instanceof SerializableObjectWithBuffers ? resultSerialized.value : resultSerialized;
|
|
82
|
+
return revive(resultDto);
|
|
83
|
+
} finally {
|
|
84
|
+
this._runningToolCalls.delete(dto.callId);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
prepareToolInvocation: (context, token) => this._proxy.$prepareToolInvocation(id, context, token),
|
|
88
|
+
handleToolStream: hasHandleToolStream ? (context, token) => this._proxy.$handleToolStream(id, context, token) : undefined
|
|
89
|
+
});
|
|
90
|
+
this._tools.set(id, disposable);
|
|
91
|
+
}
|
|
92
|
+
$registerToolWithDefinition(extensionId, definition, hasHandleToolStream) {
|
|
93
|
+
let icon;
|
|
94
|
+
if (definition.icon) {
|
|
95
|
+
if (ThemeIcon.isThemeIcon(definition.icon)) {
|
|
96
|
+
icon = definition.icon;
|
|
97
|
+
} else if (typeof definition.icon === "object" && definition.icon !== null && isUriComponents(definition.icon)) {
|
|
98
|
+
icon = {
|
|
99
|
+
dark: URI.revive(definition.icon)
|
|
100
|
+
};
|
|
101
|
+
} else {
|
|
102
|
+
const iconObj = definition.icon;
|
|
103
|
+
icon = {
|
|
104
|
+
dark: URI.revive(iconObj.dark),
|
|
105
|
+
light: iconObj.light ? URI.revive(iconObj.light) : undefined
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const isBuiltinTool = this._productService.defaultChatAgent?.chatExtensionId ? ExtensionIdentifier.equals(extensionId, this._productService.defaultChatAgent.chatExtensionId) : false;
|
|
110
|
+
const source = isBuiltinTool ? ToolDataSource.Internal : revive(definition.source);
|
|
111
|
+
const toolData = {
|
|
112
|
+
id: definition.id,
|
|
113
|
+
displayName: definition.displayName,
|
|
114
|
+
toolReferenceName: definition.toolReferenceName,
|
|
115
|
+
legacyToolReferenceFullNames: definition.legacyToolReferenceFullNames,
|
|
116
|
+
tags: definition.tags,
|
|
117
|
+
userDescription: definition.userDescription,
|
|
118
|
+
modelDescription: definition.modelDescription,
|
|
119
|
+
inputSchema: definition.inputSchema,
|
|
120
|
+
source,
|
|
121
|
+
icon,
|
|
122
|
+
models: definition.models,
|
|
123
|
+
canBeReferencedInPrompt: !!definition.userDescription && !definition.toolSet
|
|
124
|
+
};
|
|
125
|
+
const id = definition.id;
|
|
126
|
+
const store = ( new DisposableStore());
|
|
127
|
+
store.add(this._languageModelToolsService.registerTool(toolData, {
|
|
128
|
+
invoke: async (dto, countTokens, progress, token) => {
|
|
129
|
+
try {
|
|
130
|
+
this._runningToolCalls.set(dto.callId, {
|
|
131
|
+
countTokens,
|
|
132
|
+
progress
|
|
133
|
+
});
|
|
134
|
+
const resultSerialized = await this._proxy.$invokeTool(dto, token);
|
|
135
|
+
const resultDto = resultSerialized instanceof SerializableObjectWithBuffers ? resultSerialized.value : resultSerialized;
|
|
136
|
+
return revive(resultDto);
|
|
137
|
+
} finally {
|
|
138
|
+
this._runningToolCalls.delete(dto.callId);
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
handleToolStream: hasHandleToolStream ? (context, token) => this._proxy.$handleToolStream(id, context, token) : undefined,
|
|
142
|
+
prepareToolInvocation: (context, token) => this._proxy.$prepareToolInvocation(id, context, token)
|
|
143
|
+
}));
|
|
144
|
+
if (definition.toolSet) {
|
|
145
|
+
const ts = this._languageModelToolsService.getToolSet(toToolSetKey(extensionId, definition.toolSet)) || this._languageModelToolsService.getToolSet(definition.toolSet);
|
|
146
|
+
if (!ts || !(ts instanceof ToolSet)) {
|
|
147
|
+
this._logService.warn(
|
|
148
|
+
`ToolSet ${definition.toolSet} not found for tool ${definition.id} from extension ${extensionId.value}`
|
|
149
|
+
);
|
|
150
|
+
} else {
|
|
151
|
+
store.add(ts.addTool(toolData));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
this._tools.set(id, store);
|
|
155
|
+
}
|
|
156
|
+
$unregisterTool(name) {
|
|
157
|
+
this._tools.deleteAndDispose(name);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
MainThreadLanguageModelTools = __decorate([
|
|
161
|
+
extHostNamedCustomer(MainContext.MainThreadLanguageModelTools),
|
|
162
|
+
( __param(1, ILanguageModelToolsService)),
|
|
163
|
+
( __param(2, ILogService)),
|
|
164
|
+
( __param(3, IProductService))
|
|
165
|
+
], MainThreadLanguageModelTools);
|
|
166
|
+
|
|
167
|
+
export { MainThreadLanguageModelTools };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { SerializedError } from "@codingame/monaco-vscode-api/vscode/vs/base/common/errors";
|
|
3
|
+
import { UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
+
import { ExtensionIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
|
|
5
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
6
|
+
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
7
|
+
import { ILanguageModelIgnoredFilesService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/ignoredFiles.service";
|
|
8
|
+
import { IChatMessage, IChatResponsePart, ILanguageModelChatSelector } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
|
|
9
|
+
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
10
|
+
import { IAuthenticationAccessService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationAccessService.service";
|
|
11
|
+
import { IAuthenticationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service";
|
|
12
|
+
import { IExtHostContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers";
|
|
13
|
+
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
14
|
+
import { SerializableObjectWithBuffers } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/proxyIdentifier";
|
|
15
|
+
import { MainThreadLanguageModelsShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
16
|
+
export declare class MainThreadLanguageModels implements MainThreadLanguageModelsShape {
|
|
17
|
+
private readonly _chatProviderService;
|
|
18
|
+
private readonly _logService;
|
|
19
|
+
private readonly _productService;
|
|
20
|
+
private readonly _authenticationService;
|
|
21
|
+
private readonly _authenticationAccessService;
|
|
22
|
+
private readonly _extensionService;
|
|
23
|
+
private readonly _ignoredFilesService;
|
|
24
|
+
private readonly _proxy;
|
|
25
|
+
private readonly _store;
|
|
26
|
+
private readonly _providerRegistrations;
|
|
27
|
+
private readonly _lmProviderChange;
|
|
28
|
+
private readonly _pendingProgress;
|
|
29
|
+
private readonly _pendingCancelCTS;
|
|
30
|
+
private readonly _ignoredFileProviderRegistrations;
|
|
31
|
+
constructor(extHostContext: IExtHostContext, _chatProviderService: ILanguageModelsService, _logService: ILogService, _productService: IProductService, _authenticationService: IAuthenticationService, _authenticationAccessService: IAuthenticationAccessService, _extensionService: IExtensionService, _ignoredFilesService: ILanguageModelIgnoredFilesService);
|
|
32
|
+
dispose(): void;
|
|
33
|
+
$registerLanguageModelProvider(vendor: string): void;
|
|
34
|
+
$onLMProviderChange(vendor: string): void;
|
|
35
|
+
$reportResponsePart(requestId: number, chunk: SerializableObjectWithBuffers<IChatResponsePart | IChatResponsePart[]>): Promise<void>;
|
|
36
|
+
$reportResponseDone(requestId: number, err: SerializedError | undefined): Promise<void>;
|
|
37
|
+
$unregisterProvider(vendor: string): void;
|
|
38
|
+
$cancelLanguageModelChatRequest(requestId: number): void;
|
|
39
|
+
$selectChatModels(selector: ILanguageModelChatSelector): Promise<string[]>;
|
|
40
|
+
$tryStartChatRequest(extension: ExtensionIdentifier, modelIdentifier: string, requestId: number, messages: SerializableObjectWithBuffers<IChatMessage[]>, options: {}, token: CancellationToken): Promise<void>;
|
|
41
|
+
$countTokens(modelId: string, value: string | IChatMessage, token: CancellationToken): Promise<number>;
|
|
42
|
+
private _registerAuthenticationProvider;
|
|
43
|
+
$fileIsIgnored(uri: UriComponents, token: CancellationToken): Promise<boolean>;
|
|
44
|
+
$registerFileIgnoreProvider(handle: number): void;
|
|
45
|
+
$unregisterFileIgnoreProvider(handle: number): void;
|
|
46
|
+
}
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { DeferredPromise, AsyncIterableSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
|
+
import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
5
|
+
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
6
|
+
import { toErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errorMessage';
|
|
7
|
+
import { CancellationError, transformErrorFromSerialization, transformErrorForSerialization } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
8
|
+
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
9
|
+
import { equalSets } from '@codingame/monaco-vscode-api/vscode/vs/base/common/collections';
|
|
10
|
+
import { Disposable, DisposableStore, DisposableMap, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
11
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
12
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
13
|
+
import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
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 { resizeImage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatImageUtils';
|
|
17
|
+
import { ILanguageModelIgnoredFilesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/ignoredFiles.service';
|
|
18
|
+
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
19
|
+
import { IAuthenticationAccessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationAccessService.service';
|
|
20
|
+
import { INTERNAL_AUTH_PROVIDER_PREFIX } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication';
|
|
21
|
+
import { IAuthenticationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service';
|
|
22
|
+
import { extHostNamedCustomer } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers';
|
|
23
|
+
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
24
|
+
import { SerializableObjectWithBuffers } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/proxyIdentifier';
|
|
25
|
+
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
26
|
+
import { LanguageModelError } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHostTypes';
|
|
27
|
+
|
|
28
|
+
class RequestCancellationTokenSource extends Disposable {
|
|
29
|
+
constructor(parent, onCancellationRequested) {
|
|
30
|
+
super();
|
|
31
|
+
this._source = this._register(( new CancellationTokenSource(parent)));
|
|
32
|
+
if (onCancellationRequested) {
|
|
33
|
+
this._register(this._source.token.onCancellationRequested(onCancellationRequested));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
get token() {
|
|
37
|
+
return this._source.token;
|
|
38
|
+
}
|
|
39
|
+
cancel() {
|
|
40
|
+
this._source.cancel();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
44
|
+
constructor(
|
|
45
|
+
extHostContext,
|
|
46
|
+
_chatProviderService,
|
|
47
|
+
_logService,
|
|
48
|
+
_productService,
|
|
49
|
+
_authenticationService,
|
|
50
|
+
_authenticationAccessService,
|
|
51
|
+
_extensionService,
|
|
52
|
+
_ignoredFilesService
|
|
53
|
+
) {
|
|
54
|
+
this._chatProviderService = _chatProviderService;
|
|
55
|
+
this._logService = _logService;
|
|
56
|
+
this._productService = _productService;
|
|
57
|
+
this._authenticationService = _authenticationService;
|
|
58
|
+
this._authenticationAccessService = _authenticationAccessService;
|
|
59
|
+
this._extensionService = _extensionService;
|
|
60
|
+
this._ignoredFilesService = _ignoredFilesService;
|
|
61
|
+
this._store = ( new DisposableStore());
|
|
62
|
+
this._providerRegistrations = ( new DisposableMap());
|
|
63
|
+
this._lmProviderChange = ( new Emitter());
|
|
64
|
+
this._pendingProgress = ( new Map());
|
|
65
|
+
this._pendingCancelCTS = ( new DisposableMap());
|
|
66
|
+
this._ignoredFileProviderRegistrations = ( new DisposableMap());
|
|
67
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostChatProvider));
|
|
68
|
+
let lastModelIds = ( new Set(this._chatProviderService.getLanguageModelIds()));
|
|
69
|
+
this._store.add(this._chatProviderService.onDidChangeLanguageModels(() => {
|
|
70
|
+
const currentModelIds = ( new Set(this._chatProviderService.getLanguageModelIds()));
|
|
71
|
+
if (equalSets(lastModelIds, currentModelIds)) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
lastModelIds = currentModelIds;
|
|
75
|
+
this._proxy.$onChatModelsChange();
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
dispose() {
|
|
79
|
+
this._lmProviderChange.dispose();
|
|
80
|
+
this._providerRegistrations.dispose();
|
|
81
|
+
this._pendingProgress.clear();
|
|
82
|
+
this._pendingCancelCTS.dispose();
|
|
83
|
+
this._ignoredFileProviderRegistrations.dispose();
|
|
84
|
+
this._store.dispose();
|
|
85
|
+
}
|
|
86
|
+
$registerLanguageModelProvider(vendor) {
|
|
87
|
+
const disposables = ( new DisposableStore());
|
|
88
|
+
try {
|
|
89
|
+
disposables.add(this._chatProviderService.registerLanguageModelProvider(vendor, {
|
|
90
|
+
onDidChange: Event.filter(this._lmProviderChange.event, e => e.vendor === vendor, disposables),
|
|
91
|
+
provideLanguageModelChatInfo: async (options, token) => {
|
|
92
|
+
const modelsAndIdentifiers = await this._proxy.$provideLanguageModelChatInfo(vendor, options, token);
|
|
93
|
+
const copilotExtensionId = this._productService.defaultChatAgent?.chatExtensionId;
|
|
94
|
+
return ( modelsAndIdentifiers.map(m => {
|
|
95
|
+
if (m.metadata.auth) {
|
|
96
|
+
disposables.add(
|
|
97
|
+
this._registerAuthenticationProvider(m.metadata.extension, m.metadata.auth)
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
if (m.metadata.isBYOK !== undefined) {
|
|
101
|
+
return m;
|
|
102
|
+
}
|
|
103
|
+
const isBuiltinCopilot = !!copilotExtensionId && ExtensionIdentifier.equals(m.metadata.extension, copilotExtensionId);
|
|
104
|
+
return {
|
|
105
|
+
...m,
|
|
106
|
+
metadata: {
|
|
107
|
+
...m.metadata,
|
|
108
|
+
isBYOK: !isBuiltinCopilot
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
}));
|
|
112
|
+
},
|
|
113
|
+
sendChatRequest: async (modelId, messages, from, options, token) => {
|
|
114
|
+
const requestId = (Math.random() * 1e6) | 0;
|
|
115
|
+
const defer = ( new DeferredPromise());
|
|
116
|
+
defer.p.catch(() => {});
|
|
117
|
+
const stream = new AsyncIterableSource();
|
|
118
|
+
try {
|
|
119
|
+
this._pendingProgress.set(requestId, {
|
|
120
|
+
defer,
|
|
121
|
+
stream
|
|
122
|
+
});
|
|
123
|
+
const cts = ( new RequestCancellationTokenSource(token, () => {
|
|
124
|
+
this._proxy.$cancelLanguageModelChatRequest(requestId);
|
|
125
|
+
}));
|
|
126
|
+
this._pendingCancelCTS.set(requestId, cts);
|
|
127
|
+
await Promise.all(( messages.flatMap(msg => msg.content).filter(part => part.type === "image_url").map(async part => {
|
|
128
|
+
part.value.data = VSBuffer.wrap(await resizeImage(part.value.data.buffer));
|
|
129
|
+
})));
|
|
130
|
+
if (token.isCancellationRequested) {
|
|
131
|
+
this._pendingProgress.delete(requestId);
|
|
132
|
+
this._pendingCancelCTS.deleteAndDispose(requestId);
|
|
133
|
+
const err = ( new CancellationError());
|
|
134
|
+
stream.reject(err);
|
|
135
|
+
defer.error(err);
|
|
136
|
+
return {
|
|
137
|
+
result: defer.p,
|
|
138
|
+
stream: stream.asyncIterable
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
await this._proxy.$startChatRequest(modelId, requestId, from, ( new SerializableObjectWithBuffers(messages)), options, cts.token);
|
|
142
|
+
} catch (err) {
|
|
143
|
+
this._pendingProgress.delete(requestId);
|
|
144
|
+
this._pendingCancelCTS.deleteAndDispose(requestId);
|
|
145
|
+
throw err;
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
result: defer.p,
|
|
149
|
+
stream: stream.asyncIterable
|
|
150
|
+
};
|
|
151
|
+
},
|
|
152
|
+
provideTokenCount: (modelId, str, token) => {
|
|
153
|
+
return this._proxy.$provideTokenLength(modelId, str, token);
|
|
154
|
+
}
|
|
155
|
+
}));
|
|
156
|
+
this._providerRegistrations.set(vendor, disposables);
|
|
157
|
+
} catch (err) {
|
|
158
|
+
disposables.dispose();
|
|
159
|
+
throw err;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
$onLMProviderChange(vendor) {
|
|
163
|
+
this._lmProviderChange.fire({
|
|
164
|
+
vendor
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
async $reportResponsePart(requestId, chunk) {
|
|
168
|
+
const data = this._pendingProgress.get(requestId);
|
|
169
|
+
this._logService.trace("[LM] report response PART", Boolean(data), requestId, chunk);
|
|
170
|
+
if (data) {
|
|
171
|
+
data.stream.emitOne(chunk.value);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
async $reportResponseDone(requestId, err) {
|
|
175
|
+
const data = this._pendingProgress.get(requestId);
|
|
176
|
+
this._logService.trace("[LM] report response DONE", Boolean(data), requestId, err);
|
|
177
|
+
if (data) {
|
|
178
|
+
this._pendingProgress.delete(requestId);
|
|
179
|
+
this._pendingCancelCTS.deleteAndDispose(requestId);
|
|
180
|
+
if (err) {
|
|
181
|
+
const error = LanguageModelError.tryDeserialize(err) ?? transformErrorFromSerialization(err);
|
|
182
|
+
data.stream.reject(error);
|
|
183
|
+
data.defer.error(error);
|
|
184
|
+
} else {
|
|
185
|
+
data.stream.resolve();
|
|
186
|
+
data.defer.complete(undefined);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
$unregisterProvider(vendor) {
|
|
191
|
+
this._providerRegistrations.deleteAndDispose(vendor);
|
|
192
|
+
}
|
|
193
|
+
$cancelLanguageModelChatRequest(requestId) {
|
|
194
|
+
this._pendingCancelCTS.get(requestId)?.cancel();
|
|
195
|
+
}
|
|
196
|
+
$selectChatModels(selector) {
|
|
197
|
+
return this._chatProviderService.selectLanguageModels(selector);
|
|
198
|
+
}
|
|
199
|
+
async $tryStartChatRequest(extension, modelIdentifier, requestId, messages, options, token) {
|
|
200
|
+
this._logService.trace("[CHAT] request STARTED", extension.value, requestId);
|
|
201
|
+
const cts = ( new RequestCancellationTokenSource(token));
|
|
202
|
+
this._pendingCancelCTS.set(requestId, cts);
|
|
203
|
+
let response;
|
|
204
|
+
try {
|
|
205
|
+
response = await this._chatProviderService.sendChatRequest(modelIdentifier, extension, messages.value, options, cts.token);
|
|
206
|
+
} catch (err) {
|
|
207
|
+
this._logService.error("[CHAT] request FAILED", extension.value, requestId, err);
|
|
208
|
+
this._pendingCancelCTS.deleteAndDispose(requestId);
|
|
209
|
+
throw err;
|
|
210
|
+
}
|
|
211
|
+
const streaming = (async () => {
|
|
212
|
+
try {
|
|
213
|
+
for await (const part of response.stream) {
|
|
214
|
+
this._logService.trace("[CHAT] request PART", extension.value, requestId, part);
|
|
215
|
+
await this._proxy.$acceptResponsePart(requestId, ( new SerializableObjectWithBuffers(part)));
|
|
216
|
+
}
|
|
217
|
+
this._logService.trace("[CHAT] request DONE", extension.value, requestId);
|
|
218
|
+
} catch (err) {
|
|
219
|
+
this._logService.error(
|
|
220
|
+
"[CHAT] extension request ERRORED in STREAM",
|
|
221
|
+
toErrorMessage(err, true),
|
|
222
|
+
extension.value,
|
|
223
|
+
requestId
|
|
224
|
+
);
|
|
225
|
+
this._proxy.$acceptResponseDone(requestId, transformErrorForSerialization(err));
|
|
226
|
+
}
|
|
227
|
+
})();
|
|
228
|
+
Promise.allSettled([response.result, streaming]).then(() => {
|
|
229
|
+
this._logService.debug("[CHAT] extension request DONE", extension.value, requestId);
|
|
230
|
+
this._pendingCancelCTS.deleteAndDispose(requestId);
|
|
231
|
+
this._proxy.$acceptResponseDone(requestId, undefined);
|
|
232
|
+
}, err => {
|
|
233
|
+
this._logService.error(
|
|
234
|
+
"[CHAT] extension request ERRORED",
|
|
235
|
+
toErrorMessage(err, true),
|
|
236
|
+
extension.value,
|
|
237
|
+
requestId
|
|
238
|
+
);
|
|
239
|
+
this._pendingCancelCTS.deleteAndDispose(requestId);
|
|
240
|
+
this._proxy.$acceptResponseDone(requestId, transformErrorForSerialization(err));
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
$countTokens(modelId, value, token) {
|
|
244
|
+
return this._chatProviderService.computeTokenLength(modelId, value, token);
|
|
245
|
+
}
|
|
246
|
+
_registerAuthenticationProvider(extension, auth) {
|
|
247
|
+
const authProviderId = INTERNAL_AUTH_PROVIDER_PREFIX + extension.value;
|
|
248
|
+
if (this._authenticationService.getProviderIds().includes(authProviderId)) {
|
|
249
|
+
return Disposable.None;
|
|
250
|
+
}
|
|
251
|
+
const accountLabel = auth.accountLabel ?? ( localize(3012, "Language Models"));
|
|
252
|
+
const disposables = ( new DisposableStore());
|
|
253
|
+
const provider = ( new LanguageModelAccessAuthProvider(authProviderId, auth.providerLabel, accountLabel));
|
|
254
|
+
this._authenticationService.registerAuthenticationProvider(authProviderId, provider);
|
|
255
|
+
disposables.add(toDisposable(() => {
|
|
256
|
+
this._authenticationService.unregisterAuthenticationProvider(authProviderId);
|
|
257
|
+
provider.dispose();
|
|
258
|
+
}));
|
|
259
|
+
disposables.add(
|
|
260
|
+
this._authenticationAccessService.onDidChangeExtensionSessionAccess(async e => {
|
|
261
|
+
const allowedExtensions = this._authenticationAccessService.readAllowedExtensions(authProviderId, accountLabel);
|
|
262
|
+
const accessList = [];
|
|
263
|
+
for (const allowedExtension of allowedExtensions) {
|
|
264
|
+
const from = await this._extensionService.getExtension(allowedExtension.id);
|
|
265
|
+
if (from) {
|
|
266
|
+
accessList.push({
|
|
267
|
+
from: from.identifier,
|
|
268
|
+
to: extension,
|
|
269
|
+
enabled: allowedExtension.allowed ?? true
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
this._proxy.$updateModelAccesslist(accessList);
|
|
274
|
+
})
|
|
275
|
+
);
|
|
276
|
+
return disposables;
|
|
277
|
+
}
|
|
278
|
+
$fileIsIgnored(uri, token) {
|
|
279
|
+
return this._ignoredFilesService.fileIsIgnored(URI.revive(uri), token);
|
|
280
|
+
}
|
|
281
|
+
$registerFileIgnoreProvider(handle) {
|
|
282
|
+
this._ignoredFileProviderRegistrations.set(handle, this._ignoredFilesService.registerIgnoredFileProvider({
|
|
283
|
+
isFileIgnored: async (uri, token) => this._proxy.$isFileIgnored(handle, uri, token)
|
|
284
|
+
}));
|
|
285
|
+
}
|
|
286
|
+
$unregisterFileIgnoreProvider(handle) {
|
|
287
|
+
this._ignoredFileProviderRegistrations.deleteAndDispose(handle);
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
MainThreadLanguageModels = __decorate(
|
|
291
|
+
[extHostNamedCustomer(MainContext.MainThreadLanguageModels), ( __param(1, ILanguageModelsService)), ( __param(2, ILogService)), ( __param(3, IProductService)), ( __param(4, IAuthenticationService)), ( __param(5, IAuthenticationAccessService)), ( __param(6, IExtensionService)), ( __param(7, ILanguageModelIgnoredFilesService))],
|
|
292
|
+
MainThreadLanguageModels
|
|
293
|
+
);
|
|
294
|
+
class LanguageModelAccessAuthProvider {
|
|
295
|
+
constructor(id, label, _accountLabel) {
|
|
296
|
+
this.id = id;
|
|
297
|
+
this.label = label;
|
|
298
|
+
this._accountLabel = _accountLabel;
|
|
299
|
+
this.supportsMultipleAccounts = false;
|
|
300
|
+
this._onDidChangeSessions = ( new Emitter());
|
|
301
|
+
this.onDidChangeSessions = this._onDidChangeSessions.event;
|
|
302
|
+
}
|
|
303
|
+
async getSessions(scopes) {
|
|
304
|
+
if (scopes === undefined && !this._session) {
|
|
305
|
+
return [];
|
|
306
|
+
}
|
|
307
|
+
if (this._session) {
|
|
308
|
+
return [this._session];
|
|
309
|
+
}
|
|
310
|
+
return [await this.createSession(scopes || [])];
|
|
311
|
+
}
|
|
312
|
+
async createSession(scopes) {
|
|
313
|
+
this._session = this._createFakeSession(scopes);
|
|
314
|
+
this._onDidChangeSessions.fire({
|
|
315
|
+
added: [this._session],
|
|
316
|
+
changed: [],
|
|
317
|
+
removed: []
|
|
318
|
+
});
|
|
319
|
+
return this._session;
|
|
320
|
+
}
|
|
321
|
+
removeSession(sessionId) {
|
|
322
|
+
if (this._session) {
|
|
323
|
+
this._onDidChangeSessions.fire({
|
|
324
|
+
added: [],
|
|
325
|
+
changed: [],
|
|
326
|
+
removed: [this._session]
|
|
327
|
+
});
|
|
328
|
+
this._session = undefined;
|
|
329
|
+
}
|
|
330
|
+
return Promise.resolve();
|
|
331
|
+
}
|
|
332
|
+
confirmation(extensionName, _recreatingSession) {
|
|
333
|
+
return localize(
|
|
334
|
+
3013,
|
|
335
|
+
"The extension '{0}' wants to access the language models provided by {1}.",
|
|
336
|
+
extensionName,
|
|
337
|
+
this.label
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
_createFakeSession(scopes) {
|
|
341
|
+
return {
|
|
342
|
+
id: "fake-session",
|
|
343
|
+
account: {
|
|
344
|
+
id: this.id,
|
|
345
|
+
label: this._accountLabel
|
|
346
|
+
},
|
|
347
|
+
accessToken: "fake-access-token",
|
|
348
|
+
scopes
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
dispose() {
|
|
352
|
+
this._onDidChangeSessions.dispose();
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export { MainThreadLanguageModels };
|
|
@@ -67,11 +67,11 @@ class ChatChangesPillActionViewItem extends ChatPillActionViewItemBase {
|
|
|
67
67
|
insertions,
|
|
68
68
|
deletions
|
|
69
69
|
} = stats;
|
|
70
|
-
const filesLabel = files === 1 ? ( localize(
|
|
70
|
+
const filesLabel = files === 1 ? ( localize(3492, "{0} File", files)) : ( localize(3493, "{0} Files", files));
|
|
71
71
|
this._filesLabel.textContent = filesLabel;
|
|
72
72
|
this.button.setTitle(this._action.tooltip || this._action.label);
|
|
73
73
|
this.button.element.setAttribute("aria-label", ( localize(
|
|
74
|
-
|
|
74
|
+
3494,
|
|
75
75
|
"{0}: {1}, +{2}, -{3}",
|
|
76
76
|
this._action.label,
|
|
77
77
|
filesLabel,
|