@codingame/monaco-vscode-chat-service-override 31.0.1 → 32.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.d.ts +1 -1
- package/index.js +21 -5
- package/package.json +5 -5
- package/vscode/src/vs/base/common/defaultAccount.d.ts +69 -0
- package/vscode/src/vs/base/common/defaultAccount.js +12 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +91 -22
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +301 -68
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +24 -5
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +89 -16
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +17 -5
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +73 -10
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +32 -6
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +32 -20
- package/vscode/src/vs/platform/agentHost/common/agentHostPermissionService.d.ts +37 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostPermissionService.js +15 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +242 -201
- package/vscode/src/vs/platform/agentHost/common/agentService.js +3 -1
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.d.ts +35 -0
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.js +106 -0
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +38 -30
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +2 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +114 -4
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +10 -10
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +52 -19
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +42 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +7 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +42 -41
- package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.d.ts +6 -6
- package/vscode/src/vs/platform/agentHost/common/transportConstants.d.ts +15 -0
- package/vscode/src/vs/platform/agentHost/common/transportConstants.js +6 -0
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +4 -3
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +4 -3
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +4 -2
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +15 -7
- package/vscode/src/vs/workbench/contrib/browserView/common/browserChatToolReferenceNames.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/browserView/common/browserChatToolReferenceNames.js +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +14 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +64 -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 +31 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +18 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +30 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +8 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +21 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +12 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +99 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.js +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +63 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +10 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +3 -3
- 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 +4 -4
- 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 +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +25 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +99 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +17 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +35 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +347 -326
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +1 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +113 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +37 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +436 -134
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +52 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +93 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +73 -104
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +272 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +30 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +430 -185
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +44 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +480 -279
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.d.ts +138 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.js +221 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +1216 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +32 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +26 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +28 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +25 -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.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +68 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +650 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +390 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +18 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +1 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +6 -87
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +116 -182
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +12 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +61 -41
- 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 +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +16 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +106 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +25 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +629 -425
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +105 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +175 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +20 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +339 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/media/planReviewFeedback.css +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +572 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.js +167 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +49 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +315 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +45 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +44 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +111 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +13 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.js +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +14 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +17 -2
- 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 +23 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +136 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.d.ts +72 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.js +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +14 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +41 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +30 -12
- 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 +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +25 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +108 -45
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +65 -26
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +38 -11
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +165 -16
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +62 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +15 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +18 -24
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +203 -180
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.js +35 -0
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +27 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +14 -49
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +35 -177
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -11
- 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 +13 -13
- 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.d.ts +29 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +129 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +14 -6
- 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.d.ts +1 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +12 -38
- 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 +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +77 -70
- 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/browser/tools/terminalOutputCompressor.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +232 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.d.ts +83 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.js +243 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +0 -749
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.js +0 -14
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.d.ts +0 -17
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.js +0 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +0 -40
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +0 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +0 -638
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +0 -131
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +0 -363
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +0 -306
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +0 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatStatusWidget.css +0 -57
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -78
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -242
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1701
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -191
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -728
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +0 -69
|
@@ -3,6 +3,8 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
4
|
import { Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
6
|
+
import { getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
7
|
+
import { matchesSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
6
8
|
|
|
7
9
|
let ChatSlashCommandService = class ChatSlashCommandService extends Disposable {
|
|
8
10
|
constructor(_extensionService) {
|
|
@@ -16,33 +18,58 @@ let ChatSlashCommandService = class ChatSlashCommandService extends Disposable {
|
|
|
16
18
|
super.dispose();
|
|
17
19
|
this._commands.clear();
|
|
18
20
|
}
|
|
21
|
+
getSessionScopedCommands(id) {
|
|
22
|
+
return this._commands.get(id) ?? [];
|
|
23
|
+
}
|
|
24
|
+
commandsOverlap(dataA, dataB) {
|
|
25
|
+
if (dataA.sessionTypes === undefined || dataB.sessionTypes === undefined) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
return ( dataA.sessionTypes.some(sessionType => dataB.sessionTypes?.includes(sessionType)));
|
|
29
|
+
}
|
|
30
|
+
getCommand(id, sessionType) {
|
|
31
|
+
return this.getSessionScopedCommands(id).find(candidate => matchesSessionType(candidate.data.sessionTypes, sessionType));
|
|
32
|
+
}
|
|
19
33
|
registerSlashCommand(data, command) {
|
|
20
|
-
|
|
21
|
-
|
|
34
|
+
const commandsForId = this.getSessionScopedCommands(data.command);
|
|
35
|
+
if (( commandsForId.some(candidate => this.commandsOverlap(candidate.data, data)))) {
|
|
36
|
+
throw ( new Error(`Already registered a command with id ${data.command}`));
|
|
22
37
|
}
|
|
23
|
-
|
|
38
|
+
const entry = {
|
|
24
39
|
data,
|
|
25
40
|
command
|
|
26
|
-
}
|
|
41
|
+
};
|
|
42
|
+
commandsForId.push(entry);
|
|
43
|
+
this._commands.set(data.command, commandsForId);
|
|
27
44
|
this._onDidChangeCommands.fire();
|
|
28
45
|
return toDisposable(() => {
|
|
29
|
-
|
|
30
|
-
|
|
46
|
+
const commandsForId = this._commands.get(data.command);
|
|
47
|
+
if (!commandsForId) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const entryIndex = commandsForId.indexOf(entry);
|
|
51
|
+
if (entryIndex === -1) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
commandsForId.splice(entryIndex, 1);
|
|
55
|
+
if (commandsForId.length === 0) {
|
|
56
|
+
this._commands.delete(data.command);
|
|
31
57
|
}
|
|
58
|
+
this._onDidChangeCommands.fire();
|
|
32
59
|
});
|
|
33
60
|
}
|
|
34
61
|
getCommands(location, mode) {
|
|
35
|
-
return Array.from(( this._commands.values())
|
|
62
|
+
return Array.from(( this._commands.values())).flatMap(commands => ( commands.map(v => v.data))).filter(
|
|
36
63
|
c => c.locations.includes(location) && (!c.modes || c.modes.includes(mode))
|
|
37
64
|
);
|
|
38
65
|
}
|
|
39
|
-
hasCommand(id) {
|
|
40
|
-
return
|
|
66
|
+
hasCommand(id, sessionType) {
|
|
67
|
+
return !!this.getCommand(id, sessionType);
|
|
41
68
|
}
|
|
42
69
|
async executeCommand(id, prompt, progress, history, location, sessionResource, token, options) {
|
|
43
|
-
const data = this.
|
|
70
|
+
const data = this.getCommand(id, getChatSessionType(sessionResource));
|
|
44
71
|
if (!data) {
|
|
45
|
-
throw ( new Error(
|
|
72
|
+
throw ( new Error(`No command with id ${id} NOT registered`));
|
|
46
73
|
}
|
|
47
74
|
if (!data.command) {
|
|
48
75
|
await this._extensionService.activateByEvent(`onSlash:${id}`);
|
|
@@ -13,7 +13,7 @@ import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
13
13
|
import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service";
|
|
14
14
|
import { IEnablementModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/enablement";
|
|
15
15
|
import { IAgentPluginRepositoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service";
|
|
16
|
-
import { IAgentPlugin, IAgentPluginDiscovery } from "
|
|
16
|
+
import { IAgentPlugin, IAgentPluginDiscovery } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService";
|
|
17
17
|
import { IAgentPluginService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service";
|
|
18
18
|
import { IMarketplacePlugin } from "./pluginMarketplaceService.js";
|
|
19
19
|
import { IPluginMarketplaceService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service";
|
|
@@ -32,6 +32,8 @@ export declare class AgentPluginService extends Disposable implements IAgentPlug
|
|
|
32
32
|
interface IPluginSource {
|
|
33
33
|
readonly uri: URI;
|
|
34
34
|
readonly fromMarketplace: IMarketplacePlugin | undefined;
|
|
35
|
+
/** Repository root that serves as the boundary for component path resolution. */
|
|
36
|
+
readonly repositoryUri?: URI;
|
|
35
37
|
/** Called when remove is invoked on the plugin */
|
|
36
38
|
remove(): void;
|
|
37
39
|
}
|
|
@@ -112,6 +114,20 @@ export declare class MarketplaceAgentPluginDiscovery extends AbstractAgentPlugin
|
|
|
112
114
|
start(enablementModel: IEnablementModel): void;
|
|
113
115
|
protected _discoverPluginSources(): Promise<readonly IPluginSource[]>;
|
|
114
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Discovers plugins installed by the Copilot CLI under
|
|
119
|
+
* `~/.copilot/installed-plugins/<marketplace>/<plugin>/`. Each leaf directory
|
|
120
|
+
* is treated as a plugin root, allowing CLI-installed plugins (both
|
|
121
|
+
* marketplace and direct) to surface in VS Code without a separate install.
|
|
122
|
+
*/
|
|
123
|
+
export declare class CopilotCliAgentPluginDiscovery extends AbstractAgentPluginDiscovery {
|
|
124
|
+
private readonly _dialogService;
|
|
125
|
+
constructor(fileService: IFileService, pathService: IPathService, logService: ILogService, workspaceContextService: IWorkspaceContextService, _dialogService: IDialogService);
|
|
126
|
+
start(enablementModel: IEnablementModel): void;
|
|
127
|
+
private _getInstalledPluginsDir;
|
|
128
|
+
protected _discoverPluginSources(): Promise<readonly IPluginSource[]>;
|
|
129
|
+
private _promptRemove;
|
|
130
|
+
}
|
|
115
131
|
export declare class ExtensionAgentPluginDiscovery extends AbstractAgentPluginDiscovery {
|
|
116
132
|
private readonly _commandService;
|
|
117
133
|
private readonly _contextKeyService;
|
|
@@ -36,7 +36,7 @@ import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbe
|
|
|
36
36
|
import { EnablementModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/enablement';
|
|
37
37
|
import { HookType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes';
|
|
38
38
|
import { IAgentPluginRepositoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service';
|
|
39
|
-
import { agentPluginDiscoveryRegistry } from '
|
|
39
|
+
import { agentPluginDiscoveryRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService';
|
|
40
40
|
import { IPluginMarketplaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service';
|
|
41
41
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
42
42
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
@@ -121,9 +121,13 @@ class AbstractAgentPluginDiscovery extends Disposable {
|
|
|
121
121
|
if (!( seenPluginUris.has(key))) {
|
|
122
122
|
seenPluginUris.add(key);
|
|
123
123
|
const format = await detectPluginFormat(source.uri, this._fileService);
|
|
124
|
-
plugins.push(
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
plugins.push(this._toPlugin(
|
|
125
|
+
source.uri,
|
|
126
|
+
format,
|
|
127
|
+
source.fromMarketplace,
|
|
128
|
+
source.repositoryUri,
|
|
129
|
+
() => source.remove()
|
|
130
|
+
));
|
|
127
131
|
}
|
|
128
132
|
}
|
|
129
133
|
this._disposePluginEntriesExcept(seenPluginUris);
|
|
@@ -138,7 +142,7 @@ class AbstractAgentPluginDiscovery extends Disposable {
|
|
|
138
142
|
return false;
|
|
139
143
|
}
|
|
140
144
|
}
|
|
141
|
-
_toPlugin(uri, format, fromMarketplace, removeCallback) {
|
|
145
|
+
_toPlugin(uri, format, fromMarketplace, repositoryUri, removeCallback) {
|
|
142
146
|
const key = ( uri.toString());
|
|
143
147
|
const existing = this._pluginEntries.get(key);
|
|
144
148
|
if (existing) {
|
|
@@ -169,7 +173,7 @@ class AbstractAgentPluginDiscovery extends Disposable {
|
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
175
|
const paths = parseComponentPathConfig(section);
|
|
172
|
-
const dirs = resolveComponentDirs(uri, defaultPath, paths);
|
|
176
|
+
const dirs = resolveComponentDirs(uri, defaultPath, paths, repositoryUri);
|
|
173
177
|
for (const d of dirs) {
|
|
174
178
|
const watcher = this._fileService.createWatcher(d, {
|
|
175
179
|
recursive: false,
|
|
@@ -488,9 +492,11 @@ let MarketplaceAgentPluginDiscovery = class MarketplaceAgentPluginDiscovery exte
|
|
|
488
492
|
);
|
|
489
493
|
continue;
|
|
490
494
|
}
|
|
495
|
+
const repositoryUri = this._pluginRepositoryService.getRepositoryUri(entry.plugin.marketplaceReference, entry.plugin.marketplaceType);
|
|
491
496
|
sources.push({
|
|
492
497
|
uri: stat.resource,
|
|
493
498
|
fromMarketplace: entry.plugin,
|
|
499
|
+
repositoryUri,
|
|
494
500
|
remove: () => {
|
|
495
501
|
this._enablementModel.remove(( stat.resource.toString()));
|
|
496
502
|
this._pluginMarketplaceService.removeInstalledPlugin(entry.pluginUri);
|
|
@@ -508,10 +514,153 @@ let MarketplaceAgentPluginDiscovery = class MarketplaceAgentPluginDiscovery exte
|
|
|
508
514
|
}
|
|
509
515
|
};
|
|
510
516
|
MarketplaceAgentPluginDiscovery = ( __decorate([( __param(0, IPluginMarketplaceService)), ( __param(1, IAgentPluginRepositoryService)), ( __param(2, IFileService)), ( __param(3, IPathService)), ( __param(4, ILogService)), ( __param(5, IWorkspaceContextService))], MarketplaceAgentPluginDiscovery));
|
|
517
|
+
const COPILOT_CLI_INSTALLED_PLUGINS_DIR = ".copilot/installed-plugins";
|
|
518
|
+
let CopilotCliAgentPluginDiscovery = class CopilotCliAgentPluginDiscovery extends AbstractAgentPluginDiscovery {
|
|
519
|
+
constructor(
|
|
520
|
+
fileService,
|
|
521
|
+
pathService,
|
|
522
|
+
logService,
|
|
523
|
+
workspaceContextService,
|
|
524
|
+
_dialogService
|
|
525
|
+
) {
|
|
526
|
+
super(fileService, pathService, logService, workspaceContextService);
|
|
527
|
+
this._dialogService = _dialogService;
|
|
528
|
+
}
|
|
529
|
+
start(enablementModel) {
|
|
530
|
+
this._enablementModel = enablementModel;
|
|
531
|
+
const scheduler = this._register(( new RunOnceScheduler(() => this._refreshPlugins(), 0)));
|
|
532
|
+
const watcherStore = this._register(( new DisposableStore()));
|
|
533
|
+
const setupWatchers = async () => {
|
|
534
|
+
watcherStore.clear();
|
|
535
|
+
if (this._store.isDisposed) {
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
const root = await this._getInstalledPluginsDir();
|
|
539
|
+
const dirsToWatch = [];
|
|
540
|
+
let candidate = root;
|
|
541
|
+
while (candidate) {
|
|
542
|
+
dirsToWatch.unshift(candidate);
|
|
543
|
+
const parent = joinPath(candidate, "..");
|
|
544
|
+
if (( parent.toString()) === ( candidate.toString())) {
|
|
545
|
+
break;
|
|
546
|
+
}
|
|
547
|
+
if (await this._pathExists(parent)) {
|
|
548
|
+
dirsToWatch.unshift(parent);
|
|
549
|
+
break;
|
|
550
|
+
}
|
|
551
|
+
candidate = parent;
|
|
552
|
+
}
|
|
553
|
+
for (const dir of dirsToWatch) {
|
|
554
|
+
if (!(await this._pathExists(dir))) {
|
|
555
|
+
continue;
|
|
556
|
+
}
|
|
557
|
+
const watcher = this._fileService.createWatcher(dir, {
|
|
558
|
+
recursive: false,
|
|
559
|
+
excludes: []
|
|
560
|
+
});
|
|
561
|
+
watcherStore.add(watcher);
|
|
562
|
+
watcherStore.add(watcher.onDidChange(() => {
|
|
563
|
+
scheduler.schedule();
|
|
564
|
+
setupWatchers().catch(() => {});
|
|
565
|
+
}));
|
|
566
|
+
}
|
|
567
|
+
let rootStat;
|
|
568
|
+
try {
|
|
569
|
+
rootStat = await this._fileService.resolve(root);
|
|
570
|
+
} catch {
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
if (!rootStat.children) {
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
for (const marketplaceDir of rootStat.children) {
|
|
577
|
+
if (!marketplaceDir.isDirectory) {
|
|
578
|
+
continue;
|
|
579
|
+
}
|
|
580
|
+
const watcher = this._fileService.createWatcher(marketplaceDir.resource, {
|
|
581
|
+
recursive: false,
|
|
582
|
+
excludes: []
|
|
583
|
+
});
|
|
584
|
+
watcherStore.add(watcher);
|
|
585
|
+
watcherStore.add(watcher.onDidChange(() => scheduler.schedule()));
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
setupWatchers().catch(() => {});
|
|
589
|
+
scheduler.schedule();
|
|
590
|
+
}
|
|
591
|
+
async _getInstalledPluginsDir() {
|
|
592
|
+
const userHome = await this._pathService.userHome();
|
|
593
|
+
return joinPath(userHome, COPILOT_CLI_INSTALLED_PLUGINS_DIR);
|
|
594
|
+
}
|
|
595
|
+
async _discoverPluginSources() {
|
|
596
|
+
const root = await this._getInstalledPluginsDir();
|
|
597
|
+
let rootStat;
|
|
598
|
+
try {
|
|
599
|
+
rootStat = await this._fileService.resolve(root);
|
|
600
|
+
} catch {
|
|
601
|
+
return [];
|
|
602
|
+
}
|
|
603
|
+
if (!rootStat.isDirectory || !rootStat.children) {
|
|
604
|
+
return [];
|
|
605
|
+
}
|
|
606
|
+
const sources = [];
|
|
607
|
+
for (const marketplaceDir of rootStat.children) {
|
|
608
|
+
if (!marketplaceDir.isDirectory) {
|
|
609
|
+
continue;
|
|
610
|
+
}
|
|
611
|
+
let marketplaceStat;
|
|
612
|
+
try {
|
|
613
|
+
marketplaceStat = await this._fileService.resolve(marketplaceDir.resource);
|
|
614
|
+
} catch {
|
|
615
|
+
continue;
|
|
616
|
+
}
|
|
617
|
+
if (!marketplaceStat.children) {
|
|
618
|
+
continue;
|
|
619
|
+
}
|
|
620
|
+
for (const pluginDir of marketplaceStat.children) {
|
|
621
|
+
if (!pluginDir.isDirectory) {
|
|
622
|
+
continue;
|
|
623
|
+
}
|
|
624
|
+
sources.push({
|
|
625
|
+
uri: pluginDir.resource,
|
|
626
|
+
fromMarketplace: undefined,
|
|
627
|
+
remove: () => this._promptRemove(pluginDir.resource)
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
return sources;
|
|
632
|
+
}
|
|
633
|
+
async _promptRemove(resource) {
|
|
634
|
+
const {
|
|
635
|
+
confirmed
|
|
636
|
+
} = await this._dialogService.confirm({
|
|
637
|
+
message: ( localize(7732, "This plugin was installed by the Copilot CLI. Remove it from disk?")),
|
|
638
|
+
detail: ( localize(
|
|
639
|
+
7733,
|
|
640
|
+
"The plugin directory '{0}' will be moved to the trash. You can reinstall it later via the Copilot CLI.",
|
|
641
|
+
resource.fsPath
|
|
642
|
+
)),
|
|
643
|
+
primaryButton: ( localize(7734, "Remove"))
|
|
644
|
+
});
|
|
645
|
+
if (!confirmed) {
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
try {
|
|
649
|
+
await this._fileService.del(resource, {
|
|
650
|
+
recursive: true,
|
|
651
|
+
useTrash: true
|
|
652
|
+
});
|
|
653
|
+
this._enablementModel.remove(( resource.toString()));
|
|
654
|
+
} catch (error) {
|
|
655
|
+
this._logService.error("[CopilotCliAgentPluginDiscovery] Failed to remove plugin", error);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
};
|
|
659
|
+
CopilotCliAgentPluginDiscovery = ( __decorate([( __param(0, IFileService)), ( __param(1, IPathService)), ( __param(2, ILogService)), ( __param(3, IWorkspaceContextService)), ( __param(4, IDialogService))], CopilotCliAgentPluginDiscovery));
|
|
511
660
|
const epPlugins = ExtensionsRegistry.registerExtensionPoint({
|
|
512
661
|
extensionPoint: "chatPlugins",
|
|
513
662
|
jsonSchema: {
|
|
514
|
-
description: ( localize(
|
|
663
|
+
description: ( localize(7735, "Contributes agent plugins for chat.")),
|
|
515
664
|
type: "array",
|
|
516
665
|
items: {
|
|
517
666
|
additionalProperties: false,
|
|
@@ -525,13 +674,13 @@ const epPlugins = ExtensionsRegistry.registerExtensionPoint({
|
|
|
525
674
|
properties: {
|
|
526
675
|
path: {
|
|
527
676
|
description: ( localize(
|
|
528
|
-
|
|
677
|
+
7736,
|
|
529
678
|
"Path to the agent plugin root directory relative to the extension root."
|
|
530
679
|
)),
|
|
531
680
|
type: "string"
|
|
532
681
|
},
|
|
533
682
|
when: {
|
|
534
|
-
description: ( localize(
|
|
683
|
+
description: ( localize(7737, "(Optional) A condition which must be true to enable this plugin.")),
|
|
535
684
|
type: "string"
|
|
536
685
|
}
|
|
537
686
|
}
|
|
@@ -568,7 +717,7 @@ let ExtensionAgentPluginDiscovery = class ExtensionAgentPluginDiscovery extends
|
|
|
568
717
|
for (const raw of ext.value) {
|
|
569
718
|
if (!raw.path) {
|
|
570
719
|
ext.collector.error(( localize(
|
|
571
|
-
|
|
720
|
+
7738,
|
|
572
721
|
"Extension '{0}' cannot register a chatPlugins entry without a path.",
|
|
573
722
|
ext.description.identifier.value
|
|
574
723
|
)));
|
|
@@ -577,7 +726,7 @@ let ExtensionAgentPluginDiscovery = class ExtensionAgentPluginDiscovery extends
|
|
|
577
726
|
const pluginUri = joinPath(ext.description.extensionLocation, raw.path);
|
|
578
727
|
if (!isEqualOrParent(pluginUri, ext.description.extensionLocation)) {
|
|
579
728
|
ext.collector.error(( localize(
|
|
580
|
-
|
|
729
|
+
7739,
|
|
581
730
|
"Extension '{0}' chatPlugins entry '{1}' resolves outside the extension.",
|
|
582
731
|
ext.description.identifier.value,
|
|
583
732
|
raw.path
|
|
@@ -589,7 +738,7 @@ let ExtensionAgentPluginDiscovery = class ExtensionAgentPluginDiscovery extends
|
|
|
589
738
|
whenExpr = ContextKeyExpr.deserialize(raw.when);
|
|
590
739
|
if (!whenExpr) {
|
|
591
740
|
ext.collector.error(( localize(
|
|
592
|
-
|
|
741
|
+
7740,
|
|
593
742
|
"Extension '{0}' chatPlugins entry '{1}' has an invalid when clause: '{2}'.",
|
|
594
743
|
ext.description.identifier.value,
|
|
595
744
|
raw.path,
|
|
@@ -660,7 +809,7 @@ let ExtensionAgentPluginDiscovery = class ExtensionAgentPluginDiscovery extends
|
|
|
660
809
|
confirmed
|
|
661
810
|
} = await this._dialogService.confirm({
|
|
662
811
|
message: ( localize(
|
|
663
|
-
|
|
812
|
+
7741,
|
|
664
813
|
"This plugin is provided by the extension '{0}'. Do you want to uninstall the extension?",
|
|
665
814
|
extensionId
|
|
666
815
|
))
|
|
@@ -693,7 +842,7 @@ class ChatPluginsDataRenderer extends Disposable {
|
|
|
693
842
|
dispose: () => {}
|
|
694
843
|
};
|
|
695
844
|
}
|
|
696
|
-
const headers = [( localize(
|
|
845
|
+
const headers = [( localize(7742, "Path")), ( localize(7743, "When"))];
|
|
697
846
|
const rows = ( contributions.map(d => [d.path, d.when ?? "-"]));
|
|
698
847
|
return {
|
|
699
848
|
data: {
|
|
@@ -706,11 +855,11 @@ class ChatPluginsDataRenderer extends Disposable {
|
|
|
706
855
|
}
|
|
707
856
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
708
857
|
id: "chatPlugins",
|
|
709
|
-
label: ( localize(
|
|
858
|
+
label: ( localize(7744, "Chat Plugins")),
|
|
710
859
|
access: {
|
|
711
860
|
canToggle: false
|
|
712
861
|
},
|
|
713
862
|
renderer: ( new SyncDescriptor(ChatPluginsDataRenderer))
|
|
714
863
|
});
|
|
715
864
|
|
|
716
|
-
export { AbstractAgentPluginDiscovery, AgentPluginService, ConfiguredAgentPluginDiscovery, ExtensionAgentPluginDiscovery, MarketplaceAgentPluginDiscovery };
|
|
865
|
+
export { AbstractAgentPluginDiscovery, AgentPluginService, ConfiguredAgentPluginDiscovery, CopilotCliAgentPluginDiscovery, ExtensionAgentPluginDiscovery, MarketplaceAgentPluginDiscovery };
|
|
@@ -152,6 +152,7 @@ export declare class PluginMarketplaceService extends Disposable implements IPlu
|
|
|
152
152
|
private _runUpdateCheck;
|
|
153
153
|
private _fetchFromClonedRepo;
|
|
154
154
|
readPluginsFromDirectory(repoDir: URI, reference: IMarketplaceReference): Promise<IMarketplacePlugin[]>;
|
|
155
|
+
readSinglePluginManifest(repoDir: URI, reference: IMarketplaceReference): Promise<IMarketplacePlugin | undefined>;
|
|
155
156
|
private _readPluginsFromDirectory;
|
|
156
157
|
/**
|
|
157
158
|
* Iterates over {@link MARKETPLACE_DEFINITIONS} paths, calling
|
|
@@ -57,6 +57,16 @@ const MARKETPLACE_DEFINITIONS = [{
|
|
|
57
57
|
type: MarketplaceType.Claude,
|
|
58
58
|
path: ".claude-plugin/marketplace.json"
|
|
59
59
|
}];
|
|
60
|
+
const SINGLE_PLUGIN_MANIFEST_DEFINITIONS = [{
|
|
61
|
+
type: MarketplaceType.OpenPlugin,
|
|
62
|
+
path: ".plugin/plugin.json"
|
|
63
|
+
}, {
|
|
64
|
+
type: MarketplaceType.Claude,
|
|
65
|
+
path: ".claude-plugin/plugin.json"
|
|
66
|
+
}, {
|
|
67
|
+
type: MarketplaceType.Copilot,
|
|
68
|
+
path: "plugin.json"
|
|
69
|
+
}];
|
|
60
70
|
const GITHUB_MARKETPLACE_CACHE_TTL_MS = 8 * 60 * 60 * 1000;
|
|
61
71
|
const GITHUB_MARKETPLACE_CACHE_STORAGE_KEY = "chat.plugins.marketplaces.githubCache.v1";
|
|
62
72
|
const PLUGIN_UPDATE_CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000;
|
|
@@ -400,7 +410,13 @@ let PluginMarketplaceService = class PluginMarketplaceService extends Disposable
|
|
|
400
410
|
}
|
|
401
411
|
try {
|
|
402
412
|
const repoDir = this._pluginRepositoryService.getRepositoryUri(reference);
|
|
403
|
-
|
|
413
|
+
let plugins = await this._readPluginsFromDirectory(repoDir, reference);
|
|
414
|
+
if (plugins.length === 0) {
|
|
415
|
+
const single = await this.readSinglePluginManifest(repoDir, reference);
|
|
416
|
+
if (single) {
|
|
417
|
+
plugins = [single];
|
|
418
|
+
}
|
|
419
|
+
}
|
|
404
420
|
const match = plugins.find(p => {
|
|
405
421
|
const installUri = this._pluginRepositoryService.getPluginInstallUri(p);
|
|
406
422
|
return isEqual(installUri, entry.pluginUri);
|
|
@@ -526,6 +542,51 @@ let PluginMarketplaceService = class PluginMarketplaceService extends Disposable
|
|
|
526
542
|
async readPluginsFromDirectory(repoDir, reference) {
|
|
527
543
|
return this._readPluginsFromDirectory(repoDir, reference);
|
|
528
544
|
}
|
|
545
|
+
async readSinglePluginManifest(repoDir, reference) {
|
|
546
|
+
if (reference.kind !== MarketplaceReferenceKind.GitHubShorthand && reference.kind !== MarketplaceReferenceKind.GitUri) {
|
|
547
|
+
return undefined;
|
|
548
|
+
}
|
|
549
|
+
for (const def of SINGLE_PLUGIN_MANIFEST_DEFINITIONS) {
|
|
550
|
+
const manifestUri = joinPath(repoDir, def.path);
|
|
551
|
+
let manifest;
|
|
552
|
+
try {
|
|
553
|
+
const contents = await this._fileService.readFile(manifestUri);
|
|
554
|
+
const parsed = parse(( contents.value.toString()));
|
|
555
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
556
|
+
manifest = parsed;
|
|
557
|
+
}
|
|
558
|
+
} catch {
|
|
559
|
+
continue;
|
|
560
|
+
}
|
|
561
|
+
if (!manifest) {
|
|
562
|
+
continue;
|
|
563
|
+
}
|
|
564
|
+
const sourceDescriptor = reference.kind === MarketplaceReferenceKind.GitHubShorthand ? {
|
|
565
|
+
kind: PluginSourceKind.GitHub,
|
|
566
|
+
repo: reference.githubRepo
|
|
567
|
+
} : {
|
|
568
|
+
kind: PluginSourceKind.GitUrl,
|
|
569
|
+
url: reference.cloneUrl
|
|
570
|
+
};
|
|
571
|
+
const manifestName = typeof manifest["name"] === "string" && manifest["name"] ? manifest["name"] : reference.displayLabel;
|
|
572
|
+
const manifestDescription = typeof manifest["description"] === "string" ? manifest["description"] : "";
|
|
573
|
+
const manifestVersion = typeof manifest["version"] === "string" ? manifest["version"] : "";
|
|
574
|
+
return {
|
|
575
|
+
name: manifestName,
|
|
576
|
+
description: manifestDescription,
|
|
577
|
+
version: manifestVersion,
|
|
578
|
+
source: "",
|
|
579
|
+
sourceDescriptor,
|
|
580
|
+
marketplace: reference.displayLabel,
|
|
581
|
+
marketplaceReference: reference,
|
|
582
|
+
marketplaceType: def.type
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
this._logService.debug(
|
|
586
|
+
`[PluginMarketplaceService] No single-plugin manifest found in ${reference.rawValue}`
|
|
587
|
+
);
|
|
588
|
+
return undefined;
|
|
589
|
+
}
|
|
529
590
|
async _readPluginsFromDirectory(repoDir, reference, token) {
|
|
530
591
|
return this._readPluginsFromDefinitions(reference, async defPath => {
|
|
531
592
|
if (token?.isCancellationRequested) {
|
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(7745, "Contributes {0} for chat prompts.", point)),
|
|
29
29
|
type: "array",
|
|
30
30
|
items: {
|
|
31
31
|
additionalProperties: false,
|
|
@@ -39,28 +39,28 @@ function registerChatFilesExtensionPoint(point) {
|
|
|
39
39
|
properties: {
|
|
40
40
|
path: {
|
|
41
41
|
description: point === ChatContributionPoint.chatSkills ? ( localize(
|
|
42
|
-
|
|
42
|
+
7746,
|
|
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(7747, "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(7748, "(Optional) Name for this entry.")),
|
|
49
|
+
deprecationMessage: ( localize(7749, "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(7750, "(Optional) Description of the entry.")),
|
|
54
|
+
deprecationMessage: ( localize(7751, "Specify \"description\" in the prompt file itself instead.")),
|
|
55
55
|
type: "string"
|
|
56
56
|
},
|
|
57
57
|
when: {
|
|
58
|
-
description: ( localize(
|
|
58
|
+
description: ( localize(7752, "(Optional) A condition which must be true to enable this entry.")),
|
|
59
59
|
type: "string"
|
|
60
60
|
},
|
|
61
61
|
sessionTypes: {
|
|
62
62
|
description: ( localize(
|
|
63
|
-
|
|
63
|
+
7753,
|
|
64
64
|
"(Optional) The chat session types where this entry should be offered."
|
|
65
65
|
)),
|
|
66
66
|
type: "array",
|
|
@@ -116,7 +116,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
116
116
|
for (const raw of ext.value) {
|
|
117
117
|
if (!raw.path) {
|
|
118
118
|
ext.collector.error(( localize(
|
|
119
|
-
|
|
119
|
+
7754,
|
|
120
120
|
"Extension '{0}' cannot register {1} entry without path.",
|
|
121
121
|
ext.description.identifier.value,
|
|
122
122
|
contributionPoint
|
|
@@ -126,7 +126,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
126
126
|
const fileUri = joinPath(ext.description.extensionLocation, raw.path);
|
|
127
127
|
if (!isEqualOrParent(fileUri, ext.description.extensionLocation)) {
|
|
128
128
|
ext.collector.error(( localize(
|
|
129
|
-
|
|
129
|
+
7755,
|
|
130
130
|
"Extension '{0}' {1} entry '{2}' resolves outside the extension.",
|
|
131
131
|
ext.description.identifier.value,
|
|
132
132
|
contributionPoint,
|
|
@@ -136,7 +136,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
136
136
|
}
|
|
137
137
|
if (raw.when && !ContextKeyExpr.deserialize(raw.when)) {
|
|
138
138
|
ext.collector.error(( localize(
|
|
139
|
-
|
|
139
|
+
7756,
|
|
140
140
|
"Extension '{0}' {1} entry '{2}' has an invalid when clause: '{3}'.",
|
|
141
141
|
ext.description.identifier.value,
|
|
142
142
|
contributionPoint,
|
|
@@ -159,7 +159,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
159
159
|
} catch (e) {
|
|
160
160
|
const msg = e instanceof Error ? e.message : String(e);
|
|
161
161
|
ext.collector.error(( localize(
|
|
162
|
-
|
|
162
|
+
7757,
|
|
163
163
|
"Extension '{0}' {1}. Failed to register {2}: {3}",
|
|
164
164
|
ext.description.identifier.value,
|
|
165
165
|
contributionPoint,
|
|
@@ -220,7 +220,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
220
220
|
dispose: () => {}
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
const headers = [( localize(
|
|
223
|
+
const headers = [( localize(7758, "Name")), ( localize(7759, "Description")), ( localize(7760, "Path"))];
|
|
224
224
|
const rows = ( contributions.map(d => {
|
|
225
225
|
return [d.name ?? "-", d.description ?? "-", d.path];
|
|
226
226
|
}));
|
|
@@ -235,7 +235,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
235
235
|
}
|
|
236
236
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
237
237
|
id: ChatContributionPoint.chatPromptFiles,
|
|
238
|
-
label: ( localize(
|
|
238
|
+
label: ( localize(7761, "Chat Prompt Files")),
|
|
239
239
|
access: {
|
|
240
240
|
canToggle: false
|
|
241
241
|
},
|
|
@@ -243,7 +243,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
243
243
|
});
|
|
244
244
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
245
245
|
id: ChatContributionPoint.chatInstructions,
|
|
246
|
-
label: ( localize(
|
|
246
|
+
label: ( localize(7762, "Chat Instructions")),
|
|
247
247
|
access: {
|
|
248
248
|
canToggle: false
|
|
249
249
|
},
|
|
@@ -251,7 +251,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
251
251
|
});
|
|
252
252
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
253
253
|
id: ChatContributionPoint.chatAgents,
|
|
254
|
-
label: ( localize(
|
|
254
|
+
label: ( localize(7763, "Chat Agents")),
|
|
255
255
|
access: {
|
|
256
256
|
canToggle: false
|
|
257
257
|
},
|
|
@@ -259,7 +259,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
259
259
|
});
|
|
260
260
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
261
261
|
id: ChatContributionPoint.chatSkills,
|
|
262
|
-
label: ( localize(
|
|
262
|
+
label: ( localize(7764, "Chat Skills")),
|
|
263
263
|
access: {
|
|
264
264
|
canToggle: false
|
|
265
265
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
4
4
|
import { IChatModeService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes.service';
|
|
5
|
+
import { localChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
5
6
|
import { PromptHeaderAttributes } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser';
|
|
6
7
|
import { getPromptsTypeForLanguageId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
7
8
|
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
@@ -24,7 +25,7 @@ let PromptHeaderDefinitionProvider = class PromptHeaderDefinitionProvider {
|
|
|
24
25
|
}
|
|
25
26
|
const agentAttr = header.getAttribute(PromptHeaderAttributes.agent) ?? header.getAttribute(PromptHeaderAttributes.mode);
|
|
26
27
|
if (agentAttr && agentAttr.value.type === "scalar" && agentAttr.range.containsPosition(position)) {
|
|
27
|
-
const agent = this.chatModeService.findModeByName(agentAttr.value.value);
|
|
28
|
+
const agent = (await this.chatModeService.awaitModes(localChatSessionType)).findModeByName(agentAttr.value.value);
|
|
28
29
|
if (agent && agent.uri) {
|
|
29
30
|
return {
|
|
30
31
|
uri: agent.uri.get(),
|