@codingame/monaco-vscode-chat-service-override 26.2.2 → 28.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +35 -2
- 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 +89 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +251 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +123 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +278 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +76 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +299 -0
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +67 -0
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +263 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +85 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +397 -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 +13 -5
- 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 +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +8 -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 +18 -32
- 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 +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +49 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +537 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.js +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/media/agentPluginEditor.css +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +282 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +634 -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 +74 -67
- 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 +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +179 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +987 -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 +246 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +878 -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 +83 -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 +692 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +936 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +702 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.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/simpleBrowserEditorOverlay.js +36 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +622 -391
- 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 +314 -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 +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +170 -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 +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +467 -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 +47 -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 +788 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +32 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +6 -24
- 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/media/chatEditorController.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +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 +24 -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 +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +394 -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/chatTipCatalog.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +245 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.js +234 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +88 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +624 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.js +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +88 -24
- 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 +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +175 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +99 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +489 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +364 -279
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +69 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +9 -9
- 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.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +67 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +187 -74
- 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.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +29 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +8 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +126 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +9 -5
- 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 +46 -9
- 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 +65 -37
- 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 +16 -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 +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +28 -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 +44 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +208 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +19 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +261 -105
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +21 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -2
- 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 +13 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +144 -11
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +36 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +57 -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 +119 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +748 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +146 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +672 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +35 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +3 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +7 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +10 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +26 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +293 -94
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +86 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +121 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +1422 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +48 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +404 -132
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +17 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +40 -28
- 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/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +14 -2
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +54 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +12 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +27 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +265 -25
- 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 +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +302 -69
- 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 +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +63 -21
- 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 +7 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +46 -17
- 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/browser/attachments/chatVariables.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -51
- 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,634 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { getDomNodePagePosition, append, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
5
|
+
import { ActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
6
|
+
import { Action, Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
7
|
+
import { RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
8
|
+
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
9
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
10
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
11
|
+
import { disposeIfDisposable, DisposableStore, MutableDisposable, isDisposable, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
12
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
13
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
14
|
+
import { PagedModel } from '@codingame/monaco-vscode-api/vscode/vs/base/common/paging';
|
|
15
|
+
import { dirname, joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
16
|
+
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
17
|
+
import { Action2, MenuId, registerAction2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
18
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
19
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
20
|
+
import { RawContextKey, ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
21
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
22
|
+
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
23
|
+
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
24
|
+
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
25
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
26
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
27
|
+
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
28
|
+
import { WorkbenchPagedList } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
29
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
30
|
+
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
31
|
+
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
32
|
+
import { getLocationBasedViewColors } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
33
|
+
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
34
|
+
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
35
|
+
import { MODAL_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
36
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
37
|
+
import { VIEW_CONTAINER } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensions.contribution';
|
|
38
|
+
import { manageExtensionIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensionsIcons';
|
|
39
|
+
import { AbstractExtensionsListView } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensionsViews';
|
|
40
|
+
import { extensionsFilterSubMenu, DefaultViewsContext, SearchAgentPluginsContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions';
|
|
41
|
+
import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
42
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
43
|
+
import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
|
|
44
|
+
import { IPluginInstallService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service';
|
|
45
|
+
import { IPluginMarketplaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service';
|
|
46
|
+
import { AgentPluginEditorInput } from './agentPluginEditor/agentPluginEditorInput.js';
|
|
47
|
+
import { AgentPluginItemKind } from './agentPluginEditor/agentPluginItems.js';
|
|
48
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
49
|
+
|
|
50
|
+
var InstallPluginAction_1, EnablePluginAction_1, DisablePluginAction_1, OpenPluginFolderAction_1, OpenPluginReadmeAction_1, ManagePluginAction_1, AgentPluginRenderer_1;
|
|
51
|
+
const HasInstalledAgentPluginsContext = ( new RawContextKey("hasInstalledAgentPlugins", false));
|
|
52
|
+
const InstalledAgentPluginsViewId = "workbench.views.agentPlugins.installed";
|
|
53
|
+
function installedPluginToItem(plugin, labelService) {
|
|
54
|
+
const name = plugin.label;
|
|
55
|
+
const description = plugin.fromMarketplace?.description ?? labelService.getUriLabel(dirname(plugin.uri), {
|
|
56
|
+
relative: true
|
|
57
|
+
});
|
|
58
|
+
const marketplace = plugin.fromMarketplace?.marketplace;
|
|
59
|
+
return {
|
|
60
|
+
kind: AgentPluginItemKind.Installed,
|
|
61
|
+
name,
|
|
62
|
+
description,
|
|
63
|
+
marketplace,
|
|
64
|
+
plugin
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function marketplacePluginToItem(plugin) {
|
|
68
|
+
return {
|
|
69
|
+
kind: AgentPluginItemKind.Marketplace,
|
|
70
|
+
name: plugin.name,
|
|
71
|
+
description: plugin.description,
|
|
72
|
+
source: plugin.source,
|
|
73
|
+
sourceDescriptor: plugin.sourceDescriptor,
|
|
74
|
+
marketplace: plugin.marketplace,
|
|
75
|
+
marketplaceReference: plugin.marketplaceReference,
|
|
76
|
+
marketplaceType: plugin.marketplaceType,
|
|
77
|
+
readmeUri: plugin.readmeUri
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
let InstallPluginAction = class InstallPluginAction extends Action {
|
|
81
|
+
static {
|
|
82
|
+
InstallPluginAction_1 = this;
|
|
83
|
+
}
|
|
84
|
+
static {
|
|
85
|
+
this.ID = "agentPlugin.install";
|
|
86
|
+
}
|
|
87
|
+
constructor(item, pluginInstallService) {
|
|
88
|
+
super(InstallPluginAction_1.ID, ( localize(5024, "Install")), "extension-action label prominent install");
|
|
89
|
+
this.item = item;
|
|
90
|
+
this.pluginInstallService = pluginInstallService;
|
|
91
|
+
}
|
|
92
|
+
async run() {
|
|
93
|
+
await this.pluginInstallService.installPlugin({
|
|
94
|
+
name: this.item.name,
|
|
95
|
+
description: this.item.description,
|
|
96
|
+
version: "",
|
|
97
|
+
source: this.item.source,
|
|
98
|
+
sourceDescriptor: this.item.sourceDescriptor,
|
|
99
|
+
marketplace: this.item.marketplace,
|
|
100
|
+
marketplaceReference: this.item.marketplaceReference,
|
|
101
|
+
marketplaceType: this.item.marketplaceType,
|
|
102
|
+
readmeUri: this.item.readmeUri
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
InstallPluginAction = InstallPluginAction_1 = ( __decorate([( __param(1, IPluginInstallService))], InstallPluginAction));
|
|
107
|
+
let EnablePluginAction = class EnablePluginAction extends Action {
|
|
108
|
+
static {
|
|
109
|
+
EnablePluginAction_1 = this;
|
|
110
|
+
}
|
|
111
|
+
static {
|
|
112
|
+
this.ID = "agentPlugin.enable";
|
|
113
|
+
}
|
|
114
|
+
constructor(plugin, agentPluginService) {
|
|
115
|
+
super(EnablePluginAction_1.ID, ( localize(5025, "Enable")));
|
|
116
|
+
this.plugin = plugin;
|
|
117
|
+
this.agentPluginService = agentPluginService;
|
|
118
|
+
}
|
|
119
|
+
async run() {
|
|
120
|
+
this.agentPluginService.setPluginEnabled(this.plugin.uri, true);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
EnablePluginAction = EnablePluginAction_1 = ( __decorate([( __param(1, IAgentPluginService))], EnablePluginAction));
|
|
124
|
+
let DisablePluginAction = class DisablePluginAction extends Action {
|
|
125
|
+
static {
|
|
126
|
+
DisablePluginAction_1 = this;
|
|
127
|
+
}
|
|
128
|
+
static {
|
|
129
|
+
this.ID = "agentPlugin.disable";
|
|
130
|
+
}
|
|
131
|
+
constructor(plugin, agentPluginService) {
|
|
132
|
+
super(DisablePluginAction_1.ID, ( localize(5026, "Disable")));
|
|
133
|
+
this.plugin = plugin;
|
|
134
|
+
this.agentPluginService = agentPluginService;
|
|
135
|
+
}
|
|
136
|
+
async run() {
|
|
137
|
+
this.agentPluginService.setPluginEnabled(this.plugin.uri, false);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
DisablePluginAction = DisablePluginAction_1 = ( __decorate([( __param(1, IAgentPluginService))], DisablePluginAction));
|
|
141
|
+
class UninstallPluginAction extends Action {
|
|
142
|
+
static {
|
|
143
|
+
this.ID = "agentPlugin.uninstall";
|
|
144
|
+
}
|
|
145
|
+
constructor(plugin) {
|
|
146
|
+
super(UninstallPluginAction.ID, ( localize(5027, "Uninstall")));
|
|
147
|
+
this.plugin = plugin;
|
|
148
|
+
}
|
|
149
|
+
async run() {
|
|
150
|
+
this.plugin.remove();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
let OpenPluginFolderAction = class OpenPluginFolderAction extends Action {
|
|
154
|
+
static {
|
|
155
|
+
OpenPluginFolderAction_1 = this;
|
|
156
|
+
}
|
|
157
|
+
static {
|
|
158
|
+
this.ID = "agentPlugin.openFolder";
|
|
159
|
+
}
|
|
160
|
+
constructor(plugin, commandService, openerService) {
|
|
161
|
+
super(OpenPluginFolderAction_1.ID, ( localize(5028, "Open Plugin Folder")));
|
|
162
|
+
this.plugin = plugin;
|
|
163
|
+
this.commandService = commandService;
|
|
164
|
+
this.openerService = openerService;
|
|
165
|
+
}
|
|
166
|
+
async run() {
|
|
167
|
+
try {
|
|
168
|
+
await this.commandService.executeCommand("revealFileInOS", this.plugin.uri);
|
|
169
|
+
} catch {
|
|
170
|
+
await this.openerService.open(dirname(this.plugin.uri));
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
OpenPluginFolderAction = OpenPluginFolderAction_1 = ( __decorate([( __param(1, ICommandService)), ( __param(2, IOpenerService))], OpenPluginFolderAction));
|
|
175
|
+
let OpenPluginReadmeAction = class OpenPluginReadmeAction extends Action {
|
|
176
|
+
static {
|
|
177
|
+
OpenPluginReadmeAction_1 = this;
|
|
178
|
+
}
|
|
179
|
+
static {
|
|
180
|
+
this.ID = "agentPlugin.openReadme";
|
|
181
|
+
}
|
|
182
|
+
constructor(readmeUri, openerService) {
|
|
183
|
+
super(OpenPluginReadmeAction_1.ID, ( localize(5029, "Open README")));
|
|
184
|
+
this.readmeUri = readmeUri;
|
|
185
|
+
this.openerService = openerService;
|
|
186
|
+
}
|
|
187
|
+
async run() {
|
|
188
|
+
await this.openerService.open(this.readmeUri);
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
OpenPluginReadmeAction = OpenPluginReadmeAction_1 = ( __decorate([( __param(1, IOpenerService))], OpenPluginReadmeAction));
|
|
192
|
+
function getInstalledPluginContextMenuActionGroups(plugin, instantiationService) {
|
|
193
|
+
const groups = [];
|
|
194
|
+
if (plugin.enabled.get()) {
|
|
195
|
+
groups.push([instantiationService.createInstance(DisablePluginAction, plugin)]);
|
|
196
|
+
} else {
|
|
197
|
+
groups.push([instantiationService.createInstance(EnablePluginAction, plugin)]);
|
|
198
|
+
}
|
|
199
|
+
groups.push([
|
|
200
|
+
instantiationService.createInstance(OpenPluginFolderAction, plugin),
|
|
201
|
+
instantiationService.createInstance(OpenPluginReadmeAction, joinPath(plugin.uri, "README.md"))
|
|
202
|
+
]);
|
|
203
|
+
groups.push([instantiationService.createInstance(UninstallPluginAction, plugin)]);
|
|
204
|
+
return groups;
|
|
205
|
+
}
|
|
206
|
+
let ManagePluginAction = class ManagePluginAction extends Action {
|
|
207
|
+
static {
|
|
208
|
+
ManagePluginAction_1 = this;
|
|
209
|
+
}
|
|
210
|
+
static {
|
|
211
|
+
this.ID = "agentPlugin.manage";
|
|
212
|
+
}
|
|
213
|
+
static {
|
|
214
|
+
this.CLASS = `extension-action icon manage ${ThemeIcon.asClassName(manageExtensionIcon)}`;
|
|
215
|
+
}
|
|
216
|
+
constructor(getActionGroups, instantiationService) {
|
|
217
|
+
super(ManagePluginAction_1.ID, "", ManagePluginAction_1.CLASS, true);
|
|
218
|
+
this.getActionGroups = getActionGroups;
|
|
219
|
+
this.instantiationService = instantiationService;
|
|
220
|
+
this._actionViewItem = null;
|
|
221
|
+
this.tooltip = ( localize(5030, "Manage"));
|
|
222
|
+
}
|
|
223
|
+
createActionViewItem(options) {
|
|
224
|
+
this._actionViewItem = this.instantiationService.createInstance(DropDownActionViewItem, this, options);
|
|
225
|
+
return this._actionViewItem;
|
|
226
|
+
}
|
|
227
|
+
async run() {
|
|
228
|
+
this._actionViewItem?.showMenu(this.getActionGroups());
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
ManagePluginAction = ManagePluginAction_1 = ( __decorate([( __param(1, IInstantiationService))], ManagePluginAction));
|
|
232
|
+
let DropDownActionViewItem = class DropDownActionViewItem extends ActionViewItem {
|
|
233
|
+
constructor(action, options, contextMenuService) {
|
|
234
|
+
super(null, action, {
|
|
235
|
+
...options,
|
|
236
|
+
icon: true,
|
|
237
|
+
label: false
|
|
238
|
+
});
|
|
239
|
+
this.contextMenuService = contextMenuService;
|
|
240
|
+
}
|
|
241
|
+
showMenu(actionGroups) {
|
|
242
|
+
if (!this.element) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
const actions = actionGroups.flatMap(group => [...group, ( new Separator())]);
|
|
246
|
+
if (actions.length > 0) {
|
|
247
|
+
actions.pop();
|
|
248
|
+
}
|
|
249
|
+
const {
|
|
250
|
+
left,
|
|
251
|
+
top,
|
|
252
|
+
height
|
|
253
|
+
} = getDomNodePagePosition(this.element);
|
|
254
|
+
this.contextMenuService.showContextMenu({
|
|
255
|
+
getAnchor: () => ({
|
|
256
|
+
x: left,
|
|
257
|
+
y: top + height + 10
|
|
258
|
+
}),
|
|
259
|
+
getActions: () => actions,
|
|
260
|
+
onHide: () => disposeIfDisposable(actions)
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
DropDownActionViewItem = ( __decorate([( __param(2, IContextMenuService))], DropDownActionViewItem));
|
|
265
|
+
let AgentPluginRenderer = class AgentPluginRenderer {
|
|
266
|
+
static {
|
|
267
|
+
AgentPluginRenderer_1 = this;
|
|
268
|
+
}
|
|
269
|
+
static {
|
|
270
|
+
this.templateId = "agentPlugin";
|
|
271
|
+
}
|
|
272
|
+
constructor(instantiationService) {
|
|
273
|
+
this.instantiationService = instantiationService;
|
|
274
|
+
this.templateId = AgentPluginRenderer_1.templateId;
|
|
275
|
+
}
|
|
276
|
+
renderTemplate(root) {
|
|
277
|
+
const element = append(root, $(".agent-plugin-item.extension-list-item"));
|
|
278
|
+
const details = append(element, $(".details"));
|
|
279
|
+
const headerContainer = append(details, $(".header-container"));
|
|
280
|
+
const header = append(headerContainer, $(".header"));
|
|
281
|
+
const name = append(header, $("span.name"));
|
|
282
|
+
const description = append(details, $(".description.ellipsis"));
|
|
283
|
+
const footer = append(details, $(".footer"));
|
|
284
|
+
const detailContainer = append(footer, $(".publisher-container"));
|
|
285
|
+
const detail = append(detailContainer, $("span.publisher-name"));
|
|
286
|
+
const actionbar = ( new ActionBar(footer, {
|
|
287
|
+
focusOnlyEnabledItems: true,
|
|
288
|
+
actionViewItemProvider: (action, options) => {
|
|
289
|
+
if (action instanceof ManagePluginAction) {
|
|
290
|
+
return action.createActionViewItem(options);
|
|
291
|
+
}
|
|
292
|
+
return undefined;
|
|
293
|
+
}
|
|
294
|
+
}));
|
|
295
|
+
actionbar.setFocusable(false);
|
|
296
|
+
return {
|
|
297
|
+
root,
|
|
298
|
+
name,
|
|
299
|
+
description,
|
|
300
|
+
detail,
|
|
301
|
+
actionbar,
|
|
302
|
+
disposables: [actionbar],
|
|
303
|
+
elementDisposables: []
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
renderPlaceholder(_index, data) {
|
|
307
|
+
data.name.textContent = "";
|
|
308
|
+
data.description.textContent = "";
|
|
309
|
+
data.detail.textContent = "";
|
|
310
|
+
data.actionbar.clear();
|
|
311
|
+
this.disposeElement(undefined, 0, data);
|
|
312
|
+
}
|
|
313
|
+
renderElement(element, _index, data) {
|
|
314
|
+
this.disposeElement(undefined, 0, data);
|
|
315
|
+
data.name.textContent = element.name;
|
|
316
|
+
data.description.textContent = element.description;
|
|
317
|
+
data.elementDisposables.push(autorun(reader => {
|
|
318
|
+
data.root.classList.toggle(
|
|
319
|
+
"disabled",
|
|
320
|
+
element.kind === AgentPluginItemKind.Installed && !element.plugin.enabled.read(reader)
|
|
321
|
+
);
|
|
322
|
+
}));
|
|
323
|
+
data.actionbar.clear();
|
|
324
|
+
if (element.kind === AgentPluginItemKind.Marketplace) {
|
|
325
|
+
data.detail.textContent = element.marketplace;
|
|
326
|
+
const installAction = this.instantiationService.createInstance(InstallPluginAction, element);
|
|
327
|
+
data.elementDisposables.push(installAction);
|
|
328
|
+
data.actionbar.push([installAction], {
|
|
329
|
+
icon: true,
|
|
330
|
+
label: true
|
|
331
|
+
});
|
|
332
|
+
} else {
|
|
333
|
+
data.detail.textContent = element.marketplace ?? "";
|
|
334
|
+
const manageAction = this.instantiationService.createInstance(
|
|
335
|
+
ManagePluginAction,
|
|
336
|
+
() => getInstalledPluginContextMenuActionGroups(element.plugin, this.instantiationService)
|
|
337
|
+
);
|
|
338
|
+
data.elementDisposables.push(manageAction);
|
|
339
|
+
data.actionbar.push([manageAction], {
|
|
340
|
+
icon: true,
|
|
341
|
+
label: false
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
disposeElement(_element, _index, data) {
|
|
346
|
+
for (const d of data.elementDisposables) {
|
|
347
|
+
d.dispose();
|
|
348
|
+
}
|
|
349
|
+
data.elementDisposables = [];
|
|
350
|
+
}
|
|
351
|
+
disposeTemplate(data) {
|
|
352
|
+
for (const d of data.disposables) {
|
|
353
|
+
d.dispose();
|
|
354
|
+
}
|
|
355
|
+
this.disposeElement(undefined, 0, data);
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
AgentPluginRenderer = AgentPluginRenderer_1 = ( __decorate([( __param(0, IInstantiationService))], AgentPluginRenderer));
|
|
359
|
+
let AgentPluginsListView = class AgentPluginsListView extends AbstractExtensionsListView {
|
|
360
|
+
constructor(
|
|
361
|
+
listOptions,
|
|
362
|
+
options,
|
|
363
|
+
keybindingService,
|
|
364
|
+
contextMenuService,
|
|
365
|
+
instantiationService,
|
|
366
|
+
themeService,
|
|
367
|
+
hoverService,
|
|
368
|
+
configurationService,
|
|
369
|
+
contextKeyService,
|
|
370
|
+
viewDescriptorService,
|
|
371
|
+
openerService,
|
|
372
|
+
agentPluginService,
|
|
373
|
+
pluginMarketplaceService,
|
|
374
|
+
pluginInstallService,
|
|
375
|
+
labelService,
|
|
376
|
+
editorService
|
|
377
|
+
) {
|
|
378
|
+
super(
|
|
379
|
+
options,
|
|
380
|
+
keybindingService,
|
|
381
|
+
contextMenuService,
|
|
382
|
+
configurationService,
|
|
383
|
+
contextKeyService,
|
|
384
|
+
viewDescriptorService,
|
|
385
|
+
instantiationService,
|
|
386
|
+
openerService,
|
|
387
|
+
themeService,
|
|
388
|
+
hoverService
|
|
389
|
+
);
|
|
390
|
+
this.listOptions = listOptions;
|
|
391
|
+
this.agentPluginService = agentPluginService;
|
|
392
|
+
this.pluginMarketplaceService = pluginMarketplaceService;
|
|
393
|
+
this.pluginInstallService = pluginInstallService;
|
|
394
|
+
this.labelService = labelService;
|
|
395
|
+
this.editorService = editorService;
|
|
396
|
+
this.actionStore = this._register(( new DisposableStore()));
|
|
397
|
+
this.queryCts = ( new MutableDisposable());
|
|
398
|
+
this.list = null;
|
|
399
|
+
this.listContainer = null;
|
|
400
|
+
this.currentQuery = "@agentPlugins";
|
|
401
|
+
this.refreshOnPluginsChangedScheduler = this._register(( new RunOnceScheduler(() => {
|
|
402
|
+
if (this.list) {
|
|
403
|
+
void this.show(this.currentQuery);
|
|
404
|
+
}
|
|
405
|
+
}, 0)));
|
|
406
|
+
this._register(autorun(reader => {
|
|
407
|
+
this.agentPluginService.plugins.read(reader);
|
|
408
|
+
if (this.list && this.isBodyVisible()) {
|
|
409
|
+
this.refreshOnPluginsChangedScheduler.schedule();
|
|
410
|
+
}
|
|
411
|
+
}));
|
|
412
|
+
this._register(this.pluginMarketplaceService.onDidChangeMarketplaces(() => {
|
|
413
|
+
if (this.list && this.isBodyVisible()) {
|
|
414
|
+
this.refreshOnPluginsChangedScheduler.schedule();
|
|
415
|
+
}
|
|
416
|
+
}));
|
|
417
|
+
}
|
|
418
|
+
renderBody(container) {
|
|
419
|
+
super.renderBody(container);
|
|
420
|
+
const messageContainer = append(container, $(".message-container"));
|
|
421
|
+
const messageBox = append(messageContainer, $(".message"));
|
|
422
|
+
const pluginsList = $(".agent-plugins-list");
|
|
423
|
+
this.bodyTemplate = {
|
|
424
|
+
pluginsList,
|
|
425
|
+
messageBox,
|
|
426
|
+
messageContainer
|
|
427
|
+
};
|
|
428
|
+
this.listContainer = append(container, pluginsList);
|
|
429
|
+
this.list = this._register(
|
|
430
|
+
this.instantiationService.createInstance(WorkbenchPagedList, `${this.id}-Agent-Plugins`, this.listContainer, {
|
|
431
|
+
getHeight() {
|
|
432
|
+
return 72;
|
|
433
|
+
},
|
|
434
|
+
getTemplateId: () => AgentPluginRenderer.templateId
|
|
435
|
+
}, [this.instantiationService.createInstance(AgentPluginRenderer)], {
|
|
436
|
+
multipleSelectionSupport: false,
|
|
437
|
+
setRowLineHeight: false,
|
|
438
|
+
horizontalScrolling: false,
|
|
439
|
+
accessibilityProvider: {
|
|
440
|
+
getAriaLabel(item) {
|
|
441
|
+
return item?.name ?? "";
|
|
442
|
+
},
|
|
443
|
+
getWidgetAriaLabel() {
|
|
444
|
+
return localize(5031, "Agent Plugins");
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
overrideStyles: getLocationBasedViewColors(this.viewDescriptorService.getViewLocationById(this.id)).listOverrideStyles
|
|
448
|
+
})
|
|
449
|
+
);
|
|
450
|
+
this._register(this.list.onContextMenu(e => this.onContextMenu(e), this));
|
|
451
|
+
this._register(Event.debounce(
|
|
452
|
+
Event.filter(this.list.onDidOpen, e => e.element !== null),
|
|
453
|
+
(_, event) => event,
|
|
454
|
+
75,
|
|
455
|
+
true
|
|
456
|
+
)(options => {
|
|
457
|
+
this.editorService.openEditor(
|
|
458
|
+
this.instantiationService.createInstance(AgentPluginEditorInput, options.element),
|
|
459
|
+
options.editorOptions,
|
|
460
|
+
MODAL_GROUP
|
|
461
|
+
);
|
|
462
|
+
}));
|
|
463
|
+
}
|
|
464
|
+
onContextMenu(e) {
|
|
465
|
+
if (!e.element) {
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
const actions = this.getContextMenuActions(e.element);
|
|
469
|
+
if (actions.length === 0) {
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
this.contextMenuService.showContextMenu({
|
|
473
|
+
getAnchor: () => e.anchor,
|
|
474
|
+
getActions: () => actions
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
getContextMenuActions(item) {
|
|
478
|
+
let actions;
|
|
479
|
+
if (item.kind === AgentPluginItemKind.Installed) {
|
|
480
|
+
const groups = getInstalledPluginContextMenuActionGroups(item.plugin, this.instantiationService);
|
|
481
|
+
actions = groups.flatMap(group => [...group, ( new Separator())]);
|
|
482
|
+
if (actions.length > 0) {
|
|
483
|
+
actions.pop();
|
|
484
|
+
}
|
|
485
|
+
} else {
|
|
486
|
+
actions = [];
|
|
487
|
+
if (item.readmeUri) {
|
|
488
|
+
actions.push(
|
|
489
|
+
this.instantiationService.createInstance(OpenPluginReadmeAction, item.readmeUri)
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
actions.push(this.instantiationService.createInstance(InstallPluginAction, item));
|
|
493
|
+
}
|
|
494
|
+
this.actionStore.clear();
|
|
495
|
+
for (const action of actions) {
|
|
496
|
+
if (isDisposable(action)) {
|
|
497
|
+
this.actionStore.add(action);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
return actions;
|
|
501
|
+
}
|
|
502
|
+
layoutBody(height, width) {
|
|
503
|
+
super.layoutBody(height, width);
|
|
504
|
+
this.list?.layout(height, width);
|
|
505
|
+
}
|
|
506
|
+
async show(query) {
|
|
507
|
+
this.currentQuery = query;
|
|
508
|
+
const text = query.replace(/@agentPlugins/i, "").trim().toLowerCase();
|
|
509
|
+
let installed = this.queryInstalled();
|
|
510
|
+
if (text) {
|
|
511
|
+
installed = installed.filter(
|
|
512
|
+
p => p.name.toLowerCase().includes(text) || p.description.toLowerCase().includes(text)
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
let items = installed;
|
|
516
|
+
if (!this.listOptions.installedOnly) {
|
|
517
|
+
const marketplace = await this.queryMarketplace(text);
|
|
518
|
+
const installedPaths = ( new Set(( installed.map(i => ( i.plugin.uri.toString())))));
|
|
519
|
+
const filteredMarketplace = marketplace.filter(m => {
|
|
520
|
+
const expectedUri = this.pluginInstallService.getPluginInstallUri({
|
|
521
|
+
name: m.name,
|
|
522
|
+
description: m.description,
|
|
523
|
+
version: "",
|
|
524
|
+
source: m.source,
|
|
525
|
+
sourceDescriptor: m.sourceDescriptor,
|
|
526
|
+
marketplace: m.marketplace,
|
|
527
|
+
marketplaceReference: m.marketplaceReference,
|
|
528
|
+
marketplaceType: m.marketplaceType
|
|
529
|
+
});
|
|
530
|
+
return !( installedPaths.has(( expectedUri.toString())));
|
|
531
|
+
});
|
|
532
|
+
items = [...installed, ...filteredMarketplace];
|
|
533
|
+
}
|
|
534
|
+
const model = ( new PagedModel(items));
|
|
535
|
+
if (this.list) {
|
|
536
|
+
this.list.model = model;
|
|
537
|
+
}
|
|
538
|
+
this.updateBody(model.length);
|
|
539
|
+
return model;
|
|
540
|
+
}
|
|
541
|
+
queryInstalled() {
|
|
542
|
+
const allPlugins = this.agentPluginService.allPlugins.get();
|
|
543
|
+
return ( allPlugins.map(p => installedPluginToItem(p, this.labelService)));
|
|
544
|
+
}
|
|
545
|
+
async queryMarketplace(text) {
|
|
546
|
+
this.queryCts.value?.cancel();
|
|
547
|
+
const cts = ( new CancellationTokenSource());
|
|
548
|
+
this.queryCts.value = cts;
|
|
549
|
+
try {
|
|
550
|
+
const plugins = await this.pluginMarketplaceService.fetchMarketplacePlugins(cts.token);
|
|
551
|
+
const lowerText = text.toLowerCase();
|
|
552
|
+
return ( plugins.filter(
|
|
553
|
+
p => p.name.toLowerCase().includes(lowerText) || p.description.toLowerCase().includes(lowerText)
|
|
554
|
+
).map(marketplacePluginToItem));
|
|
555
|
+
} catch {
|
|
556
|
+
return [];
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
updateBody(count) {
|
|
560
|
+
if (this.bodyTemplate) {
|
|
561
|
+
this.bodyTemplate.pluginsList.classList.toggle("hidden", count === 0);
|
|
562
|
+
this.bodyTemplate.messageContainer.classList.toggle("hidden", count > 0);
|
|
563
|
+
if (count === 0 && this.isBodyVisible()) {
|
|
564
|
+
this.bodyTemplate.messageBox.textContent = ( localize(5032, "No agent plugins found."));
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
AgentPluginsListView = ( __decorate([( __param(2, IKeybindingService)), ( __param(3, IContextMenuService)), ( __param(4, IInstantiationService)), ( __param(5, IThemeService)), ( __param(6, IHoverService)), ( __param(7, IConfigurationService)), ( __param(8, IContextKeyService)), ( __param(9, IViewDescriptorService)), ( __param(10, IOpenerService)), ( __param(11, IAgentPluginService)), ( __param(12, IPluginMarketplaceService)), ( __param(13, IPluginInstallService)), ( __param(14, ILabelService)), ( __param(15, IEditorService))], AgentPluginsListView));
|
|
570
|
+
class AgentPluginsBrowseCommand extends Action2 {
|
|
571
|
+
constructor() {
|
|
572
|
+
super({
|
|
573
|
+
id: "workbench.agentPlugins.browse",
|
|
574
|
+
title: ( localize2(5033, "Agent Plugins")),
|
|
575
|
+
tooltip: ( localize2(5034, "Browse Agent Plugins")),
|
|
576
|
+
icon: Codicon.search,
|
|
577
|
+
precondition: ( ChatContextKeys.Setup.hidden.negate()),
|
|
578
|
+
menu: [{
|
|
579
|
+
id: extensionsFilterSubMenu,
|
|
580
|
+
group: "1_predefined",
|
|
581
|
+
order: 2,
|
|
582
|
+
when: ( ChatContextKeys.Setup.hidden.negate())
|
|
583
|
+
}, {
|
|
584
|
+
id: MenuId.ViewTitle,
|
|
585
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("view", InstalledAgentPluginsViewId)), ( ChatContextKeys.Setup.hidden.negate()))),
|
|
586
|
+
group: "navigation"
|
|
587
|
+
}]
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
async run(accessor) {
|
|
591
|
+
accessor.get(IExtensionsWorkbenchService).openSearch("@agentPlugins ");
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
let AgentPluginsViewsContribution = class AgentPluginsViewsContribution extends Disposable {
|
|
595
|
+
static {
|
|
596
|
+
this.ID = "workbench.chat.agentPlugins.views.contribution";
|
|
597
|
+
}
|
|
598
|
+
constructor(contextKeyService, agentPluginService) {
|
|
599
|
+
super();
|
|
600
|
+
const hasInstalledKey = HasInstalledAgentPluginsContext.bindTo(contextKeyService);
|
|
601
|
+
this._register(autorun(reader => {
|
|
602
|
+
hasInstalledKey.set(agentPluginService.allPlugins.read(reader).length > 0);
|
|
603
|
+
}));
|
|
604
|
+
registerAction2(AgentPluginsBrowseCommand);
|
|
605
|
+
( Registry.as(Extensions.ViewsRegistry)).registerViews([{
|
|
606
|
+
id: InstalledAgentPluginsViewId,
|
|
607
|
+
name: ( localize2(5035, "Agent Plugins - Installed")),
|
|
608
|
+
ctorDescriptor: ( new SyncDescriptor(AgentPluginsListView, [{
|
|
609
|
+
installedOnly: true
|
|
610
|
+
}])),
|
|
611
|
+
when: ( ContextKeyExpr.and(DefaultViewsContext, HasInstalledAgentPluginsContext, ( ChatContextKeys.Setup.hidden.negate()))),
|
|
612
|
+
weight: 30,
|
|
613
|
+
order: 5,
|
|
614
|
+
canToggleVisibility: true
|
|
615
|
+
}, {
|
|
616
|
+
id: "workbench.views.agentPlugins.default.marketplace",
|
|
617
|
+
name: ( localize2(5036, "Agent Plugins")),
|
|
618
|
+
ctorDescriptor: ( new SyncDescriptor(AgentPluginsListView, [{}])),
|
|
619
|
+
when: ( ContextKeyExpr.and(DefaultViewsContext, ( HasInstalledAgentPluginsContext.toNegated()), ( ChatContextKeys.Setup.hidden.negate()))),
|
|
620
|
+
weight: 30,
|
|
621
|
+
order: 5,
|
|
622
|
+
canToggleVisibility: true,
|
|
623
|
+
hideByDefault: true
|
|
624
|
+
}, {
|
|
625
|
+
id: "workbench.views.agentPlugins.marketplace",
|
|
626
|
+
name: ( localize2(5036, "Agent Plugins")),
|
|
627
|
+
ctorDescriptor: ( new SyncDescriptor(AgentPluginsListView, [{}])),
|
|
628
|
+
when: ( ContextKeyExpr.and(SearchAgentPluginsContext, ( ChatContextKeys.Setup.hidden.negate())))
|
|
629
|
+
}], VIEW_CONTAINER);
|
|
630
|
+
}
|
|
631
|
+
};
|
|
632
|
+
AgentPluginsViewsContribution = ( __decorate([( __param(0, IContextKeyService)), ( __param(1, IAgentPluginService))], AgentPluginsViewsContribution));
|
|
633
|
+
|
|
634
|
+
export { AgentPluginsListView, AgentPluginsViewsContribution, HasInstalledAgentPluginsContext, InstalledAgentPluginsViewId };
|