@codingame/monaco-vscode-chat-service-override 30.0.0 → 31.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 +21 -3
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +125 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +393 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +65 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +453 -0
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +28 -0
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +81 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +75 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +180 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +202 -51
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +182 -0
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +282 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +303 -32
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.js +14 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.js +9 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +30 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +662 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +12 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +9 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.d.ts +17 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.js +5 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +5 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.js +14 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.d.ts +42 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.js +7 -0
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +118 -0
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +551 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +22 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +113 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +81 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +47 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +15 -10
- 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 +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +13 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +58 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +24 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +29 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.js +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +65 -55
- 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 +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +28 -28
- 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/aiCustomizationDebugPanel.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +80 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +20 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +30 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +131 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +363 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +31 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +374 -764
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +222 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +20 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +269 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +249 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +5 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +14 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +113 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +202 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +246 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +162 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +306 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +581 -257
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +245 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +25 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +3 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +103 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +80 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +20 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +128 -65
- 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 +28 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- 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.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +11 -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 +6 -5
- 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 +10 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +4 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +4 -310
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +3 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +61 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +0 -110
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +46 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +17 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +96 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +21 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +15 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +315 -263
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +196 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +56 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +8 -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/pluginGitCommandService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +26 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +48 -57
- 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 +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +2 -2
- 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.d.ts +11 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +226 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatModelCountTelemetry.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatModelCountTelemetry.js +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +108 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +9 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +21 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +26 -59
- 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 +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +46 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugEvents.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugEvents.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +32 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +152 -26
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +5 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +265 -261
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +28 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +75 -7
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +9 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +32 -4
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +10 -25
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +7 -52
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +58 -466
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +36 -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.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +168 -182
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +49 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +491 -462
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +16 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +18 -12
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +24 -4
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +145 -68
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +25 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +19 -17
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +5 -17
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +77 -157
- 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 +17 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +21 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +29 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +12 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +49 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +9 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +13 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +319 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +8 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +2 -2
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.d.ts +21 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +35 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +0 -94
- package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +0 -16
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +0 -578
- package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +0 -206
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +0 -114
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +0 -860
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +0 -27
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +0 -58
- package/vscode/src/vs/platform/browserElements/common/browserElements.js +0 -16
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +0 -18
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/media/simpleBrowserOverlay.css +0 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +0 -443
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +0 -132
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatUsageWidget.css +0 -69
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +0 -66
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +0 -158
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +0 -142
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +0 -45
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +0 -164
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +0 -163
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +0 -142
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +0 -29
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +0 -137
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +0 -174
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +0 -39
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +0 -32
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +0 -249
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +0 -92
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +0 -209
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +0 -106
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +0 -392
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +0 -45
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +0 -243
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +0 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +0 -310
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +0 -168
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +0 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +0 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +0 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +0 -44
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +0 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +0 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +0 -29
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +0 -33
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +0 -28
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +0 -118
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +0 -1019
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +0 -49
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +0 -23
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +0 -150
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +0 -1619
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +0 -118
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.js +0 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +0 -130
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +0 -122
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +0 -482
|
@@ -17,6 +17,27 @@ export interface ChatModelStoreDelegate {
|
|
|
17
17
|
createModel: (props: IStartSessionProps) => ChatModel;
|
|
18
18
|
willDisposeModel: (model: ChatModel) => Promise<void>;
|
|
19
19
|
}
|
|
20
|
+
export interface IChatModelReferenceDebugHolder {
|
|
21
|
+
readonly holder: string;
|
|
22
|
+
readonly count: number;
|
|
23
|
+
}
|
|
24
|
+
export interface IChatModelReferenceDebugInfo {
|
|
25
|
+
readonly sessionResource: URI;
|
|
26
|
+
readonly title: string;
|
|
27
|
+
readonly createdBy: string;
|
|
28
|
+
readonly initialLocation: ChatAgentLocation;
|
|
29
|
+
readonly isImported: boolean;
|
|
30
|
+
readonly willKeepAlive: boolean;
|
|
31
|
+
readonly hasPendingEdits: boolean;
|
|
32
|
+
readonly pendingDisposal: boolean;
|
|
33
|
+
readonly referenceCount: number;
|
|
34
|
+
readonly holders: readonly IChatModelReferenceDebugHolder[];
|
|
35
|
+
}
|
|
36
|
+
export interface IChatModelReferenceDebugSnapshot {
|
|
37
|
+
readonly totalModels: number;
|
|
38
|
+
readonly totalReferences: number;
|
|
39
|
+
readonly models: readonly IChatModelReferenceDebugInfo[];
|
|
40
|
+
}
|
|
20
41
|
export declare class ChatModelStore extends Disposable {
|
|
21
42
|
private readonly delegate;
|
|
22
43
|
private readonly logService;
|
|
@@ -24,6 +45,9 @@ export declare class ChatModelStore extends Disposable {
|
|
|
24
45
|
private readonly _models;
|
|
25
46
|
private readonly _modelsToDispose;
|
|
26
47
|
private readonly _pendingDisposals;
|
|
48
|
+
private readonly _modelCreateOwners;
|
|
49
|
+
private readonly _referenceOwners;
|
|
50
|
+
private _referenceOwnerIds;
|
|
27
51
|
private readonly _onDidDisposeModel;
|
|
28
52
|
readonly onDidDisposeModel: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<ChatModel>;
|
|
29
53
|
private readonly _onDidCreateModel;
|
|
@@ -36,11 +60,13 @@ export declare class ChatModelStore extends Disposable {
|
|
|
36
60
|
*/
|
|
37
61
|
get(uri: URI): ChatModel | undefined;
|
|
38
62
|
has(uri: URI): boolean;
|
|
39
|
-
acquireExisting(uri: URI): IReference<ChatModel> | undefined;
|
|
40
|
-
acquireOrCreate(props: IStartSessionProps): IReference<ChatModel>;
|
|
63
|
+
acquireExisting(uri: URI, debugOwner?: string): IReference<ChatModel> | undefined;
|
|
64
|
+
acquireOrCreate(props: IStartSessionProps, debugOwner?: string): IReference<ChatModel>;
|
|
65
|
+
getReferenceDebugSnapshot(): IChatModelReferenceDebugSnapshot;
|
|
41
66
|
private createReferencedObject;
|
|
42
67
|
private destroyReferencedObject;
|
|
43
68
|
private doDestroyReferencedObject;
|
|
69
|
+
private wrapReference;
|
|
44
70
|
/**
|
|
45
71
|
* For test use only
|
|
46
72
|
*/
|
|
@@ -4,6 +4,7 @@ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/even
|
|
|
4
4
|
import { Disposable, ReferenceCollection } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
6
6
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
7
|
+
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
7
8
|
import { ObservableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/map';
|
|
8
9
|
|
|
9
10
|
let ChatModelStore = class ChatModelStore extends Disposable {
|
|
@@ -14,14 +15,17 @@ let ChatModelStore = class ChatModelStore extends Disposable {
|
|
|
14
15
|
this._models = ( new ObservableMap());
|
|
15
16
|
this._modelsToDispose = ( new Set());
|
|
16
17
|
this._pendingDisposals = ( new Set());
|
|
18
|
+
this._modelCreateOwners = ( new Map());
|
|
19
|
+
this._referenceOwners = ( new Map());
|
|
20
|
+
this._referenceOwnerIds = 0;
|
|
17
21
|
this._onDidDisposeModel = this._register(( new Emitter()));
|
|
18
22
|
this.onDidDisposeModel = this._onDidDisposeModel.event;
|
|
19
23
|
this._onDidCreateModel = this._register(( new Emitter()));
|
|
20
24
|
this.onDidCreateModel = this._onDidCreateModel.event;
|
|
21
25
|
const self = this;
|
|
22
26
|
this._refCollection = new (class extends ReferenceCollection {
|
|
23
|
-
createReferencedObject(key, props) {
|
|
24
|
-
return self.createReferencedObject(key, props);
|
|
27
|
+
createReferencedObject(key, props, debugOwner) {
|
|
28
|
+
return self.createReferencedObject(key, props, debugOwner);
|
|
25
29
|
}
|
|
26
30
|
destroyReferencedObject(key, object) {
|
|
27
31
|
return self.destroyReferencedObject(key, object);
|
|
@@ -40,17 +44,51 @@ let ChatModelStore = class ChatModelStore extends Disposable {
|
|
|
40
44
|
has(uri) {
|
|
41
45
|
return ( this._models.has(this.toKey(uri)));
|
|
42
46
|
}
|
|
43
|
-
acquireExisting(uri) {
|
|
47
|
+
acquireExisting(uri, debugOwner) {
|
|
44
48
|
const key = this.toKey(uri);
|
|
45
49
|
if (!( this._models.has(key))) {
|
|
46
50
|
return undefined;
|
|
47
51
|
}
|
|
48
|
-
return this._refCollection.acquire(key);
|
|
52
|
+
return this.wrapReference(key, this._refCollection.acquire(key, undefined, debugOwner), debugOwner);
|
|
49
53
|
}
|
|
50
|
-
acquireOrCreate(props) {
|
|
51
|
-
|
|
54
|
+
acquireOrCreate(props, debugOwner) {
|
|
55
|
+
const key = this.toKey(props.sessionResource);
|
|
56
|
+
return this.wrapReference(key, this._refCollection.acquire(key, props, debugOwner), debugOwner);
|
|
52
57
|
}
|
|
53
|
-
|
|
58
|
+
getReferenceDebugSnapshot() {
|
|
59
|
+
const models = ( Array.from(( this._models.values())).map(model => {
|
|
60
|
+
const key = this.toKey(model.sessionResource);
|
|
61
|
+
const owners = this._referenceOwners.get(key) ?? ( new Map());
|
|
62
|
+
const countsByOwner = ( new Map());
|
|
63
|
+
for (const owner of ( owners.values())) {
|
|
64
|
+
countsByOwner.set(owner, (countsByOwner.get(owner) ?? 0) + 1);
|
|
65
|
+
}
|
|
66
|
+
const holders = ( Array.from(countsByOwner.entries()).map(([holder, count]) => ({
|
|
67
|
+
holder,
|
|
68
|
+
count
|
|
69
|
+
}))).sort((a, b) => b.count - a.count || a.holder.localeCompare(b.holder));
|
|
70
|
+
return {
|
|
71
|
+
sessionResource: model.sessionResource,
|
|
72
|
+
title: model.title,
|
|
73
|
+
createdBy: this._modelCreateOwners.get(key) ?? "unknown",
|
|
74
|
+
initialLocation: model.initialLocation,
|
|
75
|
+
isImported: !!model.isImported,
|
|
76
|
+
willKeepAlive: model.willKeepAlive,
|
|
77
|
+
hasPendingEdits: !!model.editingSession?.entries.get().some(entry => entry.state.get() === ModifiedFileEntryState.Modified),
|
|
78
|
+
pendingDisposal: ( this._modelsToDispose.has(key)),
|
|
79
|
+
referenceCount: owners.size,
|
|
80
|
+
holders
|
|
81
|
+
};
|
|
82
|
+
})).sort(
|
|
83
|
+
(a, b) => b.referenceCount - a.referenceCount || Number(b.hasPendingEdits) - Number(a.hasPendingEdits) || ( a.sessionResource.toString()).localeCompare(( b.sessionResource.toString()))
|
|
84
|
+
);
|
|
85
|
+
return {
|
|
86
|
+
totalModels: models.length,
|
|
87
|
+
totalReferences: models.reduce((total, model) => total + model.referenceCount, 0),
|
|
88
|
+
models
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
createReferencedObject(key, props, debugOwner) {
|
|
54
92
|
this._modelsToDispose.delete(key);
|
|
55
93
|
const existingModel = this._models.get(key);
|
|
56
94
|
if (existingModel) {
|
|
@@ -61,6 +99,7 @@ let ChatModelStore = class ChatModelStore extends Disposable {
|
|
|
61
99
|
}
|
|
62
100
|
this.logService.trace(`Creating chat session ${key}`);
|
|
63
101
|
const model = this.delegate.createModel(props);
|
|
102
|
+
this._modelCreateOwners.set(key, debugOwner ?? "unspecified");
|
|
64
103
|
if (( model.sessionResource.toString()) !== key) {
|
|
65
104
|
throw ( new Error(`Chat session key mismatch for ${key}`));
|
|
66
105
|
}
|
|
@@ -85,12 +124,41 @@ let ChatModelStore = class ChatModelStore extends Disposable {
|
|
|
85
124
|
if (( this._modelsToDispose.has(key))) {
|
|
86
125
|
this.logService.trace(`Disposing chat session ${key}`);
|
|
87
126
|
this._models.delete(key);
|
|
127
|
+
this._modelCreateOwners.delete(key);
|
|
128
|
+
this._referenceOwners.delete(key);
|
|
88
129
|
this._onDidDisposeModel.fire(object);
|
|
89
130
|
object.dispose();
|
|
90
131
|
}
|
|
91
132
|
this._modelsToDispose.delete(key);
|
|
92
133
|
}
|
|
93
134
|
}
|
|
135
|
+
wrapReference(key, reference, debugOwner) {
|
|
136
|
+
const ownerId = ++this._referenceOwnerIds;
|
|
137
|
+
let ownerEntries = this._referenceOwners.get(key);
|
|
138
|
+
if (!ownerEntries) {
|
|
139
|
+
ownerEntries = ( new Map());
|
|
140
|
+
this._referenceOwners.set(key, ownerEntries);
|
|
141
|
+
}
|
|
142
|
+
ownerEntries.set(ownerId, debugOwner ?? "unspecified");
|
|
143
|
+
let isDisposed = false;
|
|
144
|
+
const wrapped = {
|
|
145
|
+
object: reference.object,
|
|
146
|
+
dispose: () => {
|
|
147
|
+
if (isDisposed) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
isDisposed = true;
|
|
151
|
+
const owners = this._referenceOwners.get(key);
|
|
152
|
+
owners?.delete(ownerId);
|
|
153
|
+
if (owners?.size === 0) {
|
|
154
|
+
this._referenceOwners.delete(key);
|
|
155
|
+
}
|
|
156
|
+
reference.dispose();
|
|
157
|
+
wrapped.object = null;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
return wrapped;
|
|
161
|
+
}
|
|
94
162
|
async waitForModelDisposals() {
|
|
95
163
|
await Promise.all(this._pendingDisposals);
|
|
96
164
|
}
|
|
@@ -52,6 +52,7 @@ const responsePartSchema = v(
|
|
|
52
52
|
case "progressMessage":
|
|
53
53
|
case "pullRequest":
|
|
54
54
|
case "questionCarousel":
|
|
55
|
+
case "planReview":
|
|
55
56
|
case "undoStop":
|
|
56
57
|
case "warning":
|
|
57
58
|
case "treeData":
|
|
@@ -110,7 +111,14 @@ const requestSchema = object({
|
|
|
110
111
|
contentReferences: v(m => m.response?.contentReferences, equals),
|
|
111
112
|
codeCitations: v(m => m.response?.codeCitations, equals),
|
|
112
113
|
timeSpentWaiting: v(m => m.response?.timestamp),
|
|
113
|
-
|
|
114
|
+
completionTokens: v(m => m.response?.completionTokenCount),
|
|
115
|
+
elapsedMs: v(
|
|
116
|
+
m => m.response?.elapsedMs ?? (m.response?.completedAt ? Math.max(0, m.response.completedAt - m.response.confirmationAdjustedTimestamp.get()) : undefined)
|
|
117
|
+
),
|
|
118
|
+
modeInfo: v(m => m.modeInfo, equals),
|
|
119
|
+
isSystemInitiated: v(m => m.isSystemInitiated),
|
|
120
|
+
systemInitiatedLabel: v(m => m.systemInitiatedLabel),
|
|
121
|
+
terminalExecutionId: v(m => m.terminalExecutionId)
|
|
114
122
|
}, {
|
|
115
123
|
sealed: o => o.modelState?.value === ResponseModelState.Cancelled || o.modelState?.value === ResponseModelState.Failed || o.modelState?.value === ResponseModelState.Complete
|
|
116
124
|
});
|
|
@@ -98,7 +98,7 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
98
98
|
}
|
|
99
99
|
e.join(this.storeTask, {
|
|
100
100
|
id: "join.chatSessionStore",
|
|
101
|
-
label: ( localize(
|
|
101
|
+
label: ( localize(7418, "Saving chat history"))
|
|
102
102
|
});
|
|
103
103
|
}));
|
|
104
104
|
}
|
|
@@ -356,14 +356,14 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
356
356
|
this._didReportIssue = true;
|
|
357
357
|
this.dialogService.prompt({
|
|
358
358
|
custom: true,
|
|
359
|
-
title: ( localize(
|
|
359
|
+
title: ( localize(7419, "Error saving chat session")),
|
|
360
360
|
message: ( localize(
|
|
361
|
-
|
|
361
|
+
7420,
|
|
362
362
|
"Error serializing chat session for storage. The session will be lost if the window is closed. Please report this issue to the VS Code team:\n\n{0}",
|
|
363
363
|
e.stack || toErrorMessage(e)
|
|
364
364
|
)),
|
|
365
365
|
buttons: [{
|
|
366
|
-
label: ( localize(
|
|
366
|
+
label: ( localize(7421, "Report Issue")),
|
|
367
367
|
run: () => this.openerService.open("https://github.com/microsoft/vscode/issues/new?template=bug_report.md")
|
|
368
368
|
}]
|
|
369
369
|
});
|
|
@@ -375,6 +375,7 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
375
375
|
append: op === "append"
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
|
+
session.dataSerializer.confirmWrite();
|
|
378
379
|
} else {
|
|
379
380
|
const content = ( new ChatSessionOperationLog()).createInitialFromSerialized(session);
|
|
380
381
|
await this.fileService.writeFile(storageLocation.log, content);
|
|
@@ -708,7 +709,7 @@ async function getSessionMetadata(session) {
|
|
|
708
709
|
}
|
|
709
710
|
return {
|
|
710
711
|
sessionId: session.sessionId,
|
|
711
|
-
title: title || ( localize(
|
|
712
|
+
title: title || ( localize(7422, "New Chat")),
|
|
712
713
|
lastMessageDate,
|
|
713
714
|
timing,
|
|
714
715
|
initialLocation: session.initialLocation,
|
|
@@ -79,6 +79,9 @@ export declare class ObjectMutationLog<TFrom, TTo> {
|
|
|
79
79
|
private readonly _compactAfterEntries;
|
|
80
80
|
private _previous;
|
|
81
81
|
private _entryCount;
|
|
82
|
+
private _hasPendingWrite;
|
|
83
|
+
private _pendingPrevious;
|
|
84
|
+
private _pendingEntryCount;
|
|
82
85
|
constructor(_transform: Transform<TFrom, TTo>, _compactAfterEntries?: number);
|
|
83
86
|
/**
|
|
84
87
|
* Creates an initial log file from the given object.
|
|
@@ -86,6 +89,11 @@ export declare class ObjectMutationLog<TFrom, TTo> {
|
|
|
86
89
|
createInitial(current: TFrom): VSBuffer;
|
|
87
90
|
/**
|
|
88
91
|
* Creates an initial log file from the serialized object.
|
|
92
|
+
*
|
|
93
|
+
* Unlike {@link write}, this commits state immediately without requiring
|
|
94
|
+
* {@link confirmWrite}. This is safe because the returned buffer contains
|
|
95
|
+
* a self-contained `Initial` entry — if it fails to persist, no
|
|
96
|
+
* incremental entries can be appended to a non-existent file.
|
|
89
97
|
*/
|
|
90
98
|
createInitialFromSerialized(value: TTo): VSBuffer;
|
|
91
99
|
/**
|
|
@@ -94,11 +102,21 @@ export declare class ObjectMutationLog<TFrom, TTo> {
|
|
|
94
102
|
read(content: VSBuffer): TTo;
|
|
95
103
|
/**
|
|
96
104
|
* Writes updates to the log. Returns the operation type and data to write.
|
|
105
|
+
* The caller **must** invoke {@link confirmWrite} after the data is
|
|
106
|
+
* successfully persisted to commit the internal state. Without confirmation,
|
|
107
|
+
* the next write is computed against the last confirmed state, and will only
|
|
108
|
+
* produce a full initial entry when no confirmed state exists, preventing
|
|
109
|
+
* corrupted log files when a write fails.
|
|
97
110
|
*/
|
|
98
111
|
write(current: TFrom): {
|
|
99
112
|
op: "append" | "replace";
|
|
100
113
|
data: VSBuffer;
|
|
101
114
|
};
|
|
115
|
+
/**
|
|
116
|
+
* Commits the internal state after a successful write to disk.
|
|
117
|
+
*/
|
|
118
|
+
confirmWrite(): void;
|
|
119
|
+
private _clearPending;
|
|
102
120
|
private _applySet;
|
|
103
121
|
private _applyPush;
|
|
104
122
|
private _diff;
|
|
@@ -106,6 +106,8 @@ class ObjectMutationLog {
|
|
|
106
106
|
this._transform = _transform;
|
|
107
107
|
this._compactAfterEntries = _compactAfterEntries;
|
|
108
108
|
this._entryCount = 0;
|
|
109
|
+
this._hasPendingWrite = false;
|
|
110
|
+
this._pendingEntryCount = 0;
|
|
109
111
|
}
|
|
110
112
|
createInitial(current) {
|
|
111
113
|
return this.createInitialFromSerialized(this._transform.extract(current));
|
|
@@ -113,6 +115,7 @@ class ObjectMutationLog {
|
|
|
113
115
|
createInitialFromSerialized(value) {
|
|
114
116
|
this._previous = value;
|
|
115
117
|
this._entryCount = 1;
|
|
118
|
+
this._clearPending();
|
|
116
119
|
const entry = {
|
|
117
120
|
kind: EntryKind.Initial,
|
|
118
121
|
v: value
|
|
@@ -139,12 +142,21 @@ class ObjectMutationLog {
|
|
|
139
142
|
state = entry.v;
|
|
140
143
|
break;
|
|
141
144
|
case EntryKind.Set:
|
|
145
|
+
if (state === undefined) {
|
|
146
|
+
throw ( new Error("Log file is missing an initial entry"));
|
|
147
|
+
}
|
|
142
148
|
this._applySet(state, entry.k, entry.v);
|
|
143
149
|
break;
|
|
144
150
|
case EntryKind.Push:
|
|
151
|
+
if (state === undefined) {
|
|
152
|
+
throw ( new Error("Log file is missing an initial entry"));
|
|
153
|
+
}
|
|
145
154
|
this._applyPush(state, entry.k, entry.v, entry.i);
|
|
146
155
|
break;
|
|
147
156
|
case EntryKind.Delete:
|
|
157
|
+
if (state === undefined) {
|
|
158
|
+
throw ( new Error("Log file is missing an initial entry"));
|
|
159
|
+
}
|
|
148
160
|
this._applySet(state, entry.k, undefined);
|
|
149
161
|
break;
|
|
150
162
|
default:
|
|
@@ -159,13 +171,15 @@ class ObjectMutationLog {
|
|
|
159
171
|
}
|
|
160
172
|
this._previous = state;
|
|
161
173
|
this._entryCount = lineCount;
|
|
174
|
+
this._clearPending();
|
|
162
175
|
return state;
|
|
163
176
|
}
|
|
164
177
|
write(current) {
|
|
165
178
|
const currentValue = this._transform.extract(current);
|
|
166
179
|
if (!this._previous || this._entryCount > this._compactAfterEntries) {
|
|
167
|
-
this.
|
|
168
|
-
this.
|
|
180
|
+
this._hasPendingWrite = true;
|
|
181
|
+
this._pendingPrevious = currentValue;
|
|
182
|
+
this._pendingEntryCount = 1;
|
|
169
183
|
const entry = {
|
|
170
184
|
kind: EntryKind.Initial,
|
|
171
185
|
v: currentValue
|
|
@@ -187,13 +201,15 @@ class ObjectMutationLog {
|
|
|
187
201
|
throw e;
|
|
188
202
|
}
|
|
189
203
|
if (entries.length === 0) {
|
|
204
|
+
this._clearPending();
|
|
190
205
|
return {
|
|
191
206
|
op: "append",
|
|
192
207
|
data: VSBuffer.fromString("")
|
|
193
208
|
};
|
|
194
209
|
}
|
|
195
|
-
this.
|
|
196
|
-
this.
|
|
210
|
+
this._hasPendingWrite = true;
|
|
211
|
+
this._pendingEntryCount = this._entryCount + entries.length;
|
|
212
|
+
this._pendingPrevious = currentValue;
|
|
197
213
|
let data = "";
|
|
198
214
|
for (const e of entries) {
|
|
199
215
|
data += JSON.stringify(e) + "\n";
|
|
@@ -203,6 +219,18 @@ class ObjectMutationLog {
|
|
|
203
219
|
data: VSBuffer.fromString(data)
|
|
204
220
|
};
|
|
205
221
|
}
|
|
222
|
+
confirmWrite() {
|
|
223
|
+
if (this._hasPendingWrite) {
|
|
224
|
+
this._previous = this._pendingPrevious;
|
|
225
|
+
this._entryCount = this._pendingEntryCount;
|
|
226
|
+
this._clearPending();
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
_clearPending() {
|
|
230
|
+
this._hasPendingWrite = false;
|
|
231
|
+
this._pendingPrevious = undefined;
|
|
232
|
+
this._pendingEntryCount = 0;
|
|
233
|
+
}
|
|
206
234
|
_applySet(state, path, value) {
|
|
207
235
|
if (path.length === 0) {
|
|
208
236
|
return;
|
|
@@ -2,39 +2,22 @@ import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/
|
|
|
2
2
|
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
4
|
import { SyncDescriptor0 } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors";
|
|
5
|
-
import {
|
|
5
|
+
import { type INamedPluginResource, type IMcpServerDefinition, type IParsedHookCommand } from "../../../../../platform/agentPlugins/common/pluginParsers.js";
|
|
6
6
|
import { ContributionEnablementState, IEnablementModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/enablement";
|
|
7
|
-
import { IHookCommand } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema";
|
|
8
7
|
import { HookType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes";
|
|
9
8
|
import { IMarketplacePlugin } from "./pluginMarketplaceService.js";
|
|
10
9
|
export interface IAgentPluginHook {
|
|
11
10
|
readonly type: HookType;
|
|
12
|
-
readonly hooks: readonly
|
|
11
|
+
readonly hooks: readonly IParsedHookCommand[];
|
|
13
12
|
/** URI where this hook is defined -- not unique, multiple hooks may be in a manifest */
|
|
14
13
|
readonly uri: URI;
|
|
15
14
|
readonly originalId: string;
|
|
16
15
|
}
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export
|
|
22
|
-
readonly uri: URI;
|
|
23
|
-
readonly name: string;
|
|
24
|
-
}
|
|
25
|
-
export interface IAgentPluginAgent {
|
|
26
|
-
readonly uri: URI;
|
|
27
|
-
readonly name: string;
|
|
28
|
-
}
|
|
29
|
-
export interface IAgentPluginInstruction {
|
|
30
|
-
readonly uri: URI;
|
|
31
|
-
readonly name: string;
|
|
32
|
-
}
|
|
33
|
-
export interface IAgentPluginMcpServerDefinition {
|
|
34
|
-
readonly name: string;
|
|
35
|
-
readonly configuration: IMcpServerConfiguration;
|
|
36
|
-
readonly uri: URI;
|
|
37
|
-
}
|
|
16
|
+
export type IAgentPluginCommand = INamedPluginResource;
|
|
17
|
+
export type IAgentPluginSkill = INamedPluginResource;
|
|
18
|
+
export type IAgentPluginAgent = INamedPluginResource;
|
|
19
|
+
export type IAgentPluginInstruction = INamedPluginResource;
|
|
20
|
+
export type IAgentPluginMcpServerDefinition = IMcpServerDefinition;
|
|
38
21
|
export interface IAgentPlugin {
|
|
39
22
|
readonly uri: URI;
|
|
40
23
|
/** Human-readable display name for the plugin. */
|
|
@@ -55,7 +38,9 @@ export interface IAgentPluginDiscovery extends IDisposable {
|
|
|
55
38
|
readonly plugins: IObservable<readonly IAgentPlugin[]>;
|
|
56
39
|
start(enablementModel: IEnablementModel): void;
|
|
57
40
|
}
|
|
58
|
-
export declare function getCanonicalPluginCommandId(plugin:
|
|
41
|
+
export declare function getCanonicalPluginCommandId(plugin: {
|
|
42
|
+
readonly uri: URI;
|
|
43
|
+
}, commandName: string): string;
|
|
59
44
|
declare class AgentPluginDiscoveryRegistry {
|
|
60
45
|
private readonly _discovery;
|
|
61
46
|
register(descriptor: SyncDescriptor0<IAgentPluginDiscovery>): void;
|
|
@@ -13,43 +13,11 @@ import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
13
13
|
import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service";
|
|
14
14
|
import { IEnablementModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/enablement";
|
|
15
15
|
import { IAgentPluginRepositoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service";
|
|
16
|
-
import { IAgentPlugin, IAgentPluginDiscovery
|
|
16
|
+
import { IAgentPlugin, IAgentPluginDiscovery } from "./agentPluginService.js";
|
|
17
17
|
import { IAgentPluginService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service";
|
|
18
18
|
import { IMarketplacePlugin } from "./pluginMarketplaceService.js";
|
|
19
19
|
import { IPluginMarketplaceService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service";
|
|
20
|
-
|
|
21
|
-
* Replaces `${CLAUDE_PLUGIN_ROOT}` in a shell command string with the
|
|
22
|
-
* given fsPath. If the path contains characters that would break shell
|
|
23
|
-
* parsing (e.g. spaces), occurrences are wrapped in double-quotes.
|
|
24
|
-
*
|
|
25
|
-
* The token may be followed by additional path segments like
|
|
26
|
-
* `${CLAUDE_PLUGIN_ROOT}/scripts/run.sh`; the entire resulting path
|
|
27
|
-
* (including suffix) is quoted as one unit.
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
export declare function shellQuotePluginRootInCommand(command: string, fsPath: string, token: string): string;
|
|
31
|
-
/**
|
|
32
|
-
* Extracts the MCP server map from a raw JSON value. Accepts both the
|
|
33
|
-
* wrapped format `{ mcpServers: { … } }` (Claude `.mcp.json`) and the
|
|
34
|
-
* flat format where server entries are at the top level.
|
|
35
|
-
* Returns `undefined` when the input is not a usable object.
|
|
36
|
-
*/
|
|
37
|
-
export declare function resolveMcpServersMap(raw: unknown): Record<string, unknown> | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Converts bare `${VAR}` environment-variable references found in MCP server
|
|
40
|
-
* definition strings to the VS Code `${env:VAR}` syntax so that the
|
|
41
|
-
* `configurationResolverService` can resolve them later in the pipeline.
|
|
42
|
-
*
|
|
43
|
-
* The MCP ecosystem (Claude Desktop, Copilot CLI) uses bare `${VAR}` to
|
|
44
|
-
* reference environment variables, while VS Code's resolver expects the
|
|
45
|
-
* `${env:VAR}` form. This function bridges that gap for all plugin-provided
|
|
46
|
-
* MCP server definitions.
|
|
47
|
-
*
|
|
48
|
-
* Only references whose name consists of uppercase letters, digits, and
|
|
49
|
-
* underscores are converted — this avoids transforming VS Code's own variable
|
|
50
|
-
* tokens (e.g. `${workspaceFolder}`) which use lowercase/camelCase names.
|
|
51
|
-
*/
|
|
52
|
-
export declare function convertBareEnvVarsToVsCodeSyntax(def: IAgentPluginMcpServerDefinition): IAgentPluginMcpServerDefinition;
|
|
20
|
+
export { shellQuotePluginRootInCommand, resolveMcpServersMap, convertBareEnvVarsToVsCodeSyntax } from "../../../../../platform/agentPlugins/common/pluginParsers.js";
|
|
53
21
|
export declare class AgentPluginService extends Disposable implements IAgentPluginService {
|
|
54
22
|
readonly _serviceBrand: undefined;
|
|
55
23
|
readonly plugins: IObservable<readonly IAgentPlugin[]>;
|
|
@@ -79,19 +47,18 @@ export declare abstract class AbstractAgentPluginDiscovery extends Disposable im
|
|
|
79
47
|
protected readonly _fileService: IFileService;
|
|
80
48
|
protected readonly _pathService: IPathService;
|
|
81
49
|
protected readonly _logService: ILogService;
|
|
82
|
-
protected readonly
|
|
50
|
+
protected readonly _workspaceContextService: IWorkspaceContextService;
|
|
83
51
|
private readonly _pluginEntries;
|
|
84
52
|
private readonly _plugins;
|
|
85
53
|
readonly plugins: IObservable<readonly IAgentPlugin[]>;
|
|
86
54
|
private _discoverVersion;
|
|
87
55
|
protected _enablementModel: IEnablementModel;
|
|
88
|
-
constructor(_fileService: IFileService, _pathService: IPathService, _logService: ILogService,
|
|
56
|
+
constructor(_fileService: IFileService, _pathService: IPathService, _logService: ILogService, _workspaceContextService: IWorkspaceContextService);
|
|
89
57
|
abstract start(enablementModel: IEnablementModel): void;
|
|
90
58
|
protected _refreshPlugins(): Promise<void>;
|
|
91
59
|
/** Subclasses return plugin sources to discover. */
|
|
92
60
|
protected abstract _discoverPluginSources(): Promise<readonly IPluginSource[]>;
|
|
93
61
|
private _discoverAndBuildPlugins;
|
|
94
|
-
private _detectPluginFormatAdapter;
|
|
95
62
|
protected _pathExists(resource: URI): Promise<boolean>;
|
|
96
63
|
private _toPlugin;
|
|
97
64
|
private _readManifest;
|
|
@@ -107,32 +74,21 @@ export declare abstract class AbstractAgentPluginDiscovery extends Disposable im
|
|
|
107
74
|
* server name wins.
|
|
108
75
|
*/
|
|
109
76
|
private _readMcpDefinitionsFromPaths;
|
|
110
|
-
private _parseMcpServerDefinitionMap;
|
|
111
|
-
private _normalizeMcpServerConfiguration;
|
|
112
77
|
private _readJsonFile;
|
|
113
|
-
private _readSkills;
|
|
114
78
|
/**
|
|
115
79
|
* Scans directories for rule/instruction files (`.mdc`, `.md`,
|
|
116
80
|
* `.instructions.md`), returning `{ uri, name }` entries where name is
|
|
117
81
|
* derived from the filename minus the matched suffix.
|
|
118
82
|
*/
|
|
119
83
|
private _readRules;
|
|
120
|
-
/**
|
|
121
|
-
* Scans directories for `.md` files, returning `{ uri, name }` entries
|
|
122
|
-
* where name is derived from the filename (minus the `.md` extension).
|
|
123
|
-
* If a path points to a specific `.md` file, it is included directly.
|
|
124
|
-
* Used for both commands and agents.
|
|
125
|
-
*/
|
|
126
|
-
private _readMarkdownComponents;
|
|
127
84
|
private _disposePluginEntriesExcept;
|
|
128
85
|
dispose(): void;
|
|
129
86
|
}
|
|
130
87
|
export declare class ConfiguredAgentPluginDiscovery extends AbstractAgentPluginDiscovery {
|
|
131
88
|
private readonly _configurationService;
|
|
132
89
|
private readonly _pluginMarketplaceService;
|
|
133
|
-
private readonly _workspaceContextService;
|
|
134
90
|
private readonly _pluginLocationsConfig;
|
|
135
|
-
constructor(_configurationService: IConfigurationService, fileService: IFileService, _pluginMarketplaceService: IPluginMarketplaceService,
|
|
91
|
+
constructor(_configurationService: IConfigurationService, fileService: IFileService, _pluginMarketplaceService: IPluginMarketplaceService, workspaceContextService: IWorkspaceContextService, pathService: IPathService, logService: ILogService);
|
|
136
92
|
start(enablementModel: IEnablementModel): void;
|
|
137
93
|
protected _discoverPluginSources(): Promise<readonly IPluginSource[]>;
|
|
138
94
|
private _getUserHome;
|
|
@@ -152,7 +108,7 @@ export declare class ConfiguredAgentPluginDiscovery extends AbstractAgentPluginD
|
|
|
152
108
|
export declare class MarketplaceAgentPluginDiscovery extends AbstractAgentPluginDiscovery {
|
|
153
109
|
private readonly _pluginMarketplaceService;
|
|
154
110
|
private readonly _pluginRepositoryService;
|
|
155
|
-
constructor(_pluginMarketplaceService: IPluginMarketplaceService, _pluginRepositoryService: IAgentPluginRepositoryService, fileService: IFileService, pathService: IPathService, logService: ILogService,
|
|
111
|
+
constructor(_pluginMarketplaceService: IPluginMarketplaceService, _pluginRepositoryService: IAgentPluginRepositoryService, fileService: IFileService, pathService: IPathService, logService: ILogService, workspaceContextService: IWorkspaceContextService);
|
|
156
112
|
start(enablementModel: IEnablementModel): void;
|
|
157
113
|
protected _discoverPluginSources(): Promise<readonly IPluginSource[]>;
|
|
158
114
|
}
|
|
@@ -162,10 +118,9 @@ export declare class ExtensionAgentPluginDiscovery extends AbstractAgentPluginDi
|
|
|
162
118
|
private readonly _dialogService;
|
|
163
119
|
private readonly _extensionPlugins;
|
|
164
120
|
private readonly _whenKeys;
|
|
165
|
-
constructor(_commandService: ICommandService, _contextKeyService: IContextKeyService, _dialogService: IDialogService, fileService: IFileService, pathService: IPathService, logService: ILogService,
|
|
121
|
+
constructor(_commandService: ICommandService, _contextKeyService: IContextKeyService, _dialogService: IDialogService, fileService: IFileService, pathService: IPathService, logService: ILogService, workspaceContextService: IWorkspaceContextService);
|
|
166
122
|
start(enablementModel: IEnablementModel): void;
|
|
167
123
|
private _rebuildWhenKeys;
|
|
168
124
|
protected _discoverPluginSources(): Promise<readonly IPluginSource[]>;
|
|
169
125
|
private _promptUninstallExtension;
|
|
170
126
|
}
|
|
171
|
-
export {};
|