@codingame/monaco-vscode-chat-service-override 28.4.1 → 29.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 +18 -12
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +300 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.js +31 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +84 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +16 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +488 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +424 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +50 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +202 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +114 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +723 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +33 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +40 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +22 -0
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +29 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +76 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +162 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +167 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +52 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +97 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +78 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +174 -170
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +118 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +13 -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.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +23 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +341 -196
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +79 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +22 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +85 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +668 -214
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +306 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +84 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +651 -81
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +31 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +9 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -142
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +25 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +297 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +153 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +111 -171
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +5 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +277 -186
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +31 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +4 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +18 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +112 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +16 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +41 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +1 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +8 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +13 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +29 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +14 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +79 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +113 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +18 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +54 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +8 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +103 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +48 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +28 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +62 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +21 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +17 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +43 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +194 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +81 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +22 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +19 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +105 -172
- 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 +80 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +56 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +70 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +33 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +21 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +362 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +90 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +146 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +10 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +33 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +200 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +90 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +21 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +22 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +28 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +20 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +68 -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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +57 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +21 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +171 -57
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +7 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +206 -35
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +11 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +44 -22
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +450 -301
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +34 -20
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +209 -144
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +205 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +191 -159
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +210 -233
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +19 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +183 -193
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +8 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +97 -35
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +67 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +62 -23
- 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 +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +23 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +50 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +21 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +124 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +20 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +10 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +46 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +74 -37
- 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/commandLineAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +24 -14
- 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/commandLineAnalyzer/commandLineSandboxAnalyzer.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +5 -1
- 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 +1 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +66 -64
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +5 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +390 -114
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +21 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +70 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +61 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +94 -76
- 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 +19 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +112 -21
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +0 -53
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +0 -219
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +0 -89
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +0 -251
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -123
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +0 -278
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +0 -76
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +0 -299
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +0 -67
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +0 -263
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +0 -85
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +0 -397
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +0 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +0 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +0 -28
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -190
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -20
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
4
4
|
import { timeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
5
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
6
|
import { DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
7
|
import { isWindows } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
7
|
-
import { dirname, joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
8
|
+
import { dirname, joinPath, isEqualOrParent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
8
9
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
9
10
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
10
11
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
@@ -35,7 +36,7 @@ function gitRevisionCacheSuffix(ref, sha) {
|
|
|
35
36
|
function showGitOutputAction(commandService) {
|
|
36
37
|
return (new Action(
|
|
37
38
|
"showGitOutput",
|
|
38
|
-
localize(
|
|
39
|
+
localize(6398, "Show Git Output"),
|
|
39
40
|
undefined,
|
|
40
41
|
true,
|
|
41
42
|
() => {
|
|
@@ -68,65 +69,81 @@ let AbstractGitPluginSource = class AbstractGitPluginSource {
|
|
|
68
69
|
this._progressService = _progressService;
|
|
69
70
|
}
|
|
70
71
|
getCleanupTarget(cacheRoot, descriptor) {
|
|
72
|
+
return this._getRepoDir(cacheRoot, descriptor);
|
|
73
|
+
}
|
|
74
|
+
_getRepoDir(cacheRoot, descriptor) {
|
|
71
75
|
return this.getInstallUri(cacheRoot, descriptor);
|
|
72
76
|
}
|
|
73
77
|
async ensure(cacheRoot, plugin, options) {
|
|
74
78
|
const descriptor = plugin.sourceDescriptor;
|
|
75
|
-
const repoDir = this.
|
|
79
|
+
const repoDir = this._getRepoDir(cacheRoot, descriptor);
|
|
76
80
|
const repoExists = await this._fileService.exists(repoDir);
|
|
77
81
|
const label = this._displayLabel(descriptor);
|
|
78
82
|
if (repoExists) {
|
|
79
83
|
await this._checkoutRevision(repoDir, descriptor, options?.failureLabel ?? label);
|
|
80
|
-
return
|
|
84
|
+
return this.getInstallUri(cacheRoot, descriptor);
|
|
81
85
|
}
|
|
82
|
-
const progressTitle = options?.progressTitle ?? ( localize(
|
|
86
|
+
const progressTitle = options?.progressTitle ?? ( localize(6399, "Cloning plugin source '{0}'...", label));
|
|
83
87
|
const failureLabel = options?.failureLabel ?? label;
|
|
84
88
|
const ref = descriptor.ref;
|
|
85
89
|
await this._cloneRepository(repoDir, this._cloneUrl(descriptor), progressTitle, failureLabel, ref);
|
|
86
90
|
await this._checkoutRevision(repoDir, descriptor, failureLabel);
|
|
87
|
-
return
|
|
91
|
+
return this.getInstallUri(cacheRoot, descriptor);
|
|
88
92
|
}
|
|
89
93
|
async update(cacheRoot, plugin, options) {
|
|
90
94
|
const descriptor = plugin.sourceDescriptor;
|
|
91
|
-
const repoDir = this.
|
|
95
|
+
const repoDir = this._getRepoDir(cacheRoot, descriptor);
|
|
92
96
|
const repoExists = await this._fileService.exists(repoDir);
|
|
93
97
|
if (!repoExists) {
|
|
94
98
|
this._logService.warn(
|
|
95
99
|
`[${this.kind}] Cannot update plugin '${options?.pluginName ?? plugin.name}': source repository not cloned`
|
|
96
100
|
);
|
|
97
|
-
return;
|
|
101
|
+
return false;
|
|
98
102
|
}
|
|
99
103
|
const updateLabel = options?.pluginName ?? plugin.name;
|
|
100
104
|
const failureLabel = options?.failureLabel ?? updateLabel;
|
|
101
105
|
try {
|
|
102
|
-
|
|
103
|
-
location: ProgressLocation.Notification,
|
|
104
|
-
title: ( localize(6250, "Updating plugin '{0}'...", updateLabel)),
|
|
105
|
-
cancellable: false
|
|
106
|
-
}, async () => {
|
|
106
|
+
const doUpdate = async () => {
|
|
107
107
|
await this._commandService.executeCommand("git.openRepository", repoDir.fsPath);
|
|
108
108
|
const git = descriptor;
|
|
109
|
+
let changed;
|
|
109
110
|
if (git.sha) {
|
|
111
|
+
const headBefore = await this._commandService.executeCommand("_git.revParse", repoDir.fsPath, "HEAD").catch(() => undefined);
|
|
110
112
|
await this._commandService.executeCommand("git.fetch", repoDir.fsPath);
|
|
113
|
+
await this._checkoutRevision(repoDir, descriptor, failureLabel);
|
|
114
|
+
const headAfter = await this._commandService.executeCommand("_git.revParse", repoDir.fsPath, "HEAD").catch(() => undefined);
|
|
115
|
+
changed = headBefore !== headAfter;
|
|
111
116
|
} else {
|
|
112
|
-
await this._commandService.executeCommand("_git.pull", repoDir.fsPath);
|
|
117
|
+
changed = !!(await this._commandService.executeCommand("_git.pull", repoDir.fsPath));
|
|
118
|
+
await this._checkoutRevision(repoDir, descriptor, failureLabel);
|
|
113
119
|
}
|
|
114
|
-
|
|
115
|
-
}
|
|
120
|
+
return changed;
|
|
121
|
+
};
|
|
122
|
+
if (options?.silent) {
|
|
123
|
+
return await doUpdate();
|
|
124
|
+
}
|
|
125
|
+
return await this._progressService.withProgress({
|
|
126
|
+
location: ProgressLocation.Notification,
|
|
127
|
+
title: ( localize(6400, "Updating plugin '{0}'...", updateLabel)),
|
|
128
|
+
cancellable: false
|
|
129
|
+
}, doUpdate);
|
|
116
130
|
} catch (err) {
|
|
117
131
|
this._logService.error(`[${this.kind}] Failed to update plugin source '${updateLabel}':`, err);
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
if (!options?.silent) {
|
|
133
|
+
this._notificationService.notify({
|
|
134
|
+
severity: Severity.Error,
|
|
135
|
+
message: ( localize(
|
|
136
|
+
6401,
|
|
137
|
+
"Failed to update plugin '{0}': {1}",
|
|
138
|
+
failureLabel,
|
|
139
|
+
err?.message ?? String(err)
|
|
140
|
+
)),
|
|
141
|
+
actions: {
|
|
142
|
+
primary: [showGitOutputAction(this._commandService)]
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
throw err;
|
|
130
147
|
}
|
|
131
148
|
}
|
|
132
149
|
async _cloneRepository(repoDir, cloneUrl, progressTitle, failureLabel, ref) {
|
|
@@ -144,7 +161,7 @@ let AbstractGitPluginSource = class AbstractGitPluginSource {
|
|
|
144
161
|
this._notificationService.notify({
|
|
145
162
|
severity: Severity.Error,
|
|
146
163
|
message: ( localize(
|
|
147
|
-
|
|
164
|
+
6402,
|
|
148
165
|
"Failed to install plugin '{0}': {1}",
|
|
149
166
|
failureLabel,
|
|
150
167
|
err?.message ?? String(err)
|
|
@@ -172,7 +189,7 @@ let AbstractGitPluginSource = class AbstractGitPluginSource {
|
|
|
172
189
|
this._notificationService.notify({
|
|
173
190
|
severity: Severity.Error,
|
|
174
191
|
message: ( localize(
|
|
175
|
-
|
|
192
|
+
6403,
|
|
176
193
|
"Failed to checkout plugin '{0}' to requested revision: {1}",
|
|
177
194
|
failureLabel,
|
|
178
195
|
err?.message ?? String(err)
|
|
@@ -212,6 +229,20 @@ class GitHubPluginSource extends AbstractGitPluginSource {
|
|
|
212
229
|
this.kind = PluginSourceKind.GitHub;
|
|
213
230
|
}
|
|
214
231
|
getInstallUri(cacheRoot, descriptor) {
|
|
232
|
+
const repoDir = this._getRepoDir(cacheRoot, descriptor);
|
|
233
|
+
const gh = descriptor;
|
|
234
|
+
if (gh.path) {
|
|
235
|
+
const normalizedPath = gh.path.trim().replace(/^\.?\/+|\/+$/g, "");
|
|
236
|
+
if (normalizedPath) {
|
|
237
|
+
const target = joinPath(repoDir, normalizedPath);
|
|
238
|
+
if (isEqualOrParent(target, repoDir)) {
|
|
239
|
+
return target;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return repoDir;
|
|
244
|
+
}
|
|
245
|
+
_getRepoDir(cacheRoot, descriptor) {
|
|
215
246
|
const gh = descriptor;
|
|
216
247
|
const [owner, repo] = gh.repo.split("/");
|
|
217
248
|
return joinPath(
|
|
@@ -223,7 +254,8 @@ class GitHubPluginSource extends AbstractGitPluginSource {
|
|
|
223
254
|
);
|
|
224
255
|
}
|
|
225
256
|
getLabel(descriptor) {
|
|
226
|
-
|
|
257
|
+
const gh = descriptor;
|
|
258
|
+
return gh.path ? `${gh.repo}/${gh.path}` : gh.repo;
|
|
227
259
|
}
|
|
228
260
|
_cloneUrl(descriptor) {
|
|
229
261
|
return `https://github.com/${descriptor.repo}.git`;
|
|
@@ -294,16 +326,19 @@ let AbstractPackagePluginSource = class AbstractPackagePluginSource {
|
|
|
294
326
|
async update(cacheRoot, plugin, _options) {
|
|
295
327
|
const installDir = this._getCacheDir(cacheRoot, plugin.sourceDescriptor);
|
|
296
328
|
const pluginDir = this.getInstallUri(cacheRoot, plugin.sourceDescriptor);
|
|
297
|
-
await this.runInstall(installDir, pluginDir, plugin
|
|
329
|
+
await this.runInstall(installDir, pluginDir, plugin, {
|
|
330
|
+
silent: _options?.silent
|
|
331
|
+
});
|
|
332
|
+
return true;
|
|
298
333
|
}
|
|
299
|
-
async runInstall(installDir, pluginDir, plugin) {
|
|
334
|
+
async runInstall(installDir, pluginDir, plugin, options) {
|
|
300
335
|
const args = this._buildInstallArgs(installDir, plugin);
|
|
301
336
|
const command = formatShellCommand(args);
|
|
302
|
-
const confirmed = await this._confirmTerminalCommand(plugin.name, command);
|
|
337
|
+
const confirmed = await this._confirmTerminalCommand(plugin.name, command, options?.silent);
|
|
303
338
|
if (!confirmed) {
|
|
304
339
|
return undefined;
|
|
305
340
|
}
|
|
306
|
-
const progressTitle = ( localize(
|
|
341
|
+
const progressTitle = ( localize(6404, "Installing {0} plugin '{1}'...", this._managerName, plugin.name));
|
|
307
342
|
const {
|
|
308
343
|
success,
|
|
309
344
|
terminal
|
|
@@ -316,7 +351,7 @@ let AbstractPackagePluginSource = class AbstractPackagePluginSource {
|
|
|
316
351
|
this._notificationService.notify({
|
|
317
352
|
severity: Severity.Error,
|
|
318
353
|
message: ( localize(
|
|
319
|
-
|
|
354
|
+
6405,
|
|
320
355
|
"{0} package '{1}' was not found after installation.",
|
|
321
356
|
this._managerName,
|
|
322
357
|
this.getLabel(plugin.sourceDescriptor)
|
|
@@ -329,14 +364,26 @@ let AbstractPackagePluginSource = class AbstractPackagePluginSource {
|
|
|
329
364
|
pluginDir
|
|
330
365
|
};
|
|
331
366
|
}
|
|
332
|
-
async _confirmTerminalCommand(pluginName, command) {
|
|
367
|
+
async _confirmTerminalCommand(pluginName, command, silent) {
|
|
368
|
+
if (silent) {
|
|
369
|
+
return (new Promise(resolve => {
|
|
370
|
+
const n = this._notificationService.notify({
|
|
371
|
+
severity: Severity.Info,
|
|
372
|
+
message: ( localize(6406, "Plugin '{0}' wants to run: {1}", pluginName, command)),
|
|
373
|
+
actions: {
|
|
374
|
+
primary: [( new Action("installPlugin", ( localize(6407, "Install")), undefined, true, async () => resolve(true)))]
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
Event.once(n.onDidClose)(() => resolve(false));
|
|
378
|
+
}));
|
|
379
|
+
}
|
|
333
380
|
const {
|
|
334
381
|
confirmed
|
|
335
382
|
} = await this._dialogService.confirm({
|
|
336
383
|
type: "question",
|
|
337
|
-
message: ( localize(
|
|
338
|
-
detail: ( localize(
|
|
339
|
-
primaryButton: ( localize(
|
|
384
|
+
message: ( localize(6408, "Install Plugin '{0}'?", pluginName)),
|
|
385
|
+
detail: ( localize(6409, "This will run the following command in a terminal:\n\n{0}", command)),
|
|
386
|
+
primaryButton: ( localize(6410, "&&Install"))
|
|
340
387
|
});
|
|
341
388
|
return confirmed;
|
|
342
389
|
}
|
|
@@ -350,7 +397,7 @@ let AbstractPackagePluginSource = class AbstractPackagePluginSource {
|
|
|
350
397
|
}, async () => {
|
|
351
398
|
terminal = await this._terminalService.createTerminal({
|
|
352
399
|
config: {
|
|
353
|
-
name: ( localize(
|
|
400
|
+
name: ( localize(6411, "Plugin Install")),
|
|
354
401
|
forceShellIntegration: true,
|
|
355
402
|
isTransient: true,
|
|
356
403
|
isFeatureTerminal: true
|
|
@@ -362,7 +409,7 @@ let AbstractPackagePluginSource = class AbstractPackagePluginSource {
|
|
|
362
409
|
await terminal.runCommand(command, true);
|
|
363
410
|
const exitCode = await commandResultPromise;
|
|
364
411
|
if (exitCode !== 0) {
|
|
365
|
-
throw ( new Error(( localize(
|
|
412
|
+
throw ( new Error(( localize(6412, "Command exited with code {0}", exitCode))));
|
|
366
413
|
}
|
|
367
414
|
});
|
|
368
415
|
return {
|
|
@@ -374,7 +421,7 @@ let AbstractPackagePluginSource = class AbstractPackagePluginSource {
|
|
|
374
421
|
this._notificationService.notify({
|
|
375
422
|
severity: Severity.Error,
|
|
376
423
|
message: ( localize(
|
|
377
|
-
|
|
424
|
+
6413,
|
|
378
425
|
"Plugin installation command failed: {0}",
|
|
379
426
|
err?.message ?? String(err)
|
|
380
427
|
))
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
+
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
5
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
6
|
+
import { IURLHandler } from "@codingame/monaco-vscode-api/vscode/vs/platform/url/common/url";
|
|
7
|
+
import { IURLService } from "@codingame/monaco-vscode-api/vscode/vs/platform/url/common/url.service";
|
|
8
|
+
import { IHostService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service";
|
|
9
|
+
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
10
|
+
import { IPluginInstallService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service";
|
|
11
|
+
/**
|
|
12
|
+
* Handles `vscode://chat-plugin/install?source=<base64>` and
|
|
13
|
+
* `vscode://chat-plugin/add-marketplace?ref=<base64>` URLs.
|
|
14
|
+
*
|
|
15
|
+
* The `source` / `ref` query parameter is a base64-encoded `owner/repo` or
|
|
16
|
+
* git clone URL. A confirmation dialog is always shown before any action.
|
|
17
|
+
*/
|
|
18
|
+
export declare class PluginUrlHandler extends Disposable implements IWorkbenchContribution, IURLHandler {
|
|
19
|
+
private readonly _pluginInstallService;
|
|
20
|
+
private readonly _dialogService;
|
|
21
|
+
private readonly _configurationService;
|
|
22
|
+
private readonly _hostService;
|
|
23
|
+
private readonly _logService;
|
|
24
|
+
static readonly ID = "workbench.contrib.pluginUrlHandler";
|
|
25
|
+
constructor(urlService: IURLService, _pluginInstallService: IPluginInstallService, _dialogService: IDialogService, _configurationService: IConfigurationService, _hostService: IHostService, _logService: ILogService);
|
|
26
|
+
handleURL(uri: URI): Promise<boolean>;
|
|
27
|
+
private _handleInstall;
|
|
28
|
+
private _handleAddMarketplace;
|
|
29
|
+
/**
|
|
30
|
+
* Reads a query parameter and attempts to parse it as a marketplace
|
|
31
|
+
* reference. Tries base64-decoding first, then falls back to the raw
|
|
32
|
+
* value so that plain-text `owner/repo` values also work in URLs.
|
|
33
|
+
*/
|
|
34
|
+
private _decodeQueryParam;
|
|
35
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { mainWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/window';
|
|
4
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
5
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
7
|
+
import { ConfigurationTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
|
|
8
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
|
+
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
10
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
11
|
+
import { IURLService } from '@codingame/monaco-vscode-api/vscode/vs/platform/url/common/url.service';
|
|
12
|
+
import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
|
|
13
|
+
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
14
|
+
import { parseMarketplaceReference, MarketplaceReferenceKind, parseMarketplaceReferences } from '../common/plugins/marketplaceReference.js';
|
|
15
|
+
import { IPluginInstallService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service';
|
|
16
|
+
import { decodeBase64 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
17
|
+
|
|
18
|
+
let PluginUrlHandler = class PluginUrlHandler extends Disposable {
|
|
19
|
+
static {
|
|
20
|
+
this.ID = "workbench.contrib.pluginUrlHandler";
|
|
21
|
+
}
|
|
22
|
+
constructor(
|
|
23
|
+
urlService,
|
|
24
|
+
_pluginInstallService,
|
|
25
|
+
_dialogService,
|
|
26
|
+
_configurationService,
|
|
27
|
+
_hostService,
|
|
28
|
+
_logService
|
|
29
|
+
) {
|
|
30
|
+
super();
|
|
31
|
+
this._pluginInstallService = _pluginInstallService;
|
|
32
|
+
this._dialogService = _dialogService;
|
|
33
|
+
this._configurationService = _configurationService;
|
|
34
|
+
this._hostService = _hostService;
|
|
35
|
+
this._logService = _logService;
|
|
36
|
+
this._register(urlService.registerHandler(this));
|
|
37
|
+
}
|
|
38
|
+
async handleURL(uri) {
|
|
39
|
+
if (uri.authority !== "chat-plugin") {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
switch (uri.path) {
|
|
43
|
+
case "/install":
|
|
44
|
+
return this._handleInstall(uri);
|
|
45
|
+
case "/add-marketplace":
|
|
46
|
+
return this._handleAddMarketplace(uri);
|
|
47
|
+
default:
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async _handleInstall(uri) {
|
|
52
|
+
const source = this._decodeQueryParam(uri, "source");
|
|
53
|
+
if (!source) {
|
|
54
|
+
this._logService.warn("[PluginUrlHandler] Missing or invalid \"source\" query parameter");
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
const ref = parseMarketplaceReference(source);
|
|
58
|
+
if (!ref) {
|
|
59
|
+
this._logService.warn(`[PluginUrlHandler] Invalid plugin source: ${source}`);
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
if (ref.kind === MarketplaceReferenceKind.LocalFileUri) {
|
|
63
|
+
this._logService.warn("[PluginUrlHandler] Local file URIs are not supported for install");
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
await this._hostService.focus(mainWindow);
|
|
67
|
+
const {
|
|
68
|
+
confirmed
|
|
69
|
+
} = await this._dialogService.confirm({
|
|
70
|
+
type: "question",
|
|
71
|
+
message: ( localize(6414, "Install Plugin from '{0}'?", ref.displayLabel)),
|
|
72
|
+
detail: ( localize(
|
|
73
|
+
6415,
|
|
74
|
+
"An external application wants to install a plugin from this source. Plugins can run code on your machine. Only install plugins from sources you trust.\n\nSource: {0}",
|
|
75
|
+
ref.rawValue
|
|
76
|
+
)),
|
|
77
|
+
primaryButton: ( localize(6416, "&&Install")),
|
|
78
|
+
custom: {
|
|
79
|
+
icon: Codicon.shield
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
if (!confirmed) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
await this._pluginInstallService.installPluginFromSource(source);
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
async _handleAddMarketplace(uri) {
|
|
89
|
+
const refValue = this._decodeQueryParam(uri, "ref");
|
|
90
|
+
if (!refValue) {
|
|
91
|
+
this._logService.warn("[PluginUrlHandler] Missing or invalid \"ref\" query parameter");
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
const ref = parseMarketplaceReference(refValue);
|
|
95
|
+
if (!ref) {
|
|
96
|
+
this._logService.warn(`[PluginUrlHandler] Invalid marketplace reference: ${refValue}`);
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
await this._hostService.focus(mainWindow);
|
|
100
|
+
const {
|
|
101
|
+
confirmed
|
|
102
|
+
} = await this._dialogService.confirm({
|
|
103
|
+
type: "question",
|
|
104
|
+
message: ( localize(6417, "Add Plugin Marketplace '{0}'?", ref.displayLabel)),
|
|
105
|
+
detail: ( localize(
|
|
106
|
+
6418,
|
|
107
|
+
"An external application wants to add a plugin marketplace. Plugins from this marketplace will appear in the plugin catalog and can be installed.\n\nSource: {0}",
|
|
108
|
+
ref.rawValue
|
|
109
|
+
)),
|
|
110
|
+
primaryButton: ( localize(6419, "&&Add Marketplace")),
|
|
111
|
+
custom: {
|
|
112
|
+
icon: Codicon.shield
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
if (!confirmed) {
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
const existing = this._configurationService.getValue(ChatConfiguration.PluginMarketplaces) ?? [];
|
|
119
|
+
const existingRefs = parseMarketplaceReferences(existing);
|
|
120
|
+
if (!( existingRefs.some(e => e.canonicalId === ref.canonicalId))) {
|
|
121
|
+
await this._configurationService.updateValue(
|
|
122
|
+
ChatConfiguration.PluginMarketplaces,
|
|
123
|
+
[...existing, refValue],
|
|
124
|
+
ConfigurationTarget.USER
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
_decodeQueryParam(uri, key) {
|
|
130
|
+
const params = ( new URLSearchParams(uri.query));
|
|
131
|
+
const raw = params.get(key);
|
|
132
|
+
if (!raw) {
|
|
133
|
+
return undefined;
|
|
134
|
+
}
|
|
135
|
+
try {
|
|
136
|
+
const decoded = ( decodeBase64(raw).toString());
|
|
137
|
+
if (parseMarketplaceReference(decoded)) {
|
|
138
|
+
return decoded;
|
|
139
|
+
}
|
|
140
|
+
} catch {}
|
|
141
|
+
return raw;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
PluginUrlHandler = ( __decorate([( __param(0, IURLService)), ( __param(1, IPluginInstallService)), ( __param(2, IDialogService)), ( __param(3, IConfigurationService)), ( __param(4, IHostService)), ( __param(5, ILogService))], PluginUrlHandler));
|
|
145
|
+
|
|
146
|
+
export { PluginUrlHandler };
|
|
@@ -17,7 +17,7 @@ class ConfigAgentActionImpl extends Action2 {
|
|
|
17
17
|
const openerService = accessor.get(IOpenerService);
|
|
18
18
|
const pickers = instaService.createInstance(PromptFilePickers);
|
|
19
19
|
const placeholder = ( localize(
|
|
20
|
-
|
|
20
|
+
6426,
|
|
21
21
|
"Select the custom agents to open and configure visibility in the agent picker"
|
|
22
22
|
));
|
|
23
23
|
const result = await pickers.selectPromptFile({
|
|
@@ -35,8 +35,8 @@ const PICKER_CONFIGURE_AGENTS_ACTION_ID = "workbench.action.chat.picker.customag
|
|
|
35
35
|
function createPickerConfigureAgentsActionConfig(disabled) {
|
|
36
36
|
const config = {
|
|
37
37
|
id: disabled ? PICKER_CONFIGURE_AGENTS_ACTION_ID + ".disabled" : PICKER_CONFIGURE_AGENTS_ACTION_ID,
|
|
38
|
-
title: ( localize2(
|
|
39
|
-
tooltip: disabled ? ( localize(
|
|
38
|
+
title: ( localize2(6427, "Configure Custom Agents...")),
|
|
39
|
+
tooltip: disabled ? ( localize(6428, "Managed by your organization")) : undefined,
|
|
40
40
|
icon: disabled ? Codicon.lock : undefined,
|
|
41
41
|
category: CHAT_CATEGORY,
|
|
42
42
|
f1: false,
|
|
@@ -62,8 +62,8 @@ const CONFIGURE_AGENTS_ACTION_ID = "workbench.action.chat.configure.customagents
|
|
|
62
62
|
function createManageAgentsActionConfig(disabled) {
|
|
63
63
|
const base = {
|
|
64
64
|
id: disabled ? CONFIGURE_AGENTS_ACTION_ID + ".disabled" : CONFIGURE_AGENTS_ACTION_ID,
|
|
65
|
-
title: ( localize2(
|
|
66
|
-
shortTitle: ( localize(
|
|
65
|
+
title: ( localize2(6429, "Configure Custom Agents...")),
|
|
66
|
+
shortTitle: ( localize(6430, "Custom Agents")),
|
|
67
67
|
icon: disabled ? Codicon.lock : Codicon.bookmark,
|
|
68
68
|
f1: !disabled,
|
|
69
69
|
precondition: disabled ? ( ContextKeyExpr.false()) : ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeys.Modes.agentModeDisabledByPolicy.negate()))),
|
|
@@ -77,7 +77,7 @@ function createManageAgentsActionConfig(disabled) {
|
|
|
77
77
|
};
|
|
78
78
|
return disabled ? {
|
|
79
79
|
...base,
|
|
80
|
-
tooltip: ( localize(
|
|
80
|
+
tooltip: ( localize(6428, "Managed by your organization"))
|
|
81
81
|
} : base;
|
|
82
82
|
}
|
|
83
83
|
class ManageAgentsAction extends ConfigAgentActionImpl {
|