@codingame/monaco-vscode-chat-service-override 31.0.1 → 32.0.1
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 +22 -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/agentPluginsView.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +16 -17
- 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/chat.view.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.view.contribution.js +5 -0
- 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/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,14 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var ReconnectResultType;
|
|
4
|
-
(function (ReconnectResultType) {
|
|
5
|
-
ReconnectResultType["Replay"] = "replay";
|
|
6
|
-
ReconnectResultType["Snapshot"] = "snapshot";
|
|
7
|
-
})(ReconnectResultType || (ReconnectResultType = {}));
|
|
8
|
-
var ContentEncoding;
|
|
9
|
-
(function (ContentEncoding) {
|
|
10
|
-
ContentEncoding["Base64"] = "base64";
|
|
11
|
-
ContentEncoding["Utf8"] = "utf-8";
|
|
12
|
-
})(ContentEncoding || (ContentEncoding = {}));
|
|
13
|
-
|
|
14
|
-
export { ContentEncoding, ReconnectResultType };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const PROTOCOL_VERSION = 1;
|
|
2
|
-
export declare const MIN_PROTOCOL_VERSION = 1;
|
|
3
|
-
/**
|
|
4
|
-
* Capabilities derived from a protocol version.
|
|
5
|
-
* Core features (v1) are always-present literal `true`.
|
|
6
|
-
* Features from later versions are optional `true | undefined`.
|
|
7
|
-
*/
|
|
8
|
-
export interface ProtocolCapabilities {
|
|
9
|
-
readonly sessions: true;
|
|
10
|
-
readonly tools: true;
|
|
11
|
-
readonly permissions: true;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Derives the set of capabilities available at a given protocol version.
|
|
15
|
-
* Newer clients use this to determine which features the server supports.
|
|
16
|
-
*/
|
|
17
|
-
export declare function capabilitiesForVersion(version: number): ProtocolCapabilities;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export type { IJsonRpcErrorResponse, IJsonRpcNotification, IJsonRpcRequest, IJsonRpcResponse, IJsonRpcSuccessResponse, } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/messages";
|
|
2
|
-
export type { IAhpClientNotification, IAhpNotification, IAhpRequest, IAhpResponse, IAhpServerNotification, IAhpSuccessResponse, ICommandMap, IClientNotificationMap, INotificationMap, INotificationMethodParams, IProtocolMessage, IServerNotificationMap, } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/messages";
|
|
3
|
-
export type { ICreateSessionParams, IDirectoryEntry, IDispatchActionParams, IDisposeSessionParams, IFetchTurnsParams, IFetchTurnsResult, IInitializeParams, IInitializeResult, IListSessionsParams, IListSessionsResult, IReconnectParams, IReconnectReplayResult, IReconnectResult, IReconnectSnapshotResult, IResourceCopyParams, IResourceCopyResult, IResourceDeleteParams, IResourceDeleteResult, IResourceListParams, IResourceListResult, IResourceMoveParams, IResourceMoveResult, IResourceReadParams, IResourceReadResult, IResourceWriteParams, IResourceWriteResult, ISubscribeParams, IUnsubscribeParams, } from "./protocol/commands.js";
|
|
4
|
-
export { ContentEncoding, ReconnectResultType } from "./protocol/commands.js";
|
|
5
|
-
export { AhpErrorCodes, JsonRpcErrorCodes } from "./protocol/errors.js";
|
|
6
|
-
export type { AhpErrorCode, JsonRpcErrorCode } from "./protocol/errors.js";
|
|
7
|
-
export type { ISnapshot as IStateSnapshot } from "@codingame/monaco-vscode-xterm-common/vscode/vs/platform/agentHost/common/state/protocol/state";
|
|
8
|
-
export declare const JSON_RPC_PARSE_ERROR: -32700;
|
|
9
|
-
export declare const JSON_RPC_INTERNAL_ERROR: -32603;
|
|
10
|
-
export declare const AHP_SESSION_NOT_FOUND: -32001;
|
|
11
|
-
export declare const AHP_PROVIDER_NOT_FOUND: -32002;
|
|
12
|
-
export declare const AHP_SESSION_ALREADY_EXISTS: -32003;
|
|
13
|
-
export declare const AHP_TURN_IN_PROGRESS: -32004;
|
|
14
|
-
export declare const AHP_UNSUPPORTED_PROTOCOL_VERSION: -32005;
|
|
15
|
-
export declare const AHP_CONTENT_NOT_FOUND: -32006;
|
|
16
|
-
export declare const AHP_AUTH_REQUIRED: -32007;
|
|
17
|
-
import type { IAhpRequest, IAhpNotification, IAhpSuccessResponse, IProtocolMessage, IJsonRpcErrorResponse } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/messages";
|
|
18
|
-
export declare function isJsonRpcRequest(msg: IProtocolMessage): msg is IAhpRequest;
|
|
19
|
-
export declare function isJsonRpcNotification(msg: IProtocolMessage): msg is IAhpNotification;
|
|
20
|
-
export declare function isJsonRpcResponse(msg: IProtocolMessage): msg is IAhpSuccessResponse | IJsonRpcErrorResponse;
|
|
21
|
-
/**
|
|
22
|
-
* Error with a JSON-RPC error code for protocol-level failures.
|
|
23
|
-
* Optionally carries a `data` payload for structured error details.
|
|
24
|
-
*/
|
|
25
|
-
export declare class ProtocolError extends Error {
|
|
26
|
-
readonly code: number;
|
|
27
|
-
readonly data?: unknown | undefined;
|
|
28
|
-
constructor(code: number, message: string, data?: unknown | undefined);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* VS Code-specific extension: set the auth token on the server.
|
|
32
|
-
* Not yet part of the official protocol.
|
|
33
|
-
*/
|
|
34
|
-
export interface ISetAuthTokenParams {
|
|
35
|
-
readonly token: string;
|
|
36
|
-
}
|
|
37
|
-
import type { INotification } from "./sessionActions.js";
|
|
38
|
-
export interface INotificationBroadcastParams {
|
|
39
|
-
readonly notification: INotification;
|
|
40
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export { ContentEncoding, ReconnectResultType } from './protocol/commands.js';
|
|
3
|
-
|
|
4
|
-
function isJsonRpcRequest(msg) {
|
|
5
|
-
return 'method' in msg && 'id' in msg;
|
|
6
|
-
}
|
|
7
|
-
function isJsonRpcNotification(msg) {
|
|
8
|
-
return 'method' in msg && !('id' in msg);
|
|
9
|
-
}
|
|
10
|
-
function isJsonRpcResponse(msg) {
|
|
11
|
-
return 'id' in msg && !('method' in msg);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse };
|
package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
|
-
import { IMatch } from "@codingame/monaco-vscode-api/vscode/vs/base/common/filters";
|
|
3
|
-
import { ResourceMap } from "@codingame/monaco-vscode-api/vscode/vs/base/common/map";
|
|
4
|
-
import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
|
|
5
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
6
|
-
import { ExtensionIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
|
|
7
|
-
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
8
|
-
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
9
|
-
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
10
|
-
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
11
|
-
import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service";
|
|
12
|
-
import { IAICustomizationWorkspaceService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service";
|
|
13
|
-
import { ICustomizationSyncProvider, ICustomizationItem, ICustomizationItemProvider } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService";
|
|
14
|
-
import { IAgentPluginService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service";
|
|
15
|
-
import { PromptsType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes";
|
|
16
|
-
import { PromptsStorage } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService";
|
|
17
|
-
import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service";
|
|
18
|
-
/**
|
|
19
|
-
* Represents an AI customization item in the list widget.
|
|
20
|
-
*/
|
|
21
|
-
export interface IAICustomizationListItem {
|
|
22
|
-
readonly id: string;
|
|
23
|
-
readonly uri: URI;
|
|
24
|
-
readonly name: string;
|
|
25
|
-
readonly filename: string;
|
|
26
|
-
readonly description?: string;
|
|
27
|
-
/** Storage origin. Set by core when items come from promptsService; omitted for external provider items. */
|
|
28
|
-
readonly storage?: PromptsStorage;
|
|
29
|
-
readonly promptType: PromptsType;
|
|
30
|
-
readonly disabled: boolean;
|
|
31
|
-
/** When set, overrides `storage` for display grouping purposes. */
|
|
32
|
-
readonly groupKey?: string;
|
|
33
|
-
/** URI of the parent plugin, when this item comes from an installed plugin. */
|
|
34
|
-
readonly pluginUri?: URI;
|
|
35
|
-
/** When set, overrides the formatted name for display. */
|
|
36
|
-
readonly displayName?: string;
|
|
37
|
-
/** When set, shows a small inline badge next to the item name. */
|
|
38
|
-
readonly badge?: string;
|
|
39
|
-
/** Tooltip shown when hovering the badge. */
|
|
40
|
-
readonly badgeTooltip?: string;
|
|
41
|
-
/** When set, overrides the default prompt-type icon. */
|
|
42
|
-
readonly typeIcon?: ThemeIcon;
|
|
43
|
-
/** True when item comes from the default chat extension (grouped under Built-in). */
|
|
44
|
-
readonly isBuiltin?: boolean;
|
|
45
|
-
/** Display name of the contributing extension (for non-built-in extension items). */
|
|
46
|
-
readonly extensionLabel?: string;
|
|
47
|
-
/** Server-reported loading/sync status for remote customizations. */
|
|
48
|
-
readonly status?: "loading" | "loaded" | "degraded" | "error";
|
|
49
|
-
/** Human-readable status detail (e.g. error message or warning). */
|
|
50
|
-
readonly statusMessage?: string;
|
|
51
|
-
/** When true, this item can be selected for syncing to a remote harness. */
|
|
52
|
-
readonly syncable?: boolean;
|
|
53
|
-
/** When true, this syncable item is currently selected for syncing. */
|
|
54
|
-
readonly synced?: boolean;
|
|
55
|
-
nameMatches?: IMatch[];
|
|
56
|
-
descriptionMatches?: IMatch[];
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Browser-internal item source consumed by the list widget.
|
|
60
|
-
*
|
|
61
|
-
* Item sources fetch provider-shaped customization rows, normalize them into
|
|
62
|
-
* the browser-only list item shape, and add view-only overlays such as sync state.
|
|
63
|
-
*/
|
|
64
|
-
export interface IAICustomizationItemSource {
|
|
65
|
-
readonly onDidChange: Event<void>;
|
|
66
|
-
fetchItems(promptType: PromptsType): Promise<IAICustomizationListItem[]>;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Returns true if the given extension identifier matches the default
|
|
70
|
-
* chat extension (e.g. GitHub Copilot Chat). Used to group items from
|
|
71
|
-
* the chat extension under "Built-in" instead of "Extensions".
|
|
72
|
-
*/
|
|
73
|
-
export declare function isChatExtensionItem(extensionId: ExtensionIdentifier, productService: IProductService): boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Derives a friendly name from a filename by removing extension suffixes.
|
|
76
|
-
*/
|
|
77
|
-
export declare function getFriendlyName(filename: string): string;
|
|
78
|
-
/**
|
|
79
|
-
* Expands hook file items into individual hook entries by parsing hook
|
|
80
|
-
* definitions from the file content. Falls back to the original item
|
|
81
|
-
* when parsing fails.
|
|
82
|
-
*/
|
|
83
|
-
export declare function expandHookFileItems(hookFileItems: readonly ICustomizationItem[], workspaceService: IAICustomizationWorkspaceService, fileService: IFileService, pathService: IPathService): Promise<ICustomizationItem[]>;
|
|
84
|
-
/**
|
|
85
|
-
* Converts provider-shaped customization rows into the rich list model used by the management UI.
|
|
86
|
-
*/
|
|
87
|
-
export declare class AICustomizationItemNormalizer {
|
|
88
|
-
private readonly workspaceContextService;
|
|
89
|
-
private readonly workspaceService;
|
|
90
|
-
private readonly labelService;
|
|
91
|
-
private readonly agentPluginService;
|
|
92
|
-
private readonly productService;
|
|
93
|
-
constructor(workspaceContextService: IWorkspaceContextService, workspaceService: IAICustomizationWorkspaceService, labelService: ILabelService, agentPluginService: IAgentPluginService, productService: IProductService);
|
|
94
|
-
normalizeItems(items: readonly ICustomizationItem[], promptType: PromptsType): IAICustomizationListItem[];
|
|
95
|
-
normalizeItem(item: ICustomizationItem, promptType: PromptsType, uriUseCounts?: ResourceMap<number>): IAICustomizationListItem;
|
|
96
|
-
private resolveSource;
|
|
97
|
-
private inferStorageAndGroup;
|
|
98
|
-
private findPluginUri;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Unified item source that fetches items from a provider (extension-contributed
|
|
102
|
-
* or the promptsService adapter), normalizes them into list items, and optionally
|
|
103
|
-
* blends in local syncable items when a sync provider is present.
|
|
104
|
-
*/
|
|
105
|
-
export declare class ProviderCustomizationItemSource implements IAICustomizationItemSource {
|
|
106
|
-
private readonly itemProvider;
|
|
107
|
-
private readonly syncProvider;
|
|
108
|
-
private readonly promptsService;
|
|
109
|
-
private readonly workspaceService;
|
|
110
|
-
private readonly fileService;
|
|
111
|
-
private readonly pathService;
|
|
112
|
-
private readonly itemNormalizer;
|
|
113
|
-
readonly onDidChange: Event<void>;
|
|
114
|
-
constructor(itemProvider: ICustomizationItemProvider | undefined, syncProvider: ICustomizationSyncProvider | undefined, promptsService: IPromptsService, workspaceService: IAICustomizationWorkspaceService, fileService: IFileService, pathService: IPathService, itemNormalizer: AICustomizationItemNormalizer);
|
|
115
|
-
fetchItems(promptType: PromptsType): Promise<IAICustomizationListItem[]>;
|
|
116
|
-
private fetchItemsFromProvider;
|
|
117
|
-
/**
|
|
118
|
-
* Merges built-in skills (bundled with the app under `vs/sessions/skills/`)
|
|
119
|
-
* into the provider's items. The provider may re-discover the bundled
|
|
120
|
-
* copies when scanning disk — those duplicates are dropped (deduped by
|
|
121
|
-
* URI) and replaced with the authoritative built-in entry tagged
|
|
122
|
-
* `groupKey: BUILTIN_STORAGE` so the UI renders them in the "Built-in"
|
|
123
|
-
* group. User-authored overrides (different URI, same name) are preserved.
|
|
124
|
-
*
|
|
125
|
-
* A workbench that uses the base `PromptsService` will throw on
|
|
126
|
-
* `BUILTIN_STORAGE` — we catch and return the items unchanged in that case.
|
|
127
|
-
*/
|
|
128
|
-
private mergeBuiltinSkills;
|
|
129
|
-
private addSkillDescriptionFallbacks;
|
|
130
|
-
private fetchLocalSyncableItems;
|
|
131
|
-
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js
DELETED
|
@@ -1,363 +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 { parse } from '@codingame/monaco-vscode-api/vscode/vs/base/common/json';
|
|
5
|
-
import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
6
|
-
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
7
|
-
import { OS } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
8
|
-
import { basename, isEqualOrParent, dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
9
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
10
|
-
import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
11
|
-
import { parseHooksFromFile } from '../../common/promptSyntax/hookCompatibility.js';
|
|
12
|
-
import { formatHookCommandLabel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema';
|
|
13
|
-
import { HOOK_METADATA } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes';
|
|
14
|
-
import { PromptsType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
15
|
-
import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
16
|
-
import { storageToIcon } from './aiCustomizationIcons.js';
|
|
17
|
-
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement';
|
|
18
|
-
import { extractExtensionIdFromPath } from './aiCustomizationListWidgetUtils.js';
|
|
19
|
-
import { BUILTIN_STORAGE } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService';
|
|
20
|
-
|
|
21
|
-
function isChatExtensionItem(extensionId, productService) {
|
|
22
|
-
const chatExtensionId = productService.defaultChatAgent?.chatExtensionId;
|
|
23
|
-
return !!chatExtensionId && ExtensionIdentifier.equals(extensionId, chatExtensionId);
|
|
24
|
-
}
|
|
25
|
-
function getFriendlyName(filename) {
|
|
26
|
-
let name = filename.replace(/\.instructions\.md$/i, "").replace(/\.prompt\.md$/i, "").replace(/\.agent\.md$/i, "").replace(/\.md$/i, "");
|
|
27
|
-
name = name.replace(/[-_]/g, " ").replace(/\b\w/g, c => c.toUpperCase());
|
|
28
|
-
return name || filename;
|
|
29
|
-
}
|
|
30
|
-
async function expandHookFileItems(hookFileItems, workspaceService, fileService, pathService) {
|
|
31
|
-
const items = [];
|
|
32
|
-
const activeRoot = workspaceService.getActiveProjectRoot();
|
|
33
|
-
const userHomeUri = await pathService.userHome();
|
|
34
|
-
const userHome = userHomeUri.scheme === Schemas.file ? userHomeUri.fsPath : userHomeUri.path;
|
|
35
|
-
for (const item of hookFileItems) {
|
|
36
|
-
let parsedHooks = false;
|
|
37
|
-
try {
|
|
38
|
-
const content = await fileService.readFile(item.uri);
|
|
39
|
-
const json = parse(( content.value.toString()));
|
|
40
|
-
const {
|
|
41
|
-
hooks
|
|
42
|
-
} = parseHooksFromFile(item.uri, json, activeRoot, userHome);
|
|
43
|
-
if (hooks.size > 0) {
|
|
44
|
-
parsedHooks = true;
|
|
45
|
-
for (const [hookType, entry] of hooks) {
|
|
46
|
-
const hookMeta = HOOK_METADATA[hookType];
|
|
47
|
-
for (let i = 0; i < entry.hooks.length; i++) {
|
|
48
|
-
const hook = entry.hooks[i];
|
|
49
|
-
const cmdLabel = formatHookCommandLabel(hook, OS);
|
|
50
|
-
const truncatedCmd = cmdLabel.length > 60 ? cmdLabel.substring(0, 57) + "..." : cmdLabel;
|
|
51
|
-
items.push({
|
|
52
|
-
uri: item.uri,
|
|
53
|
-
type: PromptsType.hook,
|
|
54
|
-
name: hookMeta?.label ?? entry.originalId,
|
|
55
|
-
description: truncatedCmd || ( localize(5311, "(unset)")),
|
|
56
|
-
enabled: item.enabled,
|
|
57
|
-
groupKey: item.groupKey,
|
|
58
|
-
storage: item.storage
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
} catch {}
|
|
64
|
-
if (!parsedHooks) {
|
|
65
|
-
items.push(item);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return items;
|
|
69
|
-
}
|
|
70
|
-
class AICustomizationItemNormalizer {
|
|
71
|
-
constructor(
|
|
72
|
-
workspaceContextService,
|
|
73
|
-
workspaceService,
|
|
74
|
-
labelService,
|
|
75
|
-
agentPluginService,
|
|
76
|
-
productService
|
|
77
|
-
) {
|
|
78
|
-
this.workspaceContextService = workspaceContextService;
|
|
79
|
-
this.workspaceService = workspaceService;
|
|
80
|
-
this.labelService = labelService;
|
|
81
|
-
this.agentPluginService = agentPluginService;
|
|
82
|
-
this.productService = productService;
|
|
83
|
-
}
|
|
84
|
-
normalizeItems(items, promptType) {
|
|
85
|
-
const uriUseCounts = ( new ResourceMap());
|
|
86
|
-
return ( items.filter(item => item.type === promptType).map(item => this.normalizeItem(item, promptType, uriUseCounts))).sort((a, b) => a.name.localeCompare(b.name));
|
|
87
|
-
}
|
|
88
|
-
normalizeItem(
|
|
89
|
-
item,
|
|
90
|
-
promptType,
|
|
91
|
-
uriUseCounts = ( new ResourceMap())
|
|
92
|
-
) {
|
|
93
|
-
const {
|
|
94
|
-
storage,
|
|
95
|
-
groupKey,
|
|
96
|
-
isBuiltin,
|
|
97
|
-
extensionLabel
|
|
98
|
-
} = this.resolveSource(item);
|
|
99
|
-
const seenCount = uriUseCounts.get(item.uri) ?? 0;
|
|
100
|
-
uriUseCounts.set(item.uri, seenCount + 1);
|
|
101
|
-
const duplicateSuffix = seenCount === 0 ? "" : `#${seenCount}`;
|
|
102
|
-
const isWorkspaceItem = storage === PromptsStorage.local;
|
|
103
|
-
return {
|
|
104
|
-
id: `${( item.uri.toString())}${duplicateSuffix}`,
|
|
105
|
-
uri: item.uri,
|
|
106
|
-
name: item.name,
|
|
107
|
-
filename: item.uri.scheme === Schemas.file ? this.labelService.getUriLabel(item.uri, {
|
|
108
|
-
relative: isWorkspaceItem
|
|
109
|
-
}) : basename(item.uri),
|
|
110
|
-
description: item.description,
|
|
111
|
-
storage,
|
|
112
|
-
promptType,
|
|
113
|
-
disabled: item.enabled === false,
|
|
114
|
-
groupKey,
|
|
115
|
-
pluginUri: storage === PromptsStorage.plugin ? this.findPluginUri(item.uri) : undefined,
|
|
116
|
-
displayName: item.name,
|
|
117
|
-
badge: item.badge,
|
|
118
|
-
badgeTooltip: item.badgeTooltip,
|
|
119
|
-
typeIcon: promptType === PromptsType.instructions && storage ? storageToIcon(storage) : undefined,
|
|
120
|
-
isBuiltin,
|
|
121
|
-
extensionLabel,
|
|
122
|
-
status: item.status,
|
|
123
|
-
statusMessage: item.statusMessage
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
resolveSource(item) {
|
|
127
|
-
const inferred = this.inferStorageAndGroup(item.uri);
|
|
128
|
-
const storage = item.storage ?? inferred.storage;
|
|
129
|
-
const extensionLabel = item.extensionLabel ?? inferred.extensionLabel;
|
|
130
|
-
if (!item.groupKey) {
|
|
131
|
-
return {
|
|
132
|
-
...inferred,
|
|
133
|
-
storage,
|
|
134
|
-
extensionLabel
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
switch (item.groupKey) {
|
|
138
|
-
case BUILTIN_STORAGE:
|
|
139
|
-
{
|
|
140
|
-
const builtinStorage = item.storage === BUILTIN_STORAGE ? BUILTIN_STORAGE : PromptsStorage.extension;
|
|
141
|
-
return {
|
|
142
|
-
storage: builtinStorage,
|
|
143
|
-
groupKey: BUILTIN_STORAGE,
|
|
144
|
-
isBuiltin: true,
|
|
145
|
-
extensionLabel
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
default:
|
|
149
|
-
return {
|
|
150
|
-
storage,
|
|
151
|
-
groupKey: item.groupKey,
|
|
152
|
-
extensionLabel
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
inferStorageAndGroup(uri) {
|
|
157
|
-
if (uri.scheme !== Schemas.file) {
|
|
158
|
-
return {
|
|
159
|
-
storage: PromptsStorage.extension,
|
|
160
|
-
groupKey: BUILTIN_STORAGE,
|
|
161
|
-
isBuiltin: true
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
const activeProjectRoot = this.workspaceService.getActiveProjectRoot();
|
|
165
|
-
if (activeProjectRoot && isEqualOrParent(uri, activeProjectRoot)) {
|
|
166
|
-
return {
|
|
167
|
-
storage: PromptsStorage.local
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
for (const folder of this.workspaceContextService.getWorkspace().folders) {
|
|
171
|
-
if (isEqualOrParent(uri, folder.uri)) {
|
|
172
|
-
return {
|
|
173
|
-
storage: PromptsStorage.local
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
for (const plugin of this.agentPluginService.plugins.get()) {
|
|
178
|
-
if (isEqualOrParent(uri, plugin.uri)) {
|
|
179
|
-
return {
|
|
180
|
-
storage: PromptsStorage.plugin
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
const extensionId = extractExtensionIdFromPath(uri.path);
|
|
185
|
-
if (extensionId) {
|
|
186
|
-
const extensionIdentifier = ( new ExtensionIdentifier(extensionId));
|
|
187
|
-
if (isChatExtensionItem(extensionIdentifier, this.productService)) {
|
|
188
|
-
return {
|
|
189
|
-
storage: PromptsStorage.extension,
|
|
190
|
-
groupKey: BUILTIN_STORAGE,
|
|
191
|
-
isBuiltin: true
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
return {
|
|
195
|
-
storage: PromptsStorage.extension,
|
|
196
|
-
extensionLabel: extensionIdentifier.value
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
return {
|
|
200
|
-
storage: PromptsStorage.user
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
findPluginUri(itemUri) {
|
|
204
|
-
for (const plugin of this.agentPluginService.plugins.get()) {
|
|
205
|
-
if (isEqualOrParent(itemUri, plugin.uri)) {
|
|
206
|
-
return plugin.uri;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
return undefined;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
class ProviderCustomizationItemSource {
|
|
213
|
-
constructor(
|
|
214
|
-
itemProvider,
|
|
215
|
-
syncProvider,
|
|
216
|
-
promptsService,
|
|
217
|
-
workspaceService,
|
|
218
|
-
fileService,
|
|
219
|
-
pathService,
|
|
220
|
-
itemNormalizer
|
|
221
|
-
) {
|
|
222
|
-
this.itemProvider = itemProvider;
|
|
223
|
-
this.syncProvider = syncProvider;
|
|
224
|
-
this.promptsService = promptsService;
|
|
225
|
-
this.workspaceService = workspaceService;
|
|
226
|
-
this.fileService = fileService;
|
|
227
|
-
this.pathService = pathService;
|
|
228
|
-
this.itemNormalizer = itemNormalizer;
|
|
229
|
-
const onDidChangeSyncableCustomizations = this.syncProvider ? Event.any(
|
|
230
|
-
this.promptsService.onDidChangeCustomAgents,
|
|
231
|
-
this.promptsService.onDidChangeSlashCommands,
|
|
232
|
-
this.promptsService.onDidChangeSkills,
|
|
233
|
-
this.promptsService.onDidChangeHooks,
|
|
234
|
-
this.promptsService.onDidChangeInstructions
|
|
235
|
-
) : Event.None;
|
|
236
|
-
this.onDidChange = Event.any(
|
|
237
|
-
this.itemProvider?.onDidChange ?? Event.None,
|
|
238
|
-
this.syncProvider?.onDidChange ?? Event.None,
|
|
239
|
-
onDidChangeSyncableCustomizations
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
|
-
async fetchItems(promptType) {
|
|
243
|
-
const remoteItems = this.itemProvider ? await this.fetchItemsFromProvider(this.itemProvider, promptType) : [];
|
|
244
|
-
if (!this.syncProvider) {
|
|
245
|
-
return remoteItems;
|
|
246
|
-
}
|
|
247
|
-
const localItems = await this.fetchLocalSyncableItems(promptType, this.syncProvider);
|
|
248
|
-
return [...remoteItems, ...localItems];
|
|
249
|
-
}
|
|
250
|
-
async fetchItemsFromProvider(provider, promptType) {
|
|
251
|
-
const allItems = await provider.provideChatSessionCustomizations(CancellationToken.None);
|
|
252
|
-
if (!allItems) {
|
|
253
|
-
return [];
|
|
254
|
-
}
|
|
255
|
-
let providerItems;
|
|
256
|
-
if (promptType === PromptsType.hook) {
|
|
257
|
-
const hookItems = allItems.filter(item => item.type === PromptsType.hook);
|
|
258
|
-
const toExpand = hookItems.filter(item => item.storage !== PromptsStorage.plugin);
|
|
259
|
-
const preExpanded = hookItems.filter(item => item.storage === PromptsStorage.plugin);
|
|
260
|
-
const expanded = await expandHookFileItems(toExpand, this.workspaceService, this.fileService, this.pathService);
|
|
261
|
-
providerItems = [...expanded, ...preExpanded];
|
|
262
|
-
} else {
|
|
263
|
-
providerItems = allItems.filter(item => item.type === promptType);
|
|
264
|
-
}
|
|
265
|
-
if (promptType === PromptsType.skill) {
|
|
266
|
-
providerItems = await this.addSkillDescriptionFallbacks(providerItems);
|
|
267
|
-
}
|
|
268
|
-
const normalized = this.itemNormalizer.normalizeItems(providerItems, promptType);
|
|
269
|
-
if (promptType === PromptsType.skill) {
|
|
270
|
-
return this.mergeBuiltinSkills(normalized, promptType);
|
|
271
|
-
}
|
|
272
|
-
return normalized;
|
|
273
|
-
}
|
|
274
|
-
async mergeBuiltinSkills(items, promptType) {
|
|
275
|
-
let builtinPaths = [];
|
|
276
|
-
try {
|
|
277
|
-
builtinPaths = await this.promptsService.listPromptFilesForStorage(PromptsType.skill, BUILTIN_STORAGE, CancellationToken.None);
|
|
278
|
-
} catch {
|
|
279
|
-
return [...items];
|
|
280
|
-
}
|
|
281
|
-
if (builtinPaths.length === 0) {
|
|
282
|
-
return [...items];
|
|
283
|
-
}
|
|
284
|
-
const builtinUris = ( new ResourceMap());
|
|
285
|
-
for (const p of builtinPaths) {
|
|
286
|
-
builtinUris.set(p.uri, p);
|
|
287
|
-
}
|
|
288
|
-
const deduped = items.filter(item => !( builtinUris.has(item.uri)));
|
|
289
|
-
const uiIntegrations = this.workspaceService.getSkillUIIntegrations();
|
|
290
|
-
const uiIntegrationBadge = ( localize(5312, "UI Integration"));
|
|
291
|
-
const overriddenNames = ( new Set());
|
|
292
|
-
for (const item of deduped) {
|
|
293
|
-
if (item.storage === PromptsStorage.local || item.storage === PromptsStorage.user) {
|
|
294
|
-
if (item.name) {
|
|
295
|
-
overriddenNames.add(item.name);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
const uriUseCounts = ( new ResourceMap());
|
|
300
|
-
for (const item of deduped) {
|
|
301
|
-
uriUseCounts.set(item.uri, (uriUseCounts.get(item.uri) ?? 0) + 1);
|
|
302
|
-
}
|
|
303
|
-
const appended = [];
|
|
304
|
-
const disabledPromptFiles = this.promptsService.getDisabledPromptFiles(PromptsType.skill);
|
|
305
|
-
for (const p of builtinPaths) {
|
|
306
|
-
const name = p.name ?? basename(p.uri);
|
|
307
|
-
if (( overriddenNames.has(name))) {
|
|
308
|
-
continue;
|
|
309
|
-
}
|
|
310
|
-
const folderName = basename(dirname(p.uri));
|
|
311
|
-
const uiTooltip = uiIntegrations.get(folderName);
|
|
312
|
-
const builtinItem = {
|
|
313
|
-
uri: p.uri,
|
|
314
|
-
type: PromptsType.skill,
|
|
315
|
-
name,
|
|
316
|
-
description: p.description,
|
|
317
|
-
storage: BUILTIN_STORAGE,
|
|
318
|
-
groupKey: BUILTIN_STORAGE,
|
|
319
|
-
enabled: !( disabledPromptFiles.has(p.uri)),
|
|
320
|
-
badge: uiTooltip ? uiIntegrationBadge : undefined,
|
|
321
|
-
badgeTooltip: uiTooltip
|
|
322
|
-
};
|
|
323
|
-
appended.push(this.itemNormalizer.normalizeItem(builtinItem, promptType, uriUseCounts));
|
|
324
|
-
}
|
|
325
|
-
return [...deduped, ...appended];
|
|
326
|
-
}
|
|
327
|
-
async addSkillDescriptionFallbacks(items) {
|
|
328
|
-
const descriptionsByUri = ( new Map());
|
|
329
|
-
const skills = await this.promptsService.findAgentSkills(CancellationToken.None);
|
|
330
|
-
for (const skill of skills ?? []) {
|
|
331
|
-
if (skill.description) {
|
|
332
|
-
descriptionsByUri.set(( skill.uri.toString()), skill.description);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
return ( items.map(item => item.description ? item : {
|
|
336
|
-
...item,
|
|
337
|
-
description: descriptionsByUri.get(( item.uri.toString()))
|
|
338
|
-
}));
|
|
339
|
-
}
|
|
340
|
-
async fetchLocalSyncableItems(promptType, syncProvider) {
|
|
341
|
-
const files = await this.promptsService.listPromptFiles(promptType, CancellationToken.None);
|
|
342
|
-
if (!files.length) {
|
|
343
|
-
return [];
|
|
344
|
-
}
|
|
345
|
-
const providerItems = ( files.filter(
|
|
346
|
-
file => file.storage === PromptsStorage.local || file.storage === PromptsStorage.user
|
|
347
|
-
).map(file => ({
|
|
348
|
-
uri: file.uri,
|
|
349
|
-
type: promptType,
|
|
350
|
-
name: getFriendlyName(basename(file.uri)),
|
|
351
|
-
groupKey: "sync-local",
|
|
352
|
-
enabled: true
|
|
353
|
-
})));
|
|
354
|
-
return ( this.itemNormalizer.normalizeItems(providerItems, promptType).map(item => ({
|
|
355
|
-
...item,
|
|
356
|
-
id: `sync-${item.id}`,
|
|
357
|
-
syncable: true,
|
|
358
|
-
synced: syncProvider.isSelected(item.uri)
|
|
359
|
-
})));
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
export { AICustomizationItemNormalizer, ProviderCustomizationItemSource, expandHookFileItems, getFriendlyName, isChatExtensionItem };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
-
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
-
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
4
|
-
import { IAICustomizationWorkspaceService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service";
|
|
5
|
-
import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service";
|
|
6
|
-
import { ICustomizationItem, ICustomizationItemProvider, IHarnessDescriptor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService";
|
|
7
|
-
/**
|
|
8
|
-
* Adapts the rich promptsService model to the same provider-shaped items
|
|
9
|
-
* contributed by external customization providers.
|
|
10
|
-
*/
|
|
11
|
-
export declare class PromptsServiceCustomizationItemProvider implements ICustomizationItemProvider {
|
|
12
|
-
private readonly getActiveDescriptor;
|
|
13
|
-
private readonly promptsService;
|
|
14
|
-
private readonly workspaceService;
|
|
15
|
-
private readonly productService;
|
|
16
|
-
readonly onDidChange: Event<void>;
|
|
17
|
-
constructor(getActiveDescriptor: () => IHarnessDescriptor, promptsService: IPromptsService, workspaceService: IAICustomizationWorkspaceService, productService: IProductService);
|
|
18
|
-
provideChatSessionCustomizations(token: CancellationToken): Promise<ICustomizationItem[]>;
|
|
19
|
-
private provideCustomizations;
|
|
20
|
-
private fetchPromptServiceHooks;
|
|
21
|
-
private fetchPromptServiceInstructions;
|
|
22
|
-
private applyBuiltinGroupKeys;
|
|
23
|
-
private applyLocalFilters;
|
|
24
|
-
}
|