@codingame/monaco-vscode-chat-service-override 32.0.0 → 32.0.2
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 +1 -0
- package/package.json +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +637 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +53 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +22 -22
- 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/aiCustomization/aiCustomizationIcons.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +97 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +43 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +58 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +50 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +51 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +229 -229
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.view.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.view.contribution.js +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +99 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +43 -43
- 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.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +57 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
- 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.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
- 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 +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -6
- 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/editor/chatInputCompletions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
- 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.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- 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.js +150 -150
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
- 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 +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- 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/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +10 -10
- 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
|
@@ -0,0 +1,637 @@
|
|
|
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, CancellationToken } 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 } 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 { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
19
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
20
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
21
|
+
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
22
|
+
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
23
|
+
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
24
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
25
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
26
|
+
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
27
|
+
import { WorkbenchPagedList } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
28
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
29
|
+
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
30
|
+
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
31
|
+
import { getLocationBasedViewColors } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
32
|
+
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
33
|
+
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
34
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
35
|
+
import { VIEW_CONTAINER } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensions.contribution';
|
|
36
|
+
import { manageExtensionIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensionsIcons';
|
|
37
|
+
import { AbstractExtensionsListView } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensionsViews';
|
|
38
|
+
import { extensionsFilterSubMenu, DefaultViewsContext, SearchAgentPluginsContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions';
|
|
39
|
+
import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
40
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
41
|
+
import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
|
|
42
|
+
import { isContributionEnabled } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/enablement';
|
|
43
|
+
import { IPluginInstallService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service';
|
|
44
|
+
import { hasSourceChanged } from '../common/plugins/pluginMarketplaceService.js';
|
|
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 { InstallPluginAction, getInstalledPluginContextMenuActions, OpenPluginReadmeAction } from './agentPluginActions.js';
|
|
49
|
+
import { InstalledAgentPluginsViewId, HasInstalledAgentPluginsContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
50
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
51
|
+
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
52
|
+
|
|
53
|
+
var UpdatePluginAction_1, ManagePluginAction_1, AgentPluginRenderer_1;
|
|
54
|
+
function installedPluginToItem(plugin, labelService, outdated) {
|
|
55
|
+
const name = plugin.label;
|
|
56
|
+
const description = plugin.fromMarketplace?.description ?? labelService.getUriLabel(dirname(plugin.uri), {
|
|
57
|
+
relative: true
|
|
58
|
+
});
|
|
59
|
+
const marketplace = plugin.fromMarketplace?.marketplace;
|
|
60
|
+
return {
|
|
61
|
+
kind: AgentPluginItemKind.Installed,
|
|
62
|
+
name,
|
|
63
|
+
description,
|
|
64
|
+
marketplace,
|
|
65
|
+
plugin,
|
|
66
|
+
outdated
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function marketplacePluginToItem(plugin) {
|
|
70
|
+
return {
|
|
71
|
+
kind: AgentPluginItemKind.Marketplace,
|
|
72
|
+
name: plugin.name,
|
|
73
|
+
description: plugin.description,
|
|
74
|
+
source: plugin.source,
|
|
75
|
+
sourceDescriptor: plugin.sourceDescriptor,
|
|
76
|
+
marketplace: plugin.marketplace,
|
|
77
|
+
marketplaceReference: plugin.marketplaceReference,
|
|
78
|
+
marketplaceType: plugin.marketplaceType,
|
|
79
|
+
readmeUri: plugin.readmeUri
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
let UpdatePluginAction = class UpdatePluginAction extends Action {
|
|
83
|
+
static {
|
|
84
|
+
UpdatePluginAction_1 = this;
|
|
85
|
+
}
|
|
86
|
+
static {
|
|
87
|
+
this.ID = "agentPlugin.update";
|
|
88
|
+
}
|
|
89
|
+
constructor(
|
|
90
|
+
plugin,
|
|
91
|
+
liveMarketplacePlugin,
|
|
92
|
+
pluginInstallService,
|
|
93
|
+
pluginMarketplaceService
|
|
94
|
+
) {
|
|
95
|
+
super(UpdatePluginAction_1.ID, ( localize(5158, "Update")), "extension-action label prominent install");
|
|
96
|
+
this.plugin = plugin;
|
|
97
|
+
this.liveMarketplacePlugin = liveMarketplacePlugin;
|
|
98
|
+
this.pluginInstallService = pluginInstallService;
|
|
99
|
+
this.pluginMarketplaceService = pluginMarketplaceService;
|
|
100
|
+
}
|
|
101
|
+
async run() {
|
|
102
|
+
if (await this.pluginInstallService.updatePlugin(this.liveMarketplacePlugin)) {
|
|
103
|
+
this.pluginMarketplaceService.addInstalledPlugin(this.plugin.uri, this.liveMarketplacePlugin);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
UpdatePluginAction = UpdatePluginAction_1 = ( __decorate([( __param(2, IPluginInstallService)), ( __param(3, IPluginMarketplaceService))], UpdatePluginAction));
|
|
108
|
+
let ManagePluginAction = class ManagePluginAction extends Action {
|
|
109
|
+
static {
|
|
110
|
+
ManagePluginAction_1 = this;
|
|
111
|
+
}
|
|
112
|
+
static {
|
|
113
|
+
this.ID = "agentPlugin.manage";
|
|
114
|
+
}
|
|
115
|
+
static {
|
|
116
|
+
this.CLASS = `extension-action icon manage ${ThemeIcon.asClassName(manageExtensionIcon)}`;
|
|
117
|
+
}
|
|
118
|
+
constructor(getActionGroups, instantiationService) {
|
|
119
|
+
super(ManagePluginAction_1.ID, "", ManagePluginAction_1.CLASS, true);
|
|
120
|
+
this.getActionGroups = getActionGroups;
|
|
121
|
+
this.instantiationService = instantiationService;
|
|
122
|
+
this._actionViewItem = null;
|
|
123
|
+
this.tooltip = ( localize(5159, "Manage"));
|
|
124
|
+
}
|
|
125
|
+
createActionViewItem(options) {
|
|
126
|
+
this._actionViewItem = this.instantiationService.createInstance(DropDownActionViewItem, this, options);
|
|
127
|
+
return this._actionViewItem;
|
|
128
|
+
}
|
|
129
|
+
async run() {
|
|
130
|
+
this._actionViewItem?.showMenu(this.getActionGroups());
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
ManagePluginAction = ManagePluginAction_1 = ( __decorate([( __param(1, IInstantiationService))], ManagePluginAction));
|
|
134
|
+
let DropDownActionViewItem = class DropDownActionViewItem extends ActionViewItem {
|
|
135
|
+
constructor(action, options, contextMenuService) {
|
|
136
|
+
super(null, action, {
|
|
137
|
+
...options,
|
|
138
|
+
icon: true,
|
|
139
|
+
label: false
|
|
140
|
+
});
|
|
141
|
+
this.contextMenuService = contextMenuService;
|
|
142
|
+
}
|
|
143
|
+
showMenu(actionGroups) {
|
|
144
|
+
if (!this.element) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const actions = actionGroups.flatMap(group => [...group, ( new Separator())]);
|
|
148
|
+
if (actions.length > 0) {
|
|
149
|
+
actions.pop();
|
|
150
|
+
}
|
|
151
|
+
const {
|
|
152
|
+
left,
|
|
153
|
+
top,
|
|
154
|
+
height
|
|
155
|
+
} = getDomNodePagePosition(this.element);
|
|
156
|
+
this.contextMenuService.showContextMenu({
|
|
157
|
+
getAnchor: () => ({
|
|
158
|
+
x: left,
|
|
159
|
+
y: top + height + 10
|
|
160
|
+
}),
|
|
161
|
+
getActions: () => actions,
|
|
162
|
+
onHide: () => disposeIfDisposable(actions)
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
DropDownActionViewItem = ( __decorate([( __param(2, IContextMenuService))], DropDownActionViewItem));
|
|
167
|
+
let AgentPluginRenderer = class AgentPluginRenderer {
|
|
168
|
+
static {
|
|
169
|
+
AgentPluginRenderer_1 = this;
|
|
170
|
+
}
|
|
171
|
+
static {
|
|
172
|
+
this.templateId = "agentPlugin";
|
|
173
|
+
}
|
|
174
|
+
constructor(instantiationService) {
|
|
175
|
+
this.instantiationService = instantiationService;
|
|
176
|
+
this.templateId = AgentPluginRenderer_1.templateId;
|
|
177
|
+
}
|
|
178
|
+
renderTemplate(root) {
|
|
179
|
+
const element = append(root, $(".agent-plugin-item.extension-list-item"));
|
|
180
|
+
const details = append(element, $(".details"));
|
|
181
|
+
const headerContainer = append(details, $(".header-container"));
|
|
182
|
+
const header = append(headerContainer, $(".header"));
|
|
183
|
+
const name = append(header, $("span.name"));
|
|
184
|
+
const description = append(details, $(".description.ellipsis"));
|
|
185
|
+
const footer = append(details, $(".footer"));
|
|
186
|
+
const detailContainer = append(footer, $(".publisher-container"));
|
|
187
|
+
const detail = append(detailContainer, $("span.publisher-name"));
|
|
188
|
+
const actionbar = ( new ActionBar(footer, {
|
|
189
|
+
focusOnlyEnabledItems: true,
|
|
190
|
+
actionViewItemProvider: (action, options) => {
|
|
191
|
+
if (action instanceof ManagePluginAction) {
|
|
192
|
+
return action.createActionViewItem(options);
|
|
193
|
+
}
|
|
194
|
+
return undefined;
|
|
195
|
+
}
|
|
196
|
+
}));
|
|
197
|
+
actionbar.setFocusable(false);
|
|
198
|
+
return {
|
|
199
|
+
root,
|
|
200
|
+
name,
|
|
201
|
+
description,
|
|
202
|
+
detail,
|
|
203
|
+
actionbar,
|
|
204
|
+
disposables: [actionbar],
|
|
205
|
+
elementDisposables: []
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
renderPlaceholder(_index, data) {
|
|
209
|
+
data.name.textContent = "";
|
|
210
|
+
data.description.textContent = "";
|
|
211
|
+
data.detail.textContent = "";
|
|
212
|
+
data.actionbar.clear();
|
|
213
|
+
this.disposeElement(undefined, 0, data);
|
|
214
|
+
}
|
|
215
|
+
renderElement(element, _index, data) {
|
|
216
|
+
this.disposeElement(undefined, 0, data);
|
|
217
|
+
data.name.textContent = element.name;
|
|
218
|
+
data.description.textContent = element.description;
|
|
219
|
+
data.elementDisposables.push(autorun(reader => {
|
|
220
|
+
data.root.classList.toggle(
|
|
221
|
+
"disabled",
|
|
222
|
+
element.kind === AgentPluginItemKind.Installed && !isContributionEnabled(element.plugin.enablement.read(reader))
|
|
223
|
+
);
|
|
224
|
+
}));
|
|
225
|
+
const updateActions = reader => {
|
|
226
|
+
data.actionbar.clear();
|
|
227
|
+
if (element.kind === AgentPluginItemKind.Marketplace) {
|
|
228
|
+
data.detail.textContent = element.marketplace;
|
|
229
|
+
const installAction = this.instantiationService.createInstance(InstallPluginAction, element);
|
|
230
|
+
reader.store.add(installAction);
|
|
231
|
+
data.actionbar.push([installAction], {
|
|
232
|
+
icon: true,
|
|
233
|
+
label: true
|
|
234
|
+
});
|
|
235
|
+
} else {
|
|
236
|
+
data.detail.textContent = element.marketplace ?? "";
|
|
237
|
+
const actions = [];
|
|
238
|
+
const livePlugin = element.outdated?.read(reader);
|
|
239
|
+
if (livePlugin) {
|
|
240
|
+
const updateAction = this.instantiationService.createInstance(UpdatePluginAction, element.plugin, livePlugin);
|
|
241
|
+
reader.store.add(updateAction);
|
|
242
|
+
actions.push(updateAction);
|
|
243
|
+
}
|
|
244
|
+
const manageAction = this.instantiationService.createInstance(
|
|
245
|
+
ManagePluginAction,
|
|
246
|
+
() => getInstalledPluginContextMenuActions(element.plugin, this.instantiationService)
|
|
247
|
+
);
|
|
248
|
+
reader.store.add(manageAction);
|
|
249
|
+
actions.push(manageAction);
|
|
250
|
+
data.actionbar.push(actions, {
|
|
251
|
+
icon: true,
|
|
252
|
+
label: true
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
data.elementDisposables.push(autorun(updateActions));
|
|
257
|
+
}
|
|
258
|
+
disposeElement(_element, _index, data) {
|
|
259
|
+
for (const d of data.elementDisposables) {
|
|
260
|
+
d.dispose();
|
|
261
|
+
}
|
|
262
|
+
data.elementDisposables = [];
|
|
263
|
+
}
|
|
264
|
+
disposeTemplate(data) {
|
|
265
|
+
for (const d of data.disposables) {
|
|
266
|
+
d.dispose();
|
|
267
|
+
}
|
|
268
|
+
this.disposeElement(undefined, 0, data);
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
AgentPluginRenderer = AgentPluginRenderer_1 = ( __decorate([( __param(0, IInstantiationService))], AgentPluginRenderer));
|
|
272
|
+
let AgentPluginsListView = class AgentPluginsListView extends AbstractExtensionsListView {
|
|
273
|
+
constructor(
|
|
274
|
+
listOptions,
|
|
275
|
+
options,
|
|
276
|
+
keybindingService,
|
|
277
|
+
contextMenuService,
|
|
278
|
+
instantiationService,
|
|
279
|
+
themeService,
|
|
280
|
+
hoverService,
|
|
281
|
+
configurationService,
|
|
282
|
+
contextKeyService,
|
|
283
|
+
viewDescriptorService,
|
|
284
|
+
openerService,
|
|
285
|
+
agentPluginService,
|
|
286
|
+
pluginMarketplaceService,
|
|
287
|
+
pluginInstallService,
|
|
288
|
+
labelService,
|
|
289
|
+
editorService
|
|
290
|
+
) {
|
|
291
|
+
super(
|
|
292
|
+
options,
|
|
293
|
+
keybindingService,
|
|
294
|
+
contextMenuService,
|
|
295
|
+
configurationService,
|
|
296
|
+
contextKeyService,
|
|
297
|
+
viewDescriptorService,
|
|
298
|
+
instantiationService,
|
|
299
|
+
openerService,
|
|
300
|
+
themeService,
|
|
301
|
+
hoverService
|
|
302
|
+
);
|
|
303
|
+
this.listOptions = listOptions;
|
|
304
|
+
this.agentPluginService = agentPluginService;
|
|
305
|
+
this.pluginMarketplaceService = pluginMarketplaceService;
|
|
306
|
+
this.pluginInstallService = pluginInstallService;
|
|
307
|
+
this.labelService = labelService;
|
|
308
|
+
this.editorService = editorService;
|
|
309
|
+
this.actionStore = this._register(( new DisposableStore()));
|
|
310
|
+
this.queryCts = ( new MutableDisposable());
|
|
311
|
+
this.list = null;
|
|
312
|
+
this.listContainer = null;
|
|
313
|
+
this.currentQuery = "@agentPlugins";
|
|
314
|
+
this.refreshOnPluginsChangedScheduler = this._register(( new RunOnceScheduler(() => {
|
|
315
|
+
if (this.list) {
|
|
316
|
+
void this.show(this.currentQuery);
|
|
317
|
+
}
|
|
318
|
+
}, 0)));
|
|
319
|
+
this._register(autorun(reader => {
|
|
320
|
+
const plugins = this.agentPluginService.plugins.read(reader);
|
|
321
|
+
for (const plugin of plugins) {
|
|
322
|
+
plugin.enablement.read(reader);
|
|
323
|
+
}
|
|
324
|
+
if (this.list && this.isBodyVisible()) {
|
|
325
|
+
this.refreshOnPluginsChangedScheduler.schedule();
|
|
326
|
+
}
|
|
327
|
+
}));
|
|
328
|
+
this._register(this.pluginMarketplaceService.onDidChangeMarketplaces(() => {
|
|
329
|
+
if (this.list && this.isBodyVisible()) {
|
|
330
|
+
this.refreshOnPluginsChangedScheduler.schedule();
|
|
331
|
+
}
|
|
332
|
+
}));
|
|
333
|
+
}
|
|
334
|
+
renderBody(container) {
|
|
335
|
+
super.renderBody(container);
|
|
336
|
+
const messageContainer = append(container, $(".message-container"));
|
|
337
|
+
const messageBox = append(messageContainer, $(".message"));
|
|
338
|
+
const pluginsList = $(".agent-plugins-list");
|
|
339
|
+
this.bodyTemplate = {
|
|
340
|
+
pluginsList,
|
|
341
|
+
messageBox,
|
|
342
|
+
messageContainer
|
|
343
|
+
};
|
|
344
|
+
this.listContainer = append(container, pluginsList);
|
|
345
|
+
this.list = this._register(
|
|
346
|
+
this.instantiationService.createInstance(WorkbenchPagedList, `${this.id}-Agent-Plugins`, this.listContainer, {
|
|
347
|
+
getHeight() {
|
|
348
|
+
return 72;
|
|
349
|
+
},
|
|
350
|
+
getTemplateId: () => AgentPluginRenderer.templateId
|
|
351
|
+
}, [this.instantiationService.createInstance(AgentPluginRenderer)], {
|
|
352
|
+
multipleSelectionSupport: false,
|
|
353
|
+
setRowLineHeight: false,
|
|
354
|
+
horizontalScrolling: false,
|
|
355
|
+
accessibilityProvider: {
|
|
356
|
+
getAriaLabel(item) {
|
|
357
|
+
return item?.name ?? "";
|
|
358
|
+
},
|
|
359
|
+
getWidgetAriaLabel() {
|
|
360
|
+
return localize(5160, "Agent Plugins");
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
overrideStyles: getLocationBasedViewColors(this.viewDescriptorService.getViewLocationById(this.id)).listOverrideStyles
|
|
364
|
+
})
|
|
365
|
+
);
|
|
366
|
+
this._register(this.list.onContextMenu(e => this.onContextMenu(e), this));
|
|
367
|
+
this._register(Event.debounce(
|
|
368
|
+
Event.filter(this.list.onDidOpen, e => e.element !== null),
|
|
369
|
+
(_, event) => event,
|
|
370
|
+
75,
|
|
371
|
+
true
|
|
372
|
+
)(options => {
|
|
373
|
+
this.editorService.openEditor(
|
|
374
|
+
this.instantiationService.createInstance(AgentPluginEditorInput, options.element),
|
|
375
|
+
options.editorOptions
|
|
376
|
+
);
|
|
377
|
+
}));
|
|
378
|
+
}
|
|
379
|
+
onContextMenu(e) {
|
|
380
|
+
if (!e.element) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
const actions = this.getContextMenuActions(e.element);
|
|
384
|
+
if (actions.length === 0) {
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
this.contextMenuService.showContextMenu({
|
|
388
|
+
getAnchor: () => e.anchor,
|
|
389
|
+
getActions: () => actions
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
getContextMenuActions(item) {
|
|
393
|
+
let actions;
|
|
394
|
+
if (item.kind === AgentPluginItemKind.Installed) {
|
|
395
|
+
const groups = getInstalledPluginContextMenuActions(item.plugin, this.instantiationService);
|
|
396
|
+
actions = groups.flatMap(group => [...group, ( new Separator())]);
|
|
397
|
+
if (actions.length > 0) {
|
|
398
|
+
actions.pop();
|
|
399
|
+
}
|
|
400
|
+
} else {
|
|
401
|
+
actions = [];
|
|
402
|
+
if (item.readmeUri) {
|
|
403
|
+
actions.push(
|
|
404
|
+
this.instantiationService.createInstance(OpenPluginReadmeAction, item.readmeUri)
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
actions.push(this.instantiationService.createInstance(InstallPluginAction, item));
|
|
408
|
+
}
|
|
409
|
+
this.actionStore.clear();
|
|
410
|
+
for (const action of actions) {
|
|
411
|
+
if (isDisposable(action)) {
|
|
412
|
+
this.actionStore.add(action);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
return actions;
|
|
416
|
+
}
|
|
417
|
+
layoutBody(height, width) {
|
|
418
|
+
super.layoutBody(height, width);
|
|
419
|
+
this.list?.layout(height, width);
|
|
420
|
+
}
|
|
421
|
+
async show(query) {
|
|
422
|
+
this.currentQuery = query;
|
|
423
|
+
const stripped = query.replace(/@agentPlugins/i, "").trim();
|
|
424
|
+
const isRecommended = /^@recommended$/i.test(stripped);
|
|
425
|
+
const isInstalled = /(?:^|\s)@installed(?:\s|$)/i.test(stripped);
|
|
426
|
+
const text = isRecommended ? "" : stripped.replace(/(?:^|\s)@installed(?:\s|$)/gi, " ").trim().toLowerCase();
|
|
427
|
+
let installed = this.queryInstalled();
|
|
428
|
+
if (text) {
|
|
429
|
+
installed = installed.filter(
|
|
430
|
+
p => p.name.toLowerCase().includes(text) || p.description.toLowerCase().includes(text) || (p.marketplace ?? "").toLowerCase().includes(text)
|
|
431
|
+
);
|
|
432
|
+
}
|
|
433
|
+
if (isRecommended) {
|
|
434
|
+
const recommended = this.pluginMarketplaceService.recommendedPlugins.get();
|
|
435
|
+
installed = installed.filter(p => {
|
|
436
|
+
const marketplace = p.plugin.fromMarketplace;
|
|
437
|
+
if (!marketplace) {
|
|
438
|
+
return false;
|
|
439
|
+
}
|
|
440
|
+
const key = `${marketplace.name}@${marketplace.marketplace}`;
|
|
441
|
+
return ( recommended.has(key));
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
let items = installed;
|
|
445
|
+
if (!this.listOptions.installedOnly && !isInstalled) {
|
|
446
|
+
const marketplacePlugins = await this.queryMarketplacePlugins();
|
|
447
|
+
let filteredMp = marketplacePlugins;
|
|
448
|
+
if (isRecommended) {
|
|
449
|
+
const recommended = this.pluginMarketplaceService.recommendedPlugins.get();
|
|
450
|
+
filteredMp = filteredMp.filter(p => {
|
|
451
|
+
const key = `${p.name}@${p.marketplace}`;
|
|
452
|
+
return ( recommended.has(key));
|
|
453
|
+
});
|
|
454
|
+
} else {
|
|
455
|
+
const lowerText = text.toLowerCase();
|
|
456
|
+
filteredMp = filteredMp.filter(
|
|
457
|
+
p => p.name.toLowerCase().includes(lowerText) || p.description.toLowerCase().includes(lowerText) || p.marketplace.toLowerCase().includes(lowerText)
|
|
458
|
+
);
|
|
459
|
+
}
|
|
460
|
+
const marketplace = ( filteredMp.map(marketplacePluginToItem));
|
|
461
|
+
const installedPaths = ( new Set(( installed.map(i => ( i.plugin.uri.toString())))));
|
|
462
|
+
const filteredMarketplace = marketplace.filter(m => {
|
|
463
|
+
const expectedUri = this.pluginInstallService.getPluginInstallUri({
|
|
464
|
+
name: m.name,
|
|
465
|
+
description: m.description,
|
|
466
|
+
version: "",
|
|
467
|
+
source: m.source,
|
|
468
|
+
sourceDescriptor: m.sourceDescriptor,
|
|
469
|
+
marketplace: m.marketplace,
|
|
470
|
+
marketplaceReference: m.marketplaceReference,
|
|
471
|
+
marketplaceType: m.marketplaceType
|
|
472
|
+
});
|
|
473
|
+
return !( installedPaths.has(( expectedUri.toString())));
|
|
474
|
+
});
|
|
475
|
+
items = [...installed, ...filteredMarketplace];
|
|
476
|
+
}
|
|
477
|
+
const model = ( new PagedModel(items));
|
|
478
|
+
if (this.list) {
|
|
479
|
+
this.list.model = model;
|
|
480
|
+
}
|
|
481
|
+
this.updateBody(model.length);
|
|
482
|
+
return model;
|
|
483
|
+
}
|
|
484
|
+
queryInstalled() {
|
|
485
|
+
const marketplaceObs = derived(reader => {
|
|
486
|
+
const cachedMarketplace = this.pluginMarketplaceService.lastFetchedPlugins.read(reader);
|
|
487
|
+
const marketplaceByKey = ( new Map());
|
|
488
|
+
for (const mp of cachedMarketplace) {
|
|
489
|
+
marketplaceByKey.set(`${mp.marketplaceReference.canonicalId}::${mp.name}`, mp);
|
|
490
|
+
}
|
|
491
|
+
const installedByUri = ( new Map());
|
|
492
|
+
for (const entry of this.pluginMarketplaceService.installedPlugins.read(reader)) {
|
|
493
|
+
installedByUri.set(( entry.pluginUri.toString()), entry.plugin);
|
|
494
|
+
}
|
|
495
|
+
return {
|
|
496
|
+
marketplaceByKey,
|
|
497
|
+
installedByUri
|
|
498
|
+
};
|
|
499
|
+
});
|
|
500
|
+
const plugins = this.agentPluginService.plugins.get();
|
|
501
|
+
return ( plugins.map(p => {
|
|
502
|
+
const isOutdated = derived(reader => {
|
|
503
|
+
const {
|
|
504
|
+
marketplaceByKey,
|
|
505
|
+
installedByUri
|
|
506
|
+
} = marketplaceObs.read(reader);
|
|
507
|
+
const storedPlugin = installedByUri.get(( p.uri.toString())) ?? p.fromMarketplace;
|
|
508
|
+
if (storedPlugin) {
|
|
509
|
+
const key = `${storedPlugin.marketplaceReference.canonicalId}::${storedPlugin.name}`;
|
|
510
|
+
const live = marketplaceByKey.get(key);
|
|
511
|
+
if (live && hasSourceChanged(storedPlugin.sourceDescriptor, live.sourceDescriptor)) {
|
|
512
|
+
return live;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
return undefined;
|
|
516
|
+
});
|
|
517
|
+
return installedPluginToItem(p, this.labelService, isOutdated);
|
|
518
|
+
}));
|
|
519
|
+
}
|
|
520
|
+
async queryMarketplacePlugins() {
|
|
521
|
+
this.queryCts.value?.cancel();
|
|
522
|
+
const cts = ( new CancellationTokenSource());
|
|
523
|
+
this.queryCts.value = cts;
|
|
524
|
+
try {
|
|
525
|
+
return await this.pluginMarketplaceService.fetchMarketplacePlugins(cts.token);
|
|
526
|
+
} catch {
|
|
527
|
+
return [];
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
updateBody(count) {
|
|
531
|
+
if (this.bodyTemplate) {
|
|
532
|
+
this.bodyTemplate.pluginsList.classList.toggle("hidden", count === 0);
|
|
533
|
+
this.bodyTemplate.messageContainer.classList.toggle("hidden", count > 0);
|
|
534
|
+
if (count === 0 && this.isBodyVisible()) {
|
|
535
|
+
this.bodyTemplate.messageBox.textContent = ( localize(5161, "No agent plugins found."));
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
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));
|
|
541
|
+
class AgentPluginsBrowseCommand extends Action2 {
|
|
542
|
+
constructor() {
|
|
543
|
+
super({
|
|
544
|
+
id: "workbench.agentPlugins.browse",
|
|
545
|
+
title: ( localize2(5162, "Agent Plugins")),
|
|
546
|
+
tooltip: ( localize2(5163, "Browse Agent Plugins")),
|
|
547
|
+
icon: Codicon.search,
|
|
548
|
+
precondition: ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate()))),
|
|
549
|
+
menu: [{
|
|
550
|
+
id: extensionsFilterSubMenu,
|
|
551
|
+
group: "1_predefined",
|
|
552
|
+
order: 2,
|
|
553
|
+
when: ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate())))
|
|
554
|
+
}, {
|
|
555
|
+
id: MenuId.ViewTitle,
|
|
556
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("view", InstalledAgentPluginsViewId)), ( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate()))),
|
|
557
|
+
group: "navigation"
|
|
558
|
+
}]
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
async run(accessor) {
|
|
562
|
+
accessor.get(IExtensionsWorkbenchService).openSearch("@agentPlugins ");
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
class CheckForPluginUpdatesCommand extends Action2 {
|
|
566
|
+
constructor() {
|
|
567
|
+
super({
|
|
568
|
+
id: "workbench.agentPlugins.checkForUpdates",
|
|
569
|
+
title: ( localize2(5164, "Update Plugins")),
|
|
570
|
+
category: ( localize2(5165, "Chat")),
|
|
571
|
+
precondition: ChatContextKeys.enabled,
|
|
572
|
+
f1: true
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
async run(accessor) {
|
|
576
|
+
await accessor.get(IPluginInstallService).updateAllPlugins({}, CancellationToken.None);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
class ForceUpdatePluginsCommand extends Action2 {
|
|
580
|
+
constructor() {
|
|
581
|
+
super({
|
|
582
|
+
id: "workbench.agentPlugins.forceUpdate",
|
|
583
|
+
title: ( localize2(5166, "Update Plugins (Force)")),
|
|
584
|
+
category: ( localize2(5165, "Chat")),
|
|
585
|
+
precondition: ChatContextKeys.enabled,
|
|
586
|
+
f1: true
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
async run(accessor) {
|
|
590
|
+
await accessor.get(IPluginInstallService).updateAllPlugins({
|
|
591
|
+
force: true
|
|
592
|
+
}, CancellationToken.None);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
let AgentPluginsViewsContribution = class AgentPluginsViewsContribution extends Disposable {
|
|
596
|
+
static {
|
|
597
|
+
this.ID = "workbench.chat.agentPlugins.views.contribution";
|
|
598
|
+
}
|
|
599
|
+
constructor(contextKeyService, agentPluginService) {
|
|
600
|
+
super();
|
|
601
|
+
const hasInstalledKey = HasInstalledAgentPluginsContext.bindTo(contextKeyService);
|
|
602
|
+
this._register(autorun(reader => {
|
|
603
|
+
hasInstalledKey.set(agentPluginService.plugins.read(reader).length > 0);
|
|
604
|
+
}));
|
|
605
|
+
registerAction2(AgentPluginsBrowseCommand);
|
|
606
|
+
registerAction2(CheckForPluginUpdatesCommand);
|
|
607
|
+
registerAction2(ForceUpdatePluginsCommand);
|
|
608
|
+
( Registry.as(Extensions.ViewsRegistry)).registerViews([{
|
|
609
|
+
id: InstalledAgentPluginsViewId,
|
|
610
|
+
name: ( localize2(5167, "Agent Plugins - Installed")),
|
|
611
|
+
ctorDescriptor: ( new SyncDescriptor(AgentPluginsListView, [{
|
|
612
|
+
installedOnly: true
|
|
613
|
+
}])),
|
|
614
|
+
when: ( ContextKeyExpr.and(DefaultViewsContext, HasInstalledAgentPluginsContext, ( ChatContextKeys.Setup.hidden.negate()))),
|
|
615
|
+
weight: 30,
|
|
616
|
+
order: 5,
|
|
617
|
+
canToggleVisibility: true
|
|
618
|
+
}, {
|
|
619
|
+
id: "workbench.views.agentPlugins.default.marketplace",
|
|
620
|
+
name: ( localize2(5168, "Agent Plugins")),
|
|
621
|
+
ctorDescriptor: ( new SyncDescriptor(AgentPluginsListView, [{}])),
|
|
622
|
+
when: ( ContextKeyExpr.and(DefaultViewsContext, ( HasInstalledAgentPluginsContext.toNegated()), ( ChatContextKeys.Setup.hidden.negate()))),
|
|
623
|
+
weight: 30,
|
|
624
|
+
order: 5,
|
|
625
|
+
canToggleVisibility: true,
|
|
626
|
+
hideByDefault: true
|
|
627
|
+
}, {
|
|
628
|
+
id: "workbench.views.agentPlugins.marketplace",
|
|
629
|
+
name: ( localize2(5168, "Agent Plugins")),
|
|
630
|
+
ctorDescriptor: ( new SyncDescriptor(AgentPluginsListView, [{}])),
|
|
631
|
+
when: ( ContextKeyExpr.and(SearchAgentPluginsContext, ( ChatContextKeys.Setup.hidden.negate())))
|
|
632
|
+
}], VIEW_CONTAINER);
|
|
633
|
+
}
|
|
634
|
+
};
|
|
635
|
+
AgentPluginsViewsContribution = ( __decorate([( __param(0, IContextKeyService)), ( __param(1, IAgentPluginService))], AgentPluginsViewsContribution));
|
|
636
|
+
|
|
637
|
+
export { AgentPluginsListView, AgentPluginsViewsContribution };
|
|
@@ -64,23 +64,23 @@ let AgentHostPermissionUiContribution = class AgentHostPermissionUiContribution
|
|
|
64
64
|
const path = request.uri.scheme === Schemas.file ? request.uri.fsPath : ( request.uri.toString());
|
|
65
65
|
const fence = "`".repeat((path.match(/`+/g)?.reduce((m, s) => Math.max(m, s.length), 0) ?? 0) + 1);
|
|
66
66
|
const codePath = `${fence}${path}${fence}`;
|
|
67
|
-
const message = ( new MarkdownString(request.mode === AgentHostPermissionMode.Write ? ( localize(
|
|
68
|
-
const description = totalPending > 1 ? totalPending === 2 ? ( localize(
|
|
67
|
+
const message = ( new MarkdownString(request.mode === AgentHostPermissionMode.Write ? ( localize(5169, "Remote agent host \"{0}\" wants to write {1}", hostName, codePath)) : ( localize(5170, "Remote agent host \"{0}\" wants to read {1}", hostName, codePath))));
|
|
68
|
+
const description = totalPending > 1 ? totalPending === 2 ? ( localize(5171, "+1 more request waiting")) : ( localize(5172, "+{0} more requests waiting", totalPending - 1)) : undefined;
|
|
69
69
|
return {
|
|
70
70
|
id: AgentHostPermissionUiContribution_1.NOTIFICATION_ID,
|
|
71
71
|
severity: ChatInputNotificationSeverity.Warning,
|
|
72
72
|
message,
|
|
73
73
|
description,
|
|
74
74
|
actions: [{
|
|
75
|
-
label: ( localize(
|
|
75
|
+
label: ( localize(5173, "Deny")),
|
|
76
76
|
commandId: DENY_COMMAND,
|
|
77
77
|
commandArgs: [request.id]
|
|
78
78
|
}, {
|
|
79
|
-
label: ( localize(
|
|
79
|
+
label: ( localize(5174, "Allow")),
|
|
80
80
|
commandId: ALLOW_COMMAND,
|
|
81
81
|
commandArgs: [request.id]
|
|
82
82
|
}, {
|
|
83
|
-
label: ( localize(
|
|
83
|
+
label: ( localize(5175, "Always Allow")),
|
|
84
84
|
commandId: ALLOW_ALWAYS_COMMAND,
|
|
85
85
|
commandArgs: [request.id]
|
|
86
86
|
}],
|