@codingame/monaco-vscode-chat-service-override 32.0.2 → 33.0.5
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 +15 -5
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +170 -24
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +372 -66
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +18 -1
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +160 -31
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.d.ts +8 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +19 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +134 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +257 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +84 -3
- package/vscode/src/vs/platform/agentHost/common/agentService.js +9 -1
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +61 -1
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +61 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.js +3 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +4 -4
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +1 -1
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +2 -7
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +8 -29
- 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 +60 -60
- 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.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +10 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +180 -174
- 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 +12 -12
- 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 +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +330 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +77 -0
- 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.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +267 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +53 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +30 -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/agentSessions/localAgentSessionsController.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +7 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +150 -119
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +45 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +58 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +2 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +88 -70
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +82 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +10 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +2 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +89 -71
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +2 -2843
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +2934 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +99 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +53 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +131 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +23 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +91 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +23 -21
- 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 +29 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +203 -163
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +31 -54
- 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 +88 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +17 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +91 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.js +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +21 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +55 -18
- 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/hasByokModelsContribution.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.js +106 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +4 -6
- 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 +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +38 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.js +106 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/{toolInvocationParts/chatToolOutputStateCache.d.ts → chatOutputPartStateCache.d.ts} +5 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/{toolInvocationParts/chatToolOutputStateCache.js → chatOutputPartStateCache.js} +19 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +58 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +18 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +19 -18
- 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 +1 -2
- 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 +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +14 -15
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +155 -156
- package/vscode/src/vs/workbench/contrib/chat/common/tools/copilotToolIds.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/copilotToolIds.js +12 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/toolResultCompressor.d.ts +88 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/toolResultCompressor.js +25 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +237 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +600 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +47 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselTypes.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselTypes.js +7 -0
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/media/imageCarousel.css +298 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +12 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +78 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +15 -11
- 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 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -16
- 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/terminalCommandParser.d.ts +60 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandParser.js +286 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.js +285 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.d.ts +19 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +415 -47
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.d.ts +2 -7
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +1 -1
- package/vscode/src/vs/base/common/defaultAccount.d.ts +0 -69
- package/vscode/src/vs/base/common/defaultAccount.js +0 -12
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +0 -85
|
@@ -9,19 +9,29 @@ import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
9
9
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
10
10
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
11
11
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
12
|
+
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
13
|
+
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
12
14
|
import { AgentHostAhpJsonlLoggingSettingId } from '../common/agentService.js';
|
|
13
|
-
import { RemoteAgentHostsSettingId, RemoteAgentHostsEnabledSettingId, RemoteAgentHostEntryType, getEntryAddress, RemoteAgentHostConnectionStatus,
|
|
14
|
-
import { RemoteAgentHostProtocolClient } from './remoteAgentHostProtocolClient.js';
|
|
15
|
+
import { RemoteAgentHostsSettingId, RemoteAgentHostsEnabledSettingId, RemoteAgentHostEntryType, getEntryAddress, RemoteAgentHostConnectionStatus, entryToRawEntry, rawEntryToEntry } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/remoteAgentHostService';
|
|
16
|
+
import { RemoteAgentHostProtocolClient, AgentHostClientState } from './remoteAgentHostProtocolClient.js';
|
|
15
17
|
import { WebSocketClientTransport } from './webSocketClientTransport.js';
|
|
16
18
|
import { normalizeRemoteAgentHostAddress, AGENT_HOST_LABEL_FORMATTER, agentHostAuthority, AGENT_HOST_SCHEME } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
|
|
17
19
|
import { isDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
18
20
|
import { PROTOCOL_VERSION } from '../common/state/protocol/version/registry.js';
|
|
19
21
|
|
|
20
22
|
var RemoteAgentHostService_1;
|
|
23
|
+
const SSH_REMOTE_AGENT_HOSTS_STORAGE_KEY = "remoteAgentHost.sshConnections";
|
|
21
24
|
function disposeEntry(entry) {
|
|
22
25
|
entry.store.dispose();
|
|
23
26
|
entry.transportDisposable?.dispose();
|
|
24
27
|
}
|
|
28
|
+
function isRawRemoteAgentHostEntry(value) {
|
|
29
|
+
if (typeof value !== "object" || value === null) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
const candidate = value;
|
|
33
|
+
return typeof candidate.address === "string" && typeof candidate.name === "string" && (candidate.connectionToken === undefined || typeof candidate.connectionToken === "string") && (candidate.sshConfigHost === undefined || typeof candidate.sshConfigHost === "string") && (candidate.sshHostName === undefined || typeof candidate.sshHostName === "string") && (candidate.sshUser === undefined || typeof candidate.sshUser === "string") && (candidate.sshPort === undefined || typeof candidate.sshPort === "number");
|
|
34
|
+
}
|
|
25
35
|
let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
26
36
|
static {
|
|
27
37
|
RemoteAgentHostService_1 = this;
|
|
@@ -35,12 +45,16 @@ let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
|
35
45
|
static {
|
|
36
46
|
this.ReconnectMaxDelay = 30000;
|
|
37
47
|
}
|
|
48
|
+
static {
|
|
49
|
+
this.UpgradeRequestTimeout = 5 * 60 * 1000;
|
|
50
|
+
}
|
|
38
51
|
constructor(
|
|
39
52
|
_configurationService,
|
|
40
53
|
_instantiationService,
|
|
41
54
|
_logService,
|
|
42
55
|
_labelService,
|
|
43
|
-
_environmentService
|
|
56
|
+
_environmentService,
|
|
57
|
+
_storageService
|
|
44
58
|
) {
|
|
45
59
|
super();
|
|
46
60
|
this._configurationService = _configurationService;
|
|
@@ -48,6 +62,7 @@ let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
|
48
62
|
this._logService = _logService;
|
|
49
63
|
this._labelService = _labelService;
|
|
50
64
|
this._environmentService = _environmentService;
|
|
65
|
+
this._storageService = _storageService;
|
|
51
66
|
this._onDidChangeConnections = this._register(( new Emitter()));
|
|
52
67
|
this.onDidChangeConnections = this._onDidChangeConnections.event;
|
|
53
68
|
this._entries = ( new Map());
|
|
@@ -63,6 +78,13 @@ let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
|
63
78
|
this._reconcileConnections();
|
|
64
79
|
}
|
|
65
80
|
}));
|
|
81
|
+
this._register(
|
|
82
|
+
this._storageService.onDidChangeValue(StorageScope.APPLICATION, SSH_REMOTE_AGENT_HOSTS_STORAGE_KEY, this._store)(() => {
|
|
83
|
+
this._reconcileConnections();
|
|
84
|
+
this._onDidChangeConnections.fire();
|
|
85
|
+
})
|
|
86
|
+
);
|
|
87
|
+
this._migrateSSHEntriesFromSetting();
|
|
66
88
|
this._reconcileConnections();
|
|
67
89
|
}
|
|
68
90
|
get connections() {
|
|
@@ -105,6 +127,23 @@ let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
|
105
127
|
}
|
|
106
128
|
return this.configuredEntries.find(e => normalizeRemoteAgentHostAddress(getEntryAddress(e)) === normalized);
|
|
107
129
|
}
|
|
130
|
+
async triggerServerUpgrade(address, method) {
|
|
131
|
+
const normalized = normalizeRemoteAgentHostAddress(address);
|
|
132
|
+
const entry = this._entries.get(normalized);
|
|
133
|
+
if (!entry) {
|
|
134
|
+
throw ( new Error(`No remote agent host entry found for ${address}.`));
|
|
135
|
+
}
|
|
136
|
+
const result = await raceTimeout(
|
|
137
|
+
entry.client.triggerVscodeUpgrade(method),
|
|
138
|
+
RemoteAgentHostService_1.UpgradeRequestTimeout
|
|
139
|
+
);
|
|
140
|
+
if (result === undefined) {
|
|
141
|
+
throw ( new Error(
|
|
142
|
+
`Server upgrade request timed out after ${RemoteAgentHostService_1.UpgradeRequestTimeout}ms.`
|
|
143
|
+
));
|
|
144
|
+
}
|
|
145
|
+
return result;
|
|
146
|
+
}
|
|
108
147
|
reconnect(address) {
|
|
109
148
|
const normalized = normalizeRemoteAgentHostAddress(address);
|
|
110
149
|
const configuredEntry = this._getConfiguredEntries().find(e => normalizeRemoteAgentHostAddress(getEntryAddress(e)) === normalized);
|
|
@@ -163,6 +202,9 @@ let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
|
163
202
|
return connection;
|
|
164
203
|
}
|
|
165
204
|
async addManagedConnection(entry, connection, transportDisposable) {
|
|
205
|
+
if (!this._configurationService.getValue(RemoteAgentHostsEnabledSettingId)) {
|
|
206
|
+
throw ( new Error("Remote agent host connections are not enabled."));
|
|
207
|
+
}
|
|
166
208
|
const address = getEntryAddress(entry);
|
|
167
209
|
const existingEntry = this._entries.get(address);
|
|
168
210
|
if (existingEntry) {
|
|
@@ -240,8 +282,8 @@ let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
|
240
282
|
}
|
|
241
283
|
return;
|
|
242
284
|
}
|
|
243
|
-
const
|
|
244
|
-
const entriesWithAddress = (
|
|
285
|
+
const configuredEntries = this._getConfiguredEntries();
|
|
286
|
+
const entriesWithAddress = ( configuredEntries.map(e => ({
|
|
245
287
|
entry: e,
|
|
246
288
|
address: normalizeRemoteAgentHostAddress(getEntryAddress(e))
|
|
247
289
|
})));
|
|
@@ -290,6 +332,9 @@ let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
|
290
332
|
}
|
|
291
333
|
}
|
|
292
334
|
_connectTo(address, connectionToken) {
|
|
335
|
+
if (!this._configurationService.getValue(RemoteAgentHostsEnabledSettingId)) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
293
338
|
const existingEntry = this._entries.get(address);
|
|
294
339
|
if (existingEntry) {
|
|
295
340
|
this._entries.delete(address);
|
|
@@ -297,15 +342,13 @@ let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
|
297
342
|
}
|
|
298
343
|
const store = ( new DisposableStore());
|
|
299
344
|
const ahpLoggingEnabled = !!this._configurationService.getValue(AgentHostAhpJsonlLoggingSettingId);
|
|
300
|
-
const
|
|
301
|
-
this.
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
} : undefined)
|
|
306
|
-
);
|
|
345
|
+
const transportFactory = () => this._instantiationService.createInstance(WebSocketClientTransport, address, connectionToken, ahpLoggingEnabled ? {
|
|
346
|
+
logsHome: this._environmentService.logsHome,
|
|
347
|
+
connectionId: address,
|
|
348
|
+
transport: "websocket"
|
|
349
|
+
} : undefined);
|
|
307
350
|
const client = store.add(
|
|
308
|
-
this._instantiationService.createInstance(RemoteAgentHostProtocolClient, address,
|
|
351
|
+
this._instantiationService.createInstance(RemoteAgentHostProtocolClient, address, transportFactory, undefined)
|
|
309
352
|
);
|
|
310
353
|
const entry = {
|
|
311
354
|
store,
|
|
@@ -325,6 +368,23 @@ let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
|
325
368
|
this._onDidChangeConnections.fire();
|
|
326
369
|
this._scheduleReconnect(address, connectionToken);
|
|
327
370
|
}));
|
|
371
|
+
store.add(client.onDidChangeConnectionState(state => {
|
|
372
|
+
if (!isCurrentEntry()) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
switch (state) {
|
|
376
|
+
case AgentHostClientState.Reconnecting:
|
|
377
|
+
entry.connected = false;
|
|
378
|
+
entry.status = RemoteAgentHostConnectionStatus.connecting;
|
|
379
|
+
this._onDidChangeConnections.fire();
|
|
380
|
+
break;
|
|
381
|
+
case AgentHostClientState.Connected:
|
|
382
|
+
entry.connected = true;
|
|
383
|
+
entry.status = RemoteAgentHostConnectionStatus.connected;
|
|
384
|
+
this._onDidChangeConnections.fire();
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
}));
|
|
328
388
|
this._logService.info(`[RemoteAgentHost] Connecting to ${address}`);
|
|
329
389
|
this._onDidChangeConnections.fire();
|
|
330
390
|
client.connect().then(() => {
|
|
@@ -404,24 +464,10 @@ let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
|
404
464
|
);
|
|
405
465
|
}
|
|
406
466
|
_getConfiguredEntries() {
|
|
407
|
-
return (
|
|
467
|
+
return this._mergeConfiguredEntries(this._getConfiguredSettingEntries(), this._getStoredSSHEntries());
|
|
408
468
|
}
|
|
409
469
|
_upsertConfiguredEntry(entry) {
|
|
410
|
-
const
|
|
411
|
-
const inspected = this._configurationService.inspect(RemoteAgentHostsSettingId);
|
|
412
|
-
let configuredRaw;
|
|
413
|
-
switch (target) {
|
|
414
|
-
case ConfigurationTarget.USER_LOCAL:
|
|
415
|
-
configuredRaw = inspected.userLocalValue ?? [];
|
|
416
|
-
break;
|
|
417
|
-
case ConfigurationTarget.USER_REMOTE:
|
|
418
|
-
configuredRaw = inspected.userRemoteValue ?? [];
|
|
419
|
-
break;
|
|
420
|
-
default:
|
|
421
|
-
configuredRaw = inspected.userValue ?? [];
|
|
422
|
-
break;
|
|
423
|
-
}
|
|
424
|
-
const configuredEntries = ( configuredRaw.map(rawEntryToEntry)).filter(e => e !== undefined);
|
|
470
|
+
const configuredEntries = this._mergeConfiguredEntries(this._getConfiguredSettingEntriesForTarget(), this._getStoredSSHEntries());
|
|
425
471
|
const normalizedAddress = normalizeRemoteAgentHostAddress(getEntryAddress(entry));
|
|
426
472
|
const existingIndex = configuredEntries.findIndex(
|
|
427
473
|
e => normalizeRemoteAgentHostAddress(getEntryAddress(e)) === normalizedAddress
|
|
@@ -445,9 +491,92 @@ let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
|
445
491
|
return ConfigurationTarget.USER;
|
|
446
492
|
}
|
|
447
493
|
async _storeConfiguredEntries(entries) {
|
|
448
|
-
|
|
494
|
+
this._storeStoredSSHEntries(
|
|
495
|
+
entries.filter(entry => entry.connection.type === RemoteAgentHostEntryType.SSH)
|
|
496
|
+
);
|
|
497
|
+
const raw = ( entries.filter(entry => entry.connection.type !== RemoteAgentHostEntryType.SSH).map(entryToRawEntry)).filter(isDefined);
|
|
449
498
|
await this._configurationService.updateValue(RemoteAgentHostsSettingId, raw, this._getConfigurationTarget());
|
|
450
499
|
}
|
|
500
|
+
_getConfiguredSettingEntries() {
|
|
501
|
+
return ( (this._configurationService.getValue(RemoteAgentHostsSettingId) ?? []).map(rawEntryToEntry)).filter(isDefined);
|
|
502
|
+
}
|
|
503
|
+
_getConfiguredSettingEntriesForTarget() {
|
|
504
|
+
return ( this._getConfiguredRawEntriesForTarget().map(rawEntryToEntry)).filter(isDefined);
|
|
505
|
+
}
|
|
506
|
+
_getConfiguredRawEntriesForTarget() {
|
|
507
|
+
const target = this._getConfigurationTarget();
|
|
508
|
+
const inspected = this._configurationService.inspect(RemoteAgentHostsSettingId);
|
|
509
|
+
switch (target) {
|
|
510
|
+
case ConfigurationTarget.USER_LOCAL:
|
|
511
|
+
return inspected.userLocalValue ?? [];
|
|
512
|
+
case ConfigurationTarget.USER_REMOTE:
|
|
513
|
+
return inspected.userRemoteValue ?? [];
|
|
514
|
+
default:
|
|
515
|
+
return inspected.userValue ?? [];
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
_getStoredSSHEntries() {
|
|
519
|
+
const raw = this._storageService.get(SSH_REMOTE_AGENT_HOSTS_STORAGE_KEY, StorageScope.APPLICATION);
|
|
520
|
+
if (!raw) {
|
|
521
|
+
return [];
|
|
522
|
+
}
|
|
523
|
+
try {
|
|
524
|
+
const parsed = JSON.parse(raw);
|
|
525
|
+
if (!Array.isArray(parsed)) {
|
|
526
|
+
return [];
|
|
527
|
+
}
|
|
528
|
+
return ( parsed.map(
|
|
529
|
+
item => isRawRemoteAgentHostEntry(item) ? rawEntryToEntry(item) : undefined
|
|
530
|
+
)).filter(entry => entry?.connection.type === RemoteAgentHostEntryType.SSH);
|
|
531
|
+
} catch {
|
|
532
|
+
return [];
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
_storeStoredSSHEntries(entries) {
|
|
536
|
+
const raw = ( entries.filter(entry => entry.connection.type === RemoteAgentHostEntryType.SSH).map(entryToRawEntry)).filter(isDefined);
|
|
537
|
+
if (raw.length === 0) {
|
|
538
|
+
this._storageService.remove(SSH_REMOTE_AGENT_HOSTS_STORAGE_KEY, StorageScope.APPLICATION);
|
|
539
|
+
} else {
|
|
540
|
+
this._storageService.store(
|
|
541
|
+
SSH_REMOTE_AGENT_HOSTS_STORAGE_KEY,
|
|
542
|
+
JSON.stringify(raw),
|
|
543
|
+
StorageScope.APPLICATION,
|
|
544
|
+
StorageTarget.USER
|
|
545
|
+
);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
_migrateSSHEntriesFromSetting() {
|
|
549
|
+
const configuredEntries = this._getConfiguredSettingEntriesForTarget();
|
|
550
|
+
const sshEntries = configuredEntries.filter(entry => entry.connection.type === RemoteAgentHostEntryType.SSH);
|
|
551
|
+
if (sshEntries.length === 0) {
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
const migratedEntries = this._mergeConfiguredEntries(this._getStoredSSHEntries(), sshEntries);
|
|
555
|
+
this._storeStoredSSHEntries(migratedEntries);
|
|
556
|
+
const nonSSHEntries = configuredEntries.filter(entry => entry.connection.type !== RemoteAgentHostEntryType.SSH);
|
|
557
|
+
const raw = ( nonSSHEntries.map(entryToRawEntry)).filter(isDefined);
|
|
558
|
+
this._configurationService.updateValue(RemoteAgentHostsSettingId, raw, this._getConfigurationTarget()).catch(err => {
|
|
559
|
+
this._logService.error(
|
|
560
|
+
"[RemoteAgentHost] Failed to migrate SSH connection details from settings to storage",
|
|
561
|
+
err
|
|
562
|
+
);
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
_mergeConfiguredEntries(base, incoming) {
|
|
566
|
+
let result = base;
|
|
567
|
+
for (const entry of incoming) {
|
|
568
|
+
const normalizedAddress = normalizeRemoteAgentHostAddress(getEntryAddress(entry));
|
|
569
|
+
const existingIndex = result.findIndex(
|
|
570
|
+
e => normalizeRemoteAgentHostAddress(getEntryAddress(e)) === normalizedAddress
|
|
571
|
+
);
|
|
572
|
+
if (existingIndex === -1) {
|
|
573
|
+
result = [...result, entry];
|
|
574
|
+
} else {
|
|
575
|
+
result = ( result.map((e, index) => index === existingIndex ? entry : e));
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
return result;
|
|
579
|
+
}
|
|
451
580
|
_getOrCreateConnectionWait(address) {
|
|
452
581
|
let wait = this._pendingConnectionWaits.get(address);
|
|
453
582
|
if (wait) {
|
|
@@ -521,6 +650,6 @@ let RemoteAgentHostService = class RemoteAgentHostService extends Disposable {
|
|
|
521
650
|
super.dispose();
|
|
522
651
|
}
|
|
523
652
|
};
|
|
524
|
-
RemoteAgentHostService = RemoteAgentHostService_1 = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IInstantiationService)), ( __param(2, ILogService)), ( __param(3, ILabelService)), ( __param(4, IEnvironmentService))], RemoteAgentHostService));
|
|
653
|
+
RemoteAgentHostService = RemoteAgentHostService_1 = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IInstantiationService)), ( __param(2, ILogService)), ( __param(3, ILabelService)), ( __param(4, IEnvironmentService)), ( __param(5, IStorageService))], RemoteAgentHostService));
|
|
525
654
|
|
|
526
655
|
export { RemoteAgentHostService };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { IRemoteFilesystemConnection } from "./agentHostFileSystemProvider.js";
|
|
2
|
+
/**
|
|
3
|
+
* Scheme used for the in-memory plugin filesystem backing synced customizations.
|
|
4
|
+
*
|
|
5
|
+
* URIs under this scheme are served by a registered {@link InMemoryFileSystemProvider}
|
|
6
|
+
* and are reachable by the agent host via `fetchContent`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SYNCED_CUSTOMIZATION_SCHEME = "vscode-synced-customization";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
3
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
|
|
5
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
6
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
8
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
9
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
10
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/charCode';
|
|
11
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
12
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
13
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
14
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
15
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands';
|
|
16
|
+
|
|
17
|
+
const SYNCED_CUSTOMIZATION_SCHEME = "vscode-synced-customization";
|
|
18
|
+
|
|
19
|
+
export { SYNCED_CUSTOMIZATION_SCHEME };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { TelemetryConfiguration, TelemetryLevel } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry";
|
|
2
|
+
import type { SessionConfigPropertySchema, SessionConfigSchema } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands";
|
|
3
|
+
/**
|
|
4
|
+
* A schema property with a phantom TypeScript type and a precomputed
|
|
5
|
+
* runtime validator.
|
|
6
|
+
*
|
|
7
|
+
* The `<T>` type parameter is the developer's assertion about the
|
|
8
|
+
* property's runtime shape; the validator derived from `protocol`
|
|
9
|
+
* (`type`, `enum`, `items`, `properties`, `required`) enforces it at
|
|
10
|
+
* runtime.
|
|
11
|
+
*/
|
|
12
|
+
export interface ISchemaProperty<T> {
|
|
13
|
+
readonly protocol: SessionConfigPropertySchema;
|
|
14
|
+
/**
|
|
15
|
+
* Returns `true` iff `value` conforms to {@link protocol}. Narrows
|
|
16
|
+
* the type to `T` for callers. The boolean form is preferred for
|
|
17
|
+
* control flow; use {@link assertValid} when you want a descriptive
|
|
18
|
+
* error for the offending path.
|
|
19
|
+
*/
|
|
20
|
+
validate(value: unknown): value is T;
|
|
21
|
+
/**
|
|
22
|
+
* Throws a {@link ProtocolError} with `JsonRpcErrorCodes.InvalidParams`
|
|
23
|
+
* describing the offending path (e.g. `'permissions.allow[2]'`) when
|
|
24
|
+
* `value` does not conform to {@link protocol}. Otherwise returns and
|
|
25
|
+
* narrows the type to `T`.
|
|
26
|
+
*
|
|
27
|
+
* @param path Dotted path prefix to embed in error messages. Defaults
|
|
28
|
+
* to empty (the value itself).
|
|
29
|
+
*/
|
|
30
|
+
assertValid(value: unknown, path?: string): asserts value is T;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Defines a strongly-typed schema property whose runtime validator is
|
|
34
|
+
* derived from the supplied JSON-schema descriptor.
|
|
35
|
+
*/
|
|
36
|
+
export declare function schemaProperty<T>(protocol: SessionConfigPropertySchema): ISchemaProperty<T>;
|
|
37
|
+
export type SchemaDefinition = Record<string, ISchemaProperty<any>>;
|
|
38
|
+
export type SchemaValue<P> = P extends ISchemaProperty<infer T> ? T : never;
|
|
39
|
+
export type SchemaValues<D extends SchemaDefinition> = {
|
|
40
|
+
[K in keyof D]?: SchemaValue<D[K]>;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* A bundle of named schema properties plus helpers for serializing to the
|
|
44
|
+
* protocol shape, validating a values bag at write sites, and validating
|
|
45
|
+
* a single key at read sites.
|
|
46
|
+
*/
|
|
47
|
+
export interface ISchema<D extends SchemaDefinition> {
|
|
48
|
+
readonly definition: D;
|
|
49
|
+
/** Returns the protocol-serializable schema for this bundle. */
|
|
50
|
+
toProtocol(): SessionConfigSchema;
|
|
51
|
+
/**
|
|
52
|
+
* Validates each known key in `values` against its schema and returns
|
|
53
|
+
* a new plain record. Throws a {@link ProtocolError} with a path like
|
|
54
|
+
* `'permissions.allow[2]'` when any supplied value fails validation.
|
|
55
|
+
* Unknown keys are passed through untouched for forward-compatibility.
|
|
56
|
+
*/
|
|
57
|
+
values(values: SchemaValues<D>): Record<string, unknown>;
|
|
58
|
+
/**
|
|
59
|
+
* Returns `true` iff `value` validates against the schema for `key`.
|
|
60
|
+
* Unknown keys return `false`.
|
|
61
|
+
*/
|
|
62
|
+
validate<K extends keyof D & string>(key: K, value: unknown): value is SchemaValue<D[K]>;
|
|
63
|
+
/**
|
|
64
|
+
* Throws a {@link ProtocolError} describing the offending path when
|
|
65
|
+
* `value` does not validate against the schema for `key`, or when
|
|
66
|
+
* `key` is not defined in the schema.
|
|
67
|
+
*/
|
|
68
|
+
assertValid<K extends keyof D & string>(key: K, value: unknown): asserts value is SchemaValue<D[K]>;
|
|
69
|
+
/**
|
|
70
|
+
* Returns a fully-typed values bag by validating each key of the
|
|
71
|
+
* schema against `values` and falling back to the default when
|
|
72
|
+
* the incoming value is missing or fails validation.
|
|
73
|
+
*
|
|
74
|
+
* Semantics: for every key declared in the schema `definition`:
|
|
75
|
+
* - if `values[key]` validates, it is kept;
|
|
76
|
+
* - else if `key` is present in `defaults`, the default is used;
|
|
77
|
+
* - else the key is omitted from the result.
|
|
78
|
+
*
|
|
79
|
+
* This means callers MAY supply defaults for only a subset of the
|
|
80
|
+
* schema — keys not present in `defaults` are simply left unset
|
|
81
|
+
* when the incoming value is missing or invalid. This is useful
|
|
82
|
+
* when some properties (e.g. per-session `permissions`) should be
|
|
83
|
+
* inherited from a higher scope rather than materialized on every
|
|
84
|
+
* new session.
|
|
85
|
+
*
|
|
86
|
+
* Intended for sanitizing untrusted input at protocol boundaries
|
|
87
|
+
* (e.g. `resolveSessionConfig`). Keys that fail validation are
|
|
88
|
+
* silently replaced with their default or dropped; use
|
|
89
|
+
* {@link values} or {@link assertValid} when you want a descriptive
|
|
90
|
+
* {@link ProtocolError} instead.
|
|
91
|
+
*/
|
|
92
|
+
validateOrDefault<T extends Partial<{
|
|
93
|
+
[K in keyof D]: SchemaValue<D[K]>;
|
|
94
|
+
}>>(values: {
|
|
95
|
+
[K in keyof T]?: unknown;
|
|
96
|
+
} | undefined, defaults: T): T;
|
|
97
|
+
}
|
|
98
|
+
export declare function createSchema<D extends SchemaDefinition>(definition: D): ISchema<D>;
|
|
99
|
+
export type AutoApproveLevel = "default" | "autoApprove" | "autopilot";
|
|
100
|
+
export type SessionMode = "interactive" | "plan";
|
|
101
|
+
export interface IPermissionsValue {
|
|
102
|
+
readonly allow: readonly string[];
|
|
103
|
+
readonly deny: readonly string[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Session-config properties owned by the platform itself — i.e. consumed
|
|
107
|
+
* by the agent host rather than by any particular agent.
|
|
108
|
+
*
|
|
109
|
+
* Agents extend this schema by spreading `platformSessionSchema.definition`
|
|
110
|
+
* into their own {@link createSchema} call together with any
|
|
111
|
+
* provider-specific properties.
|
|
112
|
+
*/
|
|
113
|
+
export declare const platformSessionSchema: ISchema<{
|
|
114
|
+
autoApprove: ISchemaProperty<AutoApproveLevel>;
|
|
115
|
+
permissions: ISchemaProperty<IPermissionsValue>;
|
|
116
|
+
mode: ISchemaProperty<SessionMode>;
|
|
117
|
+
}>;
|
|
118
|
+
/**
|
|
119
|
+
* Root (agent host) config properties owned by the platform itself.
|
|
120
|
+
*
|
|
121
|
+
* Root config acts as the baseline that applies to every session:
|
|
122
|
+
*
|
|
123
|
+
* - {@link SessionConfigKey.Permissions} — host-wide allow/deny lists
|
|
124
|
+
* unioned with each session's own permissions when evaluating tool
|
|
125
|
+
* auto-approval. See `SessionPermissionManager` for the evaluation
|
|
126
|
+
* rules.
|
|
127
|
+
*/
|
|
128
|
+
export declare const AgentHostTelemetryLevelConfigKey = "telemetryLevel";
|
|
129
|
+
export declare function telemetryLevelToAgentHostConfigValue(telemetryLevel: TelemetryLevel): TelemetryConfiguration;
|
|
130
|
+
export declare function agentHostConfigValueToTelemetryLevel(value: unknown): TelemetryLevel | undefined;
|
|
131
|
+
export declare const platformRootSchema: ISchema<{
|
|
132
|
+
permissions: ISchemaProperty<IPermissionsValue>;
|
|
133
|
+
telemetryLevel: ISchemaProperty<TelemetryConfiguration>;
|
|
134
|
+
}>;
|