@codingame/monaco-vscode-chat-service-override 27.0.0 → 28.0.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 +5 -2
- package/package.json +5 -5
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +54 -4
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +179 -11
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +5 -1
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +6 -1
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +25 -10
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +67 -0
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +263 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +6 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +25 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
- 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 +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +5 -5
- 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 +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +49 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +537 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.js +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/media/agentPluginEditor.css +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +17 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +89 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +4 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +146 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +56 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.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.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +25 -25
- 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/aiCustomization/aiCustomizationIcons.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +13 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +7 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +189 -145
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +42 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +20 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +210 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +14 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +122 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +87 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +702 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +279 -214
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +12 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +63 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +62 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +28 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +32 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +4 -5
- 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.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/media/chatEditorController.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +49 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +103 -60
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +61 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +245 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.js +234 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +31 -126
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +229 -524
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.js +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +54 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +11 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +112 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +99 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +489 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +348 -285
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +107 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +4 -4
- 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/tools/languageModelToolsConfirmationService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +55 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +148 -60
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +29 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +72 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.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 +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +11 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +72 -23
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +37 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +36 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +71 -25
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +217 -91
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +85 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +257 -63
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +3 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +7 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +32 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +7 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +26 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +287 -88
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +75 -20
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +121 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +1422 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +81 -41
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +8 -6
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +14 -2
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +54 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +6 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +38 -22
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +8 -8
- 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 +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- 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/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/awaitTerminalTool.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 +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +36 -18
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +27 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -67
|
@@ -9,6 +9,8 @@ import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs
|
|
|
9
9
|
import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service";
|
|
10
10
|
import { IAgentPlugin, IAgentPluginDiscovery } from "./agentPluginService.js";
|
|
11
11
|
import { IAgentPluginService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service";
|
|
12
|
+
import { IAgentPluginRepositoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service";
|
|
13
|
+
import { IMarketplacePlugin } from "./pluginMarketplaceService.js";
|
|
12
14
|
import { IPluginMarketplaceService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service";
|
|
13
15
|
/**
|
|
14
16
|
* Replaces `${CLAUDE_PLUGIN_ROOT}` in a shell command string with the
|
|
@@ -29,35 +31,44 @@ export declare class AgentPluginService extends Disposable implements IAgentPlug
|
|
|
29
31
|
setPluginEnabled(pluginUri: URI, enabled: boolean): void;
|
|
30
32
|
private _dedupeAndSort;
|
|
31
33
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Describes a single discovered plugin source, before the shared
|
|
36
|
+
* infrastructure builds the full {@link IAgentPlugin} from it.
|
|
37
|
+
*/
|
|
38
|
+
interface IPluginSource {
|
|
39
|
+
readonly uri: URI;
|
|
40
|
+
readonly enabled: boolean;
|
|
41
|
+
readonly fromMarketplace: IMarketplacePlugin | undefined;
|
|
42
|
+
/** Called when setEnabled is invoked on the plugin */
|
|
43
|
+
setEnabled(value: boolean): void;
|
|
44
|
+
/** Called when remove is invoked on the plugin */
|
|
45
|
+
remove(): void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Shared base class for plugin discovery implementations. Contains the common
|
|
49
|
+
* logic for reading plugin contents (commands, skills, agents, hooks, MCP server
|
|
50
|
+
* definitions) from the filesystem and watching for live updates.
|
|
51
|
+
*
|
|
52
|
+
* Subclasses implement {@link _discoverPluginSources} to determine *which*
|
|
53
|
+
* plugins exist, while this class handles the rest.
|
|
54
|
+
*/
|
|
55
|
+
export declare abstract class AbstractAgentPluginDiscovery extends Disposable implements IAgentPluginDiscovery {
|
|
56
|
+
protected readonly _fileService: IFileService;
|
|
57
|
+
protected readonly _pathService: IPathService;
|
|
58
|
+
protected readonly _logService: ILogService;
|
|
59
|
+
protected readonly _instantiationService: IInstantiationService;
|
|
41
60
|
private readonly _pluginEntries;
|
|
42
61
|
private readonly _plugins;
|
|
43
62
|
readonly plugins: IObservable<readonly IAgentPlugin[]>;
|
|
44
|
-
|
|
45
|
-
constructor(
|
|
46
|
-
start(): void;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* used directly; relative paths are resolved against each workspace folder.
|
|
52
|
-
*/
|
|
53
|
-
private _resolvePluginPath;
|
|
54
|
-
/**
|
|
55
|
-
* Updates the enabled state of a plugin path in the configuration,
|
|
56
|
-
* writing to the most specific config target where the key is defined.
|
|
57
|
-
*/
|
|
58
|
-
private _updatePluginPathEnabled;
|
|
63
|
+
protected _discoverVersion: number;
|
|
64
|
+
constructor(_fileService: IFileService, _pathService: IPathService, _logService: ILogService, _instantiationService: IInstantiationService);
|
|
65
|
+
abstract start(): void;
|
|
66
|
+
protected _refreshPlugins(): Promise<void>;
|
|
67
|
+
/** Subclasses return plugin sources to discover. */
|
|
68
|
+
protected abstract _discoverPluginSources(): Promise<readonly IPluginSource[]>;
|
|
69
|
+
private _discoverAndBuildPlugins;
|
|
59
70
|
private _detectPluginFormatAdapter;
|
|
60
|
-
|
|
71
|
+
protected _pathExists(resource: URI): Promise<boolean>;
|
|
61
72
|
private _toPlugin;
|
|
62
73
|
private _readMcpDefinitions;
|
|
63
74
|
private _readInlinePluginJsonMcpDefinitions;
|
|
@@ -71,3 +82,38 @@ export declare class ConfiguredAgentPluginDiscovery extends Disposable implement
|
|
|
71
82
|
private _disposePluginEntriesExcept;
|
|
72
83
|
dispose(): void;
|
|
73
84
|
}
|
|
85
|
+
export declare class ConfiguredAgentPluginDiscovery extends AbstractAgentPluginDiscovery {
|
|
86
|
+
private readonly _configurationService;
|
|
87
|
+
private readonly _pluginMarketplaceService;
|
|
88
|
+
private readonly _workspaceContextService;
|
|
89
|
+
private readonly _pluginLocationsConfig;
|
|
90
|
+
constructor(_configurationService: IConfigurationService, fileService: IFileService, _pluginMarketplaceService: IPluginMarketplaceService, _workspaceContextService: IWorkspaceContextService, pathService: IPathService, logService: ILogService, instantiationService: IInstantiationService);
|
|
91
|
+
start(): void;
|
|
92
|
+
protected _discoverPluginSources(): Promise<readonly IPluginSource[]>;
|
|
93
|
+
private _getUserHome;
|
|
94
|
+
/**
|
|
95
|
+
* Resolves a plugin path to one or more resource URIs. Supports:
|
|
96
|
+
* - Absolute paths (used directly)
|
|
97
|
+
* - Tilde paths (expanded to user home directory)
|
|
98
|
+
* - Relative paths (resolved against each workspace folder)
|
|
99
|
+
*/
|
|
100
|
+
private _resolvePluginPath;
|
|
101
|
+
/**
|
|
102
|
+
* Updates the enabled state of a plugin path in the configuration,
|
|
103
|
+
* writing to the most specific config target where the key is defined.
|
|
104
|
+
*/
|
|
105
|
+
private _updatePluginPathEnabled;
|
|
106
|
+
/**
|
|
107
|
+
* Removes a plugin path from `chat.pluginLocations` in the most specific
|
|
108
|
+
* config target where the key is defined.
|
|
109
|
+
*/
|
|
110
|
+
private _removePluginPath;
|
|
111
|
+
}
|
|
112
|
+
export declare class MarketplaceAgentPluginDiscovery extends AbstractAgentPluginDiscovery {
|
|
113
|
+
private readonly _pluginMarketplaceService;
|
|
114
|
+
private readonly _pluginRepositoryService;
|
|
115
|
+
constructor(_pluginMarketplaceService: IPluginMarketplaceService, _pluginRepositoryService: IAgentPluginRepositoryService, fileService: IFileService, pathService: IPathService, logService: ILogService, instantiationService: IInstantiationService);
|
|
116
|
+
start(): void;
|
|
117
|
+
protected _discoverPluginSources(): Promise<readonly IPluginSource[]>;
|
|
118
|
+
}
|
|
119
|
+
export {};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
4
|
import { parse } from '@codingame/monaco-vscode-api/vscode/vs/base/common/json';
|
|
5
|
+
import { untildify } from '@codingame/monaco-vscode-api/vscode/vs/base/common/labels';
|
|
5
6
|
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
7
|
import { ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
7
8
|
import { cloneAndChange } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
|
|
@@ -23,9 +24,10 @@ import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbe
|
|
|
23
24
|
import { parseClaudeHooks } from '../promptSyntax/hookClaudeCompat.js';
|
|
24
25
|
import { parseCopilotHooks } from '../promptSyntax/hookCompatibility.js';
|
|
25
26
|
import { agentPluginDiscoveryRegistry } from './agentPluginService.js';
|
|
27
|
+
import { IAgentPluginRepositoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service';
|
|
26
28
|
import { IPluginMarketplaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service';
|
|
27
|
-
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
28
29
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
30
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
29
31
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
30
32
|
|
|
31
33
|
const COMMAND_FILE_SUFFIX = ".md";
|
|
@@ -181,21 +183,10 @@ let AgentPluginService = class AgentPluginService extends Disposable {
|
|
|
181
183
|
}
|
|
182
184
|
};
|
|
183
185
|
AgentPluginService = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IConfigurationService))], AgentPluginService));
|
|
184
|
-
|
|
185
|
-
constructor(
|
|
186
|
-
_configurationService,
|
|
187
|
-
_fileService,
|
|
188
|
-
_pluginMarketplaceService,
|
|
189
|
-
_workspaceContextService,
|
|
190
|
-
_pathService,
|
|
191
|
-
_logService,
|
|
192
|
-
_instantiationService
|
|
193
|
-
) {
|
|
186
|
+
class AbstractAgentPluginDiscovery extends Disposable {
|
|
187
|
+
constructor(_fileService, _pathService, _logService, _instantiationService) {
|
|
194
188
|
super();
|
|
195
|
-
this._configurationService = _configurationService;
|
|
196
189
|
this._fileService = _fileService;
|
|
197
|
-
this._pluginMarketplaceService = _pluginMarketplaceService;
|
|
198
|
-
this._workspaceContextService = _workspaceContextService;
|
|
199
190
|
this._pathService = _pathService;
|
|
200
191
|
this._logService = _logService;
|
|
201
192
|
this._instantiationService = _instantiationService;
|
|
@@ -203,94 +194,38 @@ let ConfiguredAgentPluginDiscovery = class ConfiguredAgentPluginDiscovery extend
|
|
|
203
194
|
this._plugins = observableValue("discoveredAgentPlugins", []);
|
|
204
195
|
this.plugins = this._plugins;
|
|
205
196
|
this._discoverVersion = 0;
|
|
206
|
-
this._pluginPathsConfig = observableConfigValue(ChatConfiguration.PluginPaths, {}, _configurationService);
|
|
207
|
-
}
|
|
208
|
-
start() {
|
|
209
|
-
const scheduler = this._register(( new RunOnceScheduler(() => this._refreshPlugins(), 0)));
|
|
210
|
-
this._register(autorun(reader => {
|
|
211
|
-
this._pluginPathsConfig.read(reader);
|
|
212
|
-
scheduler.schedule();
|
|
213
|
-
}));
|
|
214
|
-
scheduler.schedule();
|
|
215
197
|
}
|
|
216
198
|
async _refreshPlugins() {
|
|
217
199
|
const version = ++this._discoverVersion;
|
|
218
|
-
const plugins = await this.
|
|
200
|
+
const plugins = await this._discoverAndBuildPlugins();
|
|
219
201
|
if (version !== this._discoverVersion || this._store.isDisposed) {
|
|
220
202
|
return;
|
|
221
203
|
}
|
|
222
204
|
this._plugins.set(plugins, undefined);
|
|
223
205
|
}
|
|
224
|
-
async
|
|
206
|
+
async _discoverAndBuildPlugins() {
|
|
207
|
+
const sources = await this._discoverPluginSources();
|
|
225
208
|
const plugins = [];
|
|
226
209
|
const seenPluginUris = ( new Set());
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
if (!
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
);
|
|
241
|
-
continue;
|
|
242
|
-
}
|
|
243
|
-
if (!stat.isDirectory) {
|
|
244
|
-
this._logService.debug(
|
|
245
|
-
`[ConfiguredAgentPluginDiscovery] Plugin path is not a directory: ${( resource.toString())}`
|
|
246
|
-
);
|
|
247
|
-
continue;
|
|
248
|
-
}
|
|
249
|
-
const key = ( stat.resource.toString());
|
|
250
|
-
if (!( seenPluginUris.has(key))) {
|
|
251
|
-
const adapter = await this._detectPluginFormatAdapter(stat.resource);
|
|
252
|
-
const fromMarketplace = await this._pluginMarketplaceService.getMarketplacePluginMetadata(stat.resource);
|
|
253
|
-
seenPluginUris.add(key);
|
|
254
|
-
plugins.push(this._toPlugin(stat.resource, path, enabled, adapter, fromMarketplace));
|
|
255
|
-
}
|
|
210
|
+
for (const source of sources) {
|
|
211
|
+
const key = ( source.uri.toString());
|
|
212
|
+
if (!( seenPluginUris.has(key))) {
|
|
213
|
+
seenPluginUris.add(key);
|
|
214
|
+
const adapter = await this._detectPluginFormatAdapter(source.uri);
|
|
215
|
+
plugins.push(this._toPlugin(
|
|
216
|
+
source.uri,
|
|
217
|
+
source.enabled,
|
|
218
|
+
adapter,
|
|
219
|
+
source.fromMarketplace,
|
|
220
|
+
value => source.setEnabled(value),
|
|
221
|
+
() => source.remove()
|
|
222
|
+
));
|
|
256
223
|
}
|
|
257
224
|
}
|
|
258
225
|
this._disposePluginEntriesExcept(seenPluginUris);
|
|
259
226
|
plugins.sort((a, b) => ( a.uri.toString()).localeCompare(( b.uri.toString())));
|
|
260
227
|
return plugins;
|
|
261
228
|
}
|
|
262
|
-
_resolvePluginPath(path) {
|
|
263
|
-
if (win32.isAbsolute(path) || posix.isAbsolute(path)) {
|
|
264
|
-
return [URI.file(path)];
|
|
265
|
-
}
|
|
266
|
-
return ( this._workspaceContextService.getWorkspace().folders.map(folder => joinPath(folder.uri, path)));
|
|
267
|
-
}
|
|
268
|
-
_updatePluginPathEnabled(configKey, value) {
|
|
269
|
-
const inspected = this._configurationService.inspect(ChatConfiguration.PluginPaths);
|
|
270
|
-
const targets = [
|
|
271
|
-
ConfigurationTarget.WORKSPACE_FOLDER,
|
|
272
|
-
ConfigurationTarget.WORKSPACE,
|
|
273
|
-
ConfigurationTarget.USER_LOCAL,
|
|
274
|
-
ConfigurationTarget.USER_REMOTE,
|
|
275
|
-
ConfigurationTarget.USER,
|
|
276
|
-
ConfigurationTarget.APPLICATION
|
|
277
|
-
];
|
|
278
|
-
for (const target of targets) {
|
|
279
|
-
const mapping = getConfigValueInTarget(inspected, target);
|
|
280
|
-
if (mapping && Object.prototype.hasOwnProperty.call(mapping, configKey)) {
|
|
281
|
-
this._configurationService.updateValue(ChatConfiguration.PluginPaths, {
|
|
282
|
-
...mapping,
|
|
283
|
-
[configKey]: value
|
|
284
|
-
}, target);
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
const current = getConfigValueInTarget(inspected, ConfigurationTarget.USER_LOCAL) ?? {};
|
|
289
|
-
this._configurationService.updateValue(ChatConfiguration.PluginPaths, {
|
|
290
|
-
...current,
|
|
291
|
-
[configKey]: value
|
|
292
|
-
}, ConfigurationTarget.USER_LOCAL);
|
|
293
|
-
}
|
|
294
229
|
async _detectPluginFormatAdapter(pluginUri) {
|
|
295
230
|
const isInClaudeDirectory = pluginUri.path.split("/").includes(".claude");
|
|
296
231
|
if (isInClaudeDirectory || (await this._pathExists(joinPath(pluginUri, ".claude-plugin", "plugin.json")))) {
|
|
@@ -306,7 +241,14 @@ let ConfiguredAgentPluginDiscovery = class ConfiguredAgentPluginDiscovery extend
|
|
|
306
241
|
return false;
|
|
307
242
|
}
|
|
308
243
|
}
|
|
309
|
-
_toPlugin(
|
|
244
|
+
_toPlugin(
|
|
245
|
+
uri,
|
|
246
|
+
initialEnabled,
|
|
247
|
+
adapter,
|
|
248
|
+
fromMarketplace,
|
|
249
|
+
setEnabledCallback,
|
|
250
|
+
removeCallback
|
|
251
|
+
) {
|
|
310
252
|
const key = ( uri.toString());
|
|
311
253
|
const existing = this._pluginEntries.get(key);
|
|
312
254
|
if (existing) {
|
|
@@ -372,10 +314,10 @@ let ConfiguredAgentPluginDiscovery = class ConfiguredAgentPluginDiscovery extend
|
|
|
372
314
|
mcpScheduler.schedule();
|
|
373
315
|
const plugin = {
|
|
374
316
|
uri,
|
|
317
|
+
label: fromMarketplace?.name ?? basename(uri),
|
|
375
318
|
enabled,
|
|
376
|
-
setEnabled:
|
|
377
|
-
|
|
378
|
-
},
|
|
319
|
+
setEnabled: setEnabledCallback,
|
|
320
|
+
remove: removeCallback,
|
|
379
321
|
hooks,
|
|
380
322
|
commands,
|
|
381
323
|
skills,
|
|
@@ -616,7 +558,191 @@ let ConfiguredAgentPluginDiscovery = class ConfiguredAgentPluginDiscovery extend
|
|
|
616
558
|
this._disposePluginEntriesExcept(( new Set()));
|
|
617
559
|
super.dispose();
|
|
618
560
|
}
|
|
561
|
+
}
|
|
562
|
+
let ConfiguredAgentPluginDiscovery = class ConfiguredAgentPluginDiscovery extends AbstractAgentPluginDiscovery {
|
|
563
|
+
constructor(
|
|
564
|
+
_configurationService,
|
|
565
|
+
fileService,
|
|
566
|
+
_pluginMarketplaceService,
|
|
567
|
+
_workspaceContextService,
|
|
568
|
+
pathService,
|
|
569
|
+
logService,
|
|
570
|
+
instantiationService
|
|
571
|
+
) {
|
|
572
|
+
super(fileService, pathService, logService, instantiationService);
|
|
573
|
+
this._configurationService = _configurationService;
|
|
574
|
+
this._pluginMarketplaceService = _pluginMarketplaceService;
|
|
575
|
+
this._workspaceContextService = _workspaceContextService;
|
|
576
|
+
this._pluginLocationsConfig = observableConfigValue(ChatConfiguration.PluginLocations, {}, _configurationService);
|
|
577
|
+
}
|
|
578
|
+
start() {
|
|
579
|
+
const scheduler = this._register(( new RunOnceScheduler(() => this._refreshPlugins(), 0)));
|
|
580
|
+
this._register(autorun(reader => {
|
|
581
|
+
this._pluginLocationsConfig.read(reader);
|
|
582
|
+
scheduler.schedule();
|
|
583
|
+
}));
|
|
584
|
+
scheduler.schedule();
|
|
585
|
+
}
|
|
586
|
+
async _discoverPluginSources() {
|
|
587
|
+
const sources = [];
|
|
588
|
+
const config = this._pluginLocationsConfig.get();
|
|
589
|
+
const userHome = await this._getUserHome();
|
|
590
|
+
for (const [path, enabled] of Object.entries(config)) {
|
|
591
|
+
if (!path.trim()) {
|
|
592
|
+
continue;
|
|
593
|
+
}
|
|
594
|
+
const resources = this._resolvePluginPath(path.trim(), userHome);
|
|
595
|
+
for (const resource of resources) {
|
|
596
|
+
let stat;
|
|
597
|
+
try {
|
|
598
|
+
stat = await this._fileService.resolve(resource);
|
|
599
|
+
} catch {
|
|
600
|
+
this._logService.debug(
|
|
601
|
+
`[ConfiguredAgentPluginDiscovery] Could not resolve plugin path: ${( resource.toString())}`
|
|
602
|
+
);
|
|
603
|
+
continue;
|
|
604
|
+
}
|
|
605
|
+
if (!stat.isDirectory) {
|
|
606
|
+
this._logService.debug(
|
|
607
|
+
`[ConfiguredAgentPluginDiscovery] Plugin path is not a directory: ${( resource.toString())}`
|
|
608
|
+
);
|
|
609
|
+
continue;
|
|
610
|
+
}
|
|
611
|
+
const fromMarketplace = this._pluginMarketplaceService.getMarketplacePluginMetadata(stat.resource);
|
|
612
|
+
const configKey = path;
|
|
613
|
+
sources.push({
|
|
614
|
+
uri: stat.resource,
|
|
615
|
+
enabled,
|
|
616
|
+
fromMarketplace,
|
|
617
|
+
setEnabled: value => this._updatePluginPathEnabled(configKey, value),
|
|
618
|
+
remove: () => this._removePluginPath(configKey)
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
return sources;
|
|
623
|
+
}
|
|
624
|
+
async _getUserHome() {
|
|
625
|
+
const userHome = await this._pathService.userHome();
|
|
626
|
+
return userHome.scheme === "file" ? userHome.fsPath : userHome.path;
|
|
627
|
+
}
|
|
628
|
+
_resolvePluginPath(path, userHome) {
|
|
629
|
+
if (path.startsWith("~")) {
|
|
630
|
+
path = untildify(path, userHome);
|
|
631
|
+
}
|
|
632
|
+
if (win32.isAbsolute(path) || posix.isAbsolute(path)) {
|
|
633
|
+
return [URI.file(path)];
|
|
634
|
+
}
|
|
635
|
+
return ( this._workspaceContextService.getWorkspace().folders.map(folder => joinPath(folder.uri, path)));
|
|
636
|
+
}
|
|
637
|
+
_updatePluginPathEnabled(configKey, value) {
|
|
638
|
+
const inspected = this._configurationService.inspect(ChatConfiguration.PluginLocations);
|
|
639
|
+
const targets = [
|
|
640
|
+
ConfigurationTarget.WORKSPACE_FOLDER,
|
|
641
|
+
ConfigurationTarget.WORKSPACE,
|
|
642
|
+
ConfigurationTarget.USER_LOCAL,
|
|
643
|
+
ConfigurationTarget.USER_REMOTE,
|
|
644
|
+
ConfigurationTarget.USER,
|
|
645
|
+
ConfigurationTarget.APPLICATION
|
|
646
|
+
];
|
|
647
|
+
for (const target of targets) {
|
|
648
|
+
const mapping = getConfigValueInTarget(inspected, target);
|
|
649
|
+
if (mapping && Object.prototype.hasOwnProperty.call(mapping, configKey)) {
|
|
650
|
+
this._configurationService.updateValue(ChatConfiguration.PluginLocations, {
|
|
651
|
+
...mapping,
|
|
652
|
+
[configKey]: value
|
|
653
|
+
}, target);
|
|
654
|
+
return;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
const current = getConfigValueInTarget(inspected, ConfigurationTarget.USER_LOCAL) ?? {};
|
|
658
|
+
this._configurationService.updateValue(ChatConfiguration.PluginLocations, {
|
|
659
|
+
...current,
|
|
660
|
+
[configKey]: value
|
|
661
|
+
}, ConfigurationTarget.USER_LOCAL);
|
|
662
|
+
}
|
|
663
|
+
_removePluginPath(configKey) {
|
|
664
|
+
const inspected = this._configurationService.inspect(ChatConfiguration.PluginLocations);
|
|
665
|
+
const targets = [
|
|
666
|
+
ConfigurationTarget.WORKSPACE_FOLDER,
|
|
667
|
+
ConfigurationTarget.WORKSPACE,
|
|
668
|
+
ConfigurationTarget.USER_LOCAL,
|
|
669
|
+
ConfigurationTarget.USER_REMOTE,
|
|
670
|
+
ConfigurationTarget.USER,
|
|
671
|
+
ConfigurationTarget.APPLICATION
|
|
672
|
+
];
|
|
673
|
+
for (const target of targets) {
|
|
674
|
+
const mapping = getConfigValueInTarget(inspected, target);
|
|
675
|
+
if (mapping && Object.prototype.hasOwnProperty.call(mapping, configKey)) {
|
|
676
|
+
const updated = {
|
|
677
|
+
...mapping
|
|
678
|
+
};
|
|
679
|
+
delete updated[configKey];
|
|
680
|
+
this._configurationService.updateValue(ChatConfiguration.PluginLocations, updated, target);
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
619
685
|
};
|
|
620
686
|
ConfiguredAgentPluginDiscovery = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IFileService)), ( __param(2, IPluginMarketplaceService)), ( __param(3, IWorkspaceContextService)), ( __param(4, IPathService)), ( __param(5, ILogService)), ( __param(6, IInstantiationService))], ConfiguredAgentPluginDiscovery));
|
|
687
|
+
let MarketplaceAgentPluginDiscovery = class MarketplaceAgentPluginDiscovery extends AbstractAgentPluginDiscovery {
|
|
688
|
+
constructor(
|
|
689
|
+
_pluginMarketplaceService,
|
|
690
|
+
_pluginRepositoryService,
|
|
691
|
+
fileService,
|
|
692
|
+
pathService,
|
|
693
|
+
logService,
|
|
694
|
+
instantiationService
|
|
695
|
+
) {
|
|
696
|
+
super(fileService, pathService, logService, instantiationService);
|
|
697
|
+
this._pluginMarketplaceService = _pluginMarketplaceService;
|
|
698
|
+
this._pluginRepositoryService = _pluginRepositoryService;
|
|
699
|
+
}
|
|
700
|
+
start() {
|
|
701
|
+
const scheduler = this._register(( new RunOnceScheduler(() => this._refreshPlugins(), 0)));
|
|
702
|
+
this._register(autorun(reader => {
|
|
703
|
+
this._pluginMarketplaceService.installedPlugins.read(reader);
|
|
704
|
+
scheduler.schedule();
|
|
705
|
+
}));
|
|
706
|
+
scheduler.schedule();
|
|
707
|
+
}
|
|
708
|
+
async _discoverPluginSources() {
|
|
709
|
+
const installed = this._pluginMarketplaceService.installedPlugins.get();
|
|
710
|
+
const sources = [];
|
|
711
|
+
for (const entry of installed) {
|
|
712
|
+
let stat;
|
|
713
|
+
try {
|
|
714
|
+
stat = await this._fileService.resolve(entry.pluginUri);
|
|
715
|
+
} catch {
|
|
716
|
+
this._logService.debug(
|
|
717
|
+
`[MarketplaceAgentPluginDiscovery] Could not resolve installed plugin: ${( entry.pluginUri.toString())}`
|
|
718
|
+
);
|
|
719
|
+
continue;
|
|
720
|
+
}
|
|
721
|
+
if (!stat.isDirectory) {
|
|
722
|
+
this._logService.debug(
|
|
723
|
+
`[MarketplaceAgentPluginDiscovery] Installed plugin path is not a directory: ${( entry.pluginUri.toString())}`
|
|
724
|
+
);
|
|
725
|
+
continue;
|
|
726
|
+
}
|
|
727
|
+
sources.push({
|
|
728
|
+
uri: stat.resource,
|
|
729
|
+
enabled: entry.enabled,
|
|
730
|
+
fromMarketplace: entry.plugin,
|
|
731
|
+
setEnabled: value => this._pluginMarketplaceService.setInstalledPluginEnabled(entry.pluginUri, value),
|
|
732
|
+
remove: () => {
|
|
733
|
+
this._pluginMarketplaceService.removeInstalledPlugin(entry.pluginUri);
|
|
734
|
+
this._pluginRepositoryService.cleanupPluginSource(entry.plugin).catch(error => {
|
|
735
|
+
this._logService.error(
|
|
736
|
+
"[MarketplaceAgentPluginDiscovery] Failed to clean up plugin source",
|
|
737
|
+
error
|
|
738
|
+
);
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
return sources;
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
MarketplaceAgentPluginDiscovery = ( __decorate([( __param(0, IPluginMarketplaceService)), ( __param(1, IAgentPluginRepositoryService)), ( __param(2, IFileService)), ( __param(3, IPathService)), ( __param(4, ILogService)), ( __param(5, IInstantiationService))], MarketplaceAgentPluginDiscovery));
|
|
621
747
|
|
|
622
|
-
export { AgentPluginService, ConfiguredAgentPluginDiscovery, shellQuotePluginRootInCommand };
|
|
748
|
+
export { AbstractAgentPluginDiscovery, AgentPluginService, ConfiguredAgentPluginDiscovery, MarketplaceAgentPluginDiscovery, shellQuotePluginRootInCommand };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
2
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
3
5
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
6
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
7
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
@@ -27,12 +29,52 @@ export interface IMarketplaceReference {
|
|
|
27
29
|
readonly githubRepo?: string;
|
|
28
30
|
readonly localRepositoryUri?: URI;
|
|
29
31
|
}
|
|
32
|
+
export declare enum PluginSourceKind {
|
|
33
|
+
RelativePath = "relativePath",
|
|
34
|
+
GitHub = "github",
|
|
35
|
+
GitUrl = "url",
|
|
36
|
+
Npm = "npm",
|
|
37
|
+
Pip = "pip"
|
|
38
|
+
}
|
|
39
|
+
export interface IRelativePathPluginSource {
|
|
40
|
+
readonly kind: PluginSourceKind.RelativePath;
|
|
41
|
+
/** Resolved relative path within the marketplace repository. */
|
|
42
|
+
readonly path: string;
|
|
43
|
+
}
|
|
44
|
+
export interface IGitHubPluginSource {
|
|
45
|
+
readonly kind: PluginSourceKind.GitHub;
|
|
46
|
+
readonly repo: string;
|
|
47
|
+
readonly ref?: string;
|
|
48
|
+
readonly sha?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface IGitUrlPluginSource {
|
|
51
|
+
readonly kind: PluginSourceKind.GitUrl;
|
|
52
|
+
/** Full git repository URL (must end with .git). */
|
|
53
|
+
readonly url: string;
|
|
54
|
+
readonly ref?: string;
|
|
55
|
+
readonly sha?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface INpmPluginSource {
|
|
58
|
+
readonly kind: PluginSourceKind.Npm;
|
|
59
|
+
readonly package: string;
|
|
60
|
+
readonly version?: string;
|
|
61
|
+
readonly registry?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface IPipPluginSource {
|
|
64
|
+
readonly kind: PluginSourceKind.Pip;
|
|
65
|
+
readonly package: string;
|
|
66
|
+
readonly version?: string;
|
|
67
|
+
readonly registry?: string;
|
|
68
|
+
}
|
|
69
|
+
export type IPluginSourceDescriptor = IRelativePathPluginSource | IGitHubPluginSource | IGitUrlPluginSource | INpmPluginSource | IPipPluginSource;
|
|
30
70
|
export interface IMarketplacePlugin {
|
|
31
71
|
readonly name: string;
|
|
32
72
|
readonly description: string;
|
|
33
73
|
readonly version: string;
|
|
34
|
-
/** Subdirectory within the repository where the plugin lives. */
|
|
74
|
+
/** Subdirectory within the repository where the plugin lives (for relative-path sources). */
|
|
35
75
|
readonly source: string;
|
|
76
|
+
/** Structured source descriptor indicating how the plugin should be fetched/installed. */
|
|
77
|
+
readonly sourceDescriptor: IPluginSourceDescriptor;
|
|
36
78
|
/** Marketplace label shown in UI and plugin provenance. */
|
|
37
79
|
readonly marketplace: string;
|
|
38
80
|
/** Canonical reference for clone/update/install location resolution. */
|
|
@@ -41,7 +83,23 @@ export interface IMarketplacePlugin {
|
|
|
41
83
|
readonly marketplaceType: MarketplaceType;
|
|
42
84
|
readonly readmeUri?: URI;
|
|
43
85
|
}
|
|
44
|
-
|
|
86
|
+
/** Raw JSON shape of a remote plugin source object in marketplace.json. */
|
|
87
|
+
interface IJsonPluginSource {
|
|
88
|
+
readonly source: string;
|
|
89
|
+
readonly repo?: string;
|
|
90
|
+
readonly url?: string;
|
|
91
|
+
readonly package?: string;
|
|
92
|
+
readonly ref?: string;
|
|
93
|
+
readonly sha?: string;
|
|
94
|
+
readonly version?: string;
|
|
95
|
+
readonly registry?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface IMarketplaceInstalledPlugin {
|
|
98
|
+
readonly pluginUri: URI;
|
|
99
|
+
readonly plugin: IMarketplacePlugin;
|
|
100
|
+
readonly enabled: boolean;
|
|
101
|
+
}
|
|
102
|
+
export declare class PluginMarketplaceService extends Disposable implements IPluginMarketplaceService {
|
|
45
103
|
private readonly _configurationService;
|
|
46
104
|
private readonly _requestService;
|
|
47
105
|
private readonly _fileService;
|
|
@@ -50,15 +108,39 @@ export declare class PluginMarketplaceService implements IPluginMarketplaceServi
|
|
|
50
108
|
private readonly _storageService;
|
|
51
109
|
readonly _serviceBrand: undefined;
|
|
52
110
|
private readonly _gitHubMarketplaceCache;
|
|
111
|
+
private readonly _installedPluginsStore;
|
|
112
|
+
private readonly _trustedMarketplacesStore;
|
|
53
113
|
readonly onDidChangeMarketplaces: Event<void>;
|
|
114
|
+
readonly installedPlugins: IObservable<readonly IMarketplaceInstalledPlugin[]>;
|
|
54
115
|
constructor(_configurationService: IConfigurationService, _requestService: IRequestService, _fileService: IFileService, _pluginRepositoryService: IAgentPluginRepositoryService, _logService: ILogService, _storageService: IStorageService);
|
|
55
116
|
fetchMarketplacePlugins(token: CancellationToken): Promise<IMarketplacePlugin[]>;
|
|
56
117
|
private _fetchFromGitHubRepo;
|
|
57
118
|
private _getCachedGitHubMarketplacePlugins;
|
|
58
119
|
private _loadPersistedGitHubMarketplaceCache;
|
|
59
120
|
private _savePersistedGitHubMarketplaceCache;
|
|
60
|
-
getMarketplacePluginMetadata(pluginUri: URI):
|
|
121
|
+
getMarketplacePluginMetadata(pluginUri: URI): IMarketplacePlugin | undefined;
|
|
122
|
+
addInstalledPlugin(pluginUri: URI, plugin: IMarketplacePlugin): void;
|
|
123
|
+
removeInstalledPlugin(pluginUri: URI): void;
|
|
124
|
+
setInstalledPluginEnabled(pluginUri: URI, enabled: boolean): void;
|
|
125
|
+
isMarketplaceTrusted(ref: IMarketplaceReference): boolean;
|
|
126
|
+
trustMarketplace(ref: IMarketplaceReference): void;
|
|
61
127
|
private _fetchFromClonedRepo;
|
|
62
128
|
}
|
|
63
129
|
export declare function parseMarketplaceReferences(values: readonly unknown[]): IMarketplaceReference[];
|
|
64
130
|
export declare function parseMarketplaceReference(value: string): IMarketplaceReference | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* Parse a raw `source` field from marketplace.json into a structured
|
|
133
|
+
* {@link IPluginSourceDescriptor}. Accepts either a relative-path string
|
|
134
|
+
* or a JSON object with a `source` discriminant indicating the kind.
|
|
135
|
+
*/
|
|
136
|
+
export declare function parsePluginSource(rawSource: string | IJsonPluginSource | undefined, pluginRoot: string | undefined, logContext: {
|
|
137
|
+
pluginName: string;
|
|
138
|
+
logService: ILogService;
|
|
139
|
+
logPrefix: string;
|
|
140
|
+
}): IPluginSourceDescriptor | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* Returns a human-readable label for a plugin source descriptor,
|
|
143
|
+
* suitable for error messages and UI display.
|
|
144
|
+
*/
|
|
145
|
+
export declare function getPluginSourceLabel(descriptor: IPluginSourceDescriptor): string;
|
|
146
|
+
export {};
|