@codingame/monaco-vscode-chat-service-override 33.0.9 → 34.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +19 -5
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +32 -0
- package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +77 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +84 -17
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +235 -190
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +3 -2
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +23 -4
- package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.js +22 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +107 -8
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +272 -49
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +2 -2
- package/vscode/src/vs/platform/agentHost/common/{agentHostPermissionService.d.ts → agentHostResourceService.d.ts} +26 -0
- package/vscode/src/vs/platform/agentHost/common/{agentHostPermissionService.js → agentHostResourceService.js} +11 -1
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +13 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +26 -18
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.d.ts +1 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +119 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +135 -19
- package/vscode/src/vs/platform/agentHost/common/agentService.js +8 -2
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.d.ts +5 -1
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.js +85 -22
- package/vscode/src/vs/platform/agentHost/common/customAgents.d.ts +36 -0
- package/vscode/src/vs/platform/agentHost/common/customAgents.js +12 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +81 -0
- package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +103 -0
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +86 -10
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +129 -37
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.d.ts +12 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +72 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-root/reducer.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-root/reducer.js +30 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/{reducers.js → channels-session/reducer.js} +99 -168
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.d.ts +6 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.js +110 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/{errors.d.ts → common/errors.d.ts} +13 -2
- package/vscode/src/vs/platform/agentHost/common/state/protocol/{errors.js → common/errors.js} +1 -2
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +17 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.js +9 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +33 -8
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +2 -3
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +36 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +6 -3
- package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +50 -0
- package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +138 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +3 -3
- package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +12 -0
- package/vscode/src/vs/platform/networkFilter/common/settings.js +14 -0
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.d.ts +4 -1
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +9 -0
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +21 -0
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +28 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.d.ts +31 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.js +49 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +182 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +784 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.d.ts +18 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.js +305 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +7 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.js +120 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +100 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +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 +106 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +22 -36
- 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 +21 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +38 -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 +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 +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +40 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +15 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +23 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +119 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +104 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +177 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +44 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +103 -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 +70 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +9 -7
- 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 +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +38 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +22 -31
- 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 +15 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +8 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +112 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +62 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +149 -145
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +13 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +15 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +78 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +140 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +11 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +59 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +440 -357
- 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/chatEditingEditorAccessibility.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 +3 -3
- 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/chatGoalSummaryService.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
- 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 +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +28 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +187 -106
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +346 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +72 -29
- 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 +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +144 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +126 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +32 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +40 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +25 -24
- 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/contextContrib/chatContext.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
- 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.js +1 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.d.ts +12 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.js +14 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +56 -18
- 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 +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +5 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +33 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +31 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +16 -13
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.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.js +24 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +23 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +22 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +2 -2
- 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.d.ts +14 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +55 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +54 -12
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +40 -4
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +30 -8
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +205 -46
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +8 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +153 -38
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +70 -37
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +6 -28
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +150 -150
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
- 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 +17 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +21 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +21 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +122 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +41 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +142 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +232 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +225 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +143 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +205 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +174 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +43 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +260 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +98 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +14 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +226 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +392 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +243 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +10 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +310 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +177 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +22 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +102 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +27 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +29 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +55 -0
- 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 +3 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +31 -9
- 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/monitoring/outputMonitor.d.ts +177 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +518 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +23 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +297 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +2961 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +63 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +14 -14
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +118 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.js +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +223 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +81 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +63 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +349 -0
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +75 -0
- package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +192 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostResourceService.d.ts +89 -0
- package/vscode/src/vs/workbench/services/agentHost/common/{agentHostPermissionService.js → agentHostResourceService.js} +226 -9
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +0 -30
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +0 -119
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +0 -552
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.d.ts +0 -83
|
@@ -10,27 +10,30 @@ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
|
10
10
|
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
11
11
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
12
12
|
import { toFileSystemProviderErrorCode, FileSystemProviderErrorCode } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
13
|
-
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
14
13
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
15
14
|
import { AgentSession } from '../common/agentService.js';
|
|
15
|
+
import { createRemoteWatchHandle } from '../common/agentHostFileSystemProvider.js';
|
|
16
16
|
import { AgentSubscriptionManager } from '../common/state/agentSubscription.js';
|
|
17
17
|
import { agentHostAuthority, fromAgentHostUri, toAgentHostUri } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { ActionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/actions';
|
|
21
|
-
import '@codingame/monaco-vscode-xterm-common/vscode/vs/platform/agentHost/common/state/protocol/notifications';
|
|
22
|
-
import { ROOT_STATE_URI } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
18
|
+
import { AgentHostResourcePermissionError } from '../common/agentHostResourceService.js';
|
|
19
|
+
import { IAgentHostResourceService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostResourceService.service';
|
|
20
|
+
import { ActionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/actions';
|
|
21
|
+
import '@codingame/monaco-vscode-xterm-common/vscode/vs/platform/agentHost/common/state/protocol/common/notifications';
|
|
22
|
+
import { ROOT_STATE_URI, isAhpRootChannel } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
23
23
|
import { PROTOCOL_VERSION } from '../common/state/protocol/version/registry.js';
|
|
24
24
|
import { ProtocolError, isJsonRpcRequest, isJsonRpcResponse, isJsonRpcNotification } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionProtocol';
|
|
25
25
|
import { isClientTransport } from '../common/state/sessionTransport.js';
|
|
26
|
-
import { AhpErrorCodes } from '../common/state/protocol/errors.js';
|
|
27
|
-
import { ReconnectResultType, ContentEncoding } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands';
|
|
28
|
-
import
|
|
26
|
+
import { AhpErrorCodes } from '../common/state/protocol/common/errors.js';
|
|
27
|
+
import { ReconnectResultType, ContentEncoding } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/commands';
|
|
28
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-session/commands';
|
|
29
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/commands';
|
|
30
|
+
import { encodeBase64 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
29
31
|
import { LoadEstimator } from '@codingame/monaco-vscode-api/vscode/vs/base/parts/ipc/common/ipc.net';
|
|
30
32
|
import { TELEMETRY_SETTING_ID, TELEMETRY_OLD_SETTING_ID, TELEMETRY_CRASH_REPORTER_SETTING_ID } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry';
|
|
31
33
|
import { getTelemetryLevel } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetryUtils';
|
|
32
|
-
import { AgentHostTelemetryLevelConfigKey, telemetryLevelToAgentHostConfigValue } from '../common/agentHostSchema.js';
|
|
33
|
-
import {
|
|
34
|
+
import { SESSION_SYNC_ENABLED_SETTING_ID, AgentHostTelemetryLevelConfigKey, telemetryLevelToAgentHostConfigValue, AgentHostSessionSyncEnabledConfigKey } from '../common/agentHostSchema.js';
|
|
35
|
+
import { dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
36
|
+
import { SessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-session/state';
|
|
34
37
|
|
|
35
38
|
const AHP_CLIENT_CONNECTION_CLOSED = -32e3;
|
|
36
39
|
const RECONNECT_INITIAL_DELAY_MS = 1_000;
|
|
@@ -72,29 +75,31 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
72
75
|
get connectionState() {
|
|
73
76
|
return this._state.kind;
|
|
74
77
|
}
|
|
78
|
+
get initializeResult() {
|
|
79
|
+
return this._initializeResult;
|
|
80
|
+
}
|
|
75
81
|
constructor(
|
|
76
82
|
address,
|
|
77
83
|
transportOrFactory,
|
|
78
84
|
loadEstimator,
|
|
79
85
|
_logService,
|
|
80
|
-
|
|
81
|
-
_permissionService,
|
|
86
|
+
_resourceService,
|
|
82
87
|
_configurationService
|
|
83
88
|
) {
|
|
84
89
|
super();
|
|
85
90
|
this._logService = _logService;
|
|
86
|
-
this.
|
|
87
|
-
this._permissionService = _permissionService;
|
|
91
|
+
this._resourceService = _resourceService;
|
|
88
92
|
this._configurationService = _configurationService;
|
|
89
93
|
this._clientId = generateUuid();
|
|
90
94
|
this._transportListeners = this._register(( new MutableDisposable()));
|
|
91
95
|
this._serverSeq = 0;
|
|
92
96
|
this._nextClientSeq = 1;
|
|
93
|
-
this._completionTriggerCharacters = [];
|
|
94
97
|
this._onDidAction = this._register(( new Emitter()));
|
|
95
98
|
this.onDidAction = this._onDidAction.event;
|
|
96
99
|
this._onDidNotification = this._register(( new Emitter()));
|
|
97
100
|
this.onDidNotification = this._onDidNotification.event;
|
|
101
|
+
this._onDidReceiveOtlpLogs = this._register(( new Emitter()));
|
|
102
|
+
this.onDidReceiveOtlpLogs = this._onDidReceiveOtlpLogs.event;
|
|
98
103
|
this._onDidClose = this._register(( new Emitter()));
|
|
99
104
|
this.onDidClose = this._onDidClose.event;
|
|
100
105
|
this._onDidChangeConnectionState = this._register(( new Emitter()));
|
|
@@ -135,6 +140,12 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
135
140
|
}
|
|
136
141
|
this._updateTelemetryLevel();
|
|
137
142
|
}
|
|
143
|
+
if (e.affectsConfiguration(SESSION_SYNC_ENABLED_SETTING_ID)) {
|
|
144
|
+
if (this._state.kind !== AgentHostClientState.Connected) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
this._updateSessionSyncEnabled();
|
|
148
|
+
}
|
|
138
149
|
}));
|
|
139
150
|
this._resetLivenessTimers();
|
|
140
151
|
}
|
|
@@ -175,13 +186,14 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
175
186
|
await this._raceClose(this._transport.connect());
|
|
176
187
|
}
|
|
177
188
|
const result = await this._sendRequest("initialize", {
|
|
189
|
+
channel: ROOT_STATE_URI,
|
|
178
190
|
protocolVersions: [PROTOCOL_VERSION],
|
|
179
191
|
clientId: this._clientId,
|
|
180
192
|
initialSubscriptions: [ROOT_STATE_URI]
|
|
181
193
|
});
|
|
182
194
|
this._serverSeq = result.serverSeq;
|
|
183
195
|
for (const snapshot of result.snapshots ?? []) {
|
|
184
|
-
if (snapshot.resource
|
|
196
|
+
if (isAhpRootChannel(snapshot.resource)) {
|
|
185
197
|
this._subscriptionManager.handleRootSnapshot(snapshot.state, snapshot.fromSeq);
|
|
186
198
|
}
|
|
187
199
|
}
|
|
@@ -193,12 +205,16 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
193
205
|
this._defaultDirectory = URI.revive(dir).path;
|
|
194
206
|
}
|
|
195
207
|
}
|
|
196
|
-
this.
|
|
208
|
+
this._initializeResult = result;
|
|
197
209
|
this._updateTelemetryLevel();
|
|
210
|
+
this._updateSessionSyncEnabled();
|
|
198
211
|
this._transitionTo({
|
|
199
212
|
kind: AgentHostClientState.Connected
|
|
200
213
|
});
|
|
201
214
|
}
|
|
215
|
+
notifyTransportClosed() {
|
|
216
|
+
this._handleTransportClose();
|
|
217
|
+
}
|
|
202
218
|
_handleTransportClose() {
|
|
203
219
|
switch (this._state.kind) {
|
|
204
220
|
case AgentHostClientState.Closed:
|
|
@@ -317,10 +333,8 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
317
333
|
if (result.type === ReconnectResultType.Replay) {
|
|
318
334
|
let maxSeq = this._serverSeq;
|
|
319
335
|
for (const envelope of result.actions) {
|
|
320
|
-
if (envelope.origin?.clientId === this._clientId && envelope.origin.clientSeq !== undefined && !envelope.rejectionReason
|
|
321
|
-
|
|
322
|
-
})) {
|
|
323
|
-
this._subscriptionManager.dropPendingSessionAction(envelope.action.session, envelope.origin.clientSeq);
|
|
336
|
+
if (envelope.origin?.clientId === this._clientId && envelope.origin.clientSeq !== undefined && !envelope.rejectionReason) {
|
|
337
|
+
this._subscriptionManager.dropPendingSessionAction(envelope.channel, envelope.origin.clientSeq);
|
|
324
338
|
}
|
|
325
339
|
if (envelope.serverSeq > maxSeq) {
|
|
326
340
|
maxSeq = envelope.serverSeq;
|
|
@@ -337,7 +351,7 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
337
351
|
} else {
|
|
338
352
|
let maxSeq = this._serverSeq;
|
|
339
353
|
for (const snapshot of result.snapshots) {
|
|
340
|
-
this._subscriptionManager.applyReconnectSnapshot(
|
|
354
|
+
this._subscriptionManager.applyReconnectSnapshot(snapshot.resource, snapshot.state, snapshot.fromSeq);
|
|
341
355
|
if (snapshot.fromSeq > maxSeq) {
|
|
342
356
|
maxSeq = snapshot.fromSeq;
|
|
343
357
|
}
|
|
@@ -364,6 +378,7 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
364
378
|
jsonrpc: "2.0",
|
|
365
379
|
method: "dispatchAction",
|
|
366
380
|
params: {
|
|
381
|
+
channel: entry.sessionUri,
|
|
367
382
|
clientSeq: entry.clientSeq,
|
|
368
383
|
action: entry.action
|
|
369
384
|
}
|
|
@@ -384,30 +399,42 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
384
399
|
get rootState() {
|
|
385
400
|
return this._subscriptionManager.rootState;
|
|
386
401
|
}
|
|
387
|
-
getSubscription(kind, resource) {
|
|
388
|
-
return this._subscriptionManager.getSubscription(kind, resource);
|
|
402
|
+
getSubscription(kind, resource, owner) {
|
|
403
|
+
return this._subscriptionManager.getSubscription(kind, resource, owner);
|
|
389
404
|
}
|
|
390
405
|
getSubscriptionUnmanaged(_kind, resource) {
|
|
391
406
|
return this._subscriptionManager.getSubscriptionUnmanaged(resource);
|
|
392
407
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
408
|
+
getActiveSubscriptions() {
|
|
409
|
+
return this._subscriptionManager.getActiveSubscriptions();
|
|
410
|
+
}
|
|
411
|
+
dispatch(channel, action) {
|
|
412
|
+
const seq = this._subscriptionManager.dispatchOptimistic(channel, action);
|
|
413
|
+
this.dispatchAction(channel, action, this._clientId, seq);
|
|
396
414
|
}
|
|
397
415
|
async subscribe(resource) {
|
|
398
416
|
const result = await this._sendRequest("subscribe", {
|
|
399
|
-
|
|
417
|
+
channel: ( resource.toString())
|
|
400
418
|
});
|
|
419
|
+
if (!result.snapshot) {
|
|
420
|
+
throw ( new Error(`subscribe to ${( resource.toString())} returned no snapshot`));
|
|
421
|
+
}
|
|
401
422
|
return result.snapshot;
|
|
402
423
|
}
|
|
424
|
+
async subscribeStateless(resource) {
|
|
425
|
+
await this._sendRequest("subscribe", {
|
|
426
|
+
channel: ( resource.toString())
|
|
427
|
+
});
|
|
428
|
+
}
|
|
403
429
|
unsubscribe(resource) {
|
|
404
430
|
this._sendNotification("unsubscribe", {
|
|
405
|
-
|
|
431
|
+
channel: ( resource.toString())
|
|
406
432
|
});
|
|
407
433
|
}
|
|
408
|
-
dispatchAction(action, _clientId, clientSeq) {
|
|
434
|
+
dispatchAction(channel, action, _clientId, clientSeq) {
|
|
409
435
|
this._grantImplicitReadsForOutgoingAction(action);
|
|
410
436
|
this._sendNotification("dispatchAction", {
|
|
437
|
+
channel,
|
|
411
438
|
clientSeq,
|
|
412
439
|
action
|
|
413
440
|
});
|
|
@@ -422,7 +449,7 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
422
449
|
this._grantImplicitReadsForCustomizations(config.activeClient.customizations);
|
|
423
450
|
}
|
|
424
451
|
await this._sendRequest("createSession", {
|
|
425
|
-
|
|
452
|
+
channel: ( session.toString()),
|
|
426
453
|
provider,
|
|
427
454
|
model: config?.model,
|
|
428
455
|
workingDirectory: config?.workingDirectory ? ( fromAgentHostUri(config.workingDirectory).toString()) : undefined,
|
|
@@ -433,6 +460,7 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
433
460
|
}
|
|
434
461
|
async resolveSessionConfig(params) {
|
|
435
462
|
return this._sendRequest("resolveSessionConfig", {
|
|
463
|
+
channel: ROOT_STATE_URI,
|
|
436
464
|
provider: params.provider,
|
|
437
465
|
workingDirectory: params.workingDirectory ? ( fromAgentHostUri(params.workingDirectory).toString()) : undefined,
|
|
438
466
|
config: params.config
|
|
@@ -440,6 +468,7 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
440
468
|
}
|
|
441
469
|
async sessionConfigCompletions(params) {
|
|
442
470
|
return this._sendRequest("sessionConfigCompletions", {
|
|
471
|
+
channel: ROOT_STATE_URI,
|
|
443
472
|
provider: params.provider,
|
|
444
473
|
workingDirectory: params.workingDirectory ? ( fromAgentHostUri(params.workingDirectory).toString()) : undefined,
|
|
445
474
|
config: params.config,
|
|
@@ -451,13 +480,18 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
451
480
|
return this._sendRequest("completions", params);
|
|
452
481
|
}
|
|
453
482
|
async ping() {
|
|
454
|
-
await this._sendRequest("ping", {
|
|
483
|
+
await this._sendRequest("ping", {
|
|
484
|
+
channel: ROOT_STATE_URI
|
|
485
|
+
});
|
|
455
486
|
}
|
|
456
487
|
async getCompletionTriggerCharacters() {
|
|
457
|
-
return this.
|
|
488
|
+
return this._initializeResult?.completionTriggerCharacters ?? [];
|
|
458
489
|
}
|
|
459
490
|
async authenticate(params) {
|
|
460
|
-
await this._sendRequest("authenticate",
|
|
491
|
+
await this._sendRequest("authenticate", {
|
|
492
|
+
channel: ROOT_STATE_URI,
|
|
493
|
+
...params
|
|
494
|
+
});
|
|
461
495
|
return {
|
|
462
496
|
authenticated: true
|
|
463
497
|
};
|
|
@@ -467,7 +501,7 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
467
501
|
}
|
|
468
502
|
async disposeSession(session) {
|
|
469
503
|
await this._sendRequest("disposeSession", {
|
|
470
|
-
|
|
504
|
+
channel: ( session.toString())
|
|
471
505
|
});
|
|
472
506
|
}
|
|
473
507
|
async createTerminal(params) {
|
|
@@ -475,11 +509,16 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
475
509
|
}
|
|
476
510
|
async disposeTerminal(terminal) {
|
|
477
511
|
await this._sendRequest("disposeTerminal", {
|
|
478
|
-
|
|
512
|
+
channel: ( terminal.toString())
|
|
479
513
|
});
|
|
480
514
|
}
|
|
515
|
+
async invokeChangesetOperation(params) {
|
|
516
|
+
return await this._sendRequest("invokeChangesetOperation", params);
|
|
517
|
+
}
|
|
481
518
|
async listSessions() {
|
|
482
|
-
const result = await this._sendRequest("listSessions", {
|
|
519
|
+
const result = await this._sendRequest("listSessions", {
|
|
520
|
+
channel: ROOT_STATE_URI
|
|
521
|
+
});
|
|
483
522
|
return ( result.items.map(s => ({
|
|
484
523
|
session: ( URI.parse(s.resource)),
|
|
485
524
|
startTime: s.createdAt,
|
|
@@ -496,7 +535,7 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
496
535
|
workingDirectory: typeof s.workingDirectory === "string" ? toAgentHostUri(( URI.parse(s.workingDirectory)), this._connectionAuthority) : undefined,
|
|
497
536
|
isRead: !!(s.status & SessionStatus.IsRead),
|
|
498
537
|
isArchived: !!(s.status & SessionStatus.IsArchived),
|
|
499
|
-
|
|
538
|
+
changesets: s.changesets
|
|
500
539
|
})));
|
|
501
540
|
}
|
|
502
541
|
_toLocalProjectUri(uri) {
|
|
@@ -515,21 +554,24 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
515
554
|
} catch {
|
|
516
555
|
continue;
|
|
517
556
|
}
|
|
518
|
-
const
|
|
557
|
+
const grantUri = dirname(uri);
|
|
558
|
+
const key = ( grantUri.toString());
|
|
519
559
|
if (( this._grantedCustomizationUris.has(key))) {
|
|
520
560
|
continue;
|
|
521
561
|
}
|
|
522
562
|
this._grantedCustomizationUris.add(key);
|
|
523
|
-
this.
|
|
563
|
+
this._resourceService.grantImplicitRead(this._address, grantUri);
|
|
524
564
|
}
|
|
525
565
|
}
|
|
526
566
|
async resourceList(uri) {
|
|
527
567
|
return await this._sendRequest("resourceList", {
|
|
568
|
+
channel: ROOT_STATE_URI,
|
|
528
569
|
uri: ( uri.toString())
|
|
529
570
|
});
|
|
530
571
|
}
|
|
531
572
|
async resourceRead(uri) {
|
|
532
573
|
return this._sendRequest("resourceRead", {
|
|
574
|
+
channel: ROOT_STATE_URI,
|
|
533
575
|
uri: ( uri.toString())
|
|
534
576
|
});
|
|
535
577
|
}
|
|
@@ -545,6 +587,23 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
545
587
|
async resourceMove(params) {
|
|
546
588
|
return this._sendRequest("resourceMove", params);
|
|
547
589
|
}
|
|
590
|
+
async resourceResolve(params) {
|
|
591
|
+
return this._sendRequest("resourceResolve", params);
|
|
592
|
+
}
|
|
593
|
+
async resourceMkdir(params) {
|
|
594
|
+
return this._sendRequest("resourceMkdir", params);
|
|
595
|
+
}
|
|
596
|
+
async createResourceWatch(params) {
|
|
597
|
+
return this._sendRequest("createResourceWatch", params);
|
|
598
|
+
}
|
|
599
|
+
watchResource(params) {
|
|
600
|
+
return createRemoteWatchHandle({
|
|
601
|
+
createResourceWatch: p => this.createResourceWatch(p),
|
|
602
|
+
subscribe: uri => this.subscribe(uri),
|
|
603
|
+
unsubscribe: uri => this.unsubscribe(uri),
|
|
604
|
+
onDidAction: this.onDidAction
|
|
605
|
+
}, params);
|
|
606
|
+
}
|
|
548
607
|
triggerVscodeUpgrade(method) {
|
|
549
608
|
return this._dispatchRequest(method, {});
|
|
550
609
|
}
|
|
@@ -582,13 +641,24 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
582
641
|
this._onDidAction.fire(envelope);
|
|
583
642
|
break;
|
|
584
643
|
}
|
|
585
|
-
case "
|
|
644
|
+
case "root/sessionAdded":
|
|
645
|
+
case "root/sessionRemoved":
|
|
646
|
+
case "root/sessionSummaryChanged":
|
|
647
|
+
case "auth/required":
|
|
586
648
|
{
|
|
587
|
-
|
|
588
|
-
this.
|
|
589
|
-
|
|
649
|
+
this._logService.trace(`[RemoteAgentHostProtocol] Notification: ${msg.method}`);
|
|
650
|
+
this._onDidNotification.fire({
|
|
651
|
+
type: msg.method,
|
|
652
|
+
...msg.params
|
|
653
|
+
});
|
|
590
654
|
break;
|
|
591
655
|
}
|
|
656
|
+
case "otlp/exportLogs":
|
|
657
|
+
this._onDidReceiveOtlpLogs.fire(msg.params);
|
|
658
|
+
break;
|
|
659
|
+
case "otlp/exportTraces":
|
|
660
|
+
case "otlp/exportMetrics":
|
|
661
|
+
break;
|
|
592
662
|
default:
|
|
593
663
|
this._logService.trace(`[RemoteAgentHostProtocol] Unhandled method: ${msg.method}`);
|
|
594
664
|
break;
|
|
@@ -612,7 +682,7 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
612
682
|
}
|
|
613
683
|
}
|
|
614
684
|
this._rejectPendingRequests(error);
|
|
615
|
-
this.
|
|
685
|
+
this._resourceService.connectionClosed(this._address);
|
|
616
686
|
this._grantedCustomizationUris.clear();
|
|
617
687
|
this._transitionTo({
|
|
618
688
|
kind: AgentHostClientState.Closed,
|
|
@@ -646,6 +716,20 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
646
716
|
});
|
|
647
717
|
};
|
|
648
718
|
const sendError = err => {
|
|
719
|
+
if (err instanceof AgentHostResourcePermissionError) {
|
|
720
|
+
transport.send({
|
|
721
|
+
jsonrpc: "2.0",
|
|
722
|
+
id,
|
|
723
|
+
error: {
|
|
724
|
+
code: AhpErrorCodes.PermissionDenied,
|
|
725
|
+
message: err.message,
|
|
726
|
+
data: err.request ? {
|
|
727
|
+
request: err.request
|
|
728
|
+
} : undefined
|
|
729
|
+
}
|
|
730
|
+
});
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
649
733
|
const fsCode = toFileSystemProviderErrorCode(err instanceof Error ? err : undefined);
|
|
650
734
|
let code = -32e3;
|
|
651
735
|
switch (fsCode) {
|
|
@@ -668,157 +752,109 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
668
752
|
}
|
|
669
753
|
});
|
|
670
754
|
};
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
id,
|
|
675
|
-
error: {
|
|
676
|
-
code: AhpErrorCodes.PermissionDenied,
|
|
677
|
-
message: request ? `Access to ${request.uri} is not granted.` : "Access to the requested resource is not granted.",
|
|
678
|
-
data: request ? {
|
|
679
|
-
request
|
|
680
|
-
} : undefined
|
|
681
|
-
}
|
|
682
|
-
});
|
|
683
|
-
};
|
|
684
|
-
const gateAndHandle = async (uri, mode, deniedRequest, fn) => {
|
|
755
|
+
const p = (params ?? {});
|
|
756
|
+
const addr = this._address;
|
|
757
|
+
void (async () => {
|
|
685
758
|
try {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
const p = params;
|
|
696
|
-
switch (method) {
|
|
697
|
-
case "resourceList":
|
|
698
|
-
{
|
|
699
|
-
if (!p.uri) {
|
|
700
|
-
sendError(( new Error("Missing uri")));
|
|
701
|
-
return;
|
|
702
|
-
}
|
|
703
|
-
const uri = ( URI.parse(p.uri));
|
|
704
|
-
return void gateAndHandle(uri, AgentHostPermissionMode.Read, {
|
|
705
|
-
uri: ( uri.toString()),
|
|
706
|
-
read: true
|
|
707
|
-
}, async () => {
|
|
708
|
-
const stat = await this._fileService.resolve(uri);
|
|
709
|
-
return {
|
|
710
|
-
entries: ( (stat.children ?? []).map(c => ({
|
|
711
|
-
name: c.name,
|
|
712
|
-
type: c.isDirectory ? "directory" : "file"
|
|
713
|
-
})))
|
|
714
|
-
};
|
|
715
|
-
});
|
|
716
|
-
}
|
|
717
|
-
case "resourceRead":
|
|
718
|
-
{
|
|
719
|
-
if (!p.uri) {
|
|
720
|
-
sendError(( new Error("Missing uri")));
|
|
721
|
-
return;
|
|
722
|
-
}
|
|
723
|
-
const uri = ( URI.parse(p.uri));
|
|
724
|
-
return void gateAndHandle(uri, AgentHostPermissionMode.Read, {
|
|
725
|
-
uri: ( uri.toString()),
|
|
726
|
-
read: true
|
|
727
|
-
}, async () => {
|
|
728
|
-
const content = await this._fileService.readFile(uri);
|
|
729
|
-
return {
|
|
730
|
-
data: encodeBase64(content.value),
|
|
731
|
-
encoding: ContentEncoding.Base64
|
|
732
|
-
};
|
|
733
|
-
});
|
|
734
|
-
}
|
|
735
|
-
case "resourceWrite":
|
|
736
|
-
{
|
|
737
|
-
if (!p.uri || !p.data) {
|
|
738
|
-
sendError(( new Error("Missing uri or data")));
|
|
739
|
-
return;
|
|
740
|
-
}
|
|
741
|
-
const writeUri = ( URI.parse(p.uri));
|
|
742
|
-
return void gateAndHandle(writeUri, AgentHostPermissionMode.Write, {
|
|
743
|
-
uri: ( writeUri.toString()),
|
|
744
|
-
write: true
|
|
745
|
-
}, async () => {
|
|
746
|
-
const buf = p.encoding === ContentEncoding.Base64 ? decodeBase64(p.data) : VSBuffer.fromString(p.data);
|
|
747
|
-
if (p.createOnly) {
|
|
748
|
-
await this._fileService.createFile(writeUri, buf, {
|
|
749
|
-
overwrite: false
|
|
759
|
+
switch (method) {
|
|
760
|
+
case "resourceList":
|
|
761
|
+
{
|
|
762
|
+
if (!p.uri) {
|
|
763
|
+
throw ( new Error("Missing uri"));
|
|
764
|
+
}
|
|
765
|
+
const result = await this._resourceService.list(addr, ( URI.parse(p.uri)));
|
|
766
|
+
sendResult({
|
|
767
|
+
entries: result.entries
|
|
750
768
|
});
|
|
751
|
-
|
|
752
|
-
await this._fileService.writeFile(writeUri, buf);
|
|
769
|
+
return;
|
|
753
770
|
}
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
{
|
|
759
|
-
if (!p.uri) {
|
|
760
|
-
sendError(( new Error("Missing uri")));
|
|
761
|
-
return;
|
|
762
|
-
}
|
|
763
|
-
const deleteUri = ( URI.parse(p.uri));
|
|
764
|
-
return void gateAndHandle(deleteUri, AgentHostPermissionMode.Write, {
|
|
765
|
-
uri: ( deleteUri.toString()),
|
|
766
|
-
write: true
|
|
767
|
-
}, () => this._fileService.del(deleteUri, {
|
|
768
|
-
recursive: !!p.recursive
|
|
769
|
-
}).then(() => ({})));
|
|
770
|
-
}
|
|
771
|
-
case "resourceMove":
|
|
772
|
-
{
|
|
773
|
-
if (!p.source || !p.destination) {
|
|
774
|
-
sendError(( new Error("Missing source or destination")));
|
|
775
|
-
return;
|
|
776
|
-
}
|
|
777
|
-
const sourceUri = ( URI.parse(p.source));
|
|
778
|
-
const destUri = ( URI.parse(p.destination));
|
|
779
|
-
return void (async () => {
|
|
780
|
-
try {
|
|
781
|
-
const [sourceOk, destOk] = await Promise.all([
|
|
782
|
-
this._permissionService.check(this._address, sourceUri, AgentHostPermissionMode.Write),
|
|
783
|
-
this._permissionService.check(this._address, destUri, AgentHostPermissionMode.Write)
|
|
784
|
-
]);
|
|
785
|
-
if (!sourceOk) {
|
|
786
|
-
sendPermissionDenied({
|
|
787
|
-
uri: ( sourceUri.toString()),
|
|
788
|
-
write: true
|
|
789
|
-
});
|
|
790
|
-
return;
|
|
771
|
+
case "resourceRead":
|
|
772
|
+
{
|
|
773
|
+
if (!p.uri) {
|
|
774
|
+
throw ( new Error("Missing uri"));
|
|
791
775
|
}
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
776
|
+
const result = await this._resourceService.read(addr, ( URI.parse(p.uri)));
|
|
777
|
+
sendResult({
|
|
778
|
+
data: encodeBase64(result.bytes),
|
|
779
|
+
encoding: ContentEncoding.Base64
|
|
780
|
+
});
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
case "resourceWrite":
|
|
784
|
+
{
|
|
785
|
+
if (!p.uri || p.data === undefined) {
|
|
786
|
+
throw ( new Error("Missing uri or data"));
|
|
798
787
|
}
|
|
799
|
-
await this.
|
|
788
|
+
await this._resourceService.write(addr, p);
|
|
800
789
|
sendResult({});
|
|
801
|
-
|
|
802
|
-
sendError(err);
|
|
790
|
+
return;
|
|
803
791
|
}
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
} else {
|
|
813
|
-
sendError(err);
|
|
792
|
+
case "resourceDelete":
|
|
793
|
+
{
|
|
794
|
+
if (!p.uri) {
|
|
795
|
+
throw ( new Error("Missing uri"));
|
|
796
|
+
}
|
|
797
|
+
await this._resourceService.del(addr, p);
|
|
798
|
+
sendResult({});
|
|
799
|
+
return;
|
|
814
800
|
}
|
|
815
|
-
|
|
816
|
-
|
|
801
|
+
case "resourceMove":
|
|
802
|
+
{
|
|
803
|
+
if (!p.source || !p.destination) {
|
|
804
|
+
throw ( new Error("Missing source or destination"));
|
|
805
|
+
}
|
|
806
|
+
await this._resourceService.move(addr, p);
|
|
807
|
+
sendResult({});
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
case "resourceCopy":
|
|
811
|
+
{
|
|
812
|
+
if (!p.source || !p.destination) {
|
|
813
|
+
throw ( new Error("Missing source or destination"));
|
|
814
|
+
}
|
|
815
|
+
await this._resourceService.copy(addr, p);
|
|
816
|
+
sendResult({});
|
|
817
|
+
return;
|
|
818
|
+
}
|
|
819
|
+
case "resourceResolve":
|
|
820
|
+
{
|
|
821
|
+
if (!p.uri) {
|
|
822
|
+
throw ( new Error("Missing uri"));
|
|
823
|
+
}
|
|
824
|
+
const result = await this._resourceService.resolve(addr, p);
|
|
825
|
+
sendResult(result);
|
|
826
|
+
return;
|
|
827
|
+
}
|
|
828
|
+
case "resourceMkdir":
|
|
829
|
+
{
|
|
830
|
+
if (!p.uri) {
|
|
831
|
+
throw ( new Error("Missing uri"));
|
|
832
|
+
}
|
|
833
|
+
await this._resourceService.mkdir(addr, p);
|
|
834
|
+
sendResult({});
|
|
835
|
+
return;
|
|
836
|
+
}
|
|
837
|
+
case "resourceRequest":
|
|
838
|
+
{
|
|
839
|
+
try {
|
|
840
|
+
await this._resourceService.request(addr, p);
|
|
841
|
+
sendResult({});
|
|
842
|
+
} catch (err) {
|
|
843
|
+
if (err instanceof CancellationError) {
|
|
844
|
+
throw ( new AgentHostResourcePermissionError(undefined));
|
|
845
|
+
}
|
|
846
|
+
throw err;
|
|
847
|
+
}
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
850
|
+
default:
|
|
851
|
+
this._logService.warn(`[RemoteAgentHostProtocol] Unhandled reverse request: ${method}`);
|
|
852
|
+
throw ( new Error(`Unknown method: ${method}`));
|
|
853
|
+
}
|
|
854
|
+
} catch (err) {
|
|
855
|
+
sendError(err);
|
|
817
856
|
}
|
|
818
|
-
|
|
819
|
-
this._logService.warn(`[RemoteAgentHostProtocol] Unhandled reverse request: ${method}`);
|
|
820
|
-
sendError(( new Error(`Unknown method: ${method}`)));
|
|
821
|
-
}
|
|
857
|
+
})();
|
|
822
858
|
}
|
|
823
859
|
_sendNotification(method, params) {
|
|
824
860
|
if (this._state.kind === AgentHostClientState.Closed) {
|
|
@@ -842,13 +878,22 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
842
878
|
return this._dispatchRequest(method, params);
|
|
843
879
|
}
|
|
844
880
|
_updateTelemetryLevel() {
|
|
845
|
-
this.dispatchAction({
|
|
881
|
+
this.dispatchAction(ROOT_STATE_URI, {
|
|
846
882
|
type: ActionType.RootConfigChanged,
|
|
847
883
|
config: {
|
|
848
884
|
[AgentHostTelemetryLevelConfigKey]: telemetryLevelToAgentHostConfigValue(getTelemetryLevel(this._configurationService))
|
|
849
885
|
}
|
|
850
886
|
}, this._clientId, 0);
|
|
851
887
|
}
|
|
888
|
+
_updateSessionSyncEnabled() {
|
|
889
|
+
const enabled = !!this._configurationService.getValue(SESSION_SYNC_ENABLED_SETTING_ID);
|
|
890
|
+
this.dispatchAction(ROOT_STATE_URI, {
|
|
891
|
+
type: ActionType.RootConfigChanged,
|
|
892
|
+
config: {
|
|
893
|
+
[AgentHostSessionSyncEnabledConfigKey]: enabled
|
|
894
|
+
}
|
|
895
|
+
}, this._clientId, 0);
|
|
896
|
+
}
|
|
852
897
|
async _dispatchRequest(method, params, options = {}) {
|
|
853
898
|
while (!options.bypassReconnectGate && this._state.kind === AgentHostClientState.Reconnecting) {
|
|
854
899
|
const current = this._state;
|
|
@@ -927,6 +972,6 @@ let RemoteAgentHostProtocolClient = class RemoteAgentHostProtocolClient extends
|
|
|
927
972
|
return this._nextClientSeq++;
|
|
928
973
|
}
|
|
929
974
|
};
|
|
930
|
-
RemoteAgentHostProtocolClient = ( __decorate([( __param(3, ILogService)), ( __param(4,
|
|
975
|
+
RemoteAgentHostProtocolClient = ( __decorate([( __param(3, ILogService)), ( __param(4, IAgentHostResourceService)), ( __param(5, IConfigurationService))], RemoteAgentHostProtocolClient));
|
|
931
976
|
|
|
932
977
|
export { AgentHostClientState, RemoteAgentHostProtocolClient };
|