@codingame/monaco-vscode-chat-service-override 31.0.0 → 32.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.d.ts +1 -1
- package/index.js +21 -5
- package/package.json +5 -5
- package/vscode/src/vs/base/common/defaultAccount.d.ts +69 -0
- package/vscode/src/vs/base/common/defaultAccount.js +12 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +91 -22
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +301 -68
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +24 -5
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +89 -16
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +17 -5
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +73 -10
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +32 -6
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +32 -20
- package/vscode/src/vs/platform/agentHost/common/agentHostPermissionService.d.ts +37 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostPermissionService.js +15 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +242 -201
- package/vscode/src/vs/platform/agentHost/common/agentService.js +3 -1
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.d.ts +35 -0
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.js +106 -0
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +38 -30
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +2 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +114 -4
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +10 -10
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +52 -19
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +42 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +7 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +42 -41
- package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.d.ts +6 -6
- package/vscode/src/vs/platform/agentHost/common/transportConstants.d.ts +15 -0
- package/vscode/src/vs/platform/agentHost/common/transportConstants.js +6 -0
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +4 -3
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +4 -3
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +4 -2
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +15 -7
- package/vscode/src/vs/workbench/contrib/browserView/common/browserChatToolReferenceNames.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/browserView/common/browserChatToolReferenceNames.js +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +14 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +64 -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 +31 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +18 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +30 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +8 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +21 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +12 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +99 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.js +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +63 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +10 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +3 -3
- 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 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +25 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +99 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +17 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +35 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +347 -326
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +1 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +113 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +37 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +436 -134
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +52 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +93 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +73 -104
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +272 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +30 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +430 -185
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +44 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +480 -279
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.d.ts +138 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.js +221 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +1216 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +32 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +26 -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 +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +28 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +25 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +68 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +650 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +390 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +18 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
- 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 +8 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +1 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +6 -87
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +116 -182
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +12 -39
- 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 +61 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +16 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +106 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +25 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +629 -425
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +105 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +175 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +20 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +339 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/media/planReviewFeedback.css +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +572 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.js +167 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +49 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +315 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +45 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +44 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +111 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +13 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.js +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +14 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +17 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +23 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +136 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.d.ts +72 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.js +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +14 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +41 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +30 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +25 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +108 -45
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +65 -26
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +38 -11
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +165 -16
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +62 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -1
- 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.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +15 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +18 -24
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +203 -180
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.js +35 -0
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +27 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +14 -49
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +35 -177
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -11
- 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 +13 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +29 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +129 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +14 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +1 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +12 -38
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +77 -70
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +232 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.d.ts +83 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.js +243 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +0 -749
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.js +0 -14
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.d.ts +0 -17
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.js +0 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +0 -40
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +0 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +0 -638
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +0 -131
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +0 -363
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +0 -306
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +0 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatStatusWidget.css +0 -57
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -78
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -242
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1701
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -191
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -728
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +0 -69
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { DeferredPromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
3
|
+
import { IntervalTimer, DeferredPromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
|
+
import { CancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
4
5
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
6
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
7
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
@@ -13,14 +14,34 @@ import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/fi
|
|
|
13
14
|
import { AgentSession } from '../common/agentService.js';
|
|
14
15
|
import { AgentSubscriptionManager } from '../common/state/agentSubscription.js';
|
|
15
16
|
import { agentHostAuthority, fromAgentHostUri, toAgentHostUri } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
|
|
17
|
+
import { AgentHostPermissionMode } from '../common/agentHostPermissionService.js';
|
|
18
|
+
import { IAgentHostPermissionService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostPermissionService.service';
|
|
19
|
+
import { ActionType } from '@codingame/monaco-vscode-xterm-common/vscode/vs/platform/agentHost/common/state/protocol/actions';
|
|
20
|
+
import '@codingame/monaco-vscode-xterm-common/vscode/vs/platform/agentHost/common/state/protocol/notifications';
|
|
16
21
|
import { ROOT_STATE_URI } from '@codingame/monaco-vscode-xterm-common/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
17
|
-
import { PROTOCOL_VERSION } from '../common/state/
|
|
18
|
-
import { isJsonRpcRequest, isJsonRpcResponse, isJsonRpcNotification } from '
|
|
22
|
+
import { PROTOCOL_VERSION } from '../common/state/protocol/version/registry.js';
|
|
23
|
+
import { ProtocolError, isJsonRpcRequest, isJsonRpcResponse, isJsonRpcNotification } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionProtocol';
|
|
19
24
|
import { isClientTransport } from '../common/state/sessionTransport.js';
|
|
20
25
|
import { AhpErrorCodes } from '../common/state/protocol/errors.js';
|
|
21
|
-
import { ContentEncoding } from '
|
|
26
|
+
import { ContentEncoding } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands';
|
|
22
27
|
import { decodeBase64, VSBuffer, encodeBase64 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
28
|
+
import { SessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state';
|
|
23
29
|
|
|
30
|
+
const AHP_CLIENT_CONNECTION_CLOSED = -32e3;
|
|
31
|
+
const WATCHDOG_CHECK_INTERVAL_MS = 5_000;
|
|
32
|
+
const WATCHDOG_TIMEOUT_MS = 20_000;
|
|
33
|
+
function connectionTimeoutError(address, sinceLastReadMs, oldestRequestAgeMs) {
|
|
34
|
+
return ( new ProtocolError(
|
|
35
|
+
AHP_CLIENT_CONNECTION_CLOSED,
|
|
36
|
+
`Connection appears dead: ${address}; no message received for ${sinceLastReadMs}ms, oldest pending request is ${oldestRequestAgeMs}ms old.`
|
|
37
|
+
));
|
|
38
|
+
}
|
|
39
|
+
function connectionClosedError(address) {
|
|
40
|
+
return ( new ProtocolError(AHP_CLIENT_CONNECTION_CLOSED, `Connection closed: ${address}`));
|
|
41
|
+
}
|
|
42
|
+
function connectionDisposedError(address) {
|
|
43
|
+
return ( new ProtocolError(AHP_CLIENT_CONNECTION_CLOSED, `Connection disposed: ${address}`));
|
|
44
|
+
}
|
|
24
45
|
let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends Disposable {
|
|
25
46
|
get clientId() {
|
|
26
47
|
return this._clientId;
|
|
@@ -31,13 +52,15 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
31
52
|
get defaultDirectory() {
|
|
32
53
|
return this._defaultDirectory;
|
|
33
54
|
}
|
|
34
|
-
constructor(address, transport, _logService, _fileService) {
|
|
55
|
+
constructor(address, transport, _logService, _fileService, _permissionService) {
|
|
35
56
|
super();
|
|
36
57
|
this._logService = _logService;
|
|
37
58
|
this._fileService = _fileService;
|
|
59
|
+
this._permissionService = _permissionService;
|
|
38
60
|
this._clientId = generateUuid();
|
|
39
61
|
this._serverSeq = 0;
|
|
40
62
|
this._nextClientSeq = 1;
|
|
63
|
+
this._completionTriggerCharacters = [];
|
|
41
64
|
this._onDidAction = this._register(( new Emitter()));
|
|
42
65
|
this.onDidAction = this._onDidAction.event;
|
|
43
66
|
this._onDidNotification = this._register(( new Emitter()));
|
|
@@ -46,12 +69,18 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
46
69
|
this.onDidClose = this._onDidClose.event;
|
|
47
70
|
this._pendingRequests = ( new Map());
|
|
48
71
|
this._nextRequestId = 1;
|
|
72
|
+
this._isClosed = false;
|
|
73
|
+
this._lastReadTime = Date.now();
|
|
74
|
+
this._watchdog = this._register(( new IntervalTimer()));
|
|
75
|
+
this._grantedCustomizationUris = ( new Set());
|
|
49
76
|
this._address = address;
|
|
50
77
|
this._connectionAuthority = agentHostAuthority(address);
|
|
51
78
|
this._transport = transport;
|
|
52
79
|
this._register(this._transport);
|
|
53
80
|
this._register(this._transport.onMessage(msg => this._handleMessage(msg)));
|
|
54
|
-
this._register(
|
|
81
|
+
this._register(
|
|
82
|
+
this._transport.onClose(() => this._handleClose(connectionClosedError(this._address)))
|
|
83
|
+
);
|
|
55
84
|
this._subscriptionManager = this._register(( new AgentSubscriptionManager(
|
|
56
85
|
this._clientId,
|
|
57
86
|
() => this.nextClientSeq(),
|
|
@@ -62,13 +91,18 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
62
91
|
this._register(this.onDidAction(envelope => {
|
|
63
92
|
this._subscriptionManager.receiveEnvelope(envelope);
|
|
64
93
|
}));
|
|
94
|
+
this._watchdog.cancelAndSet(() => this._watchdogTick(), WATCHDOG_CHECK_INTERVAL_MS);
|
|
95
|
+
}
|
|
96
|
+
dispose() {
|
|
97
|
+
this._handleClose(connectionDisposedError(this._address));
|
|
98
|
+
super.dispose();
|
|
65
99
|
}
|
|
66
100
|
async connect() {
|
|
67
101
|
if (isClientTransport(this._transport)) {
|
|
68
|
-
await this._transport.connect();
|
|
102
|
+
await this._raceClose(this._transport.connect());
|
|
69
103
|
}
|
|
70
104
|
const result = await this._sendRequest("initialize", {
|
|
71
|
-
|
|
105
|
+
protocolVersions: [PROTOCOL_VERSION],
|
|
72
106
|
clientId: this._clientId,
|
|
73
107
|
initialSubscriptions: [ROOT_STATE_URI]
|
|
74
108
|
});
|
|
@@ -86,6 +120,7 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
86
120
|
this._defaultDirectory = URI.revive(dir).path;
|
|
87
121
|
}
|
|
88
122
|
}
|
|
123
|
+
this._completionTriggerCharacters = result.completionTriggerCharacters ?? [];
|
|
89
124
|
}
|
|
90
125
|
get rootState() {
|
|
91
126
|
return this._subscriptionManager.rootState;
|
|
@@ -112,20 +147,28 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
112
147
|
});
|
|
113
148
|
}
|
|
114
149
|
dispatchAction(action, _clientId, clientSeq) {
|
|
150
|
+
this._grantImplicitReadsForOutgoingAction(action);
|
|
115
151
|
this._sendNotification("dispatchAction", {
|
|
116
152
|
clientSeq,
|
|
117
153
|
action
|
|
118
154
|
});
|
|
119
155
|
}
|
|
120
156
|
async createSession(config) {
|
|
121
|
-
const provider = config?.provider
|
|
122
|
-
|
|
157
|
+
const provider = config?.provider;
|
|
158
|
+
if (!provider) {
|
|
159
|
+
throw ( new Error("Cannot create remote agent host session without a provider."));
|
|
160
|
+
}
|
|
161
|
+
const session = config?.session ?? AgentSession.uri(provider, generateUuid());
|
|
162
|
+
if (config?.activeClient?.customizations) {
|
|
163
|
+
this._grantImplicitReadsForCustomizations(config.activeClient.customizations);
|
|
164
|
+
}
|
|
123
165
|
await this._sendRequest("createSession", {
|
|
124
166
|
session: ( session.toString()),
|
|
125
167
|
provider,
|
|
126
168
|
model: config?.model,
|
|
127
169
|
workingDirectory: config?.workingDirectory ? ( fromAgentHostUri(config.workingDirectory).toString()) : undefined,
|
|
128
|
-
config: config?.config
|
|
170
|
+
config: config?.config,
|
|
171
|
+
activeClient: config?.activeClient
|
|
129
172
|
});
|
|
130
173
|
return session;
|
|
131
174
|
}
|
|
@@ -145,6 +188,12 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
145
188
|
query: params.query
|
|
146
189
|
});
|
|
147
190
|
}
|
|
191
|
+
async completions(params) {
|
|
192
|
+
return this._sendRequest("completions", params);
|
|
193
|
+
}
|
|
194
|
+
async getCompletionTriggerCharacters() {
|
|
195
|
+
return this._completionTriggerCharacters;
|
|
196
|
+
}
|
|
148
197
|
async authenticate(params) {
|
|
149
198
|
await this._sendRequest("authenticate", params);
|
|
150
199
|
return {
|
|
@@ -181,14 +230,37 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
181
230
|
} : {}),
|
|
182
231
|
summary: s.title,
|
|
183
232
|
status: s.status,
|
|
233
|
+
activity: s.activity,
|
|
184
234
|
workingDirectory: typeof s.workingDirectory === "string" ? toAgentHostUri(( URI.parse(s.workingDirectory)), this._connectionAuthority) : undefined,
|
|
185
|
-
isRead: s.
|
|
186
|
-
|
|
235
|
+
isRead: !!(s.status & SessionStatus.IsRead),
|
|
236
|
+
isArchived: !!(s.status & SessionStatus.IsArchived),
|
|
237
|
+
diffs: s.diffs
|
|
187
238
|
})));
|
|
188
239
|
}
|
|
189
240
|
_toLocalProjectUri(uri) {
|
|
190
241
|
return uri.scheme === Schemas.file ? toAgentHostUri(uri, this._connectionAuthority) : uri;
|
|
191
242
|
}
|
|
243
|
+
_grantImplicitReadsForOutgoingAction(action) {
|
|
244
|
+
if (action.type === ActionType.SessionActiveClientChanged && action.activeClient?.customizations) {
|
|
245
|
+
this._grantImplicitReadsForCustomizations(action.activeClient.customizations);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
_grantImplicitReadsForCustomizations(refs) {
|
|
249
|
+
for (const ref of refs) {
|
|
250
|
+
let uri;
|
|
251
|
+
try {
|
|
252
|
+
uri = ( URI.parse(ref.uri));
|
|
253
|
+
} catch {
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
const key = ( uri.toString());
|
|
257
|
+
if (( this._grantedCustomizationUris.has(key))) {
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
this._grantedCustomizationUris.add(key);
|
|
261
|
+
this._permissionService.grantImplicitRead(this._address, uri);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
192
264
|
async resourceList(uri) {
|
|
193
265
|
return await this._sendRequest("resourceList", {
|
|
194
266
|
uri: ( uri.toString())
|
|
@@ -212,6 +284,10 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
212
284
|
return this._sendRequest("resourceMove", params);
|
|
213
285
|
}
|
|
214
286
|
_handleMessage(msg) {
|
|
287
|
+
if (this._isClosed) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
this._lastReadTime = Date.now();
|
|
215
291
|
if (isJsonRpcRequest(msg)) {
|
|
216
292
|
this._handleReverseRequest(msg.id, msg.method, msg.params);
|
|
217
293
|
} else if (isJsonRpcResponse(msg)) {
|
|
@@ -222,9 +298,9 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
222
298
|
error: true
|
|
223
299
|
})) {
|
|
224
300
|
this._logService.warn(`[RemoteAgentHostProtocol] Request ${msg.id} failed:`, msg.error);
|
|
225
|
-
pending.error((
|
|
301
|
+
pending.deferred.error(this._toProtocolError(msg.error));
|
|
226
302
|
} else {
|
|
227
|
-
pending.complete(msg.result);
|
|
303
|
+
pending.deferred.complete(msg.result);
|
|
228
304
|
}
|
|
229
305
|
} else {
|
|
230
306
|
this._logService.warn(
|
|
@@ -255,6 +331,32 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
255
331
|
this._logService.warn(`[RemoteAgentHostProtocol] Unrecognized message:`, JSON.stringify(msg));
|
|
256
332
|
}
|
|
257
333
|
}
|
|
334
|
+
_handleClose(error) {
|
|
335
|
+
if (this._isClosed) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
this._isClosed = true;
|
|
339
|
+
this._closeError = error;
|
|
340
|
+
this._watchdog.cancel();
|
|
341
|
+
this._rejectPendingRequests(error);
|
|
342
|
+
this._permissionService.connectionClosed(this._address);
|
|
343
|
+
this._grantedCustomizationUris.clear();
|
|
344
|
+
this._onDidClose.fire();
|
|
345
|
+
}
|
|
346
|
+
async _raceClose(promise) {
|
|
347
|
+
if (this._closeError) {
|
|
348
|
+
return Promise.reject(this._closeError);
|
|
349
|
+
}
|
|
350
|
+
let closeListener = Disposable.None;
|
|
351
|
+
const closePromise = ( new Promise((_resolve, reject) => {
|
|
352
|
+
closeListener = this.onDidClose(() => reject(this._closeError));
|
|
353
|
+
}));
|
|
354
|
+
try {
|
|
355
|
+
return await Promise.race([promise, closePromise]);
|
|
356
|
+
} finally {
|
|
357
|
+
closeListener.dispose();
|
|
358
|
+
}
|
|
359
|
+
}
|
|
258
360
|
_handleReverseRequest(id, method, params) {
|
|
259
361
|
const sendResult = result => {
|
|
260
362
|
this._transport.send({
|
|
@@ -286,68 +388,153 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
286
388
|
}
|
|
287
389
|
});
|
|
288
390
|
};
|
|
289
|
-
const
|
|
290
|
-
|
|
391
|
+
const sendPermissionDenied = request => {
|
|
392
|
+
this._transport.send({
|
|
393
|
+
jsonrpc: "2.0",
|
|
394
|
+
id,
|
|
395
|
+
error: {
|
|
396
|
+
code: AhpErrorCodes.PermissionDenied,
|
|
397
|
+
message: request ? `Access to ${request.uri} is not granted.` : "Access to the requested resource is not granted.",
|
|
398
|
+
data: request ? {
|
|
399
|
+
request
|
|
400
|
+
} : undefined
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
};
|
|
404
|
+
const gateAndHandle = async (uri, mode, deniedRequest, fn) => {
|
|
405
|
+
try {
|
|
406
|
+
if (!(await this._permissionService.check(this._address, uri, mode))) {
|
|
407
|
+
sendPermissionDenied(deniedRequest);
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
sendResult(await fn());
|
|
411
|
+
} catch (err) {
|
|
412
|
+
sendError(err);
|
|
413
|
+
}
|
|
291
414
|
};
|
|
292
415
|
const p = params;
|
|
293
416
|
switch (method) {
|
|
294
417
|
case "resourceList":
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
418
|
+
{
|
|
419
|
+
if (!p.uri) {
|
|
420
|
+
sendError(( new Error("Missing uri")));
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
const uri = ( URI.parse(p.uri));
|
|
424
|
+
return void gateAndHandle(uri, AgentHostPermissionMode.Read, {
|
|
425
|
+
uri: ( uri.toString()),
|
|
426
|
+
read: true
|
|
427
|
+
}, async () => {
|
|
428
|
+
const stat = await this._fileService.resolve(uri);
|
|
429
|
+
return {
|
|
430
|
+
entries: ( (stat.children ?? []).map(c => ({
|
|
431
|
+
name: c.name,
|
|
432
|
+
type: c.isDirectory ? "directory" : "file"
|
|
433
|
+
})))
|
|
434
|
+
};
|
|
435
|
+
});
|
|
298
436
|
}
|
|
299
|
-
return handle(async () => {
|
|
300
|
-
const stat = await this._fileService.resolve(( URI.parse(p.uri)));
|
|
301
|
-
return {
|
|
302
|
-
entries: ( (stat.children ?? []).map(c => ({
|
|
303
|
-
name: c.name,
|
|
304
|
-
type: c.isDirectory ? "directory" : "file"
|
|
305
|
-
})))
|
|
306
|
-
};
|
|
307
|
-
});
|
|
308
437
|
case "resourceRead":
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
438
|
+
{
|
|
439
|
+
if (!p.uri) {
|
|
440
|
+
sendError(( new Error("Missing uri")));
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
const uri = ( URI.parse(p.uri));
|
|
444
|
+
return void gateAndHandle(uri, AgentHostPermissionMode.Read, {
|
|
445
|
+
uri: ( uri.toString()),
|
|
446
|
+
read: true
|
|
447
|
+
}, async () => {
|
|
448
|
+
const content = await this._fileService.readFile(uri);
|
|
449
|
+
return {
|
|
450
|
+
data: encodeBase64(content.value),
|
|
451
|
+
encoding: ContentEncoding.Base64
|
|
452
|
+
};
|
|
453
|
+
});
|
|
312
454
|
}
|
|
313
|
-
return handle(async () => {
|
|
314
|
-
const content = await this._fileService.readFile(( URI.parse(p.uri)));
|
|
315
|
-
return {
|
|
316
|
-
data: encodeBase64(content.value),
|
|
317
|
-
encoding: ContentEncoding.Base64
|
|
318
|
-
};
|
|
319
|
-
});
|
|
320
455
|
case "resourceWrite":
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
return handle(async () => {
|
|
326
|
-
const writeUri = ( URI.parse(p.uri));
|
|
327
|
-
const buf = p.encoding === ContentEncoding.Base64 ? decodeBase64(p.data) : VSBuffer.fromString(p.data);
|
|
328
|
-
if (p.createOnly) {
|
|
329
|
-
await this._fileService.createFile(writeUri, buf, {
|
|
330
|
-
overwrite: false
|
|
331
|
-
});
|
|
332
|
-
} else {
|
|
333
|
-
await this._fileService.writeFile(writeUri, buf);
|
|
456
|
+
{
|
|
457
|
+
if (!p.uri || !p.data) {
|
|
458
|
+
sendError(( new Error("Missing uri or data")));
|
|
459
|
+
return;
|
|
334
460
|
}
|
|
335
|
-
|
|
336
|
-
|
|
461
|
+
const writeUri = ( URI.parse(p.uri));
|
|
462
|
+
return void gateAndHandle(writeUri, AgentHostPermissionMode.Write, {
|
|
463
|
+
uri: ( writeUri.toString()),
|
|
464
|
+
write: true
|
|
465
|
+
}, async () => {
|
|
466
|
+
const buf = p.encoding === ContentEncoding.Base64 ? decodeBase64(p.data) : VSBuffer.fromString(p.data);
|
|
467
|
+
if (p.createOnly) {
|
|
468
|
+
await this._fileService.createFile(writeUri, buf, {
|
|
469
|
+
overwrite: false
|
|
470
|
+
});
|
|
471
|
+
} else {
|
|
472
|
+
await this._fileService.writeFile(writeUri, buf);
|
|
473
|
+
}
|
|
474
|
+
return {};
|
|
475
|
+
});
|
|
476
|
+
}
|
|
337
477
|
case "resourceDelete":
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
478
|
+
{
|
|
479
|
+
if (!p.uri) {
|
|
480
|
+
sendError(( new Error("Missing uri")));
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
const deleteUri = ( URI.parse(p.uri));
|
|
484
|
+
return void gateAndHandle(deleteUri, AgentHostPermissionMode.Write, {
|
|
485
|
+
uri: ( deleteUri.toString()),
|
|
486
|
+
write: true
|
|
487
|
+
}, () => this._fileService.del(deleteUri, {
|
|
488
|
+
recursive: !!p.recursive
|
|
489
|
+
}).then(() => ({})));
|
|
341
490
|
}
|
|
342
|
-
return handle(() => this._fileService.del(( URI.parse(p.uri)), {
|
|
343
|
-
recursive: !!p.recursive
|
|
344
|
-
}).then(() => ({})));
|
|
345
491
|
case "resourceMove":
|
|
346
|
-
|
|
347
|
-
|
|
492
|
+
{
|
|
493
|
+
if (!p.source || !p.destination) {
|
|
494
|
+
sendError(( new Error("Missing source or destination")));
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
const sourceUri = ( URI.parse(p.source));
|
|
498
|
+
const destUri = ( URI.parse(p.destination));
|
|
499
|
+
return void (async () => {
|
|
500
|
+
try {
|
|
501
|
+
const [sourceOk, destOk] = await Promise.all([
|
|
502
|
+
this._permissionService.check(this._address, sourceUri, AgentHostPermissionMode.Write),
|
|
503
|
+
this._permissionService.check(this._address, destUri, AgentHostPermissionMode.Write)
|
|
504
|
+
]);
|
|
505
|
+
if (!sourceOk) {
|
|
506
|
+
sendPermissionDenied({
|
|
507
|
+
uri: ( sourceUri.toString()),
|
|
508
|
+
write: true
|
|
509
|
+
});
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
if (!destOk) {
|
|
513
|
+
sendPermissionDenied({
|
|
514
|
+
uri: ( destUri.toString()),
|
|
515
|
+
write: true
|
|
516
|
+
});
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
await this._fileService.move(sourceUri, destUri, !p.failIfExists);
|
|
520
|
+
sendResult({});
|
|
521
|
+
} catch (err) {
|
|
522
|
+
sendError(err);
|
|
523
|
+
}
|
|
524
|
+
})();
|
|
525
|
+
}
|
|
526
|
+
case "resourceRequest":
|
|
527
|
+
{
|
|
528
|
+
const requestParams = p;
|
|
529
|
+
this._permissionService.request(this._address, requestParams).then(() => sendResult({})).catch(err => {
|
|
530
|
+
if (err instanceof CancellationError) {
|
|
531
|
+
sendPermissionDenied(undefined);
|
|
532
|
+
} else {
|
|
533
|
+
sendError(err);
|
|
534
|
+
}
|
|
535
|
+
});
|
|
348
536
|
return;
|
|
349
537
|
}
|
|
350
|
-
return handle(() => this._fileService.move(( URI.parse(p.source)), ( URI.parse(p.destination)), !p.failIfExists).then(() => ({})));
|
|
351
538
|
default:
|
|
352
539
|
this._logService.warn(`[RemoteAgentHostProtocol] Unhandled reverse request: ${method}`);
|
|
353
540
|
sendError(( new Error(`Unknown method: ${method}`)));
|
|
@@ -361,9 +548,15 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
361
548
|
});
|
|
362
549
|
}
|
|
363
550
|
_sendRequest(method, params) {
|
|
551
|
+
if (this._closeError) {
|
|
552
|
+
return Promise.reject(this._closeError);
|
|
553
|
+
}
|
|
364
554
|
const id = this._nextRequestId++;
|
|
365
555
|
const deferred = ( new DeferredPromise());
|
|
366
|
-
this._pendingRequests.set(id,
|
|
556
|
+
this._pendingRequests.set(id, {
|
|
557
|
+
deferred,
|
|
558
|
+
sentAt: Date.now()
|
|
559
|
+
});
|
|
367
560
|
this._transport.send({
|
|
368
561
|
jsonrpc: "2.0",
|
|
369
562
|
id,
|
|
@@ -373,21 +566,61 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
373
566
|
return deferred.p;
|
|
374
567
|
}
|
|
375
568
|
_sendExtensionRequest(method, params) {
|
|
569
|
+
if (this._closeError) {
|
|
570
|
+
return Promise.reject(this._closeError);
|
|
571
|
+
}
|
|
376
572
|
const id = this._nextRequestId++;
|
|
377
573
|
const deferred = ( new DeferredPromise());
|
|
378
|
-
this._pendingRequests.set(id,
|
|
379
|
-
|
|
574
|
+
this._pendingRequests.set(id, {
|
|
575
|
+
deferred,
|
|
576
|
+
sentAt: Date.now()
|
|
577
|
+
});
|
|
578
|
+
const request = {
|
|
380
579
|
jsonrpc: "2.0",
|
|
381
580
|
id,
|
|
382
581
|
method,
|
|
383
582
|
params
|
|
384
|
-
}
|
|
583
|
+
};
|
|
584
|
+
this._transport.send(request);
|
|
385
585
|
return deferred.p;
|
|
386
586
|
}
|
|
587
|
+
_toProtocolError(error) {
|
|
588
|
+
return ( new ProtocolError(error.code, error.message, error.data));
|
|
589
|
+
}
|
|
590
|
+
_rejectPendingRequests(error) {
|
|
591
|
+
for (const pending of ( this._pendingRequests.values())) {
|
|
592
|
+
pending.deferred.error(error);
|
|
593
|
+
}
|
|
594
|
+
this._pendingRequests.clear();
|
|
595
|
+
}
|
|
596
|
+
_watchdogTick() {
|
|
597
|
+
if (this._isClosed || this._pendingRequests.size === 0) {
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
const now = Date.now();
|
|
601
|
+
const sinceLastRead = now - this._lastReadTime;
|
|
602
|
+
if (sinceLastRead < WATCHDOG_TIMEOUT_MS) {
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
let oldestSentAt = now;
|
|
606
|
+
for (const pending of ( this._pendingRequests.values())) {
|
|
607
|
+
if (pending.sentAt < oldestSentAt) {
|
|
608
|
+
oldestSentAt = pending.sentAt;
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
const oldestAge = now - oldestSentAt;
|
|
612
|
+
if (oldestAge < WATCHDOG_TIMEOUT_MS) {
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
this._logService.info(
|
|
616
|
+
`[RemoteAgentHostProtocol] Watchdog: connection to ${this._address} appears dead — ` + `${this._pendingRequests.size} request(s) outstanding, no message received for ${sinceLastRead}ms, ` + `oldest request ${oldestAge}ms old. Forcing close to trigger reconnect.`
|
|
617
|
+
);
|
|
618
|
+
this._handleClose(connectionTimeoutError(this._address, sinceLastRead, oldestAge));
|
|
619
|
+
}
|
|
387
620
|
nextClientSeq() {
|
|
388
621
|
return this._nextClientSeq++;
|
|
389
622
|
}
|
|
390
623
|
};
|
|
391
|
-
RemoteAgentHostProtocolClient = ( __decorate([( __param(2, ILogService)), ( __param(3, IFileService))], RemoteAgentHostProtocolClient));
|
|
624
|
+
RemoteAgentHostProtocolClient = ( __decorate([( __param(2, ILogService)), ( __param(3, IFileService)), ( __param(4, IAgentHostPermissionService))], RemoteAgentHostProtocolClient));
|
|
392
625
|
|
|
393
626
|
export { RemoteAgentHostProtocolClient };
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
1
|
+
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
|
+
import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
|
|
3
4
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
+
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
4
6
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
5
|
-
import type
|
|
7
|
+
import { type IAgentConnection } from "../common/agentService.js";
|
|
6
8
|
import { type IRemoteAgentHostConnectionInfo, type IRemoteAgentHostEntry } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/remoteAgentHostService";
|
|
7
9
|
import { IRemoteAgentHostService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/remoteAgentHostService.service";
|
|
8
10
|
export declare class RemoteAgentHostService extends Disposable implements IRemoteAgentHostService {
|
|
9
11
|
private readonly _configurationService;
|
|
10
12
|
private readonly _instantiationService;
|
|
11
13
|
private readonly _logService;
|
|
14
|
+
private readonly _labelService;
|
|
15
|
+
private readonly _environmentService;
|
|
12
16
|
private static readonly ConnectionWaitTimeout;
|
|
13
17
|
/** Initial reconnect delay in milliseconds. */
|
|
14
18
|
private static readonly ReconnectInitialDelay;
|
|
@@ -22,7 +26,7 @@ export declare class RemoteAgentHostService extends Disposable implements IRemot
|
|
|
22
26
|
private readonly _tokens;
|
|
23
27
|
/**
|
|
24
28
|
* Stores the original {@link IRemoteAgentHostEntry} for connections
|
|
25
|
-
* registered via {@link
|
|
29
|
+
* registered via {@link addManagedConnection}. This is needed because
|
|
26
30
|
* tunnel entries are not persisted to settings and therefore don't
|
|
27
31
|
* appear in {@link configuredEntries}.
|
|
28
32
|
*/
|
|
@@ -32,14 +36,21 @@ export declare class RemoteAgentHostService extends Disposable implements IRemot
|
|
|
32
36
|
private readonly _reconnectTimeouts;
|
|
33
37
|
/** Current reconnect attempt count per address for exponential backoff. */
|
|
34
38
|
private readonly _reconnectAttempts;
|
|
35
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Per-address {@link ILabelService} formatter handles for the
|
|
41
|
+
* {@link AGENT_HOST_SCHEME}. The formatter advertises the entry's
|
|
42
|
+
* human-readable name as the host label so any UI looking up the host
|
|
43
|
+
* label for an agent host URI gets the friendly name.
|
|
44
|
+
*/
|
|
45
|
+
private readonly _labelFormatters;
|
|
46
|
+
constructor(_configurationService: IConfigurationService, _instantiationService: IInstantiationService, _logService: ILogService, _labelService: ILabelService, _environmentService: IEnvironmentService);
|
|
36
47
|
get connections(): readonly IRemoteAgentHostConnectionInfo[];
|
|
37
48
|
get configuredEntries(): readonly IRemoteAgentHostEntry[];
|
|
38
49
|
getConnection(address: string): IAgentConnection | undefined;
|
|
39
50
|
getEntryByAddress(address: string): IRemoteAgentHostEntry | undefined;
|
|
40
51
|
reconnect(address: string): void;
|
|
41
52
|
addRemoteAgentHost(input: IRemoteAgentHostEntry): Promise<IRemoteAgentHostConnectionInfo>;
|
|
42
|
-
|
|
53
|
+
addManagedConnection(entry: IRemoteAgentHostEntry, connection: IAgentConnection, transportDisposable?: IDisposable): Promise<IRemoteAgentHostConnectionInfo>;
|
|
43
54
|
removeRemoteAgentHost(address: string): Promise<void>;
|
|
44
55
|
private _removeConnection;
|
|
45
56
|
private _reconcileConnections;
|
|
@@ -61,5 +72,13 @@ export declare class RemoteAgentHostService extends Disposable implements IRemot
|
|
|
61
72
|
private _getOrCreateConnectionWait;
|
|
62
73
|
private _resolvePendingConnectionWait;
|
|
63
74
|
private _rejectPendingConnectionWait;
|
|
75
|
+
/**
|
|
76
|
+
* Register (or re-register) the {@link AGENT_HOST_SCHEME} label formatter
|
|
77
|
+
* for the given address so that {@link ILabelService.getHostLabel} resolves
|
|
78
|
+
* to the entry's human-readable name. Called when an entry is added or its
|
|
79
|
+
* name changes.
|
|
80
|
+
*/
|
|
81
|
+
private _updateHostLabelFormatter;
|
|
82
|
+
private _clearHostLabelFormatter;
|
|
64
83
|
dispose(): void;
|
|
65
84
|
}
|