@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
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
|
|
2
|
+
import { decodeBase64, VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
3
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
+
import { Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { dirname, basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
6
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/charCode';
|
|
7
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
8
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
9
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
10
|
+
import { FileSystemProviderCapabilities, FilePermission, FileType, createFileSystemProviderError, FileSystemProviderErrorCode } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
11
|
+
import { fromAgentHostUri } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
|
|
12
|
+
import { ContentEncoding } from './state/protocol/commands.js';
|
|
13
|
+
|
|
14
|
+
class AHPFileSystemProvider extends Disposable {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.capabilities = FileSystemProviderCapabilities.PathCaseSensitive | FileSystemProviderCapabilities.FileReadWrite;
|
|
18
|
+
this._onDidChangeCapabilities = this._register(( new Emitter()));
|
|
19
|
+
this.onDidChangeCapabilities = this._onDidChangeCapabilities.event;
|
|
20
|
+
this._onDidChangeFile = this._register(( new Emitter()));
|
|
21
|
+
this.onDidChangeFile = this._onDidChangeFile.event;
|
|
22
|
+
this._authorityToConnection = ( new Map());
|
|
23
|
+
}
|
|
24
|
+
registerAuthority(authority, connection) {
|
|
25
|
+
this._authorityToConnection.set(authority, connection);
|
|
26
|
+
return toDisposable(() => this._authorityToConnection.delete(authority));
|
|
27
|
+
}
|
|
28
|
+
watch() {
|
|
29
|
+
return Disposable.None;
|
|
30
|
+
}
|
|
31
|
+
async stat(resource) {
|
|
32
|
+
const path = resource.path;
|
|
33
|
+
if (path === "/" || path === "") {
|
|
34
|
+
return {
|
|
35
|
+
type: FileType.Directory,
|
|
36
|
+
mtime: 0,
|
|
37
|
+
ctime: 0,
|
|
38
|
+
size: 0,
|
|
39
|
+
permissions: FilePermission.Readonly
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
const decoded = this._decodeUri(resource);
|
|
43
|
+
if (decoded.scheme === "session-db") {
|
|
44
|
+
return {
|
|
45
|
+
type: FileType.File,
|
|
46
|
+
mtime: 0,
|
|
47
|
+
ctime: 0,
|
|
48
|
+
size: 0,
|
|
49
|
+
permissions: FilePermission.Readonly
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (decoded.path === "/" || decoded.path === "") {
|
|
53
|
+
return {
|
|
54
|
+
type: FileType.Directory,
|
|
55
|
+
mtime: 0,
|
|
56
|
+
ctime: 0,
|
|
57
|
+
size: 0,
|
|
58
|
+
permissions: FilePermission.Readonly
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const parentUri = dirname(resource);
|
|
62
|
+
const name = basename(resource);
|
|
63
|
+
const entries = await this._listDirectory(resource.authority, parentUri);
|
|
64
|
+
const entry = entries.find(e => e.name === name);
|
|
65
|
+
if (!entry) {
|
|
66
|
+
throw createFileSystemProviderError(`File not found: ${path}`, FileSystemProviderErrorCode.FileNotFound);
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
type: entry.type === "directory" ? FileType.Directory : FileType.File,
|
|
70
|
+
mtime: 0,
|
|
71
|
+
ctime: 0,
|
|
72
|
+
size: 0,
|
|
73
|
+
permissions: FilePermission.Readonly
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
async readdir(resource) {
|
|
77
|
+
const entries = await this._listDirectory(resource.authority, resource);
|
|
78
|
+
return ( entries.map(e => [e.name, e.type === "directory" ? FileType.Directory : FileType.File]));
|
|
79
|
+
}
|
|
80
|
+
async readFile(resource) {
|
|
81
|
+
const connection = this._getConnection(resource.authority);
|
|
82
|
+
try {
|
|
83
|
+
const originalUri = this._decodeUri(resource);
|
|
84
|
+
const result = await connection.resourceRead(originalUri);
|
|
85
|
+
if (result.encoding === ContentEncoding.Base64) {
|
|
86
|
+
return decodeBase64(result.data).buffer;
|
|
87
|
+
}
|
|
88
|
+
return VSBuffer.fromString(result.data).buffer;
|
|
89
|
+
} catch (err) {
|
|
90
|
+
throw createFileSystemProviderError(
|
|
91
|
+
err instanceof Error ? err.message : String(err),
|
|
92
|
+
FileSystemProviderErrorCode.FileNotFound
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
async writeFile(resource, content, _opts) {
|
|
97
|
+
const connection = this._getConnection(resource.authority);
|
|
98
|
+
try {
|
|
99
|
+
const originalUri = this._decodeUri(resource);
|
|
100
|
+
await connection.resourceWrite({
|
|
101
|
+
uri: ( originalUri.toString()),
|
|
102
|
+
data: ( VSBuffer.wrap(content).toString()),
|
|
103
|
+
encoding: ContentEncoding.Utf8
|
|
104
|
+
});
|
|
105
|
+
} catch (err) {
|
|
106
|
+
throw createFileSystemProviderError(
|
|
107
|
+
err instanceof Error ? err.message : String(err),
|
|
108
|
+
FileSystemProviderErrorCode.NoPermissions
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async mkdir() {
|
|
113
|
+
throw createFileSystemProviderError(
|
|
114
|
+
"mkdir not supported on remote filesystem",
|
|
115
|
+
FileSystemProviderErrorCode.NoPermissions
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
async delete(resource, opts) {
|
|
119
|
+
const connection = this._getConnection(resource.authority);
|
|
120
|
+
try {
|
|
121
|
+
const originalUri = this._decodeUri(resource);
|
|
122
|
+
await connection.resourceDelete({
|
|
123
|
+
uri: ( originalUri.toString()),
|
|
124
|
+
recursive: opts.recursive
|
|
125
|
+
});
|
|
126
|
+
} catch (err) {
|
|
127
|
+
throw createFileSystemProviderError(
|
|
128
|
+
err instanceof Error ? err.message : String(err),
|
|
129
|
+
FileSystemProviderErrorCode.NoPermissions
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async rename(from, to, opts) {
|
|
134
|
+
const connection = this._getConnection(from.authority);
|
|
135
|
+
try {
|
|
136
|
+
const originalFrom = this._decodeUri(from);
|
|
137
|
+
const originalTo = this._decodeUri(to);
|
|
138
|
+
await connection.resourceMove({
|
|
139
|
+
source: ( originalFrom.toString()),
|
|
140
|
+
destination: ( originalTo.toString()),
|
|
141
|
+
failIfExists: !opts.overwrite
|
|
142
|
+
});
|
|
143
|
+
} catch (err) {
|
|
144
|
+
throw createFileSystemProviderError(
|
|
145
|
+
err instanceof Error ? err.message : String(err),
|
|
146
|
+
FileSystemProviderErrorCode.NoPermissions
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
_getConnection(authority) {
|
|
151
|
+
const connection = this._authorityToConnection.get(authority);
|
|
152
|
+
if (!connection) {
|
|
153
|
+
throw createFileSystemProviderError(
|
|
154
|
+
`No connection for authority: ${authority}`,
|
|
155
|
+
FileSystemProviderErrorCode.Unavailable
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
return connection;
|
|
159
|
+
}
|
|
160
|
+
async _listDirectory(authority, resource) {
|
|
161
|
+
const connection = this._getConnection(authority);
|
|
162
|
+
try {
|
|
163
|
+
const originalUri = this._decodeUri(resource);
|
|
164
|
+
const result = await connection.resourceList(originalUri);
|
|
165
|
+
return result.entries;
|
|
166
|
+
} catch (err) {
|
|
167
|
+
throw createFileSystemProviderError(
|
|
168
|
+
err instanceof Error ? err.message : String(err),
|
|
169
|
+
FileSystemProviderErrorCode.Unavailable
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
class AgentHostFileSystemProvider extends AHPFileSystemProvider {
|
|
175
|
+
_decodeUri(resource) {
|
|
176
|
+
return fromAgentHostUri(resource);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export { AHPFileSystemProvider, AgentHostFileSystemProvider };
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
|
-
import {
|
|
2
|
+
import { IReference } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import type { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
3
4
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
5
|
+
import type { ISyncedCustomization } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentPluginManager";
|
|
6
|
+
import type { IAgentSubscription } from "./state/agentSubscription.js";
|
|
7
|
+
import type { ICreateTerminalParams, IResolveSessionConfigResult, ISessionConfigCompletionsResult } from "./state/protocol/commands.js";
|
|
8
|
+
import { IProtectedResourceMetadata, type IConfigSchema, type IFileEdit, type IModelSelection, type IToolDefinition } from "@codingame/monaco-vscode-xterm-common/vscode/vs/platform/agentHost/common/state/protocol/state";
|
|
9
|
+
import type { IActionEnvelope, INotification, ISessionAction, ITerminalAction } from "./state/sessionActions.js";
|
|
10
|
+
import type { IResourceCopyParams, IResourceCopyResult, IResourceDeleteParams, IResourceDeleteResult, IResourceListResult, IResourceMoveParams, IResourceMoveResult, IResourceReadResult, IResourceWriteParams, IResourceWriteResult } from "./state/sessionProtocol.js";
|
|
11
|
+
import { AttachmentType, ComponentToState, SessionInputResponseKind, SessionStatus, StateComponents, type ICustomizationRef, type IPendingMessage, type IRootState, type ISessionInputAnswer, type ISessionInputRequest, type IToolCallResult, type IToolResultContent, type PolicyState, type StringOrMarkdown } from "@codingame/monaco-vscode-xterm-common/vscode/vs/platform/agentHost/common/state/sessionState";
|
|
6
12
|
export declare enum AgentHostIpcChannels {
|
|
7
13
|
/** Channel for the agent host service on the main-process side */
|
|
8
14
|
AgentHost = "agentHost",
|
|
@@ -11,15 +17,49 @@ export declare enum AgentHostIpcChannels {
|
|
|
11
17
|
/** Channel for WebSocket client connection count (server process management only) */
|
|
12
18
|
ConnectionTracker = "agentHostConnectionTracker"
|
|
13
19
|
}
|
|
14
|
-
/** Configuration key that controls whether the agent host process is spawned. */
|
|
20
|
+
/** Configuration key that controls whether the local agent host process is spawned. */
|
|
15
21
|
export declare const AgentHostEnabledSettingId = "chat.agentHost.enabled";
|
|
16
22
|
/** Configuration key that controls whether per-host IPC traffic output channels are created. */
|
|
17
23
|
export declare const AgentHostIpcLoggingSettingId = "chat.agentHost.ipcLoggingEnabled";
|
|
24
|
+
/** Result of starting the agent host WebSocket server on-demand. */
|
|
25
|
+
export interface IAgentHostSocketInfo {
|
|
26
|
+
readonly socketPath: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* IPC service exposed on the {@link AgentHostIpcChannels.ConnectionTracker}
|
|
30
|
+
* channel. Used by the server process for lifetime management and by the
|
|
31
|
+
* shared process to request a local WebSocket listener on-demand.
|
|
32
|
+
*/
|
|
33
|
+
export interface IConnectionTrackerService {
|
|
34
|
+
readonly onDidChangeConnectionCount: Event<number>;
|
|
35
|
+
/**
|
|
36
|
+
* Request the agent host to start a WebSocket server on a local
|
|
37
|
+
* pipe/socket. Returns the socket path.
|
|
38
|
+
* If a server is already running, returns the existing info.
|
|
39
|
+
*/
|
|
40
|
+
startWebSocketServer(): Promise<IAgentHostSocketInfo>;
|
|
41
|
+
}
|
|
18
42
|
export interface IAgentSessionMetadata {
|
|
19
43
|
readonly session: URI;
|
|
20
44
|
readonly startTime: number;
|
|
21
45
|
readonly modifiedTime: number;
|
|
46
|
+
readonly project?: IAgentSessionProjectInfo;
|
|
22
47
|
readonly summary?: string;
|
|
48
|
+
readonly status?: SessionStatus;
|
|
49
|
+
readonly model?: IModelSelection;
|
|
50
|
+
readonly workingDirectory?: URI;
|
|
51
|
+
readonly isRead?: boolean;
|
|
52
|
+
readonly isDone?: boolean;
|
|
53
|
+
readonly diffs?: readonly IFileEdit[];
|
|
54
|
+
}
|
|
55
|
+
export interface IAgentSessionProjectInfo {
|
|
56
|
+
readonly uri: URI;
|
|
57
|
+
readonly displayName: string;
|
|
58
|
+
}
|
|
59
|
+
export interface IAgentCreateSessionResult {
|
|
60
|
+
readonly session: URI;
|
|
61
|
+
readonly project?: IAgentSessionProjectInfo;
|
|
62
|
+
/** The resolved working directory, which may differ from the requested one (e.g. worktree). */
|
|
23
63
|
readonly workingDirectory?: URI;
|
|
24
64
|
}
|
|
25
65
|
export type AgentProvider = string;
|
|
@@ -28,27 +68,6 @@ export interface IAgentDescriptor {
|
|
|
28
68
|
readonly provider: AgentProvider;
|
|
29
69
|
readonly displayName: string;
|
|
30
70
|
readonly description: string;
|
|
31
|
-
/**
|
|
32
|
-
* Whether the renderer should push a GitHub auth token for this agent.
|
|
33
|
-
* @deprecated Use {@link IResourceMetadata.resources} from {@link IAgentService.getResourceMetadata} instead.
|
|
34
|
-
*/
|
|
35
|
-
readonly requiresAuth: boolean;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Describes the agent host as an OAuth 2.0 protected resource.
|
|
39
|
-
* Uses {@link IAuthorizationProtectedResourceMetadata} from RFC 9728
|
|
40
|
-
* to describe auth requirements, enabling clients to resolve tokens
|
|
41
|
-
* using the standard VS Code authentication service.
|
|
42
|
-
*
|
|
43
|
-
* Returned from the server via {@link IAgentService.getResourceMetadata}.
|
|
44
|
-
*/
|
|
45
|
-
export interface IResourceMetadata {
|
|
46
|
-
/**
|
|
47
|
-
* Protected resources the agent host requires authentication for.
|
|
48
|
-
* Each entry uses the standard RFC 9728 shape so clients can resolve
|
|
49
|
-
* tokens via {@link IAuthenticationService.getOrActivateProviderIdForServer}.
|
|
50
|
-
*/
|
|
51
|
-
readonly resources: readonly IAuthorizationProtectedResourceMetadata[];
|
|
52
71
|
}
|
|
53
72
|
/**
|
|
54
73
|
* Parameters for the `authenticate` command.
|
|
@@ -72,9 +91,33 @@ export interface IAuthenticateResult {
|
|
|
72
91
|
}
|
|
73
92
|
export interface IAgentCreateSessionConfig {
|
|
74
93
|
readonly provider?: AgentProvider;
|
|
75
|
-
readonly model?:
|
|
94
|
+
readonly model?: IModelSelection;
|
|
76
95
|
readonly session?: URI;
|
|
77
96
|
readonly workingDirectory?: URI;
|
|
97
|
+
readonly config?: Record<string, string>;
|
|
98
|
+
/** Fork from an existing session at a specific turn. */
|
|
99
|
+
readonly fork?: {
|
|
100
|
+
readonly session: URI;
|
|
101
|
+
readonly turnIndex: number;
|
|
102
|
+
readonly turnId: string;
|
|
103
|
+
/**
|
|
104
|
+
* Maps old protocol turn IDs to new protocol turn IDs.
|
|
105
|
+
* Populated by the service layer after generating fresh UUIDs
|
|
106
|
+
* for the forked session's turns. Used by the agent to remap
|
|
107
|
+
* per-turn data (e.g. SDK event ID mappings) in the session database.
|
|
108
|
+
*/
|
|
109
|
+
readonly turnIdMapping?: ReadonlyMap<string, string>;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
export declare const AgentHostSessionConfigBranchNameHintKey = "branchNameHint";
|
|
113
|
+
export interface IAgentResolveSessionConfigParams {
|
|
114
|
+
readonly provider?: AgentProvider;
|
|
115
|
+
readonly workingDirectory?: URI;
|
|
116
|
+
readonly config?: Record<string, string>;
|
|
117
|
+
}
|
|
118
|
+
export interface IAgentSessionConfigCompletionsParams extends IAgentResolveSessionConfigParams {
|
|
119
|
+
readonly property: string;
|
|
120
|
+
readonly query?: string;
|
|
78
121
|
}
|
|
79
122
|
/** Serializable attachment passed alongside a message to the agent host. */
|
|
80
123
|
export interface IAgentAttachment {
|
|
@@ -102,11 +145,8 @@ export interface IAgentModelInfo {
|
|
|
102
145
|
readonly name: string;
|
|
103
146
|
readonly maxContextWindow: number;
|
|
104
147
|
readonly supportsVision: boolean;
|
|
105
|
-
readonly
|
|
106
|
-
readonly supportedReasoningEfforts?: readonly string[];
|
|
107
|
-
readonly defaultReasoningEffort?: string;
|
|
148
|
+
readonly configSchema?: IConfigSchema;
|
|
108
149
|
readonly policyState?: PolicyState;
|
|
109
|
-
readonly billingMultiplier?: number;
|
|
110
150
|
}
|
|
111
151
|
interface IAgentProgressEventBase {
|
|
112
152
|
readonly session: URI;
|
|
@@ -148,18 +188,36 @@ export interface IAgentToolStartEvent extends IAgentProgressEventBase {
|
|
|
148
188
|
/** Human-readable display name for this tool. */
|
|
149
189
|
readonly displayName: string;
|
|
150
190
|
/** Message describing the tool invocation in progress (e.g., "Running `echo hello`"). */
|
|
151
|
-
readonly invocationMessage:
|
|
191
|
+
readonly invocationMessage: StringOrMarkdown;
|
|
152
192
|
/** A representative input string for display in the UI (e.g., the shell command). */
|
|
153
193
|
readonly toolInput?: string;
|
|
154
|
-
/** Hint for the renderer about how to display this tool (e.g., 'terminal' for shell commands). */
|
|
155
|
-
readonly toolKind?: "terminal";
|
|
194
|
+
/** Hint for the renderer about how to display this tool (e.g., 'terminal' for shell commands, 'subagent' for subagent-spawning tools). */
|
|
195
|
+
readonly toolKind?: "terminal" | "subagent";
|
|
156
196
|
/** Language identifier for syntax highlighting (e.g., 'shellscript', 'powershell'). Used with toolKind 'terminal'. */
|
|
157
197
|
readonly language?: string;
|
|
158
198
|
/** Serialized JSON of the tool arguments, if available. */
|
|
159
199
|
readonly toolArguments?: string;
|
|
200
|
+
/**
|
|
201
|
+
* For `toolKind === 'subagent'`, the internal name of the agent being
|
|
202
|
+
* spawned (e.g. 'explore'). Adapters are responsible for extracting this
|
|
203
|
+
* from their SDK-specific tool argument shape.
|
|
204
|
+
*/
|
|
205
|
+
readonly subagentAgentName?: string;
|
|
206
|
+
/**
|
|
207
|
+
* For `toolKind === 'subagent'`, a human-readable description of the
|
|
208
|
+
* subagent's task. Adapters are responsible for extracting this from
|
|
209
|
+
* their SDK-specific tool argument shape.
|
|
210
|
+
*/
|
|
211
|
+
readonly subagentDescription?: string;
|
|
160
212
|
readonly mcpServerName?: string;
|
|
161
213
|
readonly mcpToolName?: string;
|
|
162
214
|
readonly parentToolCallId?: string;
|
|
215
|
+
/**
|
|
216
|
+
* If set, this tool is provided by a client and the identified client
|
|
217
|
+
* is responsible for executing it. Maps to `toolClientId` in the
|
|
218
|
+
* protocol `session/toolCallStart` action.
|
|
219
|
+
*/
|
|
220
|
+
readonly toolClientId?: string;
|
|
163
221
|
}
|
|
164
222
|
/** A tool has finished executing (`tool.execution_complete`). */
|
|
165
223
|
export interface IAgentToolCompleteEvent extends IAgentProgressEventBase {
|
|
@@ -205,17 +263,45 @@ export interface IAgentToolReadyEvent extends IAgentProgressEventBase {
|
|
|
205
263
|
readonly toolInput?: string;
|
|
206
264
|
/** Short title for the confirmation prompt. */
|
|
207
265
|
readonly confirmationTitle?: StringOrMarkdown;
|
|
208
|
-
/** Kind of permission being requested
|
|
209
|
-
readonly permissionKind?:
|
|
266
|
+
/** Kind of permission being requested. */
|
|
267
|
+
readonly permissionKind?: "shell" | "write" | "mcp" | "read" | "url" | "custom-tool";
|
|
210
268
|
/** File path associated with the permission request. */
|
|
211
269
|
readonly permissionPath?: string;
|
|
270
|
+
/** File edits this tool call will perform, for preview before confirmation. */
|
|
271
|
+
readonly edits?: {
|
|
272
|
+
items: IFileEdit[];
|
|
273
|
+
};
|
|
212
274
|
}
|
|
213
275
|
/** Streaming reasoning/thinking content from the assistant. */
|
|
214
276
|
export interface IAgentReasoningEvent extends IAgentProgressEventBase {
|
|
215
277
|
readonly type: "reasoning";
|
|
216
278
|
readonly content: string;
|
|
217
279
|
}
|
|
218
|
-
|
|
280
|
+
/** A steering message was consumed (sent to the model). */
|
|
281
|
+
export interface IAgentSteeringConsumedEvent extends IAgentProgressEventBase {
|
|
282
|
+
readonly type: "steering_consumed";
|
|
283
|
+
readonly id: string;
|
|
284
|
+
}
|
|
285
|
+
/** The agent's ask_user tool is requesting user input. */
|
|
286
|
+
export interface IAgentUserInputRequestEvent extends IAgentProgressEventBase {
|
|
287
|
+
readonly type: "user_input_request";
|
|
288
|
+
readonly request: ISessionInputRequest;
|
|
289
|
+
}
|
|
290
|
+
/** A subagent has been spawned by a tool call. */
|
|
291
|
+
export interface IAgentSubagentStartedEvent extends IAgentProgressEventBase {
|
|
292
|
+
readonly type: "subagent_started";
|
|
293
|
+
readonly toolCallId: string;
|
|
294
|
+
readonly agentName: string;
|
|
295
|
+
readonly agentDisplayName: string;
|
|
296
|
+
readonly agentDescription?: string;
|
|
297
|
+
}
|
|
298
|
+
/** Partial content update for a running tool call (e.g. terminal URI available). */
|
|
299
|
+
export interface IAgentToolContentChangedEvent extends IAgentProgressEventBase {
|
|
300
|
+
readonly type: "tool_content_changed";
|
|
301
|
+
readonly toolCallId: string;
|
|
302
|
+
readonly content: IToolResultContent[];
|
|
303
|
+
}
|
|
304
|
+
export type IAgentProgressEvent = IAgentDeltaEvent | IAgentMessageEvent | IAgentIdleEvent | IAgentToolStartEvent | IAgentToolReadyEvent | IAgentToolCompleteEvent | IAgentTitleChangedEvent | IAgentErrorEvent | IAgentUsageEvent | IAgentReasoningEvent | IAgentSteeringConsumedEvent | IAgentUserInputRequestEvent | IAgentSubagentStartedEvent | IAgentToolContentChangedEvent;
|
|
219
305
|
export declare namespace AgentSession {
|
|
220
306
|
/**
|
|
221
307
|
* Creates a session URI from a provider name and raw session ID.
|
|
@@ -243,10 +329,14 @@ export interface IAgent {
|
|
|
243
329
|
readonly id: AgentProvider;
|
|
244
330
|
/** Fires when the provider streams progress for a session. */
|
|
245
331
|
readonly onDidSessionProgress: Event<IAgentProgressEvent>;
|
|
246
|
-
/** Create a new session. Returns
|
|
247
|
-
createSession(config?: IAgentCreateSessionConfig): Promise<
|
|
332
|
+
/** Create a new session. Returns server-owned session metadata. */
|
|
333
|
+
createSession(config?: IAgentCreateSessionConfig): Promise<IAgentCreateSessionResult>;
|
|
334
|
+
/** Resolve the dynamic configuration schema for creating a session. */
|
|
335
|
+
resolveSessionConfig(params: IAgentResolveSessionConfigParams): Promise<IResolveSessionConfigResult>;
|
|
336
|
+
/** Return dynamic completions for a session configuration property. */
|
|
337
|
+
sessionConfigCompletions(params: IAgentSessionConfigCompletionsParams): Promise<ISessionConfigCompletionsResult>;
|
|
248
338
|
/** Send a user message into an existing session. */
|
|
249
|
-
sendMessage(session: URI, prompt: string, attachments?: IAgentAttachment[]): Promise<void>;
|
|
339
|
+
sendMessage(session: URI, prompt: string, attachments?: IAgentAttachment[], turnId?: string): Promise<void>;
|
|
250
340
|
/**
|
|
251
341
|
* Called when the session's pending (steering) message changes.
|
|
252
342
|
* The agent harness decides how to react — e.g. inject steering
|
|
@@ -257,42 +347,103 @@ export interface IAgent {
|
|
|
257
347
|
*/
|
|
258
348
|
setPendingMessages?(session: URI, steeringMessage: IPendingMessage | undefined, queuedMessages: readonly IPendingMessage[]): void;
|
|
259
349
|
/** Retrieve all session events/messages for reconstruction. */
|
|
260
|
-
getSessionMessages(session: URI): Promise<(IAgentMessageEvent | IAgentToolStartEvent | IAgentToolCompleteEvent)[]>;
|
|
350
|
+
getSessionMessages(session: URI): Promise<(IAgentMessageEvent | IAgentToolStartEvent | IAgentToolCompleteEvent | IAgentSubagentStartedEvent)[]>;
|
|
261
351
|
/** Dispose a session, freeing resources. */
|
|
262
352
|
disposeSession(session: URI): Promise<void>;
|
|
263
353
|
/** Abort the current turn, stopping any in-flight processing. */
|
|
264
354
|
abortSession(session: URI): Promise<void>;
|
|
265
355
|
/** Change the model for an existing session. */
|
|
266
|
-
changeModel(session: URI, model:
|
|
356
|
+
changeModel(session: URI, model: IModelSelection): Promise<void>;
|
|
267
357
|
/** Respond to a pending permission request from the SDK. */
|
|
268
358
|
respondToPermissionRequest(requestId: string, approved: boolean): void;
|
|
359
|
+
/** Respond to a pending user input request from the SDK's ask_user tool. */
|
|
360
|
+
respondToUserInputRequest(requestId: string, response: SessionInputResponseKind, answers?: Record<string, ISessionInputAnswer>): void;
|
|
269
361
|
/** Return the descriptor for this agent. */
|
|
270
362
|
getDescriptor(): IAgentDescriptor;
|
|
271
|
-
/**
|
|
272
|
-
|
|
363
|
+
/** Available models from this provider. */
|
|
364
|
+
readonly models: IObservable<readonly IAgentModelInfo[]>;
|
|
273
365
|
/** List persisted sessions from this provider. */
|
|
274
366
|
listSessions(): Promise<IAgentSessionMetadata[]>;
|
|
275
367
|
/** Declare protected resources this agent requires auth for (RFC 9728). */
|
|
276
|
-
getProtectedResources():
|
|
368
|
+
getProtectedResources(): IProtectedResourceMetadata[];
|
|
277
369
|
/**
|
|
278
370
|
* Authenticate for a specific resource. Returns true if accepted.
|
|
279
371
|
* The `resource` matches {@link IAuthorizationProtectedResourceMetadata.resource}.
|
|
280
372
|
*/
|
|
281
373
|
authenticate(resource: string, token: string): Promise<boolean>;
|
|
374
|
+
/**
|
|
375
|
+
* Truncate a session's history. If `turnId` is provided, keeps turns up to
|
|
376
|
+
* and including that turn. If omitted, all turns are removed.
|
|
377
|
+
* Optional — not all providers support truncation.
|
|
378
|
+
*/
|
|
379
|
+
truncateSession?(session: URI, turnId?: string): Promise<void>;
|
|
380
|
+
/**
|
|
381
|
+
* Receives client-provided customization refs and syncs them (e.g. copies
|
|
382
|
+
* plugin files to local storage). Returns per-customization status with
|
|
383
|
+
* local plugin directories.
|
|
384
|
+
*
|
|
385
|
+
* The agent MAY defer a client restart until all active sessions are idle.
|
|
386
|
+
*/
|
|
387
|
+
setClientCustomizations(clientId: string, customizations: ICustomizationRef[], progress?: (results: ISyncedCustomization[]) => void): Promise<ISyncedCustomization[]>;
|
|
388
|
+
/**
|
|
389
|
+
* Receives client-provided tool definitions to make available in a
|
|
390
|
+
* specific session. The agent registers these as custom tools so the
|
|
391
|
+
* LLM can call them; execution is routed back to the owning client.
|
|
392
|
+
*
|
|
393
|
+
* Always called on `activeClientChanged`, even with an empty array,
|
|
394
|
+
* to clear a previous client's tools.
|
|
395
|
+
*
|
|
396
|
+
* @param session The session URI this tool set applies to.
|
|
397
|
+
* @param clientId The client that owns these tools.
|
|
398
|
+
* @param tools The tool definitions (full replacement).
|
|
399
|
+
*/
|
|
400
|
+
setClientTools(session: URI, clientId: string, tools: IToolDefinition[]): void;
|
|
401
|
+
/**
|
|
402
|
+
* Called when a client completes a client-provided tool call.
|
|
403
|
+
* Resolves the tool handler's deferred promise so the SDK can continue.
|
|
404
|
+
*
|
|
405
|
+
* @param session The session the tool call belongs to.
|
|
406
|
+
*/
|
|
407
|
+
onClientToolCallComplete(session: URI, toolCallId: string, result: IToolCallResult): void;
|
|
408
|
+
/**
|
|
409
|
+
* Notifies the agent that a customization has been toggled on or off.
|
|
410
|
+
* The agent MAY restart its client before the next message is sent.
|
|
411
|
+
*/
|
|
412
|
+
setCustomizationEnabled(uri: string, enabled: boolean): void;
|
|
282
413
|
/** Gracefully shut down all sessions. */
|
|
283
414
|
shutdown(): Promise<void>;
|
|
284
415
|
/** Dispose this provider and all its resources. */
|
|
285
416
|
dispose(): void;
|
|
286
417
|
}
|
|
287
418
|
/**
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
419
|
+
* Consumer-facing connection to an agent host. Session handlers, terminal
|
|
420
|
+
* contributions, and other features program against this interface.
|
|
421
|
+
*
|
|
422
|
+
* Implementations wrap an {@link IAgentService} and layer subscription
|
|
423
|
+
* management and optimistic write-ahead on top.
|
|
293
424
|
*/
|
|
294
|
-
export interface IAgentConnection
|
|
295
|
-
|
|
425
|
+
export interface IAgentConnection {
|
|
426
|
+
readonly _serviceBrand: undefined;
|
|
296
427
|
readonly clientId: string;
|
|
428
|
+
readonly rootState: IAgentSubscription<IRootState>;
|
|
429
|
+
getSubscription<T extends StateComponents>(kind: T, resource: URI): IReference<IAgentSubscription<ComponentToState[T]>>;
|
|
430
|
+
getSubscriptionUnmanaged<T extends StateComponents>(kind: T, resource: URI): IAgentSubscription<ComponentToState[T]> | undefined;
|
|
431
|
+
dispatch(action: ISessionAction | ITerminalAction): void;
|
|
432
|
+
readonly onDidNotification: Event<INotification>;
|
|
433
|
+
readonly onDidAction: Event<IActionEnvelope>;
|
|
434
|
+
authenticate(params: IAuthenticateParams): Promise<IAuthenticateResult>;
|
|
435
|
+
listSessions(): Promise<IAgentSessionMetadata[]>;
|
|
436
|
+
createSession(config?: IAgentCreateSessionConfig): Promise<URI>;
|
|
437
|
+
resolveSessionConfig(params: IAgentResolveSessionConfigParams): Promise<IResolveSessionConfigResult>;
|
|
438
|
+
sessionConfigCompletions(params: IAgentSessionConfigCompletionsParams): Promise<ISessionConfigCompletionsResult>;
|
|
439
|
+
disposeSession(session: URI): Promise<void>;
|
|
440
|
+
createTerminal(params: ICreateTerminalParams): Promise<void>;
|
|
441
|
+
disposeTerminal(terminal: URI): Promise<void>;
|
|
442
|
+
resourceList(uri: URI): Promise<IResourceListResult>;
|
|
443
|
+
resourceRead(uri: URI): Promise<IResourceReadResult>;
|
|
444
|
+
resourceWrite(params: IResourceWriteParams): Promise<IResourceWriteResult>;
|
|
445
|
+
resourceCopy(params: IResourceCopyParams): Promise<IResourceCopyResult>;
|
|
446
|
+
resourceDelete(params: IResourceDeleteParams): Promise<IResourceDeleteResult>;
|
|
447
|
+
resourceMove(params: IResourceMoveParams): Promise<IResourceMoveResult>;
|
|
297
448
|
}
|
|
298
449
|
export {};
|