@codingame/monaco-vscode-chat-service-override 31.0.0 → 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
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
3
|
-
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
-
import { ResourceMap, ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
5
|
-
import { OS } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
6
|
-
import { basename, dirname, isEqualOrParent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
7
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
8
|
-
import { BUILTIN_STORAGE, applyStorageSourceFilter } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService';
|
|
9
|
-
import { HookType, HOOK_METADATA } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes';
|
|
10
|
-
import { formatHookCommandLabel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema';
|
|
11
|
-
import { PromptsType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
12
|
-
import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
13
|
-
import { matchesWorkspaceSubpath, matchesInstructionFileFilter } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService';
|
|
14
|
-
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement';
|
|
15
|
-
import { getFriendlyName, isChatExtensionItem } from './aiCustomizationItemSource.js';
|
|
16
|
-
|
|
17
|
-
class PromptsServiceCustomizationItemProvider {
|
|
18
|
-
constructor(getActiveDescriptor, promptsService, workspaceService, productService) {
|
|
19
|
-
this.getActiveDescriptor = getActiveDescriptor;
|
|
20
|
-
this.promptsService = promptsService;
|
|
21
|
-
this.workspaceService = workspaceService;
|
|
22
|
-
this.productService = productService;
|
|
23
|
-
this.onDidChange = Event.any(
|
|
24
|
-
this.promptsService.onDidChangeCustomAgents,
|
|
25
|
-
this.promptsService.onDidChangeSlashCommands,
|
|
26
|
-
this.promptsService.onDidChangeSkills,
|
|
27
|
-
this.promptsService.onDidChangeHooks,
|
|
28
|
-
this.promptsService.onDidChangeInstructions
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
async provideChatSessionCustomizations(token) {
|
|
32
|
-
const itemSets = await Promise.all([
|
|
33
|
-
this.provideCustomizations(PromptsType.agent, token),
|
|
34
|
-
this.provideCustomizations(PromptsType.skill, token),
|
|
35
|
-
this.provideCustomizations(PromptsType.instructions, token),
|
|
36
|
-
this.provideCustomizations(PromptsType.hook, token),
|
|
37
|
-
this.provideCustomizations(PromptsType.prompt, token)
|
|
38
|
-
]);
|
|
39
|
-
return itemSets.flat();
|
|
40
|
-
}
|
|
41
|
-
async provideCustomizations(promptType, token = CancellationToken.None) {
|
|
42
|
-
const items = [];
|
|
43
|
-
const disabledUris = this.promptsService.getDisabledPromptFiles(promptType);
|
|
44
|
-
const extensionInfoByUri = ( new ResourceMap());
|
|
45
|
-
if (promptType === PromptsType.agent) {
|
|
46
|
-
const agents = await this.promptsService.getCustomAgents(token);
|
|
47
|
-
const allAgentFiles = await this.promptsService.listPromptFiles(PromptsType.agent, token);
|
|
48
|
-
for (const file of allAgentFiles) {
|
|
49
|
-
if (file.extension) {
|
|
50
|
-
extensionInfoByUri.set(file.uri, {
|
|
51
|
-
id: file.extension.identifier,
|
|
52
|
-
displayName: file.extension.displayName
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
for (const agent of agents) {
|
|
57
|
-
items.push({
|
|
58
|
-
uri: agent.uri,
|
|
59
|
-
type: promptType,
|
|
60
|
-
name: agent.name,
|
|
61
|
-
description: agent.description,
|
|
62
|
-
storage: agent.source.storage,
|
|
63
|
-
enabled: !( disabledUris.has(agent.uri))
|
|
64
|
-
});
|
|
65
|
-
if (agent.source.storage === PromptsStorage.extension && !( extensionInfoByUri.has(agent.uri))) {
|
|
66
|
-
extensionInfoByUri.set(agent.uri, {
|
|
67
|
-
id: agent.source.extensionId
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
} else if (promptType === PromptsType.skill) {
|
|
72
|
-
const skills = await this.promptsService.findAgentSkills(token);
|
|
73
|
-
const allSkillFiles = await this.promptsService.listPromptFiles(PromptsType.skill, token);
|
|
74
|
-
for (const file of allSkillFiles) {
|
|
75
|
-
if (file.extension) {
|
|
76
|
-
extensionInfoByUri.set(file.uri, {
|
|
77
|
-
id: file.extension.identifier,
|
|
78
|
-
displayName: file.extension.displayName
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const uiIntegrations = this.workspaceService.getSkillUIIntegrations();
|
|
83
|
-
const seenUris = ( new ResourceSet());
|
|
84
|
-
for (const skill of skills || []) {
|
|
85
|
-
const skillName = skill.name || basename(dirname(skill.uri)) || basename(skill.uri);
|
|
86
|
-
seenUris.add(skill.uri);
|
|
87
|
-
const skillFolderName = basename(dirname(skill.uri));
|
|
88
|
-
const uiTooltip = uiIntegrations.get(skillFolderName);
|
|
89
|
-
items.push({
|
|
90
|
-
uri: skill.uri,
|
|
91
|
-
type: promptType,
|
|
92
|
-
name: skillName,
|
|
93
|
-
description: skill.description,
|
|
94
|
-
storage: skill.storage,
|
|
95
|
-
enabled: true,
|
|
96
|
-
badge: uiTooltip ? ( localize(5570, "UI Integration")) : undefined,
|
|
97
|
-
badgeTooltip: uiTooltip
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
if (disabledUris.size > 0) {
|
|
101
|
-
for (const file of allSkillFiles) {
|
|
102
|
-
if (!( seenUris.has(file.uri)) && ( disabledUris.has(file.uri))) {
|
|
103
|
-
const disabledName = file.name || basename(dirname(file.uri)) || basename(file.uri);
|
|
104
|
-
const disabledFolderName = basename(dirname(file.uri));
|
|
105
|
-
const uiTooltip = uiIntegrations.get(disabledFolderName);
|
|
106
|
-
items.push({
|
|
107
|
-
uri: file.uri,
|
|
108
|
-
type: promptType,
|
|
109
|
-
name: disabledName,
|
|
110
|
-
description: file.description,
|
|
111
|
-
storage: file.storage,
|
|
112
|
-
enabled: false,
|
|
113
|
-
badge: uiTooltip ? ( localize(5570, "UI Integration")) : undefined,
|
|
114
|
-
badgeTooltip: uiTooltip
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
} else if (promptType === PromptsType.prompt) {
|
|
120
|
-
const commands = await this.promptsService.getPromptSlashCommands(token);
|
|
121
|
-
for (const command of commands) {
|
|
122
|
-
if (command.type === PromptsType.skill) {
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
|
-
items.push({
|
|
126
|
-
uri: command.uri,
|
|
127
|
-
type: promptType,
|
|
128
|
-
name: command.name,
|
|
129
|
-
description: command.description,
|
|
130
|
-
storage: command.storage,
|
|
131
|
-
enabled: !( disabledUris.has(command.uri))
|
|
132
|
-
});
|
|
133
|
-
if (command.extension) {
|
|
134
|
-
extensionInfoByUri.set(command.uri, {
|
|
135
|
-
id: command.extension.identifier,
|
|
136
|
-
displayName: command.extension.displayName
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
} else if (promptType === PromptsType.hook) {
|
|
141
|
-
await this.fetchPromptServiceHooks(items, disabledUris, promptType);
|
|
142
|
-
} else {
|
|
143
|
-
await this.fetchPromptServiceInstructions(items, extensionInfoByUri, disabledUris, promptType);
|
|
144
|
-
}
|
|
145
|
-
return this.applyLocalFilters(this.applyBuiltinGroupKeys(items, extensionInfoByUri), promptType);
|
|
146
|
-
}
|
|
147
|
-
async fetchPromptServiceHooks(items, disabledUris, promptType) {
|
|
148
|
-
const hookFiles = await this.promptsService.listPromptFiles(PromptsType.hook, CancellationToken.None);
|
|
149
|
-
for (const f of hookFiles) {
|
|
150
|
-
items.push({
|
|
151
|
-
uri: f.uri,
|
|
152
|
-
type: promptType,
|
|
153
|
-
name: f.name || getFriendlyName(basename(f.uri)),
|
|
154
|
-
storage: f.storage,
|
|
155
|
-
enabled: !( disabledUris.has(f.uri))
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
const agents = !this.workspaceService.isSessionsWindow ? await this.promptsService.getCustomAgents(CancellationToken.None) : [];
|
|
159
|
-
for (const agent of agents) {
|
|
160
|
-
if (!agent.hooks) {
|
|
161
|
-
continue;
|
|
162
|
-
}
|
|
163
|
-
for (const hookType of ( Object.values(HookType))) {
|
|
164
|
-
const hookCommands = agent.hooks[hookType];
|
|
165
|
-
if (!hookCommands || hookCommands.length === 0) {
|
|
166
|
-
continue;
|
|
167
|
-
}
|
|
168
|
-
const hookMeta = HOOK_METADATA[hookType];
|
|
169
|
-
for (let i = 0; i < hookCommands.length; i++) {
|
|
170
|
-
const hook = hookCommands[i];
|
|
171
|
-
const cmdLabel = formatHookCommandLabel(hook, OS);
|
|
172
|
-
const truncatedCmd = cmdLabel.length > 60 ? cmdLabel.substring(0, 57) + "..." : cmdLabel;
|
|
173
|
-
items.push({
|
|
174
|
-
uri: agent.uri,
|
|
175
|
-
type: promptType,
|
|
176
|
-
name: hookMeta?.label ?? hookType,
|
|
177
|
-
description: `${agent.name}: ${truncatedCmd || ( localize(5571, "(unset)"))}`,
|
|
178
|
-
storage: agent.source.storage,
|
|
179
|
-
groupKey: "agents",
|
|
180
|
-
enabled: !( disabledUris.has(agent.uri))
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
async fetchPromptServiceInstructions(items, extensionInfoByUri, disabledUris, promptType) {
|
|
187
|
-
const instructionFiles = await this.promptsService.getInstructionFiles(CancellationToken.None);
|
|
188
|
-
for (const file of instructionFiles) {
|
|
189
|
-
if (file.extension) {
|
|
190
|
-
extensionInfoByUri.set(file.uri, {
|
|
191
|
-
id: file.extension.identifier,
|
|
192
|
-
displayName: file.extension.displayName
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
const agentInstructionFiles = await this.promptsService.listAgentInstructions(CancellationToken.None, undefined);
|
|
197
|
-
const agentInstructionUris = ( new ResourceSet(( agentInstructionFiles.map(f => f.uri))));
|
|
198
|
-
for (const file of agentInstructionFiles) {
|
|
199
|
-
const storage = PromptsStorage.local;
|
|
200
|
-
const filename = basename(file.uri);
|
|
201
|
-
items.push({
|
|
202
|
-
uri: file.uri,
|
|
203
|
-
type: promptType,
|
|
204
|
-
name: filename,
|
|
205
|
-
storage,
|
|
206
|
-
groupKey: "agent-instructions",
|
|
207
|
-
enabled: !( disabledUris.has(file.uri))
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
for (const {
|
|
211
|
-
uri,
|
|
212
|
-
pattern,
|
|
213
|
-
name,
|
|
214
|
-
description,
|
|
215
|
-
storage
|
|
216
|
-
} of instructionFiles) {
|
|
217
|
-
if (( agentInstructionUris.has(uri))) {
|
|
218
|
-
continue;
|
|
219
|
-
}
|
|
220
|
-
const friendlyName = getFriendlyName(name);
|
|
221
|
-
if (pattern !== undefined) {
|
|
222
|
-
const badge = pattern === "**" ? ( localize(5572, "always added")) : pattern;
|
|
223
|
-
const badgeTooltip = pattern === "**" ? ( localize(5573, "This instruction is automatically included in every interaction.")) : ( localize(
|
|
224
|
-
5574,
|
|
225
|
-
"This instruction is automatically included when files matching '{0}' are in context.",
|
|
226
|
-
pattern
|
|
227
|
-
));
|
|
228
|
-
items.push({
|
|
229
|
-
uri,
|
|
230
|
-
type: promptType,
|
|
231
|
-
name: friendlyName,
|
|
232
|
-
badge,
|
|
233
|
-
badgeTooltip,
|
|
234
|
-
description,
|
|
235
|
-
storage,
|
|
236
|
-
groupKey: "context-instructions",
|
|
237
|
-
enabled: !( disabledUris.has(uri))
|
|
238
|
-
});
|
|
239
|
-
} else {
|
|
240
|
-
items.push({
|
|
241
|
-
uri,
|
|
242
|
-
type: promptType,
|
|
243
|
-
name: friendlyName,
|
|
244
|
-
description,
|
|
245
|
-
storage,
|
|
246
|
-
groupKey: "on-demand-instructions",
|
|
247
|
-
enabled: !( disabledUris.has(uri))
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
applyBuiltinGroupKeys(items, extensionInfoByUri) {
|
|
253
|
-
return ( items.map(item => {
|
|
254
|
-
if (item.storage !== PromptsStorage.extension) {
|
|
255
|
-
return item;
|
|
256
|
-
}
|
|
257
|
-
const extInfo = extensionInfoByUri.get(item.uri);
|
|
258
|
-
if (!extInfo) {
|
|
259
|
-
return item;
|
|
260
|
-
}
|
|
261
|
-
if (isChatExtensionItem(extInfo.id, this.productService)) {
|
|
262
|
-
return {
|
|
263
|
-
...item,
|
|
264
|
-
groupKey: item.groupKey ?? BUILTIN_STORAGE
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
return {
|
|
268
|
-
...item,
|
|
269
|
-
extensionLabel: extInfo.displayName || extInfo.id.value
|
|
270
|
-
};
|
|
271
|
-
}));
|
|
272
|
-
}
|
|
273
|
-
applyLocalFilters(groupedItems, promptType) {
|
|
274
|
-
const filter = this.workspaceService.getStorageSourceFilter(promptType);
|
|
275
|
-
const withStorage = groupedItems.filter(item => item.storage !== undefined);
|
|
276
|
-
const withoutStorage = groupedItems.filter(item => item.storage === undefined);
|
|
277
|
-
let items = [...applyStorageSourceFilter(withStorage, filter), ...withoutStorage];
|
|
278
|
-
const descriptor = this.getActiveDescriptor();
|
|
279
|
-
const subpaths = descriptor.workspaceSubpaths;
|
|
280
|
-
const instrFilter = descriptor.instructionFileFilter;
|
|
281
|
-
if (subpaths) {
|
|
282
|
-
const projectRoot = this.workspaceService.getActiveProjectRoot();
|
|
283
|
-
items = items.filter(item => {
|
|
284
|
-
if (item.storage !== PromptsStorage.local || !projectRoot || !isEqualOrParent(item.uri, projectRoot)) {
|
|
285
|
-
return true;
|
|
286
|
-
}
|
|
287
|
-
if (matchesWorkspaceSubpath(item.uri.path, subpaths)) {
|
|
288
|
-
return true;
|
|
289
|
-
}
|
|
290
|
-
if (instrFilter && promptType === PromptsType.instructions && matchesInstructionFileFilter(item.uri.path, instrFilter)) {
|
|
291
|
-
return true;
|
|
292
|
-
}
|
|
293
|
-
if (item.groupKey === "agent-instructions") {
|
|
294
|
-
return true;
|
|
295
|
-
}
|
|
296
|
-
return false;
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
if (instrFilter && promptType === PromptsType.instructions) {
|
|
300
|
-
items = items.filter(item => matchesInstructionFileFilter(item.uri.path, instrFilter));
|
|
301
|
-
}
|
|
302
|
-
return items;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
export { PromptsServiceCustomizationItemProvider };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
3
|
-
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
4
|
-
import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service";
|
|
5
|
-
import { IChatInputPartWidget } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets";
|
|
6
|
-
/**
|
|
7
|
-
* Widget that displays a status message with an optional action button.
|
|
8
|
-
* Shown only when chat quota is exceeded and the chat session is empty, and only for
|
|
9
|
-
* anonymous or free tier users.
|
|
10
|
-
*/
|
|
11
|
-
export declare class ChatStatusWidget extends Disposable implements IChatInputPartWidget {
|
|
12
|
-
private readonly chatEntitlementService;
|
|
13
|
-
private readonly commandService;
|
|
14
|
-
private readonly telemetryService;
|
|
15
|
-
static readonly ID = "chatStatusWidget";
|
|
16
|
-
readonly domNode: HTMLElement;
|
|
17
|
-
private messageElement;
|
|
18
|
-
private actionButton;
|
|
19
|
-
constructor(chatEntitlementService: IChatEntitlementService, commandService: ICommandService, telemetryService: ITelemetryService);
|
|
20
|
-
private initializeIfEnabled;
|
|
21
|
-
get height(): number;
|
|
22
|
-
private createWidgetContent;
|
|
23
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
|
-
import { $ as $$1 } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
5
|
-
import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
6
|
-
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
8
|
-
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
9
|
-
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
10
|
-
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
11
|
-
import { defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
12
|
-
import { ChatEntitlement, ChatEntitlementContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService';
|
|
13
|
-
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
14
|
-
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
15
|
-
import { CHAT_SETUP_ACTION_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
16
|
-
import { ChatInputPartWidgetsRegistry } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets';
|
|
17
|
-
import * as chatStatusWidget from './media/chatStatusWidget.css';
|
|
18
|
-
|
|
19
|
-
registerCss(chatStatusWidget);
|
|
20
|
-
const $ = $$1;
|
|
21
|
-
let ChatStatusWidget = class ChatStatusWidget extends Disposable {
|
|
22
|
-
static {
|
|
23
|
-
this.ID = "chatStatusWidget";
|
|
24
|
-
}
|
|
25
|
-
constructor(chatEntitlementService, commandService, telemetryService) {
|
|
26
|
-
super();
|
|
27
|
-
this.chatEntitlementService = chatEntitlementService;
|
|
28
|
-
this.commandService = commandService;
|
|
29
|
-
this.telemetryService = telemetryService;
|
|
30
|
-
this.domNode = $(".chat-status-widget");
|
|
31
|
-
this.domNode.style.display = "none";
|
|
32
|
-
this.initializeIfEnabled();
|
|
33
|
-
}
|
|
34
|
-
initializeIfEnabled() {
|
|
35
|
-
const entitlement = this.chatEntitlementService.entitlement;
|
|
36
|
-
const isAnonymous = this.chatEntitlementService.anonymous;
|
|
37
|
-
if (isAnonymous) {
|
|
38
|
-
this.createWidgetContent("anonymous");
|
|
39
|
-
} else if (entitlement === ChatEntitlement.Free) {
|
|
40
|
-
this.createWidgetContent("free");
|
|
41
|
-
} else {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
this.domNode.style.display = "";
|
|
45
|
-
}
|
|
46
|
-
get height() {
|
|
47
|
-
return this.domNode.style.display === "none" ? 0 : this.domNode.offsetHeight;
|
|
48
|
-
}
|
|
49
|
-
createWidgetContent(enabledSku) {
|
|
50
|
-
const contentContainer = $(".chat-status-content");
|
|
51
|
-
this.messageElement = $(".chat-status-message");
|
|
52
|
-
contentContainer.appendChild(this.messageElement);
|
|
53
|
-
const actionContainer = $(".chat-status-action");
|
|
54
|
-
this.actionButton = this._register(( new Button(actionContainer, {
|
|
55
|
-
...defaultButtonStyles,
|
|
56
|
-
supportIcons: true
|
|
57
|
-
})));
|
|
58
|
-
this.actionButton.element.classList.add("chat-status-button");
|
|
59
|
-
if (enabledSku === "anonymous") {
|
|
60
|
-
const message = ( localize(
|
|
61
|
-
7191,
|
|
62
|
-
"You've reached the limit for chat messages. Sign in to use Copilot Free."
|
|
63
|
-
));
|
|
64
|
-
const buttonLabel = ( localize(7192, "Sign In"));
|
|
65
|
-
this.messageElement.textContent = message;
|
|
66
|
-
this.actionButton.label = buttonLabel;
|
|
67
|
-
this.actionButton.element.ariaLabel = ( localize(7193, "{0} {1}", message, buttonLabel));
|
|
68
|
-
} else {
|
|
69
|
-
const message = ( localize(7194, "You've reached the limit for chat messages."));
|
|
70
|
-
const buttonLabel = ( localize(7195, "Upgrade"));
|
|
71
|
-
this.messageElement.textContent = message;
|
|
72
|
-
this.actionButton.label = buttonLabel;
|
|
73
|
-
this.actionButton.element.ariaLabel = ( localize(7196, "{0} {1}", message, buttonLabel));
|
|
74
|
-
}
|
|
75
|
-
this._register(this.actionButton.onDidClick(async () => {
|
|
76
|
-
const commandId = this.chatEntitlementService.anonymous ? CHAT_SETUP_ACTION_ID : "workbench.action.chat.upgradePlan";
|
|
77
|
-
this.telemetryService.publicLog2("workbenchActionExecuted", {
|
|
78
|
-
id: commandId,
|
|
79
|
-
from: "chatStatusWidget"
|
|
80
|
-
});
|
|
81
|
-
await this.commandService.executeCommand(commandId);
|
|
82
|
-
}));
|
|
83
|
-
this.domNode.appendChild(contentContainer);
|
|
84
|
-
this.domNode.appendChild(actionContainer);
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
ChatStatusWidget = ( __decorate([( __param(0, IChatEntitlementService)), ( __param(1, ICommandService)), ( __param(2, ITelemetryService))], ChatStatusWidget));
|
|
88
|
-
ChatInputPartWidgetsRegistry.register(ChatStatusWidget.ID, ChatStatusWidget, ( ContextKeyExpr.and(
|
|
89
|
-
ChatContextKeys.chatQuotaExceeded,
|
|
90
|
-
ChatContextKeys.chatSessionIsEmpty,
|
|
91
|
-
( ContextKeyExpr.or(
|
|
92
|
-
ChatContextKeys.Entitlement.planFree,
|
|
93
|
-
ChatEntitlementContextKeys.chatAnonymous
|
|
94
|
-
))
|
|
95
|
-
)));
|
|
96
|
-
|
|
97
|
-
export { ChatStatusWidget };
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatStatusWidget.css
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
.interactive-session .interactive-input-part > .chat-input-widgets-container .chat-status-widget {
|
|
7
|
-
padding: 6px 3px 6px 3px;
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
border: 1px solid var(--vscode-input-border, transparent);
|
|
10
|
-
background-color: var(--vscode-editor-background);
|
|
11
|
-
border-bottom: none;
|
|
12
|
-
border-top-left-radius: 4px;
|
|
13
|
-
border-top-right-radius: 4px;
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
justify-content: space-between;
|
|
17
|
-
gap: 8px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.interactive-session .interactive-input-part > .chat-input-widgets-container .chat-status-widget .chat-status-content {
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
flex: 1;
|
|
24
|
-
min-width: 0;
|
|
25
|
-
padding-left: 8px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.interactive-session .interactive-input-part > .chat-input-widgets-container .chat-status-widget .chat-status-message {
|
|
29
|
-
font-size: 11px;
|
|
30
|
-
line-height: 16px;
|
|
31
|
-
color: var(--vscode-foreground);
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
text-overflow: ellipsis;
|
|
34
|
-
white-space: nowrap;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.interactive-session .interactive-input-part > .chat-input-widgets-container .chat-status-widget .chat-status-action {
|
|
38
|
-
flex-shrink: 0;
|
|
39
|
-
padding-right: 4px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.interactive-session .interactive-input-part > .chat-input-widgets-container .chat-status-widget .chat-status-button {
|
|
43
|
-
font-size: 11px;
|
|
44
|
-
padding: 2px 8px;
|
|
45
|
-
min-width: unset;
|
|
46
|
-
height: 22px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.interactive-session .interactive-input-part > .chat-input-widgets-container:has(.chat-status-widget:not([style*="display: none"])) + .chat-todo-list-widget-container .chat-todo-list-widget {
|
|
50
|
-
border-top-left-radius: 0;
|
|
51
|
-
border-top-right-radius: 0;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.interactive-session .interactive-input-part > .chat-input-widgets-container:has(.chat-status-widget:not([style*="display: none"])) + .chat-todo-list-widget-container:not(:has(.chat-todo-list-widget.has-todos)) + .chat-editing-session .chat-editing-session-container {
|
|
55
|
-
border-top-left-radius: 0;
|
|
56
|
-
border-top-right-radius: 0;
|
|
57
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
3
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
-
import { SyncDescriptor0 } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors";
|
|
5
|
-
import { type INamedPluginResource, type IMcpServerDefinition, type IParsedHookCommand } from "../../../../../platform/agentPlugins/common/pluginParsers.js";
|
|
6
|
-
import { ContributionEnablementState, IEnablementModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/enablement";
|
|
7
|
-
import { HookType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes";
|
|
8
|
-
import { IMarketplacePlugin } from "./pluginMarketplaceService.js";
|
|
9
|
-
export interface IAgentPluginHook {
|
|
10
|
-
readonly type: HookType;
|
|
11
|
-
readonly hooks: readonly IParsedHookCommand[];
|
|
12
|
-
/** URI where this hook is defined -- not unique, multiple hooks may be in a manifest */
|
|
13
|
-
readonly uri: URI;
|
|
14
|
-
readonly originalId: string;
|
|
15
|
-
}
|
|
16
|
-
export type IAgentPluginCommand = INamedPluginResource;
|
|
17
|
-
export type IAgentPluginSkill = INamedPluginResource;
|
|
18
|
-
export type IAgentPluginAgent = INamedPluginResource;
|
|
19
|
-
export type IAgentPluginInstruction = INamedPluginResource;
|
|
20
|
-
export type IAgentPluginMcpServerDefinition = IMcpServerDefinition;
|
|
21
|
-
export interface IAgentPlugin {
|
|
22
|
-
readonly uri: URI;
|
|
23
|
-
/** Human-readable display name for the plugin. */
|
|
24
|
-
readonly label: string;
|
|
25
|
-
readonly enablement: IObservable<ContributionEnablementState>;
|
|
26
|
-
/** Removes this plugin from its discovery source (config or installed storage). */
|
|
27
|
-
remove(): void;
|
|
28
|
-
readonly hooks: IObservable<readonly IAgentPluginHook[]>;
|
|
29
|
-
readonly commands: IObservable<readonly IAgentPluginCommand[]>;
|
|
30
|
-
readonly skills: IObservable<readonly IAgentPluginSkill[]>;
|
|
31
|
-
readonly agents: IObservable<readonly IAgentPluginAgent[]>;
|
|
32
|
-
readonly instructions: IObservable<readonly IAgentPluginInstruction[]>;
|
|
33
|
-
readonly mcpServerDefinitions: IObservable<readonly IAgentPluginMcpServerDefinition[]>;
|
|
34
|
-
/** Set when the plugin was installed from a marketplace repository. */
|
|
35
|
-
readonly fromMarketplace?: IMarketplacePlugin;
|
|
36
|
-
}
|
|
37
|
-
export interface IAgentPluginDiscovery extends IDisposable {
|
|
38
|
-
readonly plugins: IObservable<readonly IAgentPlugin[]>;
|
|
39
|
-
start(enablementModel: IEnablementModel): void;
|
|
40
|
-
}
|
|
41
|
-
export declare function getCanonicalPluginCommandId(plugin: {
|
|
42
|
-
readonly uri: URI;
|
|
43
|
-
}, commandName: string): string;
|
|
44
|
-
declare class AgentPluginDiscoveryRegistry {
|
|
45
|
-
private readonly _discovery;
|
|
46
|
-
register(descriptor: SyncDescriptor0<IAgentPluginDiscovery>): void;
|
|
47
|
-
getAll(): readonly SyncDescriptor0<IAgentPluginDiscovery>[];
|
|
48
|
-
}
|
|
49
|
-
export declare const agentPluginDiscoveryRegistry: AgentPluginDiscoveryRegistry;
|
|
50
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
3
|
-
|
|
4
|
-
function getCanonicalPluginCommandId(plugin, commandName) {
|
|
5
|
-
const pluginSegment = basename(plugin.uri);
|
|
6
|
-
const prefix = normalizePluginToken(pluginSegment);
|
|
7
|
-
const normalizedCommand = normalizePluginToken(commandName);
|
|
8
|
-
if (normalizedCommand.startsWith(`${prefix}:`)) {
|
|
9
|
-
return normalizedCommand;
|
|
10
|
-
}
|
|
11
|
-
return `${prefix}:${normalizedCommand}`;
|
|
12
|
-
}
|
|
13
|
-
function normalizePluginToken(value) {
|
|
14
|
-
return value.trim().toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9_.:-]/g, "-").replace(/-+/g, "-").replace(/^[-:.]+|[-:.]+$/g, "");
|
|
15
|
-
}
|
|
16
|
-
class AgentPluginDiscoveryRegistry {
|
|
17
|
-
constructor() {
|
|
18
|
-
this._discovery = [];
|
|
19
|
-
}
|
|
20
|
-
register(descriptor) {
|
|
21
|
-
this._discovery.push(descriptor);
|
|
22
|
-
}
|
|
23
|
-
getAll() {
|
|
24
|
-
return this._discovery;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
const agentPluginDiscoveryRegistry = ( new AgentPluginDiscoveryRegistry());
|
|
28
|
-
|
|
29
|
-
export { agentPluginDiscoveryRegistry, getCanonicalPluginCommandId };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
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 };
|
|
5
|
-
/**
|
|
6
|
-
* Resolves a Claude hook type name to our abstract HookType.
|
|
7
|
-
*/
|
|
8
|
-
export declare function resolveClaudeHookType(name: string): HookType | undefined;
|
|
9
|
-
/**
|
|
10
|
-
* Gets the Claude hook type name for a given abstract HookType.
|
|
11
|
-
* Returns undefined if the hook type is not supported in Claude.
|
|
12
|
-
*/
|
|
13
|
-
export declare function getClaudeHookTypeName(hookType: HookType): string | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Result of parsing Claude hooks file.
|
|
16
|
-
*/
|
|
17
|
-
export interface IParseClaudeHooksResult {
|
|
18
|
-
/**
|
|
19
|
-
* The parsed hooks by type.
|
|
20
|
-
*/
|
|
21
|
-
readonly hooks: Map<HookType, {
|
|
22
|
-
hooks: IHookCommand[];
|
|
23
|
-
originalId: string;
|
|
24
|
-
}>;
|
|
25
|
-
/**
|
|
26
|
-
* Whether all hooks from this file were disabled via `disableAllHooks: true`.
|
|
27
|
-
*/
|
|
28
|
-
readonly disabledAllHooks: boolean;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Parses hooks from a Claude settings.json file.
|
|
32
|
-
* Claude format:
|
|
33
|
-
* {
|
|
34
|
-
* "hooks": {
|
|
35
|
-
* "PreToolUse": [
|
|
36
|
-
* { "matcher": "Bash", "hooks": [{ "type": "command", "command": "..." }] }
|
|
37
|
-
* ]
|
|
38
|
-
* }
|
|
39
|
-
* }
|
|
40
|
-
*
|
|
41
|
-
* Or simpler format:
|
|
42
|
-
* {
|
|
43
|
-
* "hooks": {
|
|
44
|
-
* "PreToolUse": [{ "type": "command", "command": "..." }]
|
|
45
|
-
* }
|
|
46
|
-
* }
|
|
47
|
-
*
|
|
48
|
-
* If the file has `disableAllHooks: true` at the top level, all hooks are filtered out.
|
|
49
|
-
*/
|
|
50
|
-
export declare function parseClaudeHooks(json: unknown, workspaceRootUri: URI | undefined, userHome: string): IParseClaudeHooksResult;
|