@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
|
@@ -3,12 +3,14 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
4
|
import { parse } from '@codingame/monaco-vscode-api/vscode/vs/base/common/json';
|
|
5
5
|
import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
|
|
6
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
7
|
import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
7
|
-
import { isEqualOrParent, joinPath, normalizePath, relativePath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
8
|
+
import { isEqualOrParent, isEqual, joinPath, normalizePath, relativePath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
8
9
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
9
10
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
10
11
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
11
12
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
13
|
+
import { observableMemento } from '@codingame/monaco-vscode-api/vscode/vs/platform/observable/common/observableMemento';
|
|
12
14
|
import { asJson } from '@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request';
|
|
13
15
|
import { IRequestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service';
|
|
14
16
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
@@ -27,6 +29,14 @@ var MarketplaceReferenceKind;
|
|
|
27
29
|
MarketplaceReferenceKind["GitUri"] = "gitUri";
|
|
28
30
|
MarketplaceReferenceKind["LocalFileUri"] = "localFileUri";
|
|
29
31
|
})(MarketplaceReferenceKind || (MarketplaceReferenceKind = {}));
|
|
32
|
+
var PluginSourceKind;
|
|
33
|
+
(function(PluginSourceKind) {
|
|
34
|
+
PluginSourceKind["RelativePath"] = "relativePath";
|
|
35
|
+
PluginSourceKind["GitHub"] = "github";
|
|
36
|
+
PluginSourceKind["GitUrl"] = "url";
|
|
37
|
+
PluginSourceKind["Npm"] = "npm";
|
|
38
|
+
PluginSourceKind["Pip"] = "pip";
|
|
39
|
+
})(PluginSourceKind || (PluginSourceKind = {}));
|
|
30
40
|
const MARKETPLACE_DEFINITIONS = [{
|
|
31
41
|
type: MarketplaceType.Copilot,
|
|
32
42
|
path: ".github/plugin/marketplace.json"
|
|
@@ -36,7 +46,37 @@ const MARKETPLACE_DEFINITIONS = [{
|
|
|
36
46
|
}];
|
|
37
47
|
const GITHUB_MARKETPLACE_CACHE_TTL_MS = 8 * 60 * 60 * 1000;
|
|
38
48
|
const GITHUB_MARKETPLACE_CACHE_STORAGE_KEY = "chat.plugins.marketplaces.githubCache.v1";
|
|
39
|
-
|
|
49
|
+
function ensureSourceDescriptor(plugin) {
|
|
50
|
+
if (plugin.sourceDescriptor) {
|
|
51
|
+
return plugin;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
...plugin,
|
|
55
|
+
sourceDescriptor: {
|
|
56
|
+
kind: PluginSourceKind.RelativePath,
|
|
57
|
+
path: plugin.source
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const installedPluginsMemento = observableMemento({
|
|
62
|
+
defaultValue: [],
|
|
63
|
+
key: "chat.plugins.installed.v1",
|
|
64
|
+
toStorage: value => JSON.stringify(value),
|
|
65
|
+
fromStorage: value => {
|
|
66
|
+
const parsed = JSON.parse(value);
|
|
67
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const trustedMarketplacesMemento = observableMemento({
|
|
71
|
+
defaultValue: [],
|
|
72
|
+
key: "chat.plugins.trustedMarketplaces.v1",
|
|
73
|
+
toStorage: value => JSON.stringify(value),
|
|
74
|
+
fromStorage: value => {
|
|
75
|
+
const parsed = JSON.parse(value);
|
|
76
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
let PluginMarketplaceService = class PluginMarketplaceService extends Disposable {
|
|
40
80
|
constructor(
|
|
41
81
|
_configurationService,
|
|
42
82
|
_requestService,
|
|
@@ -45,6 +85,7 @@ let PluginMarketplaceService = class PluginMarketplaceService {
|
|
|
45
85
|
_logService,
|
|
46
86
|
_storageService
|
|
47
87
|
) {
|
|
88
|
+
super();
|
|
48
89
|
this._configurationService = _configurationService;
|
|
49
90
|
this._requestService = _requestService;
|
|
50
91
|
this._fileService = _fileService;
|
|
@@ -52,6 +93,16 @@ let PluginMarketplaceService = class PluginMarketplaceService {
|
|
|
52
93
|
this._logService = _logService;
|
|
53
94
|
this._storageService = _storageService;
|
|
54
95
|
this._gitHubMarketplaceCache = ( new Lazy(() => this._loadPersistedGitHubMarketplaceCache()));
|
|
96
|
+
this._installedPluginsStore = this._register(
|
|
97
|
+
installedPluginsMemento(StorageScope.APPLICATION, StorageTarget.MACHINE, _storageService)
|
|
98
|
+
);
|
|
99
|
+
this._trustedMarketplacesStore = this._register(
|
|
100
|
+
trustedMarketplacesMemento(StorageScope.APPLICATION, StorageTarget.MACHINE, _storageService)
|
|
101
|
+
);
|
|
102
|
+
this.installedPlugins = ( this._installedPluginsStore.map(s => ( revive(s).map(e => ({
|
|
103
|
+
...e,
|
|
104
|
+
plugin: ensureSourceDescriptor(e.plugin)
|
|
105
|
+
})))));
|
|
55
106
|
this.onDidChangeMarketplaces = Event.filter(
|
|
56
107
|
_configurationService.onDidChangeConfiguration,
|
|
57
108
|
e => e.affectsConfiguration(ChatConfiguration.PluginsEnabled) || e.affectsConfiguration(ChatConfiguration.PluginMarketplaces)
|
|
@@ -111,18 +162,21 @@ let PluginMarketplaceService = class PluginMarketplaceService {
|
|
|
111
162
|
continue;
|
|
112
163
|
}
|
|
113
164
|
const plugins = json.plugins.filter(p => typeof p.name === "string" && !!p.name).flatMap(p => {
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
this._logService
|
|
117
|
-
|
|
118
|
-
|
|
165
|
+
const sourceDescriptor = parsePluginSource(p.source, json.metadata?.pluginRoot, {
|
|
166
|
+
pluginName: p.name,
|
|
167
|
+
logService: this._logService,
|
|
168
|
+
logPrefix: `[PluginMarketplaceService]`
|
|
169
|
+
});
|
|
170
|
+
if (!sourceDescriptor) {
|
|
119
171
|
return [];
|
|
120
172
|
}
|
|
173
|
+
const source = sourceDescriptor.kind === PluginSourceKind.RelativePath ? sourceDescriptor.path : "";
|
|
121
174
|
return [{
|
|
122
175
|
name: p.name,
|
|
123
176
|
description: p.description ?? "",
|
|
124
177
|
version: p.version ?? "",
|
|
125
178
|
source,
|
|
179
|
+
sourceDescriptor,
|
|
126
180
|
marketplace: reference.displayLabel,
|
|
127
181
|
marketplaceReference: reference,
|
|
128
182
|
marketplaceType: def.type,
|
|
@@ -181,7 +235,7 @@ let PluginMarketplaceService = class PluginMarketplaceService {
|
|
|
181
235
|
if (!reference) {
|
|
182
236
|
continue;
|
|
183
237
|
}
|
|
184
|
-
const plugins = ( entry.plugins.map(plugin => ({
|
|
238
|
+
const plugins = ( entry.plugins.map(plugin => ensureSourceDescriptor({
|
|
185
239
|
...plugin,
|
|
186
240
|
marketplace: reference.displayLabel,
|
|
187
241
|
marketplaceReference: reference
|
|
@@ -217,56 +271,41 @@ let PluginMarketplaceService = class PluginMarketplaceService {
|
|
|
217
271
|
StorageTarget.MACHINE
|
|
218
272
|
);
|
|
219
273
|
}
|
|
220
|
-
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
if (isEqualOrParent(pluginUri, pluginSourceUri)) {
|
|
255
|
-
return {
|
|
256
|
-
name: p.name,
|
|
257
|
-
description: p.description ?? "",
|
|
258
|
-
version: p.version ?? "",
|
|
259
|
-
source,
|
|
260
|
-
marketplace: ref.displayLabel,
|
|
261
|
-
marketplaceReference: ref,
|
|
262
|
-
marketplaceType: def.type,
|
|
263
|
-
readmeUri: getMarketplaceReadmeFileUri(repoDir, source)
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
274
|
+
getMarketplacePluginMetadata(pluginUri) {
|
|
275
|
+
const installed = this.installedPlugins.get();
|
|
276
|
+
return installed.find(e => isEqualOrParent(pluginUri, e.pluginUri))?.plugin;
|
|
277
|
+
}
|
|
278
|
+
addInstalledPlugin(pluginUri, plugin) {
|
|
279
|
+
const current = this.installedPlugins.get();
|
|
280
|
+
if (( current.some(e => isEqual(e.pluginUri, pluginUri)))) {
|
|
281
|
+
this._installedPluginsStore.set([...current], undefined);
|
|
282
|
+
} else {
|
|
283
|
+
this._installedPluginsStore.set([...current, {
|
|
284
|
+
pluginUri,
|
|
285
|
+
plugin,
|
|
286
|
+
enabled: true
|
|
287
|
+
}], undefined);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
removeInstalledPlugin(pluginUri) {
|
|
291
|
+
const current = this.installedPlugins.get();
|
|
292
|
+
this._installedPluginsStore.set(current.filter(e => !isEqual(e.pluginUri, pluginUri)), undefined);
|
|
293
|
+
}
|
|
294
|
+
setInstalledPluginEnabled(pluginUri, enabled) {
|
|
295
|
+
const current = this.installedPlugins.get();
|
|
296
|
+
this._installedPluginsStore.set(( current.map(e => isEqual(e.pluginUri, pluginUri) ? {
|
|
297
|
+
...e,
|
|
298
|
+
enabled
|
|
299
|
+
} : e)), undefined);
|
|
300
|
+
}
|
|
301
|
+
isMarketplaceTrusted(ref) {
|
|
302
|
+
return this._trustedMarketplacesStore.get().includes(ref.canonicalId);
|
|
303
|
+
}
|
|
304
|
+
trustMarketplace(ref) {
|
|
305
|
+
const current = this._trustedMarketplacesStore.get();
|
|
306
|
+
if (!current.includes(ref.canonicalId)) {
|
|
307
|
+
this._trustedMarketplacesStore.set([...current, ref.canonicalId], undefined);
|
|
268
308
|
}
|
|
269
|
-
return undefined;
|
|
270
309
|
}
|
|
271
310
|
async _fetchFromClonedRepo(reference, token) {
|
|
272
311
|
let repoDir;
|
|
@@ -296,18 +335,21 @@ let PluginMarketplaceService = class PluginMarketplaceService {
|
|
|
296
335
|
continue;
|
|
297
336
|
}
|
|
298
337
|
return json.plugins.filter(p => typeof p.name === "string" && !!p.name).flatMap(p => {
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
this._logService
|
|
302
|
-
|
|
303
|
-
|
|
338
|
+
const sourceDescriptor = parsePluginSource(p.source, json.metadata?.pluginRoot, {
|
|
339
|
+
pluginName: p.name,
|
|
340
|
+
logService: this._logService,
|
|
341
|
+
logPrefix: `[PluginMarketplaceService]`
|
|
342
|
+
});
|
|
343
|
+
if (!sourceDescriptor) {
|
|
304
344
|
return [];
|
|
305
345
|
}
|
|
346
|
+
const source = sourceDescriptor.kind === PluginSourceKind.RelativePath ? sourceDescriptor.path : "";
|
|
306
347
|
return [{
|
|
307
348
|
name: p.name,
|
|
308
349
|
description: p.description ?? "",
|
|
309
350
|
version: p.version ?? "",
|
|
310
351
|
source,
|
|
352
|
+
sourceDescriptor,
|
|
311
353
|
marketplace: reference.displayLabel,
|
|
312
354
|
marketplaceReference: reference,
|
|
313
355
|
marketplaceType: def.type,
|
|
@@ -465,6 +507,158 @@ function resolvePluginSource(pluginRoot, source) {
|
|
|
465
507
|
const resolvedUri = normalizePath(joinPath(pluginRootUri, normalizedSource));
|
|
466
508
|
return relativePath(repoRoot, resolvedUri) ?? undefined;
|
|
467
509
|
}
|
|
510
|
+
function parsePluginSource(rawSource, pluginRoot, logContext) {
|
|
511
|
+
if (rawSource === undefined || rawSource === null) {
|
|
512
|
+
const resolved = resolvePluginSource(pluginRoot, "");
|
|
513
|
+
if (resolved === undefined) {
|
|
514
|
+
return undefined;
|
|
515
|
+
}
|
|
516
|
+
return {
|
|
517
|
+
kind: PluginSourceKind.RelativePath,
|
|
518
|
+
path: resolved
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
if (typeof rawSource === "string") {
|
|
522
|
+
const resolved = resolvePluginSource(pluginRoot, rawSource);
|
|
523
|
+
if (resolved === undefined) {
|
|
524
|
+
return undefined;
|
|
525
|
+
}
|
|
526
|
+
return {
|
|
527
|
+
kind: PluginSourceKind.RelativePath,
|
|
528
|
+
path: resolved
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
if (typeof rawSource !== "object" || typeof rawSource.source !== "string") {
|
|
532
|
+
logContext.logService.warn(
|
|
533
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': source object is missing a 'source' discriminant`
|
|
534
|
+
);
|
|
535
|
+
return undefined;
|
|
536
|
+
}
|
|
537
|
+
switch (rawSource.source) {
|
|
538
|
+
case "github":
|
|
539
|
+
{
|
|
540
|
+
if (typeof rawSource.repo !== "string" || !rawSource.repo) {
|
|
541
|
+
logContext.logService.warn(
|
|
542
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': github source is missing required 'repo' field`
|
|
543
|
+
);
|
|
544
|
+
return undefined;
|
|
545
|
+
}
|
|
546
|
+
if (!isValidGitHubRepo(rawSource.repo)) {
|
|
547
|
+
logContext.logService.warn(
|
|
548
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': github source repo must be in 'owner/repo' format`
|
|
549
|
+
);
|
|
550
|
+
return undefined;
|
|
551
|
+
}
|
|
552
|
+
if (!isOptionalString(rawSource.ref)) {
|
|
553
|
+
logContext.logService.warn(
|
|
554
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': github source 'ref' must be a string when provided`
|
|
555
|
+
);
|
|
556
|
+
return undefined;
|
|
557
|
+
}
|
|
558
|
+
if (!isOptionalGitSha(rawSource.sha)) {
|
|
559
|
+
logContext.logService.warn(
|
|
560
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': github source 'sha' must be a full 40-character commit hash when provided`
|
|
561
|
+
);
|
|
562
|
+
return undefined;
|
|
563
|
+
}
|
|
564
|
+
return {
|
|
565
|
+
kind: PluginSourceKind.GitHub,
|
|
566
|
+
repo: rawSource.repo,
|
|
567
|
+
ref: rawSource.ref,
|
|
568
|
+
sha: rawSource.sha
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
case "url":
|
|
572
|
+
{
|
|
573
|
+
if (typeof rawSource.url !== "string" || !rawSource.url) {
|
|
574
|
+
logContext.logService.warn(
|
|
575
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': url source is missing required 'url' field`
|
|
576
|
+
);
|
|
577
|
+
return undefined;
|
|
578
|
+
}
|
|
579
|
+
if (!rawSource.url.toLowerCase().endsWith(".git")) {
|
|
580
|
+
logContext.logService.warn(
|
|
581
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': url source must end with '.git'`
|
|
582
|
+
);
|
|
583
|
+
return undefined;
|
|
584
|
+
}
|
|
585
|
+
if (!isOptionalString(rawSource.ref)) {
|
|
586
|
+
logContext.logService.warn(
|
|
587
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': url source 'ref' must be a string when provided`
|
|
588
|
+
);
|
|
589
|
+
return undefined;
|
|
590
|
+
}
|
|
591
|
+
if (!isOptionalGitSha(rawSource.sha)) {
|
|
592
|
+
logContext.logService.warn(
|
|
593
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': url source 'sha' must be a full 40-character commit hash when provided`
|
|
594
|
+
);
|
|
595
|
+
return undefined;
|
|
596
|
+
}
|
|
597
|
+
return {
|
|
598
|
+
kind: PluginSourceKind.GitUrl,
|
|
599
|
+
url: rawSource.url,
|
|
600
|
+
ref: rawSource.ref,
|
|
601
|
+
sha: rawSource.sha
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
case "npm":
|
|
605
|
+
{
|
|
606
|
+
if (typeof rawSource.package !== "string" || !rawSource.package) {
|
|
607
|
+
logContext.logService.warn(
|
|
608
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': npm source is missing required 'package' field`
|
|
609
|
+
);
|
|
610
|
+
return undefined;
|
|
611
|
+
}
|
|
612
|
+
if (!isOptionalString(rawSource.version) || !isOptionalString(rawSource.registry)) {
|
|
613
|
+
logContext.logService.warn(
|
|
614
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': npm source 'version' and 'registry' must be strings when provided`
|
|
615
|
+
);
|
|
616
|
+
return undefined;
|
|
617
|
+
}
|
|
618
|
+
return {
|
|
619
|
+
kind: PluginSourceKind.Npm,
|
|
620
|
+
package: rawSource.package,
|
|
621
|
+
version: rawSource.version,
|
|
622
|
+
registry: rawSource.registry
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
case "pip":
|
|
626
|
+
{
|
|
627
|
+
if (typeof rawSource.package !== "string" || !rawSource.package) {
|
|
628
|
+
logContext.logService.warn(
|
|
629
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': pip source is missing required 'package' field`
|
|
630
|
+
);
|
|
631
|
+
return undefined;
|
|
632
|
+
}
|
|
633
|
+
if (!isOptionalString(rawSource.version) || !isOptionalString(rawSource.registry)) {
|
|
634
|
+
logContext.logService.warn(
|
|
635
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': pip source 'version' and 'registry' must be strings when provided`
|
|
636
|
+
);
|
|
637
|
+
return undefined;
|
|
638
|
+
}
|
|
639
|
+
return {
|
|
640
|
+
kind: PluginSourceKind.Pip,
|
|
641
|
+
package: rawSource.package,
|
|
642
|
+
version: rawSource.version,
|
|
643
|
+
registry: rawSource.registry
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
default:
|
|
647
|
+
logContext.logService.warn(
|
|
648
|
+
`${logContext.logPrefix} Skipping plugin '${logContext.pluginName}': unknown source kind '${rawSource.source}'`
|
|
649
|
+
);
|
|
650
|
+
return undefined;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
function isOptionalString(value) {
|
|
654
|
+
return value === undefined || typeof value === "string";
|
|
655
|
+
}
|
|
656
|
+
function isOptionalGitSha(value) {
|
|
657
|
+
return value === undefined || (typeof value === "string" && /^[0-9a-fA-F]{40}$/.test(value));
|
|
658
|
+
}
|
|
659
|
+
function isValidGitHubRepo(repo) {
|
|
660
|
+
return /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(repo);
|
|
661
|
+
}
|
|
468
662
|
function getMarketplaceReadmeUri(repo, source) {
|
|
469
663
|
const normalizedSource = source.trim().replace(/^\.?\/+|\/+$/g, "");
|
|
470
664
|
const readmePath = normalizedSource ? `${normalizedSource}/README.md` : "README.md";
|
|
@@ -475,4 +669,4 @@ function getMarketplaceReadmeFileUri(repoDir, source) {
|
|
|
475
669
|
return normalizedSource ? joinPath(repoDir, normalizedSource, "README.md") : joinPath(repoDir, "README.md");
|
|
476
670
|
}
|
|
477
671
|
|
|
478
|
-
export { MarketplaceReferenceKind, MarketplaceType, PluginMarketplaceService, parseMarketplaceReference, parseMarketplaceReferences };
|
|
672
|
+
export { MarketplaceReferenceKind, MarketplaceType, PluginMarketplaceService, PluginSourceKind, parseMarketplaceReference, parseMarketplaceReferences, parsePluginSource };
|
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js
CHANGED
|
@@ -25,7 +25,7 @@ function registerChatFilesExtensionPoint(point) {
|
|
|
25
25
|
return ExtensionsRegistry.registerExtensionPoint({
|
|
26
26
|
extensionPoint: point,
|
|
27
27
|
jsonSchema: {
|
|
28
|
-
description: ( localize(
|
|
28
|
+
description: ( localize(7025, "Contributes {0} for chat prompts.", point)),
|
|
29
29
|
type: "array",
|
|
30
30
|
items: {
|
|
31
31
|
additionalProperties: false,
|
|
@@ -39,23 +39,23 @@ function registerChatFilesExtensionPoint(point) {
|
|
|
39
39
|
properties: {
|
|
40
40
|
path: {
|
|
41
41
|
description: point === ChatContributionPoint.chatSkills ? ( localize(
|
|
42
|
-
|
|
42
|
+
7026,
|
|
43
43
|
"Path to the SKILL.md file relative to the extension root. The folder name must match the \"name\" property in SKILL.md."
|
|
44
|
-
)) : ( localize(
|
|
44
|
+
)) : ( localize(7027, "Path to the file relative to the extension root.")),
|
|
45
45
|
type: "string"
|
|
46
46
|
},
|
|
47
47
|
name: {
|
|
48
|
-
description: ( localize(
|
|
49
|
-
deprecationMessage: ( localize(
|
|
48
|
+
description: ( localize(7028, "(Optional) Name for this entry.")),
|
|
49
|
+
deprecationMessage: ( localize(7029, "Specify \"name\" in the prompt file itself instead.")),
|
|
50
50
|
type: "string"
|
|
51
51
|
},
|
|
52
52
|
description: {
|
|
53
|
-
description: ( localize(
|
|
54
|
-
deprecationMessage: ( localize(
|
|
53
|
+
description: ( localize(7030, "(Optional) Description of the entry.")),
|
|
54
|
+
deprecationMessage: ( localize(7031, "Specify \"description\" in the prompt file itself instead.")),
|
|
55
55
|
type: "string"
|
|
56
56
|
},
|
|
57
57
|
when: {
|
|
58
|
-
description: ( localize(
|
|
58
|
+
description: ( localize(7032, "(Optional) A condition which must be true to enable this entry.")),
|
|
59
59
|
type: "string"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -106,7 +106,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
106
106
|
for (const raw of ext.value) {
|
|
107
107
|
if (!raw.path) {
|
|
108
108
|
ext.collector.error(( localize(
|
|
109
|
-
|
|
109
|
+
7033,
|
|
110
110
|
"Extension '{0}' cannot register {1} entry without path.",
|
|
111
111
|
ext.description.identifier.value,
|
|
112
112
|
contributionPoint
|
|
@@ -116,7 +116,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
116
116
|
const fileUri = joinPath(ext.description.extensionLocation, raw.path);
|
|
117
117
|
if (!isEqualOrParent(fileUri, ext.description.extensionLocation)) {
|
|
118
118
|
ext.collector.error(( localize(
|
|
119
|
-
|
|
119
|
+
7034,
|
|
120
120
|
"Extension '{0}' {1} entry '{2}' resolves outside the extension.",
|
|
121
121
|
ext.description.identifier.value,
|
|
122
122
|
contributionPoint,
|
|
@@ -126,7 +126,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
126
126
|
}
|
|
127
127
|
if (raw.when && !ContextKeyExpr.deserialize(raw.when)) {
|
|
128
128
|
ext.collector.error(( localize(
|
|
129
|
-
|
|
129
|
+
7035,
|
|
130
130
|
"Extension '{0}' {1} entry '{2}' has an invalid when clause: '{3}'.",
|
|
131
131
|
ext.description.identifier.value,
|
|
132
132
|
contributionPoint,
|
|
@@ -141,7 +141,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
141
141
|
} catch (e) {
|
|
142
142
|
const msg = e instanceof Error ? e.message : String(e);
|
|
143
143
|
ext.collector.error(( localize(
|
|
144
|
-
|
|
144
|
+
7036,
|
|
145
145
|
"Extension '{0}' {1}. Failed to register {2}: {3}",
|
|
146
146
|
ext.description.identifier.value,
|
|
147
147
|
contributionPoint,
|
|
@@ -201,7 +201,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
201
201
|
dispose: () => {}
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
const headers = [( localize(
|
|
204
|
+
const headers = [( localize(7037, "Name")), ( localize(7038, "Description")), ( localize(7039, "Path"))];
|
|
205
205
|
const rows = ( contributions.map(d => {
|
|
206
206
|
return [d.name ?? "-", d.description ?? "-", d.path];
|
|
207
207
|
}));
|
|
@@ -216,7 +216,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
216
216
|
}
|
|
217
217
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
218
218
|
id: ChatContributionPoint.chatPromptFiles,
|
|
219
|
-
label: ( localize(
|
|
219
|
+
label: ( localize(7040, "Chat Prompt Files")),
|
|
220
220
|
access: {
|
|
221
221
|
canToggle: false
|
|
222
222
|
},
|
|
@@ -224,7 +224,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
224
224
|
});
|
|
225
225
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
226
226
|
id: ChatContributionPoint.chatInstructions,
|
|
227
|
-
label: ( localize(
|
|
227
|
+
label: ( localize(7041, "Chat Instructions")),
|
|
228
228
|
access: {
|
|
229
229
|
canToggle: false
|
|
230
230
|
},
|
|
@@ -232,7 +232,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
232
232
|
});
|
|
233
233
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
234
234
|
id: ChatContributionPoint.chatAgents,
|
|
235
|
-
label: ( localize(
|
|
235
|
+
label: ( localize(7042, "Chat Agents")),
|
|
236
236
|
access: {
|
|
237
237
|
canToggle: false
|
|
238
238
|
},
|
|
@@ -240,7 +240,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
240
240
|
});
|
|
241
241
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
242
242
|
id: ChatContributionPoint.chatSkills,
|
|
243
|
-
label: ( localize(
|
|
243
|
+
label: ( localize(7043, "Chat Skills")),
|
|
244
244
|
access: {
|
|
245
245
|
canToggle: false
|
|
246
246
|
},
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* Claude uses PascalCase and slightly different names.
|
|
6
|
-
* @see https://docs.anthropic.com/en/docs/claude-code/hooks
|
|
7
|
-
*/
|
|
8
|
-
export declare const CLAUDE_HOOK_TYPE_MAP: Record<string, HookType>;
|
|
2
|
+
import { IHookCommand, extractHookCommandsFromItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema";
|
|
3
|
+
import { HookType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes";
|
|
4
|
+
export { extractHookCommandsFromItem };
|
|
9
5
|
/**
|
|
10
6
|
* Resolves a Claude hook type name to our abstract HookType.
|
|
11
7
|
*/
|
|
@@ -52,12 +48,3 @@ export interface IParseClaudeHooksResult {
|
|
|
52
48
|
* If the file has `disableAllHooks: true` at the top level, all hooks are filtered out.
|
|
53
49
|
*/
|
|
54
50
|
export declare function parseClaudeHooks(json: unknown, workspaceRootUri: URI | undefined, userHome: string): IParseClaudeHooksResult;
|
|
55
|
-
/**
|
|
56
|
-
* Helper to extract hook commands from an item that could be:
|
|
57
|
-
* 1. A direct command object: { type: 'command', command: '...' }
|
|
58
|
-
* 2. A nested structure with matcher (Claude style): { matcher: '...', hooks: [{ type: 'command', command: '...' }] }
|
|
59
|
-
*
|
|
60
|
-
* This allows Copilot format to handle Claude-style entries if pasted.
|
|
61
|
-
* Also handles Claude's leniency where 'type' field can be omitted.
|
|
62
|
-
*/
|
|
63
|
-
export declare function extractHookCommandsFromItem(item: unknown, workspaceRootUri: URI | undefined, userHome: string): IHookCommand[];
|
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { toHookType, extractHookCommandsFromItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema';
|
|
3
|
+
export { extractHookCommandsFromItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema';
|
|
4
|
+
import { HOOKS_BY_TARGET } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes';
|
|
5
|
+
import { Target } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
3
6
|
|
|
4
|
-
const CLAUDE_HOOK_TYPE_MAP = {
|
|
5
|
-
"SessionStart": HookType.SessionStart,
|
|
6
|
-
"UserPromptSubmit": HookType.UserPromptSubmit,
|
|
7
|
-
"PreToolUse": HookType.PreToolUse,
|
|
8
|
-
"PostToolUse": HookType.PostToolUse,
|
|
9
|
-
"PreCompact": HookType.PreCompact,
|
|
10
|
-
"SubagentStart": HookType.SubagentStart,
|
|
11
|
-
"SubagentStop": HookType.SubagentStop,
|
|
12
|
-
"Stop": HookType.Stop
|
|
13
|
-
};
|
|
14
7
|
let _hookTypeToClaudeName;
|
|
15
8
|
function getHookTypeToClaudeNameMap() {
|
|
16
9
|
if (!_hookTypeToClaudeName) {
|
|
17
10
|
_hookTypeToClaudeName = ( new Map());
|
|
18
|
-
for (const [claudeName, hookType] of Object.entries(
|
|
11
|
+
for (const [claudeName, hookType] of Object.entries(HOOKS_BY_TARGET[Target.Claude])) {
|
|
19
12
|
_hookTypeToClaudeName.set(hookType, claudeName);
|
|
20
13
|
}
|
|
21
14
|
}
|
|
22
15
|
return _hookTypeToClaudeName;
|
|
23
16
|
}
|
|
24
17
|
function resolveClaudeHookType(name) {
|
|
25
|
-
return
|
|
18
|
+
return HOOKS_BY_TARGET[Target.Claude][name];
|
|
26
19
|
}
|
|
27
20
|
function getClaudeHookTypeName(hookType) {
|
|
28
21
|
return getHookTypeToClaudeNameMap().get(hookType);
|
|
@@ -81,41 +74,5 @@ function parseClaudeHooks(json, workspaceRootUri, userHome) {
|
|
|
81
74
|
disabledAllHooks: false
|
|
82
75
|
};
|
|
83
76
|
}
|
|
84
|
-
function extractHookCommandsFromItem(item, workspaceRootUri, userHome) {
|
|
85
|
-
if (!item || typeof item !== "object") {
|
|
86
|
-
return [];
|
|
87
|
-
}
|
|
88
|
-
const itemObj = item;
|
|
89
|
-
const commands = [];
|
|
90
|
-
const nestedHooks = itemObj.hooks;
|
|
91
|
-
if (nestedHooks !== undefined && Array.isArray(nestedHooks)) {
|
|
92
|
-
for (const nestedHook of nestedHooks) {
|
|
93
|
-
if (!nestedHook || typeof nestedHook !== "object") {
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
const normalized = normalizeForResolve(nestedHook);
|
|
97
|
-
const resolved = resolveHookCommand(normalized, workspaceRootUri, userHome);
|
|
98
|
-
if (resolved) {
|
|
99
|
-
commands.push(resolved);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
} else {
|
|
103
|
-
const normalized = normalizeForResolve(itemObj);
|
|
104
|
-
const resolved = resolveHookCommand(normalized, workspaceRootUri, userHome);
|
|
105
|
-
if (resolved) {
|
|
106
|
-
commands.push(resolved);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return commands;
|
|
110
|
-
}
|
|
111
|
-
function normalizeForResolve(raw) {
|
|
112
|
-
if (raw.type === undefined || raw.type === "command") {
|
|
113
|
-
return {
|
|
114
|
-
...raw,
|
|
115
|
-
type: "command"
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
return raw;
|
|
119
|
-
}
|
|
120
77
|
|
|
121
|
-
export {
|
|
78
|
+
export { getClaudeHookTypeName, parseClaudeHooks, resolveClaudeHookType };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
-
import {
|
|
2
|
+
import { IHookCommand } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema";
|
|
3
|
+
import { HookType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes";
|
|
3
4
|
/**
|
|
4
5
|
* Represents a hook source with its original and normalized properties.
|
|
5
6
|
* Used to display hooks from different formats in a unified view.
|