@codingame/monaco-vscode-chat-service-override 26.2.2 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +31 -1
- package/package.json +5 -5
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +15 -0
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +53 -0
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +219 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +39 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +83 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +123 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +274 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +71 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +284 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +79 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +378 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +27 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +74 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +54 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +87 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +71 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +43 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +154 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -8
- 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 +53 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +15 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +204 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +77 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +541 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +10 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +70 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +90 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +20 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +43 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +84 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.d.ts → localAgentSessionsController.d.ts} +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.js → localAgentSessionsController.js} +24 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +181 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +943 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +248 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +118 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +727 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +72 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +623 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +858 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +30 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +19 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +36 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +529 -363
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +419 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +198 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +305 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +64 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +111 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +611 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +504 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +914 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +128 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +429 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +113 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +126 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +279 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +781 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +5 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +16 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +63 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +26 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +15 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +40 -413
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +38 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +56 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +15 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +138 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +166 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +37 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +351 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +118 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +182 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +892 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +55 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +28 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +102 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +16 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +69 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +2 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +76 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +43 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +67 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +242 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +311 -0
- 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 +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +8 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +64 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +4 -2
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +42 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +58 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +8 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +15 -6
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +190 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +188 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +18 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +192 -85
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -6
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +16 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +8 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +111 -7
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +73 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +622 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +478 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +35 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +1 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +2 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +23 -22
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +44 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +345 -113
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +14 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +34 -24
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +11 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +248 -24
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +6 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +18 -81
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +10 -10
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +6 -6
- 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/media/terminalChatWidget.css +6 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +35 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +1 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +13 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +280 -65
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +47 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +38 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +0 -587
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +0 -71
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +0 -293
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.js +0 -31
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
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 { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
|
|
6
|
+
import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
7
|
+
import { isEqualOrParent, joinPath, normalizePath, relativePath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
8
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
9
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
10
|
+
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
11
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
12
|
+
import { asJson } from '@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request';
|
|
13
|
+
import { IRequestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service';
|
|
14
|
+
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
15
|
+
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
16
|
+
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
17
|
+
import { IAgentPluginRepositoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service';
|
|
18
|
+
|
|
19
|
+
var MarketplaceType;
|
|
20
|
+
(function(MarketplaceType) {
|
|
21
|
+
MarketplaceType["Copilot"] = "copilot";
|
|
22
|
+
MarketplaceType["Claude"] = "claude";
|
|
23
|
+
})(MarketplaceType || (MarketplaceType = {}));
|
|
24
|
+
var MarketplaceReferenceKind;
|
|
25
|
+
(function(MarketplaceReferenceKind) {
|
|
26
|
+
MarketplaceReferenceKind["GitHubShorthand"] = "githubShorthand";
|
|
27
|
+
MarketplaceReferenceKind["GitUri"] = "gitUri";
|
|
28
|
+
MarketplaceReferenceKind["LocalFileUri"] = "localFileUri";
|
|
29
|
+
})(MarketplaceReferenceKind || (MarketplaceReferenceKind = {}));
|
|
30
|
+
const MARKETPLACE_DEFINITIONS = [{
|
|
31
|
+
type: MarketplaceType.Copilot,
|
|
32
|
+
path: ".github/plugin/marketplace.json"
|
|
33
|
+
}, {
|
|
34
|
+
type: MarketplaceType.Claude,
|
|
35
|
+
path: ".claude-plugin/marketplace.json"
|
|
36
|
+
}];
|
|
37
|
+
const GITHUB_MARKETPLACE_CACHE_TTL_MS = 8 * 60 * 60 * 1000;
|
|
38
|
+
const GITHUB_MARKETPLACE_CACHE_STORAGE_KEY = "chat.plugins.marketplaces.githubCache.v1";
|
|
39
|
+
let PluginMarketplaceService = class PluginMarketplaceService {
|
|
40
|
+
constructor(
|
|
41
|
+
_configurationService,
|
|
42
|
+
_requestService,
|
|
43
|
+
_fileService,
|
|
44
|
+
_pluginRepositoryService,
|
|
45
|
+
_logService,
|
|
46
|
+
_storageService
|
|
47
|
+
) {
|
|
48
|
+
this._configurationService = _configurationService;
|
|
49
|
+
this._requestService = _requestService;
|
|
50
|
+
this._fileService = _fileService;
|
|
51
|
+
this._pluginRepositoryService = _pluginRepositoryService;
|
|
52
|
+
this._logService = _logService;
|
|
53
|
+
this._storageService = _storageService;
|
|
54
|
+
this._gitHubMarketplaceCache = ( new Lazy(() => this._loadPersistedGitHubMarketplaceCache()));
|
|
55
|
+
this.onDidChangeMarketplaces = Event.filter(
|
|
56
|
+
_configurationService.onDidChangeConfiguration,
|
|
57
|
+
e => e.affectsConfiguration(ChatConfiguration.PluginsEnabled) || e.affectsConfiguration(ChatConfiguration.PluginMarketplaces)
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
async fetchMarketplacePlugins(token) {
|
|
61
|
+
if (!this._configurationService.getValue(ChatConfiguration.PluginsEnabled)) {
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
const configuredRefs = this._configurationService.getValue(ChatConfiguration.PluginMarketplaces) ?? [];
|
|
65
|
+
const refs = parseMarketplaceReferences(configuredRefs);
|
|
66
|
+
for (const value of configuredRefs) {
|
|
67
|
+
if (typeof value !== "string" || !parseMarketplaceReference(value)) {
|
|
68
|
+
this._logService.debug(
|
|
69
|
+
`[PluginMarketplaceService] Ignoring invalid marketplace entry: ${String(value)}`
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const results = await Promise.all(( refs.map(ref => {
|
|
74
|
+
if (ref.kind === MarketplaceReferenceKind.GitHubShorthand && ref.githubRepo) {
|
|
75
|
+
return this._fetchFromGitHubRepo(ref, ref.githubRepo, token);
|
|
76
|
+
}
|
|
77
|
+
return this._fetchFromClonedRepo(ref, token);
|
|
78
|
+
})));
|
|
79
|
+
return results.flat();
|
|
80
|
+
}
|
|
81
|
+
async _fetchFromGitHubRepo(reference, repo, token) {
|
|
82
|
+
const cache = this._gitHubMarketplaceCache.value;
|
|
83
|
+
const cached = this._getCachedGitHubMarketplacePlugins(cache, reference.canonicalId);
|
|
84
|
+
if (cached) {
|
|
85
|
+
return cached;
|
|
86
|
+
}
|
|
87
|
+
let repoMayBePrivate = true;
|
|
88
|
+
for (const def of MARKETPLACE_DEFINITIONS) {
|
|
89
|
+
if (token.isCancellationRequested) {
|
|
90
|
+
return [];
|
|
91
|
+
}
|
|
92
|
+
const url = `https://raw.githubusercontent.com/${repo}/main/${def.path}`;
|
|
93
|
+
try {
|
|
94
|
+
const context = await this._requestService.request({
|
|
95
|
+
type: "GET",
|
|
96
|
+
url
|
|
97
|
+
}, token);
|
|
98
|
+
const statusCode = context.res.statusCode;
|
|
99
|
+
if (statusCode !== 200) {
|
|
100
|
+
repoMayBePrivate &&= statusCode !== undefined && statusCode >= 400 && statusCode < 500;
|
|
101
|
+
this._logService.debug(
|
|
102
|
+
`[PluginMarketplaceService] ${url} returned status ${statusCode}, skipping`
|
|
103
|
+
);
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
const json = await asJson(context);
|
|
107
|
+
if (!json?.plugins || !Array.isArray(json.plugins)) {
|
|
108
|
+
this._logService.debug(
|
|
109
|
+
`[PluginMarketplaceService] ${url} did not contain a valid plugins array, skipping`
|
|
110
|
+
);
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
const plugins = json.plugins.filter(p => typeof p.name === "string" && !!p.name).flatMap(p => {
|
|
114
|
+
const source = resolvePluginSource(json.metadata?.pluginRoot, p.source ?? "");
|
|
115
|
+
if (source === undefined) {
|
|
116
|
+
this._logService.warn(
|
|
117
|
+
`[PluginMarketplaceService] Skipping plugin '${p.name}' in ${repo}: invalid source path '${p.source ?? ""}' with pluginRoot '${json.metadata?.pluginRoot ?? ""}'`
|
|
118
|
+
);
|
|
119
|
+
return [];
|
|
120
|
+
}
|
|
121
|
+
return [{
|
|
122
|
+
name: p.name,
|
|
123
|
+
description: p.description ?? "",
|
|
124
|
+
version: p.version ?? "",
|
|
125
|
+
source,
|
|
126
|
+
marketplace: reference.displayLabel,
|
|
127
|
+
marketplaceReference: reference,
|
|
128
|
+
marketplaceType: def.type,
|
|
129
|
+
readmeUri: getMarketplaceReadmeUri(repo, source)
|
|
130
|
+
}];
|
|
131
|
+
});
|
|
132
|
+
cache.set(reference.canonicalId, {
|
|
133
|
+
plugins,
|
|
134
|
+
expiresAt: Date.now() + GITHUB_MARKETPLACE_CACHE_TTL_MS,
|
|
135
|
+
referenceRawValue: reference.rawValue
|
|
136
|
+
});
|
|
137
|
+
this._savePersistedGitHubMarketplaceCache(cache);
|
|
138
|
+
return plugins;
|
|
139
|
+
} catch (err) {
|
|
140
|
+
this._logService.debug(
|
|
141
|
+
`[PluginMarketplaceService] Failed to fetch marketplace.json from ${url}:`,
|
|
142
|
+
err
|
|
143
|
+
);
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
if (repoMayBePrivate) {
|
|
148
|
+
this._logService.debug(
|
|
149
|
+
`[PluginMarketplaceService] ${repo} may be private, attempting clone-based marketplace discovery`
|
|
150
|
+
);
|
|
151
|
+
return this._fetchFromClonedRepo(reference, token);
|
|
152
|
+
}
|
|
153
|
+
this._logService.debug(`[PluginMarketplaceService] No marketplace.json found in ${repo}`);
|
|
154
|
+
return [];
|
|
155
|
+
}
|
|
156
|
+
_getCachedGitHubMarketplacePlugins(cache, cacheKey) {
|
|
157
|
+
const cached = cache.get(cacheKey);
|
|
158
|
+
if (!cached) {
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
if (cached.expiresAt <= Date.now()) {
|
|
162
|
+
cache.delete(cacheKey);
|
|
163
|
+
this._savePersistedGitHubMarketplaceCache(cache);
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
return [...cached.plugins];
|
|
167
|
+
}
|
|
168
|
+
_loadPersistedGitHubMarketplaceCache() {
|
|
169
|
+
const cache = ( new Map());
|
|
170
|
+
const now = Date.now();
|
|
171
|
+
const stored = this._storageService.getObject(GITHUB_MARKETPLACE_CACHE_STORAGE_KEY, StorageScope.APPLICATION);
|
|
172
|
+
if (!stored) {
|
|
173
|
+
return cache;
|
|
174
|
+
}
|
|
175
|
+
const revived = revive(stored);
|
|
176
|
+
for (const [cacheKey, entry] of Object.entries(revived)) {
|
|
177
|
+
if (!entry || !Array.isArray(entry.plugins) || typeof entry.expiresAt !== "number" || entry.expiresAt <= now || typeof entry.referenceRawValue !== "string") {
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
const reference = parseMarketplaceReference(entry.referenceRawValue);
|
|
181
|
+
if (!reference) {
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
const plugins = ( entry.plugins.map(plugin => ({
|
|
185
|
+
...plugin,
|
|
186
|
+
marketplace: reference.displayLabel,
|
|
187
|
+
marketplaceReference: reference
|
|
188
|
+
})));
|
|
189
|
+
cache.set(cacheKey, {
|
|
190
|
+
plugins,
|
|
191
|
+
expiresAt: entry.expiresAt,
|
|
192
|
+
referenceRawValue: entry.referenceRawValue
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
return cache;
|
|
196
|
+
}
|
|
197
|
+
_savePersistedGitHubMarketplaceCache(cache) {
|
|
198
|
+
const serialized = {};
|
|
199
|
+
for (const [cacheKey, entry] of cache) {
|
|
200
|
+
if (!entry.plugins.length || entry.expiresAt <= Date.now()) {
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
serialized[cacheKey] = {
|
|
204
|
+
expiresAt: entry.expiresAt,
|
|
205
|
+
referenceRawValue: entry.referenceRawValue,
|
|
206
|
+
plugins: entry.plugins
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
if (( Object.keys(serialized)).length === 0) {
|
|
210
|
+
this._storageService.remove(GITHUB_MARKETPLACE_CACHE_STORAGE_KEY, StorageScope.APPLICATION);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
this._storageService.store(
|
|
214
|
+
GITHUB_MARKETPLACE_CACHE_STORAGE_KEY,
|
|
215
|
+
JSON.stringify(serialized),
|
|
216
|
+
StorageScope.APPLICATION,
|
|
217
|
+
StorageTarget.MACHINE
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
async getMarketplacePluginMetadata(pluginUri) {
|
|
221
|
+
const configuredRefs = this._configurationService.getValue(ChatConfiguration.PluginMarketplaces) ?? [];
|
|
222
|
+
const refs = parseMarketplaceReferences(configuredRefs);
|
|
223
|
+
for (const ref of refs) {
|
|
224
|
+
let repoDir;
|
|
225
|
+
try {
|
|
226
|
+
repoDir = this._pluginRepositoryService.getRepositoryUri(ref);
|
|
227
|
+
} catch {
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
if (!isEqualOrParent(pluginUri, repoDir)) {
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
for (const def of MARKETPLACE_DEFINITIONS) {
|
|
234
|
+
const definitionUri = joinPath(repoDir, def.path);
|
|
235
|
+
let json;
|
|
236
|
+
try {
|
|
237
|
+
const contents = await this._fileService.readFile(definitionUri);
|
|
238
|
+
json = parse(( contents.value.toString()));
|
|
239
|
+
} catch {
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
if (!json?.plugins || !Array.isArray(json.plugins)) {
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
for (const p of json.plugins) {
|
|
246
|
+
if (typeof p.name !== "string" || !p.name) {
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
const source = resolvePluginSource(json.metadata?.pluginRoot, p.source ?? "");
|
|
250
|
+
if (source === undefined) {
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
const pluginSourceUri = normalizePath(joinPath(repoDir, source));
|
|
254
|
+
if (isEqualOrParent(pluginUri, pluginSourceUri)) {
|
|
255
|
+
return {
|
|
256
|
+
name: p.name,
|
|
257
|
+
description: p.description ?? "",
|
|
258
|
+
version: p.version ?? "",
|
|
259
|
+
source,
|
|
260
|
+
marketplace: ref.displayLabel,
|
|
261
|
+
marketplaceReference: ref,
|
|
262
|
+
marketplaceType: def.type,
|
|
263
|
+
readmeUri: getMarketplaceReadmeFileUri(repoDir, source)
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return undefined;
|
|
270
|
+
}
|
|
271
|
+
async _fetchFromClonedRepo(reference, token) {
|
|
272
|
+
let repoDir;
|
|
273
|
+
try {
|
|
274
|
+
repoDir = await this._pluginRepositoryService.ensureRepository(reference);
|
|
275
|
+
} catch (err) {
|
|
276
|
+
this._logService.debug(
|
|
277
|
+
`[PluginMarketplaceService] Failed to prepare marketplace repository ${reference.rawValue}:`,
|
|
278
|
+
err
|
|
279
|
+
);
|
|
280
|
+
return [];
|
|
281
|
+
}
|
|
282
|
+
for (const def of MARKETPLACE_DEFINITIONS) {
|
|
283
|
+
if (token.isCancellationRequested) {
|
|
284
|
+
return [];
|
|
285
|
+
}
|
|
286
|
+
const definitionUri = joinPath(repoDir, def.path);
|
|
287
|
+
let json;
|
|
288
|
+
try {
|
|
289
|
+
const contents = await this._fileService.readFile(definitionUri);
|
|
290
|
+
json = parse(( contents.value.toString()));
|
|
291
|
+
} catch {
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
if (!json?.plugins || !Array.isArray(json.plugins)) {
|
|
295
|
+
this._logService.debug(`[PluginMarketplaceService] ${( definitionUri.toString())} did not contain a valid plugins array, skipping`);
|
|
296
|
+
continue;
|
|
297
|
+
}
|
|
298
|
+
return json.plugins.filter(p => typeof p.name === "string" && !!p.name).flatMap(p => {
|
|
299
|
+
const source = resolvePluginSource(json.metadata?.pluginRoot, p.source ?? "");
|
|
300
|
+
if (source === undefined) {
|
|
301
|
+
this._logService.warn(
|
|
302
|
+
`[PluginMarketplaceService] Skipping plugin '${p.name}' in ${reference.rawValue}: invalid source path '${p.source ?? ""}' with pluginRoot '${json.metadata?.pluginRoot ?? ""}'`
|
|
303
|
+
);
|
|
304
|
+
return [];
|
|
305
|
+
}
|
|
306
|
+
return [{
|
|
307
|
+
name: p.name,
|
|
308
|
+
description: p.description ?? "",
|
|
309
|
+
version: p.version ?? "",
|
|
310
|
+
source,
|
|
311
|
+
marketplace: reference.displayLabel,
|
|
312
|
+
marketplaceReference: reference,
|
|
313
|
+
marketplaceType: def.type,
|
|
314
|
+
readmeUri: getMarketplaceReadmeFileUri(repoDir, source)
|
|
315
|
+
}];
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
this._logService.debug(
|
|
319
|
+
`[PluginMarketplaceService] No marketplace.json found in ${reference.rawValue}`
|
|
320
|
+
);
|
|
321
|
+
return [];
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
PluginMarketplaceService = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IRequestService)), ( __param(2, IFileService)), ( __param(3, IAgentPluginRepositoryService)), ( __param(4, ILogService)), ( __param(5, IStorageService))], PluginMarketplaceService));
|
|
325
|
+
function parseMarketplaceReferences(values) {
|
|
326
|
+
const byCanonicalId = ( new Map());
|
|
327
|
+
for (const value of values) {
|
|
328
|
+
if (typeof value !== "string") {
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
const parsed = parseMarketplaceReference(value);
|
|
332
|
+
if (!parsed) {
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
if (!( byCanonicalId.has(parsed.canonicalId))) {
|
|
336
|
+
byCanonicalId.set(parsed.canonicalId, parsed);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
return [...( byCanonicalId.values())];
|
|
340
|
+
}
|
|
341
|
+
function parseMarketplaceReference(value) {
|
|
342
|
+
const rawValue = value.trim();
|
|
343
|
+
if (!rawValue) {
|
|
344
|
+
return undefined;
|
|
345
|
+
}
|
|
346
|
+
const uriReference = parseUriMarketplaceReference(rawValue);
|
|
347
|
+
if (uriReference) {
|
|
348
|
+
return uriReference;
|
|
349
|
+
}
|
|
350
|
+
const scpReference = parseScpMarketplaceReference(rawValue);
|
|
351
|
+
if (scpReference) {
|
|
352
|
+
return scpReference;
|
|
353
|
+
}
|
|
354
|
+
const shorthandMatch = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/.exec(rawValue);
|
|
355
|
+
if (shorthandMatch) {
|
|
356
|
+
const owner = shorthandMatch[1];
|
|
357
|
+
const repo = shorthandMatch[2];
|
|
358
|
+
return {
|
|
359
|
+
rawValue,
|
|
360
|
+
displayLabel: `${owner}/${repo}`,
|
|
361
|
+
cloneUrl: `https://github.com/${owner}/${repo}.git`,
|
|
362
|
+
canonicalId: getGitHubCanonicalId(owner, repo),
|
|
363
|
+
cacheSegments: ["github.com", owner, repo],
|
|
364
|
+
kind: MarketplaceReferenceKind.GitHubShorthand,
|
|
365
|
+
githubRepo: `${owner}/${repo}`
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
return undefined;
|
|
369
|
+
}
|
|
370
|
+
function parseUriMarketplaceReference(rawValue) {
|
|
371
|
+
let uri;
|
|
372
|
+
try {
|
|
373
|
+
uri = ( URI.parse(rawValue));
|
|
374
|
+
} catch {
|
|
375
|
+
return undefined;
|
|
376
|
+
}
|
|
377
|
+
const scheme = uri.scheme.toLowerCase();
|
|
378
|
+
if (scheme === "file" && /^file:\/\//i.test(rawValue)) {
|
|
379
|
+
const localRepositoryUri = URI.file(uri.fsPath);
|
|
380
|
+
return {
|
|
381
|
+
rawValue,
|
|
382
|
+
displayLabel: localRepositoryUri.fsPath,
|
|
383
|
+
cloneUrl: rawValue,
|
|
384
|
+
canonicalId: `file:${( localRepositoryUri.toString()).toLowerCase()}`,
|
|
385
|
+
cacheSegments: [],
|
|
386
|
+
kind: MarketplaceReferenceKind.LocalFileUri,
|
|
387
|
+
localRepositoryUri
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
if (scheme !== "http" && scheme !== "https" && scheme !== "ssh") {
|
|
391
|
+
return undefined;
|
|
392
|
+
}
|
|
393
|
+
if (!uri.authority) {
|
|
394
|
+
return undefined;
|
|
395
|
+
}
|
|
396
|
+
const normalizedPath = normalizeGitRepoPath(uri.path);
|
|
397
|
+
if (!normalizedPath) {
|
|
398
|
+
return undefined;
|
|
399
|
+
}
|
|
400
|
+
const sanitizedAuthority = sanitizePathSegment(uri.authority.toLowerCase());
|
|
401
|
+
const pathSegments = ( normalizedPath.slice(1, -4).split("/").map(sanitizePathSegment));
|
|
402
|
+
return {
|
|
403
|
+
rawValue,
|
|
404
|
+
displayLabel: rawValue,
|
|
405
|
+
cloneUrl: rawValue,
|
|
406
|
+
canonicalId: `git:${uri.authority.toLowerCase()}/${normalizedPath.slice(1).toLowerCase()}`,
|
|
407
|
+
cacheSegments: [sanitizedAuthority, ...pathSegments],
|
|
408
|
+
kind: MarketplaceReferenceKind.GitUri
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
function parseScpMarketplaceReference(rawValue) {
|
|
412
|
+
const match = /^([^@\s]+)@([^:\s]+):(.+\.git)$/i.exec(rawValue);
|
|
413
|
+
if (!match) {
|
|
414
|
+
return undefined;
|
|
415
|
+
}
|
|
416
|
+
const authority = match[2];
|
|
417
|
+
const pathWithGit = match[3].replace(/^\/+/, "");
|
|
418
|
+
if (!pathWithGit.toLowerCase().endsWith(".git")) {
|
|
419
|
+
return undefined;
|
|
420
|
+
}
|
|
421
|
+
const pathSegments = ( pathWithGit.slice(0, -4).split("/").map(sanitizePathSegment));
|
|
422
|
+
return {
|
|
423
|
+
rawValue,
|
|
424
|
+
displayLabel: rawValue,
|
|
425
|
+
cloneUrl: rawValue,
|
|
426
|
+
canonicalId: `git:${authority.toLowerCase()}/${pathWithGit.toLowerCase()}`,
|
|
427
|
+
cacheSegments: [sanitizePathSegment(authority.toLowerCase()), ...pathSegments],
|
|
428
|
+
kind: MarketplaceReferenceKind.GitUri
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
function normalizeGitRepoPath(path) {
|
|
432
|
+
const trimmed = path.replace(/\/+/g, "/").replace(/\/+$/g, "");
|
|
433
|
+
if (!trimmed.toLowerCase().endsWith(".git")) {
|
|
434
|
+
return undefined;
|
|
435
|
+
}
|
|
436
|
+
const withLeadingSlash = trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
|
|
437
|
+
const pathWithoutGit = withLeadingSlash.slice(1, -4);
|
|
438
|
+
if (!pathWithoutGit || !pathWithoutGit.includes("/")) {
|
|
439
|
+
return undefined;
|
|
440
|
+
}
|
|
441
|
+
return withLeadingSlash;
|
|
442
|
+
}
|
|
443
|
+
function getGitHubCanonicalId(owner, repo) {
|
|
444
|
+
return `github:${owner.toLowerCase()}/${repo.toLowerCase()}`;
|
|
445
|
+
}
|
|
446
|
+
function sanitizePathSegment(value) {
|
|
447
|
+
return value.replace(/[\\/:*?"<>|]/g, "_");
|
|
448
|
+
}
|
|
449
|
+
function normalizeMarketplacePath(value) {
|
|
450
|
+
let normalized = value.trim().replace(/\\/g, "/");
|
|
451
|
+
normalized = normalized.replace(/^\.?\/+/, "").replace(/\/+$/g, "");
|
|
452
|
+
return normalized;
|
|
453
|
+
}
|
|
454
|
+
function resolvePluginSource(pluginRoot, source) {
|
|
455
|
+
const normalizedRoot = pluginRoot ? normalizeMarketplacePath(pluginRoot) : "";
|
|
456
|
+
const normalizedSource = normalizeMarketplacePath(source);
|
|
457
|
+
const repoRoot = URI.file("/");
|
|
458
|
+
const pluginRootUri = normalizedRoot ? normalizePath(joinPath(repoRoot, normalizedRoot)) : repoRoot;
|
|
459
|
+
if (!normalizedSource) {
|
|
460
|
+
return normalizedRoot || undefined;
|
|
461
|
+
}
|
|
462
|
+
if (normalizedRoot && (normalizedSource === normalizedRoot || normalizedSource.startsWith(`${normalizedRoot}/`))) {
|
|
463
|
+
return normalizedSource;
|
|
464
|
+
}
|
|
465
|
+
const resolvedUri = normalizePath(joinPath(pluginRootUri, normalizedSource));
|
|
466
|
+
return relativePath(repoRoot, resolvedUri) ?? undefined;
|
|
467
|
+
}
|
|
468
|
+
function getMarketplaceReadmeUri(repo, source) {
|
|
469
|
+
const normalizedSource = source.trim().replace(/^\.?\/+|\/+$/g, "");
|
|
470
|
+
const readmePath = normalizedSource ? `${normalizedSource}/README.md` : "README.md";
|
|
471
|
+
return ( URI.parse(`https://github.com/${repo}/blob/main/${readmePath}`));
|
|
472
|
+
}
|
|
473
|
+
function getMarketplaceReadmeFileUri(repoDir, source) {
|
|
474
|
+
const normalizedSource = source.trim().replace(/^\.?\/+|\/+$/g, "");
|
|
475
|
+
return normalizedSource ? joinPath(repoDir, normalizedSource, "README.md") : joinPath(repoDir, "README.md");
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export { MarketplaceReferenceKind, MarketplaceType, PluginMarketplaceService, parseMarketplaceReference, parseMarketplaceReferences };
|
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js
CHANGED
|
@@ -12,6 +12,7 @@ import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/c
|
|
|
12
12
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
13
13
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
14
14
|
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
|
|
15
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
15
16
|
|
|
16
17
|
var ChatContributionPoint;
|
|
17
18
|
(function(ChatContributionPoint) {
|
|
@@ -24,30 +25,37 @@ function registerChatFilesExtensionPoint(point) {
|
|
|
24
25
|
return ExtensionsRegistry.registerExtensionPoint({
|
|
25
26
|
extensionPoint: point,
|
|
26
27
|
jsonSchema: {
|
|
27
|
-
description: ( localize(
|
|
28
|
+
description: ( localize(6906, "Contributes {0} for chat prompts.", point)),
|
|
28
29
|
type: "array",
|
|
29
30
|
items: {
|
|
30
31
|
additionalProperties: false,
|
|
31
32
|
type: "object",
|
|
32
33
|
defaultSnippets: [{
|
|
33
34
|
body: {
|
|
34
|
-
path: "./relative/path/to/file.md"
|
|
35
|
+
path: point === ChatContributionPoint.chatSkills ? "./relative/path/to/skill-name/SKILL.md" : "./relative/path/to/file.md"
|
|
35
36
|
}
|
|
36
37
|
}],
|
|
37
38
|
required: ["path"],
|
|
38
39
|
properties: {
|
|
39
40
|
path: {
|
|
40
|
-
description:
|
|
41
|
+
description: point === ChatContributionPoint.chatSkills ? ( localize(
|
|
42
|
+
6907,
|
|
43
|
+
"Path to the SKILL.md file relative to the extension root. The folder name must match the \"name\" property in SKILL.md."
|
|
44
|
+
)) : ( localize(6908, "Path to the file relative to the extension root.")),
|
|
41
45
|
type: "string"
|
|
42
46
|
},
|
|
43
47
|
name: {
|
|
44
|
-
description: ( localize(
|
|
45
|
-
deprecationMessage: ( localize(
|
|
48
|
+
description: ( localize(6909, "(Optional) Name for this entry.")),
|
|
49
|
+
deprecationMessage: ( localize(6910, "Specify \"name\" in the prompt file itself instead.")),
|
|
46
50
|
type: "string"
|
|
47
51
|
},
|
|
48
52
|
description: {
|
|
49
|
-
description: ( localize(
|
|
50
|
-
deprecationMessage: ( localize(
|
|
53
|
+
description: ( localize(6911, "(Optional) Description of the entry.")),
|
|
54
|
+
deprecationMessage: ( localize(6912, "Specify \"description\" in the prompt file itself instead.")),
|
|
55
|
+
type: "string"
|
|
56
|
+
},
|
|
57
|
+
when: {
|
|
58
|
+
description: ( localize(6913, "(Optional) A condition which must be true to enable this entry.")),
|
|
51
59
|
type: "string"
|
|
52
60
|
}
|
|
53
61
|
}
|
|
@@ -98,7 +106,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
98
106
|
for (const raw of ext.value) {
|
|
99
107
|
if (!raw.path) {
|
|
100
108
|
ext.collector.error(( localize(
|
|
101
|
-
|
|
109
|
+
6914,
|
|
102
110
|
"Extension '{0}' cannot register {1} entry without path.",
|
|
103
111
|
ext.description.identifier.value,
|
|
104
112
|
contributionPoint
|
|
@@ -108,7 +116,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
108
116
|
const fileUri = joinPath(ext.description.extensionLocation, raw.path);
|
|
109
117
|
if (!isEqualOrParent(fileUri, ext.description.extensionLocation)) {
|
|
110
118
|
ext.collector.error(( localize(
|
|
111
|
-
|
|
119
|
+
6915,
|
|
112
120
|
"Extension '{0}' {1} entry '{2}' resolves outside the extension.",
|
|
113
121
|
ext.description.identifier.value,
|
|
114
122
|
contributionPoint,
|
|
@@ -116,13 +124,24 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
116
124
|
)));
|
|
117
125
|
continue;
|
|
118
126
|
}
|
|
127
|
+
if (raw.when && !ContextKeyExpr.deserialize(raw.when)) {
|
|
128
|
+
ext.collector.error(( localize(
|
|
129
|
+
6916,
|
|
130
|
+
"Extension '{0}' {1} entry '{2}' has an invalid when clause: '{3}'.",
|
|
131
|
+
ext.description.identifier.value,
|
|
132
|
+
contributionPoint,
|
|
133
|
+
raw.path,
|
|
134
|
+
raw.when
|
|
135
|
+
)));
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
119
138
|
try {
|
|
120
|
-
const d = this.promptsService.registerContributedFile(type, fileUri, ext.description, raw.name, raw.description);
|
|
139
|
+
const d = this.promptsService.registerContributedFile(type, fileUri, ext.description, raw.name, raw.description, raw.when);
|
|
121
140
|
this.registrations.set(key(ext.description.identifier, type, raw.path), d);
|
|
122
141
|
} catch (e) {
|
|
123
142
|
const msg = e instanceof Error ? e.message : String(e);
|
|
124
143
|
ext.collector.error(( localize(
|
|
125
|
-
|
|
144
|
+
6917,
|
|
126
145
|
"Extension '{0}' {1}. Failed to register {2}: {3}",
|
|
127
146
|
ext.description.identifier.value,
|
|
128
147
|
contributionPoint,
|
|
@@ -182,7 +201,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
182
201
|
dispose: () => {}
|
|
183
202
|
};
|
|
184
203
|
}
|
|
185
|
-
const headers = [( localize(
|
|
204
|
+
const headers = [( localize(6918, "Name")), ( localize(6919, "Description")), ( localize(6920, "Path"))];
|
|
186
205
|
const rows = ( contributions.map(d => {
|
|
187
206
|
return [d.name ?? "-", d.description ?? "-", d.path];
|
|
188
207
|
}));
|
|
@@ -197,7 +216,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
197
216
|
}
|
|
198
217
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
199
218
|
id: ChatContributionPoint.chatPromptFiles,
|
|
200
|
-
label: ( localize(
|
|
219
|
+
label: ( localize(6921, "Chat Prompt Files")),
|
|
201
220
|
access: {
|
|
202
221
|
canToggle: false
|
|
203
222
|
},
|
|
@@ -205,7 +224,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
205
224
|
});
|
|
206
225
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
207
226
|
id: ChatContributionPoint.chatInstructions,
|
|
208
|
-
label: ( localize(
|
|
227
|
+
label: ( localize(6922, "Chat Instructions")),
|
|
209
228
|
access: {
|
|
210
229
|
canToggle: false
|
|
211
230
|
},
|
|
@@ -213,7 +232,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
213
232
|
});
|
|
214
233
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
215
234
|
id: ChatContributionPoint.chatAgents,
|
|
216
|
-
label: ( localize(
|
|
235
|
+
label: ( localize(6923, "Chat Agents")),
|
|
217
236
|
access: {
|
|
218
237
|
canToggle: false
|
|
219
238
|
},
|
|
@@ -221,7 +240,7 @@ class ChatPromptFilesDataRenderer extends Disposable {
|
|
|
221
240
|
});
|
|
222
241
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
223
242
|
id: ChatContributionPoint.chatSkills,
|
|
224
|
-
label: ( localize(
|
|
243
|
+
label: ( localize(6924, "Chat Skills")),
|
|
225
244
|
access: {
|
|
226
245
|
canToggle: false
|
|
227
246
|
},
|
|
@@ -74,35 +74,6 @@ function parseHooksFromFile(fileUri, json, workspaceRootUri, userHome) {
|
|
|
74
74
|
disabledAllHooks
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function parseHooksIgnoringDisableAll(fileUri, json, workspaceRootUri, userHome) {
|
|
78
|
-
const format = getHookSourceFormat(fileUri);
|
|
79
|
-
let hooks;
|
|
80
|
-
switch (format) {
|
|
81
|
-
case HookSourceFormat.Claude:
|
|
82
|
-
{
|
|
83
|
-
if (json && typeof json === "object") {
|
|
84
|
-
const {
|
|
85
|
-
disableAllHooks: _,
|
|
86
|
-
...rest
|
|
87
|
-
} = json;
|
|
88
|
-
const result = parseClaudeHooks(rest, workspaceRootUri, userHome);
|
|
89
|
-
hooks = result.hooks;
|
|
90
|
-
} else {
|
|
91
|
-
hooks = ( new Map());
|
|
92
|
-
}
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
case HookSourceFormat.Copilot:
|
|
96
|
-
default:
|
|
97
|
-
hooks = parseCopilotHooks(json, workspaceRootUri, userHome);
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
return {
|
|
101
|
-
format,
|
|
102
|
-
hooks,
|
|
103
|
-
disabledAllHooks: true
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
77
|
function buildNewHookEntry(format) {
|
|
107
78
|
const commandEntry = {
|
|
108
79
|
type: "command",
|
|
@@ -117,4 +88,4 @@ function buildNewHookEntry(format) {
|
|
|
117
88
|
return commandEntry;
|
|
118
89
|
}
|
|
119
90
|
|
|
120
|
-
export { HookSourceFormat, buildNewHookEntry, getHookSourceFormat, parseCopilotHooks, parseHooksFromFile
|
|
91
|
+
export { HookSourceFormat, buildNewHookEntry, getHookSourceFormat, parseCopilotHooks, parseHooksFromFile };
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { HookType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema";
|
|
2
|
-
/**
|
|
3
|
-
* Maps Copilot CLI hook type names to our abstract HookType.
|
|
4
|
-
* Copilot CLI uses camelCase names.
|
|
5
|
-
*/
|
|
6
|
-
export declare const COPILOT_CLI_HOOK_TYPE_MAP: Record<string, HookType>;
|
|
7
2
|
/**
|
|
8
3
|
* Resolves a Copilot CLI hook type name to our abstract HookType.
|
|
9
4
|
*/
|