@codingame/monaco-vscode-chat-service-override 26.2.2 → 28.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +35 -2
- package/package.json +5 -5
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +15 -0
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +53 -0
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +219 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +89 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +251 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +123 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +278 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +76 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +299 -0
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +67 -0
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +263 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +85 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +397 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +27 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +74 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +54 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +87 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +71 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +43 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +154 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +53 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +18 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +49 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +537 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.js +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/media/agentPluginEditor.css +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +282 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +634 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +10 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +74 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +90 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +20 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +43 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +84 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.d.ts → localAgentSessionsController.d.ts} +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.js → localAgentSessionsController.js} +24 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +179 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +987 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +246 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +878 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +692 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +936 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +702 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +30 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +36 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +622 -391
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +419 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +198 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +314 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +64 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +611 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +504 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +914 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +128 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +467 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +113 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +126 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +279 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +788 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +32 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +6 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditorController.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +16 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +63 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +26 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +40 -413
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +38 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +56 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +15 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +138 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +166 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +37 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +394 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +118 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +245 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.js +234 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +88 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +624 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.js +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +88 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +28 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +175 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +99 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +489 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +364 -279
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +69 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +76 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +67 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +187 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +242 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +311 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +29 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +8 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +126 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +9 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +46 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +65 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +16 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +15 -6
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +28 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +190 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +208 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +19 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +261 -105
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +21 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -6
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +16 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +13 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +144 -11
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +36 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +119 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +748 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +146 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +672 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +35 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +3 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +7 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +10 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +26 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +293 -94
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +86 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +121 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +1422 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +48 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +404 -132
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +17 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +40 -28
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +14 -2
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +54 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +12 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +27 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +265 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +6 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +18 -81
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +10 -10
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css +6 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +35 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +1 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +13 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +302 -69
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +63 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +46 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +0 -587
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -51
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +0 -71
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +0 -293
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.js +0 -31
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Dimension } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/dom";
|
|
2
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
3
|
+
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
4
|
+
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
5
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
7
|
+
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
8
|
+
import { IRequestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service";
|
|
9
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
10
|
+
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
11
|
+
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
12
|
+
import { EditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorPane";
|
|
13
|
+
import { IEditorOpenContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
14
|
+
import { IEditorGroup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService";
|
|
15
|
+
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
16
|
+
import { IWebview } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview";
|
|
17
|
+
import { IWebviewService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview.service";
|
|
18
|
+
import { IAgentPluginService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service";
|
|
19
|
+
import { IPluginInstallService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service";
|
|
20
|
+
import { AgentPluginEditorInput } from "./agentPluginEditorInput.js";
|
|
21
|
+
export declare class AgentPluginEditor extends EditorPane {
|
|
22
|
+
private readonly instantiationService;
|
|
23
|
+
private readonly openerService;
|
|
24
|
+
private readonly extensionService;
|
|
25
|
+
private readonly webviewService;
|
|
26
|
+
private readonly languageService;
|
|
27
|
+
private readonly fileService;
|
|
28
|
+
private readonly requestService;
|
|
29
|
+
private readonly agentPluginService;
|
|
30
|
+
private readonly pluginInstallService;
|
|
31
|
+
private readonly labelService;
|
|
32
|
+
static readonly ID: string;
|
|
33
|
+
private template;
|
|
34
|
+
private pluginReadme;
|
|
35
|
+
private initialScrollProgress;
|
|
36
|
+
private currentIdentifier;
|
|
37
|
+
private layoutParticipants;
|
|
38
|
+
private readonly contentDisposables;
|
|
39
|
+
private readonly transientDisposables;
|
|
40
|
+
private activeElement;
|
|
41
|
+
private dimension;
|
|
42
|
+
constructor(group: IEditorGroup, telemetryService: ITelemetryService, instantiationService: IInstantiationService, themeService: IThemeService, openerService: IOpenerService, storageService: IStorageService, extensionService: IExtensionService, webviewService: IWebviewService, languageService: ILanguageService, fileService: IFileService, requestService: IRequestService, agentPluginService: IAgentPluginService, pluginInstallService: IPluginInstallService, labelService: ILabelService);
|
|
43
|
+
protected createEditor(parent: HTMLElement): void;
|
|
44
|
+
setInput(input: AgentPluginEditorInput, options: undefined, context: IEditorOpenContext, token: CancellationToken): Promise<void>;
|
|
45
|
+
private render;
|
|
46
|
+
private getItemActions;
|
|
47
|
+
private installedPluginToItem;
|
|
48
|
+
private fetchReadme;
|
|
49
|
+
private openDetails;
|
|
50
|
+
private openMarkdown;
|
|
51
|
+
private renderMarkdown;
|
|
52
|
+
private renderBody;
|
|
53
|
+
private loadContents;
|
|
54
|
+
clearInput(): void;
|
|
55
|
+
focus(): void;
|
|
56
|
+
get activeWebview(): IWebview | undefined;
|
|
57
|
+
layout(dimension: Dimension): void;
|
|
58
|
+
}
|
|
@@ -0,0 +1,537 @@
|
|
|
1
|
+
|
|
2
|
+
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
|
+
import { append, $, addDisposableListener, EventType, reset, setParentFlowTo } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
5
|
+
import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
6
|
+
import { Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
7
|
+
import { insert } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
8
|
+
import { Cache } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cache';
|
|
9
|
+
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
10
|
+
import { DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
11
|
+
import { Schemas, matchesScheme } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
12
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
13
|
+
import { dirname, joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
14
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
15
|
+
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
16
|
+
import { TokenizationRegistry } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages';
|
|
17
|
+
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
18
|
+
import { generateTokensCSSForColorMap } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/supports/tokenization';
|
|
19
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
20
|
+
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
21
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
22
|
+
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
23
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
24
|
+
import { asText } from '@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request';
|
|
25
|
+
import { IRequestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service';
|
|
26
|
+
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
27
|
+
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
28
|
+
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
29
|
+
import { EditorPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
30
|
+
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
31
|
+
import { renderMarkdownDocument, DEFAULT_MARKDOWN_STYLES } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer';
|
|
32
|
+
import { IWebviewService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview.service';
|
|
33
|
+
import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
|
|
34
|
+
import { IPluginInstallService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service';
|
|
35
|
+
import { AgentPluginItemKind } from './agentPluginItems.js';
|
|
36
|
+
import * as agentPluginEditor from './media/agentPluginEditor.css';
|
|
37
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
38
|
+
|
|
39
|
+
var AgentPluginEditor_1, InstallPluginEditorAction_1, EnablePluginEditorAction_1, DisablePluginEditorAction_1;
|
|
40
|
+
registerCss(agentPluginEditor);
|
|
41
|
+
var WebviewIndex;
|
|
42
|
+
(function(WebviewIndex) {
|
|
43
|
+
WebviewIndex[WebviewIndex["Readme"] = 0] = "Readme";
|
|
44
|
+
})(WebviewIndex || (WebviewIndex = {}));
|
|
45
|
+
let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
|
|
46
|
+
static {
|
|
47
|
+
AgentPluginEditor_1 = this;
|
|
48
|
+
}
|
|
49
|
+
static {
|
|
50
|
+
this.ID = "workbench.editor.agentPlugin";
|
|
51
|
+
}
|
|
52
|
+
constructor(
|
|
53
|
+
group,
|
|
54
|
+
telemetryService,
|
|
55
|
+
instantiationService,
|
|
56
|
+
themeService,
|
|
57
|
+
openerService,
|
|
58
|
+
storageService,
|
|
59
|
+
extensionService,
|
|
60
|
+
webviewService,
|
|
61
|
+
languageService,
|
|
62
|
+
fileService,
|
|
63
|
+
requestService,
|
|
64
|
+
agentPluginService,
|
|
65
|
+
pluginInstallService,
|
|
66
|
+
labelService
|
|
67
|
+
) {
|
|
68
|
+
super(
|
|
69
|
+
AgentPluginEditor_1.ID,
|
|
70
|
+
group,
|
|
71
|
+
telemetryService,
|
|
72
|
+
themeService,
|
|
73
|
+
storageService
|
|
74
|
+
);
|
|
75
|
+
this.instantiationService = instantiationService;
|
|
76
|
+
this.openerService = openerService;
|
|
77
|
+
this.extensionService = extensionService;
|
|
78
|
+
this.webviewService = webviewService;
|
|
79
|
+
this.languageService = languageService;
|
|
80
|
+
this.fileService = fileService;
|
|
81
|
+
this.requestService = requestService;
|
|
82
|
+
this.agentPluginService = agentPluginService;
|
|
83
|
+
this.pluginInstallService = pluginInstallService;
|
|
84
|
+
this.labelService = labelService;
|
|
85
|
+
this.pluginReadme = null;
|
|
86
|
+
this.initialScrollProgress = ( new Map());
|
|
87
|
+
this.currentIdentifier = "";
|
|
88
|
+
this.layoutParticipants = [];
|
|
89
|
+
this.contentDisposables = this._register(( new DisposableStore()));
|
|
90
|
+
this.transientDisposables = this._register(( new DisposableStore()));
|
|
91
|
+
this.activeElement = null;
|
|
92
|
+
}
|
|
93
|
+
createEditor(parent) {
|
|
94
|
+
const root = append(parent, $(".extension-editor.agent-plugin-editor"));
|
|
95
|
+
root.tabIndex = 0;
|
|
96
|
+
root.style.outline = "none";
|
|
97
|
+
root.setAttribute("role", "document");
|
|
98
|
+
const header = append(root, $(".header"));
|
|
99
|
+
const iconContainer = append(header, $(".icon-container"));
|
|
100
|
+
const icon = append(iconContainer, $("span.codicon.codicon-extensions"));
|
|
101
|
+
icon.style.fontSize = "64px";
|
|
102
|
+
const details = append(header, $(".details"));
|
|
103
|
+
const title = append(details, $(".title"));
|
|
104
|
+
const name = append(title, $("span.name", {
|
|
105
|
+
role: "heading",
|
|
106
|
+
tabIndex: 0
|
|
107
|
+
}));
|
|
108
|
+
const description = append(details, $(".description"));
|
|
109
|
+
const subtitle = append(details, $(".subtitle"));
|
|
110
|
+
const marketplace = append(subtitle, $("span.subtitle-entry"));
|
|
111
|
+
const actionsAndStatusContainer = append(details, $(".actions-status-container"));
|
|
112
|
+
const actionBar = this._register(( new ActionBar(actionsAndStatusContainer, {
|
|
113
|
+
focusOnlyEnabledItems: true
|
|
114
|
+
})));
|
|
115
|
+
actionBar.setFocusable(true);
|
|
116
|
+
const body = append(root, $(".body"));
|
|
117
|
+
const content = append(body, $(".content"));
|
|
118
|
+
content.id = generateUuid();
|
|
119
|
+
this.template = {
|
|
120
|
+
content,
|
|
121
|
+
description,
|
|
122
|
+
header,
|
|
123
|
+
name,
|
|
124
|
+
marketplace,
|
|
125
|
+
actionBar
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
async setInput(input, options, context, token) {
|
|
129
|
+
await super.setInput(input, options, context, token);
|
|
130
|
+
if (this.template) {
|
|
131
|
+
await this.render(input.item, this.template);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
async render(item, template) {
|
|
135
|
+
this.activeElement = null;
|
|
136
|
+
this.transientDisposables.clear();
|
|
137
|
+
this.contentDisposables.clear();
|
|
138
|
+
template.content.innerText = "";
|
|
139
|
+
const cts = ( new CancellationTokenSource());
|
|
140
|
+
this.transientDisposables.add(toDisposable(() => cts.dispose(true)));
|
|
141
|
+
const token = cts.token;
|
|
142
|
+
const itemId = item.kind === AgentPluginItemKind.Installed ? ( item.plugin.uri.toString()) : `${item.marketplaceReference.canonicalId}/${item.source}`;
|
|
143
|
+
if (this.currentIdentifier !== itemId) {
|
|
144
|
+
this.initialScrollProgress.clear();
|
|
145
|
+
this.currentIdentifier = itemId;
|
|
146
|
+
}
|
|
147
|
+
this.pluginReadme = ( new Cache(() => this.fetchReadme(item, token)));
|
|
148
|
+
template.name.textContent = item.name;
|
|
149
|
+
template.description.textContent = item.description;
|
|
150
|
+
const marketplaceLabel = item.marketplace ?? "";
|
|
151
|
+
const githubRepo = item.kind === AgentPluginItemKind.Marketplace ? item.marketplaceReference.githubRepo : item.plugin.fromMarketplace?.marketplaceReference.githubRepo;
|
|
152
|
+
if (marketplaceLabel && githubRepo) {
|
|
153
|
+
const url = `https://github.com/${githubRepo}`;
|
|
154
|
+
const link = $("a.marketplace-link", {
|
|
155
|
+
href: url
|
|
156
|
+
}, marketplaceLabel);
|
|
157
|
+
this.transientDisposables.add(addDisposableListener(link, EventType.CLICK, e => {
|
|
158
|
+
e.preventDefault();
|
|
159
|
+
e.stopPropagation();
|
|
160
|
+
this.openerService.open(( URI.parse(url)));
|
|
161
|
+
}));
|
|
162
|
+
reset(template.marketplace, link);
|
|
163
|
+
} else {
|
|
164
|
+
reset(template.marketplace, marketplaceLabel);
|
|
165
|
+
}
|
|
166
|
+
const actionDisposables = this.transientDisposables.add(( new DisposableStore()));
|
|
167
|
+
this.transientDisposables.add(autorun(reader => {
|
|
168
|
+
actionDisposables.clear();
|
|
169
|
+
template.actionBar.clear();
|
|
170
|
+
const allPlugins = this.agentPluginService.allPlugins.read(reader);
|
|
171
|
+
let currentItem = item;
|
|
172
|
+
if (item.kind === AgentPluginItemKind.Marketplace) {
|
|
173
|
+
const expectedUri = this.pluginInstallService.getPluginInstallUri({
|
|
174
|
+
name: item.name,
|
|
175
|
+
description: item.description,
|
|
176
|
+
version: "",
|
|
177
|
+
source: item.source,
|
|
178
|
+
sourceDescriptor: item.sourceDescriptor,
|
|
179
|
+
marketplace: item.marketplace,
|
|
180
|
+
marketplaceReference: item.marketplaceReference,
|
|
181
|
+
marketplaceType: item.marketplaceType
|
|
182
|
+
});
|
|
183
|
+
const installedPlugin = allPlugins.find(p => ( p.uri.toString()) === ( expectedUri.toString()));
|
|
184
|
+
if (installedPlugin) {
|
|
185
|
+
currentItem = this.installedPluginToItem(installedPlugin);
|
|
186
|
+
}
|
|
187
|
+
} else {
|
|
188
|
+
const stillInstalled = allPlugins.find(p => ( p.uri.toString()) === ( item.plugin.uri.toString()));
|
|
189
|
+
if (!stillInstalled) {
|
|
190
|
+
if (item.plugin.fromMarketplace) {
|
|
191
|
+
const mp = item.plugin.fromMarketplace;
|
|
192
|
+
currentItem = {
|
|
193
|
+
kind: AgentPluginItemKind.Marketplace,
|
|
194
|
+
name: item.name,
|
|
195
|
+
description: mp.description,
|
|
196
|
+
source: mp.source,
|
|
197
|
+
sourceDescriptor: mp.sourceDescriptor,
|
|
198
|
+
marketplace: mp.marketplace,
|
|
199
|
+
marketplaceReference: mp.marketplaceReference,
|
|
200
|
+
marketplaceType: mp.marketplaceType,
|
|
201
|
+
readmeUri: mp.readmeUri
|
|
202
|
+
};
|
|
203
|
+
} else {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
} else {
|
|
207
|
+
stillInstalled.enabled.read(reader);
|
|
208
|
+
currentItem = this.installedPluginToItem(stillInstalled);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
const actions = this.getItemActions(currentItem);
|
|
212
|
+
if (actions.length > 0) {
|
|
213
|
+
template.actionBar.push(actions, {
|
|
214
|
+
icon: true,
|
|
215
|
+
label: true
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
for (const action of actions) {
|
|
219
|
+
actionDisposables.add(action);
|
|
220
|
+
}
|
|
221
|
+
}));
|
|
222
|
+
this.activeElement = await this.openDetails(item, template, token);
|
|
223
|
+
}
|
|
224
|
+
getItemActions(item) {
|
|
225
|
+
if (item.kind === AgentPluginItemKind.Marketplace) {
|
|
226
|
+
return [this.instantiationService.createInstance(InstallPluginEditorAction, item)];
|
|
227
|
+
}
|
|
228
|
+
const actions = [];
|
|
229
|
+
if (item.plugin.enabled.get()) {
|
|
230
|
+
actions.push(
|
|
231
|
+
this.instantiationService.createInstance(DisablePluginEditorAction, item.plugin)
|
|
232
|
+
);
|
|
233
|
+
} else {
|
|
234
|
+
actions.push(
|
|
235
|
+
this.instantiationService.createInstance(EnablePluginEditorAction, item.plugin)
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
actions.push(
|
|
239
|
+
this.instantiationService.createInstance(UninstallPluginEditorAction, item.plugin)
|
|
240
|
+
);
|
|
241
|
+
return actions;
|
|
242
|
+
}
|
|
243
|
+
installedPluginToItem(plugin) {
|
|
244
|
+
const name = plugin.label;
|
|
245
|
+
const description = plugin.fromMarketplace?.description ?? this.labelService.getUriLabel(dirname(plugin.uri), {
|
|
246
|
+
relative: true
|
|
247
|
+
});
|
|
248
|
+
const marketplace = plugin.fromMarketplace?.marketplace;
|
|
249
|
+
return {
|
|
250
|
+
kind: AgentPluginItemKind.Installed,
|
|
251
|
+
name,
|
|
252
|
+
description,
|
|
253
|
+
marketplace,
|
|
254
|
+
plugin
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
async fetchReadme(item, token) {
|
|
258
|
+
let readmeUri;
|
|
259
|
+
if (item.kind === AgentPluginItemKind.Installed) {
|
|
260
|
+
readmeUri = joinPath(item.plugin.uri, "README.md");
|
|
261
|
+
} else {
|
|
262
|
+
readmeUri = item.readmeUri;
|
|
263
|
+
}
|
|
264
|
+
if (!readmeUri) {
|
|
265
|
+
return "";
|
|
266
|
+
}
|
|
267
|
+
if (readmeUri.scheme === Schemas.file || readmeUri.scheme === Schemas.vscodeRemote) {
|
|
268
|
+
try {
|
|
269
|
+
const content = await this.fileService.readFile(readmeUri);
|
|
270
|
+
return ( content.value.toString());
|
|
271
|
+
} catch {
|
|
272
|
+
return "";
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
if (readmeUri.scheme === Schemas.https) {
|
|
276
|
+
let rawUrl = ( readmeUri.toString());
|
|
277
|
+
const githubBlobMatch = rawUrl.match(
|
|
278
|
+
/^https:\/\/github\.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)\/blob\/(?<rest>.+)$/
|
|
279
|
+
);
|
|
280
|
+
if (githubBlobMatch?.groups) {
|
|
281
|
+
rawUrl = `https://raw.githubusercontent.com/${githubBlobMatch.groups["owner"]}/${githubBlobMatch.groups["repo"]}/${githubBlobMatch.groups["rest"]}`;
|
|
282
|
+
}
|
|
283
|
+
try {
|
|
284
|
+
const context = await this.requestService.request({
|
|
285
|
+
type: "GET",
|
|
286
|
+
url: rawUrl
|
|
287
|
+
}, token);
|
|
288
|
+
const text = await asText(context);
|
|
289
|
+
return text ?? "";
|
|
290
|
+
} catch {
|
|
291
|
+
return "";
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return "";
|
|
295
|
+
}
|
|
296
|
+
async openDetails(item, template, token) {
|
|
297
|
+
const details = append(template.content, $(".details"));
|
|
298
|
+
const readmeContainer = append(details, $(".content-container"));
|
|
299
|
+
const layout = () => details.classList.toggle("narrow", this.dimension !== undefined && this.dimension.width < 500);
|
|
300
|
+
layout();
|
|
301
|
+
this.contentDisposables.add(toDisposable(insert(this.layoutParticipants, {
|
|
302
|
+
layout
|
|
303
|
+
})));
|
|
304
|
+
return this.openMarkdown(this.pluginReadme.get(), ( localize(5011, "No README available.")), readmeContainer, WebviewIndex.Readme, ( localize(5012, "Readme")), token);
|
|
305
|
+
}
|
|
306
|
+
async openMarkdown(cacheResult, noContentCopy, container, webviewIndex, title, token) {
|
|
307
|
+
try {
|
|
308
|
+
const body = await this.renderMarkdown(cacheResult, container, token);
|
|
309
|
+
if (token.isCancellationRequested) {
|
|
310
|
+
return null;
|
|
311
|
+
}
|
|
312
|
+
const webview = this.contentDisposables.add(this.webviewService.createWebviewOverlay({
|
|
313
|
+
title,
|
|
314
|
+
options: {
|
|
315
|
+
enableFindWidget: true,
|
|
316
|
+
tryRestoreScrollPosition: true,
|
|
317
|
+
disableServiceWorker: true
|
|
318
|
+
},
|
|
319
|
+
contentOptions: {},
|
|
320
|
+
extension: undefined
|
|
321
|
+
}));
|
|
322
|
+
webview.initialScrollProgress = this.initialScrollProgress.get(webviewIndex) || 0;
|
|
323
|
+
webview.claim(this, this.window, undefined);
|
|
324
|
+
setParentFlowTo(webview.container, container);
|
|
325
|
+
webview.layoutWebviewOverElement(container);
|
|
326
|
+
webview.setHtml(body);
|
|
327
|
+
webview.claim(this, this.window, undefined);
|
|
328
|
+
this.contentDisposables.add(webview.onDidFocus(() => this._onDidFocus?.fire()));
|
|
329
|
+
this.contentDisposables.add(webview.onDidScroll(
|
|
330
|
+
() => this.initialScrollProgress.set(webviewIndex, webview.initialScrollProgress)
|
|
331
|
+
));
|
|
332
|
+
const removeLayoutParticipant = insert(this.layoutParticipants, {
|
|
333
|
+
layout: () => {
|
|
334
|
+
webview.layoutWebviewOverElement(container);
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
this.contentDisposables.add(toDisposable(removeLayoutParticipant));
|
|
338
|
+
let isDisposed = false;
|
|
339
|
+
this.contentDisposables.add(toDisposable(() => {
|
|
340
|
+
isDisposed = true;
|
|
341
|
+
}));
|
|
342
|
+
this.contentDisposables.add(this.themeService.onDidColorThemeChange(async () => {
|
|
343
|
+
const body = await this.renderMarkdown(cacheResult, container);
|
|
344
|
+
if (!isDisposed) {
|
|
345
|
+
webview.setHtml(body);
|
|
346
|
+
}
|
|
347
|
+
}));
|
|
348
|
+
this.contentDisposables.add(webview.onDidClickLink(link => {
|
|
349
|
+
if (!link) {
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
if (matchesScheme(link, Schemas.http) || matchesScheme(link, Schemas.https) || matchesScheme(link, Schemas.mailto)) {
|
|
353
|
+
this.openerService.open(link);
|
|
354
|
+
}
|
|
355
|
+
}));
|
|
356
|
+
return webview;
|
|
357
|
+
} catch (e) {
|
|
358
|
+
const p = append(container, $("p.nocontent"));
|
|
359
|
+
p.textContent = noContentCopy;
|
|
360
|
+
return p;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
async renderMarkdown(cacheResult, container, token) {
|
|
364
|
+
const contents = await this.loadContents(() => cacheResult, container);
|
|
365
|
+
if (token?.isCancellationRequested) {
|
|
366
|
+
return "";
|
|
367
|
+
}
|
|
368
|
+
const content = await renderMarkdownDocument(contents, this.extensionService, this.languageService, {}, token);
|
|
369
|
+
if (token?.isCancellationRequested) {
|
|
370
|
+
return "";
|
|
371
|
+
}
|
|
372
|
+
return this.renderBody(content);
|
|
373
|
+
}
|
|
374
|
+
renderBody(body) {
|
|
375
|
+
const nonce = generateUuid();
|
|
376
|
+
const colorMap = TokenizationRegistry.getColorMap();
|
|
377
|
+
const css = colorMap ? generateTokensCSSForColorMap(colorMap) : "";
|
|
378
|
+
return `<!DOCTYPE html>
|
|
379
|
+
<html>
|
|
380
|
+
<head>
|
|
381
|
+
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
382
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; script-src 'none'; style-src 'nonce-${nonce}';">
|
|
383
|
+
<style nonce="${nonce}">
|
|
384
|
+
${DEFAULT_MARKDOWN_STYLES}
|
|
385
|
+
|
|
386
|
+
body {
|
|
387
|
+
padding-bottom: 75px;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
#scroll-to-top {
|
|
391
|
+
position: fixed;
|
|
392
|
+
width: 32px;
|
|
393
|
+
height: 32px;
|
|
394
|
+
right: 25px;
|
|
395
|
+
bottom: 25px;
|
|
396
|
+
background-color: var(--vscode-button-secondaryBackground);
|
|
397
|
+
border-color: var(--vscode-button-border);
|
|
398
|
+
border-radius: 50%;
|
|
399
|
+
cursor: pointer;
|
|
400
|
+
box-shadow: 1px 1px 1px rgba(0,0,0,.25);
|
|
401
|
+
outline: none;
|
|
402
|
+
display: flex;
|
|
403
|
+
justify-content: center;
|
|
404
|
+
align-items: center;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
#scroll-to-top:hover {
|
|
408
|
+
background-color: var(--vscode-button-secondaryHoverBackground);
|
|
409
|
+
box-shadow: 2px 2px 2px rgba(0,0,0,.25);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
body.vscode-high-contrast #scroll-to-top {
|
|
413
|
+
border-width: 2px;
|
|
414
|
+
border-style: solid;
|
|
415
|
+
box-shadow: none;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
#scroll-to-top span.icon::before {
|
|
419
|
+
content: "";
|
|
420
|
+
display: block;
|
|
421
|
+
background: var(--vscode-button-secondaryForeground);
|
|
422
|
+
-webkit-mask-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkZGRkZGO30KCS5zdDF7ZmlsbDpub25lO30KPC9zdHlsZT4KPHRpdGxlPnVwY2hldnJvbjwvdGl0bGU+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik04LDUuMWwtNy4zLDcuM0wwLDExLjZsOC04bDgsOGwtMC43LDAuN0w4LDUuMXoiLz4KPHJlY3QgY2xhc3M9InN0MSIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ii8+Cjwvc3ZnPgo=');
|
|
423
|
+
width: 16px;
|
|
424
|
+
height: 16px;
|
|
425
|
+
}
|
|
426
|
+
${css}
|
|
427
|
+
</style>
|
|
428
|
+
</head>
|
|
429
|
+
<body>
|
|
430
|
+
<a id="scroll-to-top" role="button" aria-label="scroll to top" href="#"><span class="icon"></span></a>
|
|
431
|
+
${body}
|
|
432
|
+
</body>
|
|
433
|
+
</html>`;
|
|
434
|
+
}
|
|
435
|
+
loadContents(loadingTask, container) {
|
|
436
|
+
container.classList.add("loading");
|
|
437
|
+
const result = this.contentDisposables.add(loadingTask());
|
|
438
|
+
const onDone = () => container.classList.remove("loading");
|
|
439
|
+
result.promise.then(onDone, onDone);
|
|
440
|
+
return result.promise;
|
|
441
|
+
}
|
|
442
|
+
clearInput() {
|
|
443
|
+
this.contentDisposables.clear();
|
|
444
|
+
this.transientDisposables.clear();
|
|
445
|
+
super.clearInput();
|
|
446
|
+
}
|
|
447
|
+
focus() {
|
|
448
|
+
super.focus();
|
|
449
|
+
this.activeElement?.focus();
|
|
450
|
+
}
|
|
451
|
+
get activeWebview() {
|
|
452
|
+
if (!this.activeElement || !this.activeElement.runFindAction) {
|
|
453
|
+
return undefined;
|
|
454
|
+
}
|
|
455
|
+
return this.activeElement;
|
|
456
|
+
}
|
|
457
|
+
layout(dimension) {
|
|
458
|
+
this.dimension = dimension;
|
|
459
|
+
this.layoutParticipants.forEach(p => p.layout());
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
AgentPluginEditor = AgentPluginEditor_1 = ( __decorate([( __param(1, ITelemetryService)), ( __param(2, IInstantiationService)), ( __param(3, IThemeService)), ( __param(4, IOpenerService)), ( __param(5, IStorageService)), ( __param(6, IExtensionService)), ( __param(7, IWebviewService)), ( __param(8, ILanguageService)), ( __param(9, IFileService)), ( __param(10, IRequestService)), ( __param(11, IAgentPluginService)), ( __param(12, IPluginInstallService)), ( __param(13, ILabelService))], AgentPluginEditor));
|
|
463
|
+
let InstallPluginEditorAction = class InstallPluginEditorAction extends Action {
|
|
464
|
+
static {
|
|
465
|
+
InstallPluginEditorAction_1 = this;
|
|
466
|
+
}
|
|
467
|
+
static {
|
|
468
|
+
this.ID = "agentPlugin.editor.install";
|
|
469
|
+
}
|
|
470
|
+
constructor(item, pluginInstallService) {
|
|
471
|
+
super(InstallPluginEditorAction_1.ID, ( localize(5013, "Install")), "extension-action label prominent install");
|
|
472
|
+
this.item = item;
|
|
473
|
+
this.pluginInstallService = pluginInstallService;
|
|
474
|
+
}
|
|
475
|
+
async run() {
|
|
476
|
+
await this.pluginInstallService.installPlugin({
|
|
477
|
+
name: this.item.name,
|
|
478
|
+
description: this.item.description,
|
|
479
|
+
version: "",
|
|
480
|
+
source: this.item.source,
|
|
481
|
+
sourceDescriptor: this.item.sourceDescriptor,
|
|
482
|
+
marketplace: this.item.marketplace,
|
|
483
|
+
marketplaceReference: this.item.marketplaceReference,
|
|
484
|
+
marketplaceType: this.item.marketplaceType,
|
|
485
|
+
readmeUri: this.item.readmeUri
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
InstallPluginEditorAction = InstallPluginEditorAction_1 = ( __decorate([( __param(1, IPluginInstallService))], InstallPluginEditorAction));
|
|
490
|
+
let EnablePluginEditorAction = class EnablePluginEditorAction extends Action {
|
|
491
|
+
static {
|
|
492
|
+
EnablePluginEditorAction_1 = this;
|
|
493
|
+
}
|
|
494
|
+
static {
|
|
495
|
+
this.ID = "agentPlugin.editor.enable";
|
|
496
|
+
}
|
|
497
|
+
constructor(plugin, agentPluginService) {
|
|
498
|
+
super(EnablePluginEditorAction_1.ID, ( localize(5014, "Enable")), "extension-action label prominent");
|
|
499
|
+
this.plugin = plugin;
|
|
500
|
+
this.agentPluginService = agentPluginService;
|
|
501
|
+
}
|
|
502
|
+
async run() {
|
|
503
|
+
this.agentPluginService.setPluginEnabled(this.plugin.uri, true);
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
EnablePluginEditorAction = EnablePluginEditorAction_1 = ( __decorate([( __param(1, IAgentPluginService))], EnablePluginEditorAction));
|
|
507
|
+
let DisablePluginEditorAction = class DisablePluginEditorAction extends Action {
|
|
508
|
+
static {
|
|
509
|
+
DisablePluginEditorAction_1 = this;
|
|
510
|
+
}
|
|
511
|
+
static {
|
|
512
|
+
this.ID = "agentPlugin.editor.disable";
|
|
513
|
+
}
|
|
514
|
+
constructor(plugin, agentPluginService) {
|
|
515
|
+
super(DisablePluginEditorAction_1.ID, ( localize(5015, "Disable")), "extension-action label disable");
|
|
516
|
+
this.plugin = plugin;
|
|
517
|
+
this.agentPluginService = agentPluginService;
|
|
518
|
+
}
|
|
519
|
+
async run() {
|
|
520
|
+
this.agentPluginService.setPluginEnabled(this.plugin.uri, false);
|
|
521
|
+
}
|
|
522
|
+
};
|
|
523
|
+
DisablePluginEditorAction = DisablePluginEditorAction_1 = ( __decorate([( __param(1, IAgentPluginService))], DisablePluginEditorAction));
|
|
524
|
+
class UninstallPluginEditorAction extends Action {
|
|
525
|
+
static {
|
|
526
|
+
this.ID = "agentPlugin.editor.uninstall";
|
|
527
|
+
}
|
|
528
|
+
constructor(plugin) {
|
|
529
|
+
super(UninstallPluginEditorAction.ID, ( localize(5016, "Uninstall")), "extension-action label uninstall");
|
|
530
|
+
this.plugin = plugin;
|
|
531
|
+
}
|
|
532
|
+
async run() {
|
|
533
|
+
this.plugin.remove();
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
export { AgentPluginEditor };
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
|
|
2
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
+
import { EditorInputCapabilities, IUntypedEditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
4
|
+
import { EditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput";
|
|
5
|
+
import { IAgentPluginItem } from "./agentPluginItems.js";
|
|
6
|
+
export declare class AgentPluginEditorInput extends EditorInput {
|
|
7
|
+
private _item;
|
|
8
|
+
static readonly ID = "workbench.agentPlugin.input";
|
|
9
|
+
get typeId(): string;
|
|
10
|
+
get capabilities(): EditorInputCapabilities;
|
|
11
|
+
get resource(): URI;
|
|
12
|
+
constructor(_item: IAgentPluginItem);
|
|
13
|
+
get item(): IAgentPluginItem;
|
|
14
|
+
getName(): string;
|
|
15
|
+
getIcon(): ThemeIcon | undefined;
|
|
16
|
+
matches(other: EditorInput | IUntypedEditorInput): boolean;
|
|
17
|
+
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
3
|
+
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
4
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
5
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
+
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
7
|
+
import { EditorInputCapabilities } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
8
|
+
import { EditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput';
|
|
9
|
+
import { AgentPluginItemKind } from './agentPluginItems.js';
|
|
10
|
+
|
|
11
|
+
const AgentPluginEditorIcon = registerIcon("agent-plugin-editor-icon", Codicon.extensions, ( localize(5017, "Icon of the Agent Plugin editor.")));
|
|
12
|
+
function getPluginId(item) {
|
|
13
|
+
if (item.kind === AgentPluginItemKind.Installed) {
|
|
14
|
+
return ( item.plugin.uri.toString());
|
|
15
|
+
}
|
|
16
|
+
return `${item.marketplaceReference.canonicalId}/${item.source}`;
|
|
17
|
+
}
|
|
18
|
+
class AgentPluginEditorInput extends EditorInput {
|
|
19
|
+
static {
|
|
20
|
+
this.ID = "workbench.agentPlugin.input";
|
|
21
|
+
}
|
|
22
|
+
get typeId() {
|
|
23
|
+
return AgentPluginEditorInput.ID;
|
|
24
|
+
}
|
|
25
|
+
get capabilities() {
|
|
26
|
+
return EditorInputCapabilities.Readonly | EditorInputCapabilities.Singleton;
|
|
27
|
+
}
|
|
28
|
+
get resource() {
|
|
29
|
+
return ( URI.from({
|
|
30
|
+
scheme: Schemas.extension,
|
|
31
|
+
path: `/agentPlugin/${encodeURIComponent(getPluginId(this._item))}`
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
constructor(_item) {
|
|
35
|
+
super();
|
|
36
|
+
this._item = _item;
|
|
37
|
+
}
|
|
38
|
+
get item() {
|
|
39
|
+
return this._item;
|
|
40
|
+
}
|
|
41
|
+
getName() {
|
|
42
|
+
return localize(5018, "Plugin: {0}", this._item.name);
|
|
43
|
+
}
|
|
44
|
+
getIcon() {
|
|
45
|
+
return AgentPluginEditorIcon;
|
|
46
|
+
}
|
|
47
|
+
matches(other) {
|
|
48
|
+
if (super.matches(other)) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
return other instanceof AgentPluginEditorInput && getPluginId(this._item) === getPluginId(other._item);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { AgentPluginEditorInput };
|