@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
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { timeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
|
+
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
|
+
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
6
|
+
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { FileAccess } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
8
|
+
import { dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
9
|
+
import { OS, OperatingSystem } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
10
|
+
import { arch } from '@codingame/monaco-vscode-api/vscode/vs/base/common/process';
|
|
11
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
12
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
13
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
14
|
+
import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service';
|
|
15
|
+
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
16
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
17
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
18
|
+
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
19
|
+
import { SANDBOX_HELPER_CHANNEL_NAME, SandboxHelperChannelClient } from '../../../../../platform/sandbox/common/sandboxHelperIpc.js';
|
|
20
|
+
import { ISandboxHelperService } from '@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/sandboxHelperService.service';
|
|
21
|
+
import { TerminalSandboxEngine } from '../../../../../platform/sandbox/common/terminalSandboxEngine.js';
|
|
22
|
+
import { SANDBOX_SETTING_KEYS, readSandboxSetting } from './sandboxSettingsReader.js';
|
|
23
|
+
export { TerminalSandboxPrerequisiteCheck } from '../../../../../platform/sandbox/common/terminalSandboxService.js';
|
|
24
|
+
import { TerminalCapability } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities';
|
|
25
|
+
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
26
|
+
import { ChatModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
|
|
27
|
+
import { ChatElicitationRequestPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatElicitationRequestPart';
|
|
28
|
+
import { ElicitationState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
29
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
30
|
+
import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
31
|
+
import { WillShutdownJoinerOrder } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
32
|
+
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
33
|
+
|
|
34
|
+
const SANDBOX_TEMP_DIR_NAME = "tmp";
|
|
35
|
+
function affectsSandboxSettings(e) {
|
|
36
|
+
return ( SANDBOX_SETTING_KEYS.some(key => e.affectsConfiguration(key)));
|
|
37
|
+
}
|
|
38
|
+
let TerminalSandboxService = class TerminalSandboxService extends Disposable {
|
|
39
|
+
constructor(
|
|
40
|
+
_configurationService,
|
|
41
|
+
fileService,
|
|
42
|
+
_environmentService,
|
|
43
|
+
_logService,
|
|
44
|
+
_remoteAgentService,
|
|
45
|
+
_workspaceContextService,
|
|
46
|
+
_productService,
|
|
47
|
+
lifecycleService,
|
|
48
|
+
_sandboxHelperService,
|
|
49
|
+
_chatService,
|
|
50
|
+
instantiationService
|
|
51
|
+
) {
|
|
52
|
+
super();
|
|
53
|
+
this._configurationService = _configurationService;
|
|
54
|
+
this._environmentService = _environmentService;
|
|
55
|
+
this._logService = _logService;
|
|
56
|
+
this._remoteAgentService = _remoteAgentService;
|
|
57
|
+
this._workspaceContextService = _workspaceContextService;
|
|
58
|
+
this._productService = _productService;
|
|
59
|
+
this._sandboxHelperService = _sandboxHelperService;
|
|
60
|
+
this._chatService = _chatService;
|
|
61
|
+
this._onDidChangeRoots = this._register(( new Emitter()));
|
|
62
|
+
this._remoteEnvDetailsPromise = this._remoteAgentService.getEnvironment();
|
|
63
|
+
const onDidChangeSandboxSettings = Event.filter(
|
|
64
|
+
this._configurationService.onDidChangeConfiguration,
|
|
65
|
+
affectsSandboxSettings
|
|
66
|
+
);
|
|
67
|
+
const host = {
|
|
68
|
+
getOS: () => this._resolveOS(),
|
|
69
|
+
getRuntimeInfo: () => this._resolveRuntimeInfo(),
|
|
70
|
+
getUserHome: () => this._resolveUserHome(),
|
|
71
|
+
getSandboxTempDir: () => this._resolveSandboxTempDir(),
|
|
72
|
+
getWorkspaceStorageReadRoot: () => this._resolveWorkspaceStorageReadRoot(),
|
|
73
|
+
getWriteRoots: () => ( this._workspaceContextService.getWorkspace().folders.map(folder => folder.uri)),
|
|
74
|
+
onDidChangeRoots: this._onDidChangeRoots.event,
|
|
75
|
+
checkSandboxDependencies: () => this._resolveSandboxDependencyStatus(),
|
|
76
|
+
getWindowsMxcFilesystemPolicy: () => this._resolveWindowsMxcFilesystemPolicy(),
|
|
77
|
+
getWindowsMxcEnvironment: () => this._resolveWindowsMxcEnvironment(),
|
|
78
|
+
buildWindowsMxcSandboxPayload: (commandLine, policy, workingDirectory, containerName, containment) => this._resolveWindowsMxcSandboxPayload(commandLine, policy, workingDirectory, containerName, containment),
|
|
79
|
+
getSandboxSetting: settingId => this._readSandboxSetting(settingId),
|
|
80
|
+
onDidChangeSandboxSettings: ( Event.map(onDidChangeSandboxSettings, () => undefined))
|
|
81
|
+
};
|
|
82
|
+
this._engine = this._register(instantiationService.createInstance(TerminalSandboxEngine, host));
|
|
83
|
+
this._register(
|
|
84
|
+
this._workspaceContextService.onDidChangeWorkspaceFolders(() => this._onDidChangeRoots.fire())
|
|
85
|
+
);
|
|
86
|
+
this._register(lifecycleService.onWillShutdown(e => {
|
|
87
|
+
if (!this._engine.getTempDir()) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
e.join(this._engine.cleanupTempDir(), {
|
|
91
|
+
id: "join.deleteFilesInSandboxTempDir",
|
|
92
|
+
label: ( localize(14859, "Delete Files in Sandbox Temp Dir")),
|
|
93
|
+
order: WillShutdownJoinerOrder.Default
|
|
94
|
+
});
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
isEnabled(precheckInputs) {
|
|
98
|
+
return this._engine.isEnabled(precheckInputs);
|
|
99
|
+
}
|
|
100
|
+
isSandboxAllowNetworkEnabled(precheckInputs) {
|
|
101
|
+
return this._engine.isSandboxAllowNetworkEnabled(precheckInputs);
|
|
102
|
+
}
|
|
103
|
+
getOS() {
|
|
104
|
+
return this._engine.getOS();
|
|
105
|
+
}
|
|
106
|
+
wrapCommand(
|
|
107
|
+
command,
|
|
108
|
+
requestUnsandboxedExecution,
|
|
109
|
+
shell,
|
|
110
|
+
cwd,
|
|
111
|
+
commandDetails,
|
|
112
|
+
requestAllowNetwork
|
|
113
|
+
) {
|
|
114
|
+
return this._engine.wrapCommand(
|
|
115
|
+
command,
|
|
116
|
+
requestUnsandboxedExecution,
|
|
117
|
+
shell,
|
|
118
|
+
cwd,
|
|
119
|
+
commandDetails,
|
|
120
|
+
requestAllowNetwork
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
checkForSandboxingPrereqs(forceRefresh = false, precheckInputs) {
|
|
124
|
+
return this._engine.checkForSandboxingPrereqs(forceRefresh, precheckInputs);
|
|
125
|
+
}
|
|
126
|
+
getSandboxConfigPath(forceRefresh = false, precheckInputs) {
|
|
127
|
+
return this._engine.getSandboxConfigPath(forceRefresh, precheckInputs);
|
|
128
|
+
}
|
|
129
|
+
getTempDir() {
|
|
130
|
+
return this._engine.getTempDir();
|
|
131
|
+
}
|
|
132
|
+
setNeedsForceUpdateConfigFile() {
|
|
133
|
+
this._engine.setNeedsForceUpdateConfigFile();
|
|
134
|
+
}
|
|
135
|
+
getResolvedNetworkDomains() {
|
|
136
|
+
return this._engine.getResolvedNetworkDomains();
|
|
137
|
+
}
|
|
138
|
+
getMissingSandboxDependencies() {
|
|
139
|
+
return this._engine.getMissingSandboxDependencies();
|
|
140
|
+
}
|
|
141
|
+
async _resolveRemoteEnv() {
|
|
142
|
+
if (this._remoteEnvDetails === undefined) {
|
|
143
|
+
this._remoteEnvDetails = await this._remoteEnvDetailsPromise;
|
|
144
|
+
}
|
|
145
|
+
return this._remoteEnvDetails;
|
|
146
|
+
}
|
|
147
|
+
async _resolveOS() {
|
|
148
|
+
const remoteEnv = await this._resolveRemoteEnv();
|
|
149
|
+
return remoteEnv ? remoteEnv.os : OS;
|
|
150
|
+
}
|
|
151
|
+
_readSandboxSetting(settingId) {
|
|
152
|
+
return readSandboxSetting(this._configurationService, this._logService, settingId);
|
|
153
|
+
}
|
|
154
|
+
async _resolveRuntimeInfo() {
|
|
155
|
+
const remoteEnv = await this._resolveRemoteEnv();
|
|
156
|
+
if (remoteEnv) {
|
|
157
|
+
return {
|
|
158
|
+
appRoot: remoteEnv.os === OperatingSystem.Windows ? this._toWindowsPath(remoteEnv.appRoot) : remoteEnv.appRoot.path,
|
|
159
|
+
execPath: remoteEnv.execPath,
|
|
160
|
+
runAsNode: false,
|
|
161
|
+
arch: remoteEnv.arch
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
const localAppRootUri = ( FileAccess.asFileUri(""));
|
|
165
|
+
const localAppRoot = OS === OperatingSystem.Windows ? dirname(localAppRootUri.fsPath) : dirname(localAppRootUri.path);
|
|
166
|
+
const nativeEnv = this._environmentService;
|
|
167
|
+
return {
|
|
168
|
+
appRoot: localAppRoot,
|
|
169
|
+
execPath: nativeEnv.execPath,
|
|
170
|
+
runAsNode: true,
|
|
171
|
+
arch
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
_toWindowsPath(uri) {
|
|
175
|
+
let value;
|
|
176
|
+
if (uri.authority && uri.path.length > 1 && uri.scheme === "file") {
|
|
177
|
+
value = `\\\\${uri.authority}${uri.path}`;
|
|
178
|
+
} else if (/^\/[a-zA-Z]:/.test(uri.path)) {
|
|
179
|
+
value = uri.path.slice(1);
|
|
180
|
+
} else {
|
|
181
|
+
value = uri.fsPath;
|
|
182
|
+
}
|
|
183
|
+
return value.replace(/\//g, "\\");
|
|
184
|
+
}
|
|
185
|
+
async _resolveUserHome() {
|
|
186
|
+
const remoteEnv = await this._resolveRemoteEnv();
|
|
187
|
+
if (remoteEnv?.userHome) {
|
|
188
|
+
return remoteEnv.userHome;
|
|
189
|
+
}
|
|
190
|
+
const nativeEnv = this._environmentService;
|
|
191
|
+
return nativeEnv.userHome;
|
|
192
|
+
}
|
|
193
|
+
async _resolveSandboxTempDir() {
|
|
194
|
+
const remoteEnv = await this._resolveRemoteEnv();
|
|
195
|
+
const sandboxTempDirName = this._getSandboxWindowTempDirName();
|
|
196
|
+
if (remoteEnv?.userHome) {
|
|
197
|
+
const sandboxRoot = URI.joinPath(
|
|
198
|
+
remoteEnv.userHome,
|
|
199
|
+
this._productService.serverDataFolderName ?? this._productService.dataFolderName,
|
|
200
|
+
SANDBOX_TEMP_DIR_NAME
|
|
201
|
+
);
|
|
202
|
+
return sandboxTempDirName ? URI.joinPath(sandboxRoot, sandboxTempDirName) : sandboxRoot;
|
|
203
|
+
}
|
|
204
|
+
const nativeEnv = this._environmentService;
|
|
205
|
+
if (nativeEnv.userHome) {
|
|
206
|
+
const sandboxRoot = URI.joinPath(
|
|
207
|
+
nativeEnv.userHome,
|
|
208
|
+
this._productService.dataFolderName,
|
|
209
|
+
SANDBOX_TEMP_DIR_NAME
|
|
210
|
+
);
|
|
211
|
+
return sandboxTempDirName ? URI.joinPath(sandboxRoot, sandboxTempDirName) : sandboxRoot;
|
|
212
|
+
}
|
|
213
|
+
return undefined;
|
|
214
|
+
}
|
|
215
|
+
async _resolveWorkspaceStorageReadRoot() {
|
|
216
|
+
const remoteEnv = await this._resolveRemoteEnv();
|
|
217
|
+
const workspaceStorageHome = remoteEnv?.workspaceStorageHome ?? this._environmentService.workspaceStorageHome;
|
|
218
|
+
const workspaceId = this._workspaceContextService.getWorkspace().id;
|
|
219
|
+
return URI.joinPath(workspaceStorageHome, workspaceId);
|
|
220
|
+
}
|
|
221
|
+
_getSandboxWindowTempDirName() {
|
|
222
|
+
const workbenchEnv = this._environmentService;
|
|
223
|
+
const windowId = workbenchEnv.window?.id;
|
|
224
|
+
return typeof windowId === "number" ? `tmp_vscode_${windowId}` : undefined;
|
|
225
|
+
}
|
|
226
|
+
async _resolveSandboxDependencyStatus() {
|
|
227
|
+
const connection = this._remoteAgentService.getConnection();
|
|
228
|
+
if (connection) {
|
|
229
|
+
return connection.withChannel(SANDBOX_HELPER_CHANNEL_NAME, channel => {
|
|
230
|
+
const sandboxHelper = ( new SandboxHelperChannelClient(channel));
|
|
231
|
+
return sandboxHelper.checkSandboxDependencies();
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
return this._sandboxHelperService.checkSandboxDependencies();
|
|
235
|
+
}
|
|
236
|
+
async _resolveWindowsMxcFilesystemPolicy() {
|
|
237
|
+
const connection = this._remoteAgentService.getConnection();
|
|
238
|
+
if (connection) {
|
|
239
|
+
return connection.withChannel(SANDBOX_HELPER_CHANNEL_NAME, channel => {
|
|
240
|
+
const sandboxHelper = ( new SandboxHelperChannelClient(channel));
|
|
241
|
+
return sandboxHelper.getWindowsMxcFilesystemPolicy();
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
return this._sandboxHelperService.getWindowsMxcFilesystemPolicy();
|
|
245
|
+
}
|
|
246
|
+
async _resolveWindowsMxcEnvironment() {
|
|
247
|
+
const connection = this._remoteAgentService.getConnection();
|
|
248
|
+
if (connection) {
|
|
249
|
+
return connection.withChannel(SANDBOX_HELPER_CHANNEL_NAME, channel => {
|
|
250
|
+
const sandboxHelper = ( new SandboxHelperChannelClient(channel));
|
|
251
|
+
return sandboxHelper.getWindowsMxcEnvironment();
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
return this._sandboxHelperService.getWindowsMxcEnvironment();
|
|
255
|
+
}
|
|
256
|
+
async _resolveWindowsMxcSandboxPayload(commandLine, policy, workingDirectory, containerName, containment) {
|
|
257
|
+
const connection = this._remoteAgentService.getConnection();
|
|
258
|
+
if (connection) {
|
|
259
|
+
return connection.withChannel(SANDBOX_HELPER_CHANNEL_NAME, channel => {
|
|
260
|
+
const sandboxHelper = ( new SandboxHelperChannelClient(channel));
|
|
261
|
+
return sandboxHelper.buildWindowsMxcSandboxPayload(commandLine, policy, workingDirectory, containerName, containment);
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
return this._sandboxHelperService.buildWindowsMxcSandboxPayload(commandLine, policy, workingDirectory, containerName, containment);
|
|
265
|
+
}
|
|
266
|
+
async installMissingSandboxDependencies(missingDependencies, sessionResource, token, options) {
|
|
267
|
+
const depsList = missingDependencies.join(" ");
|
|
268
|
+
const installCommand = `sudo apt install -y ${depsList}`;
|
|
269
|
+
const instance = await options.createTerminal();
|
|
270
|
+
let installCommandSent = false;
|
|
271
|
+
const completionPromise = ( new Promise(resolve => {
|
|
272
|
+
const store = ( new DisposableStore());
|
|
273
|
+
let resolved = false;
|
|
274
|
+
const resolveOnce = code => {
|
|
275
|
+
if (resolved) {
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
resolved = true;
|
|
279
|
+
store.dispose();
|
|
280
|
+
resolve(code);
|
|
281
|
+
};
|
|
282
|
+
const attachListener = () => {
|
|
283
|
+
const detection = instance.capabilities.get(TerminalCapability.CommandDetection);
|
|
284
|
+
if (detection) {
|
|
285
|
+
store.add(detection.onCommandFinished(cmd => resolveOnce(cmd.exitCode)));
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
attachListener();
|
|
289
|
+
store.add(instance.capabilities.onDidAddCapability(e => {
|
|
290
|
+
if (e.id === TerminalCapability.CommandDetection) {
|
|
291
|
+
attachListener();
|
|
292
|
+
}
|
|
293
|
+
}));
|
|
294
|
+
store.add(instance.onDisposed(() => resolveOnce(undefined)));
|
|
295
|
+
store.add(token.onCancellationRequested(() => resolveOnce(undefined)));
|
|
296
|
+
const safetyTimeout = timeout(5 * 60 * 1000);
|
|
297
|
+
store.add({
|
|
298
|
+
dispose: () => safetyTimeout.cancel()
|
|
299
|
+
});
|
|
300
|
+
safetyTimeout.then(() => resolveOnce(undefined));
|
|
301
|
+
const passwordPrompt = this._createMissingDependencyPasswordPrompt(sessionResource, {
|
|
302
|
+
focusTerminal: () => options.focusTerminal(instance),
|
|
303
|
+
onDidInputData: instance.onDidInputData,
|
|
304
|
+
onDisposed: instance.onDisposed,
|
|
305
|
+
didSendInstallCommand: () => installCommandSent
|
|
306
|
+
}, token);
|
|
307
|
+
store.add(passwordPrompt);
|
|
308
|
+
}));
|
|
309
|
+
await instance.sendText(installCommand, true);
|
|
310
|
+
installCommandSent = true;
|
|
311
|
+
return {
|
|
312
|
+
exitCode: await completionPromise
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
_createMissingDependencyPasswordPrompt(sessionResource, promptContext, token) {
|
|
316
|
+
const chatModel = sessionResource && this._chatService.getSession(sessionResource);
|
|
317
|
+
if (!(chatModel instanceof ChatModel)) {
|
|
318
|
+
return ( new DisposableStore());
|
|
319
|
+
}
|
|
320
|
+
const request = chatModel.getRequests().at(-1);
|
|
321
|
+
if (!request) {
|
|
322
|
+
return ( new DisposableStore());
|
|
323
|
+
}
|
|
324
|
+
const part = ( new ChatElicitationRequestPart(( localize(14860, "The terminal is awaiting input.")), ( new MarkdownString(( localize(
|
|
325
|
+
14861,
|
|
326
|
+
"Installing missing sandbox dependencies may prompt for your sudo password. Select Focus Terminal to type it in the terminal."
|
|
327
|
+
)))), "", ( localize(14862, "Focus Terminal")), undefined, async () => {
|
|
328
|
+
await promptContext.focusTerminal();
|
|
329
|
+
return ElicitationState.Pending;
|
|
330
|
+
}));
|
|
331
|
+
chatModel.acceptResponseProgress(request, part);
|
|
332
|
+
const store = ( new DisposableStore());
|
|
333
|
+
const disposePrompt = () => store.dispose();
|
|
334
|
+
store.add({
|
|
335
|
+
dispose: () => part.hide()
|
|
336
|
+
});
|
|
337
|
+
store.add(token.onCancellationRequested(disposePrompt));
|
|
338
|
+
store.add(promptContext.onDisposed(disposePrompt));
|
|
339
|
+
store.add(promptContext.onDidInputData(data => {
|
|
340
|
+
if (promptContext.didSendInstallCommand() && data.length > 0) {
|
|
341
|
+
disposePrompt();
|
|
342
|
+
}
|
|
343
|
+
}));
|
|
344
|
+
return store;
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
TerminalSandboxService = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IFileService)), ( __param(2, IEnvironmentService)), ( __param(3, ILogService)), ( __param(4, IRemoteAgentService)), ( __param(5, IWorkspaceContextService)), ( __param(6, IProductService)), ( __param(7, ILifecycleService)), ( __param(8, ISandboxHelperService)), ( __param(9, IChatService)), ( __param(10, IInstantiationService))], TerminalSandboxService));
|
|
348
|
+
|
|
349
|
+
export { TerminalSandboxService };
|
package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
|
+
import { Disposable, IReference } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
4
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
6
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
7
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
8
|
+
import { IAgentCreateSessionConfig, IAgentHostInspectInfo, IAgentHostSocketInfo, IAgentResolveSessionConfigParams, IAgentSessionConfigCompletionsParams, IAgentSessionMetadata, AuthenticateParams, AuthenticateResult } from "../../../../platform/agentHost/common/agentService.js";
|
|
9
|
+
import { IAgentHostService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service";
|
|
10
|
+
import type { IActiveSubscriptionInfo, IAgentSubscription } from "../../../../platform/agentHost/common/state/agentSubscription.js";
|
|
11
|
+
import type { CompletionsParams, CompletionsResult, CreateTerminalParams, ResolveSessionConfigResult, SessionConfigCompletionsResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands";
|
|
12
|
+
import type { InvokeChangesetOperationParams, InvokeChangesetOperationResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/commands";
|
|
13
|
+
import type { ActionEnvelope, INotification, IRootConfigChangedAction, SessionAction, TerminalAction } from "../../../../platform/agentHost/common/state/sessionActions.js";
|
|
14
|
+
import type { IRemoteWatchHandle } from "../../../../platform/agentHost/common/agentHostFileSystemProvider.js";
|
|
15
|
+
import type { CreateResourceWatchParams, CreateResourceWatchResult, ResourceCopyParams, ResourceCopyResult, ResourceDeleteParams, ResourceDeleteResult, ResourceListResult, ResourceMkdirParams, ResourceMkdirResult, ResourceMoveParams, ResourceMoveResult, ResourceReadResult, ResourceResolveParams, ResourceResolveResult, ResourceWriteParams, ResourceWriteResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionProtocol";
|
|
16
|
+
import { ComponentToState, RootState, StateComponents } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState";
|
|
17
|
+
import { IRemoteAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
18
|
+
/**
|
|
19
|
+
* Connects the renderer to the agent host that the remote server has
|
|
20
|
+
* already started, by proxying AHP frames over the remote agent's IPC pipe.
|
|
21
|
+
*
|
|
22
|
+
* Local-only methods on {@link IAgentHostService} (`restartAgentHost`,
|
|
23
|
+
* `startWebSocketServer`, `getInspectInfo`) are stubbed — the lifecycle of
|
|
24
|
+
* the agent host is owned by whoever spawned it on the remote.
|
|
25
|
+
*/
|
|
26
|
+
export declare class EditorRemoteAgentHostServiceClient extends Disposable implements IAgentHostService {
|
|
27
|
+
private readonly _logService;
|
|
28
|
+
readonly _serviceBrand: undefined;
|
|
29
|
+
private readonly _onAgentHostExit;
|
|
30
|
+
readonly onAgentHostExit: Event<number>;
|
|
31
|
+
private readonly _onAgentHostStart;
|
|
32
|
+
readonly onAgentHostStart: Event<void>;
|
|
33
|
+
private readonly _authenticationPending;
|
|
34
|
+
readonly authenticationPending: IObservable<boolean>;
|
|
35
|
+
private _authenticationSettled;
|
|
36
|
+
private readonly _protocolClient;
|
|
37
|
+
private readonly _noopRootState;
|
|
38
|
+
private _connectStarted;
|
|
39
|
+
constructor(remoteAgentService: IRemoteAgentService, configurationService: IConfigurationService, instantiationService: IInstantiationService, _logService: ILogService);
|
|
40
|
+
private _connect;
|
|
41
|
+
private _requireClient;
|
|
42
|
+
setAuthenticationPending(pending: boolean): void;
|
|
43
|
+
restartAgentHost(): Promise<void>;
|
|
44
|
+
startWebSocketServer(): Promise<IAgentHostSocketInfo>;
|
|
45
|
+
getInspectInfo(_tryEnable: boolean): Promise<IAgentHostInspectInfo | undefined>;
|
|
46
|
+
get clientId(): string;
|
|
47
|
+
get rootState(): IAgentSubscription<RootState>;
|
|
48
|
+
get onDidNotification(): Event<INotification>;
|
|
49
|
+
get onDidAction(): Event<ActionEnvelope>;
|
|
50
|
+
getSubscription<T extends StateComponents>(kind: T, resource: URI, owner: string): IReference<IAgentSubscription<ComponentToState[T]>>;
|
|
51
|
+
getSubscriptionUnmanaged<T extends StateComponents>(kind: T, resource: URI): IAgentSubscription<ComponentToState[T]> | undefined;
|
|
52
|
+
getActiveSubscriptions(): readonly IActiveSubscriptionInfo[];
|
|
53
|
+
dispatch(channel: string, action: SessionAction | TerminalAction | IRootConfigChangedAction): void;
|
|
54
|
+
authenticate(params: AuthenticateParams): Promise<AuthenticateResult>;
|
|
55
|
+
listSessions(): Promise<IAgentSessionMetadata[]>;
|
|
56
|
+
createSession(config?: IAgentCreateSessionConfig): Promise<URI>;
|
|
57
|
+
resolveSessionConfig(params: IAgentResolveSessionConfigParams): Promise<ResolveSessionConfigResult>;
|
|
58
|
+
sessionConfigCompletions(params: IAgentSessionConfigCompletionsParams): Promise<SessionConfigCompletionsResult>;
|
|
59
|
+
completions(params: CompletionsParams): Promise<CompletionsResult>;
|
|
60
|
+
getCompletionTriggerCharacters(): Promise<readonly string[]>;
|
|
61
|
+
disposeSession(session: URI): Promise<void>;
|
|
62
|
+
createTerminal(params: CreateTerminalParams): Promise<void>;
|
|
63
|
+
disposeTerminal(terminal: URI): Promise<void>;
|
|
64
|
+
invokeChangesetOperation(params: InvokeChangesetOperationParams): Promise<InvokeChangesetOperationResult>;
|
|
65
|
+
resourceList(uri: URI): Promise<ResourceListResult>;
|
|
66
|
+
resourceRead(uri: URI): Promise<ResourceReadResult>;
|
|
67
|
+
resourceWrite(params: ResourceWriteParams): Promise<ResourceWriteResult>;
|
|
68
|
+
resourceCopy(params: ResourceCopyParams): Promise<ResourceCopyResult>;
|
|
69
|
+
resourceDelete(params: ResourceDeleteParams): Promise<ResourceDeleteResult>;
|
|
70
|
+
resourceMove(params: ResourceMoveParams): Promise<ResourceMoveResult>;
|
|
71
|
+
resourceResolve(params: ResourceResolveParams): Promise<ResourceResolveResult>;
|
|
72
|
+
resourceMkdir(params: ResourceMkdirParams): Promise<ResourceMkdirResult>;
|
|
73
|
+
createResourceWatch(params: CreateResourceWatchParams): Promise<CreateResourceWatchResult>;
|
|
74
|
+
watchResource(params: CreateResourceWatchParams): Promise<IRemoteWatchHandle>;
|
|
75
|
+
}
|
package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
6
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
7
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
9
|
+
import { isAgentHostEnabled, AgentHostEnabledSettingId, AgentHostIpcChannels } from '../../../../platform/agentHost/common/agentService.js';
|
|
10
|
+
import { AgentHostIpcChannelTransport } from '../../../../platform/agentHost/browser/agentHostIpcChannelTransport.js';
|
|
11
|
+
import { RemoteAgentHostProtocolClient } from '../../../../platform/agentHost/browser/remoteAgentHostProtocolClient.js';
|
|
12
|
+
import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
13
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
14
|
+
|
|
15
|
+
const REMOTE_NOT_SUPPORTED = op => ( new Error(`${op} is not supported when the agent host runs on a remote.`));
|
|
16
|
+
const LOG_PREFIX = "[AgentHost:remote]";
|
|
17
|
+
let EditorRemoteAgentHostServiceClient = class EditorRemoteAgentHostServiceClient extends Disposable {
|
|
18
|
+
constructor(
|
|
19
|
+
remoteAgentService,
|
|
20
|
+
configurationService,
|
|
21
|
+
instantiationService,
|
|
22
|
+
_logService
|
|
23
|
+
) {
|
|
24
|
+
super();
|
|
25
|
+
this._logService = _logService;
|
|
26
|
+
this._onAgentHostExit = this._register(( new Emitter()));
|
|
27
|
+
this.onAgentHostExit = this._onAgentHostExit.event;
|
|
28
|
+
this._onAgentHostStart = this._register(( new Emitter()));
|
|
29
|
+
this.onAgentHostStart = this._onAgentHostStart.event;
|
|
30
|
+
this._authenticationPending = observableValue("authenticationPending", true);
|
|
31
|
+
this.authenticationPending = this._authenticationPending;
|
|
32
|
+
this._authenticationSettled = false;
|
|
33
|
+
this._noopRootState = {
|
|
34
|
+
value: undefined,
|
|
35
|
+
verifiedValue: undefined,
|
|
36
|
+
onDidChange: Event.None,
|
|
37
|
+
onWillApplyAction: Event.None,
|
|
38
|
+
onDidApplyAction: Event.None
|
|
39
|
+
};
|
|
40
|
+
this._connectStarted = false;
|
|
41
|
+
const enabled = isAgentHostEnabled(configurationService);
|
|
42
|
+
const connection = remoteAgentService.getConnection();
|
|
43
|
+
this._logService.info(
|
|
44
|
+
`${LOG_PREFIX} Initializing (enabled=${enabled}, remoteAuthority=${connection?.remoteAuthority ?? "none"})`
|
|
45
|
+
);
|
|
46
|
+
if (!enabled) {
|
|
47
|
+
this._logService.info(
|
|
48
|
+
`${LOG_PREFIX} Disabled via "${AgentHostEnabledSettingId}" or web runtime. Not connecting.`
|
|
49
|
+
);
|
|
50
|
+
this.setAuthenticationPending(false);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (!connection) {
|
|
54
|
+
this._logService.warn(`${LOG_PREFIX} No remote agent connection available. Not connecting.`);
|
|
55
|
+
this.setAuthenticationPending(false);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const channel = connection.getChannel(AgentHostIpcChannels.RemoteProxy);
|
|
59
|
+
const transport = ( new AgentHostIpcChannelTransport(channel));
|
|
60
|
+
const address = `vscode-remote://${connection.remoteAuthority}`;
|
|
61
|
+
this._protocolClient = this._register(
|
|
62
|
+
instantiationService.createInstance(RemoteAgentHostProtocolClient, address, transport, undefined)
|
|
63
|
+
);
|
|
64
|
+
this._register(this._protocolClient.onDidClose(() => {
|
|
65
|
+
this._logService.info(`${LOG_PREFIX} Protocol client closed`);
|
|
66
|
+
this._onAgentHostExit.fire(0);
|
|
67
|
+
}));
|
|
68
|
+
this._connect().catch(err => this._logService.warn(`${LOG_PREFIX} Connect failed`, err));
|
|
69
|
+
}
|
|
70
|
+
async _connect() {
|
|
71
|
+
if (this._connectStarted || !this._protocolClient) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
this._connectStarted = true;
|
|
75
|
+
this._logService.info(`${LOG_PREFIX} Connecting to remote agent host...`);
|
|
76
|
+
await this._protocolClient.connect();
|
|
77
|
+
this._logService.info(`${LOG_PREFIX} Connected; clientId=${this._protocolClient.clientId}`);
|
|
78
|
+
this._onAgentHostStart.fire();
|
|
79
|
+
}
|
|
80
|
+
_requireClient() {
|
|
81
|
+
if (!this._protocolClient) {
|
|
82
|
+
throw ( new Error("Remote agent host is not enabled or no remote connection is available."));
|
|
83
|
+
}
|
|
84
|
+
return this._protocolClient;
|
|
85
|
+
}
|
|
86
|
+
setAuthenticationPending(pending) {
|
|
87
|
+
if (this._authenticationSettled) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (!pending) {
|
|
91
|
+
this._authenticationSettled = true;
|
|
92
|
+
}
|
|
93
|
+
this._authenticationPending.set(pending, undefined);
|
|
94
|
+
}
|
|
95
|
+
async restartAgentHost() {}
|
|
96
|
+
async startWebSocketServer() {
|
|
97
|
+
throw REMOTE_NOT_SUPPORTED("startWebSocketServer");
|
|
98
|
+
}
|
|
99
|
+
async getInspectInfo(_tryEnable) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
get clientId() {
|
|
103
|
+
return this._protocolClient?.clientId ?? "";
|
|
104
|
+
}
|
|
105
|
+
get rootState() {
|
|
106
|
+
return this._protocolClient?.rootState ?? this._noopRootState;
|
|
107
|
+
}
|
|
108
|
+
get onDidNotification() {
|
|
109
|
+
return this._protocolClient?.onDidNotification ?? Event.None;
|
|
110
|
+
}
|
|
111
|
+
get onDidAction() {
|
|
112
|
+
return this._protocolClient?.onDidAction ?? Event.None;
|
|
113
|
+
}
|
|
114
|
+
getSubscription(kind, resource, owner) {
|
|
115
|
+
return this._requireClient().getSubscription(kind, resource, owner);
|
|
116
|
+
}
|
|
117
|
+
getSubscriptionUnmanaged(kind, resource) {
|
|
118
|
+
return this._protocolClient?.getSubscriptionUnmanaged(kind, resource);
|
|
119
|
+
}
|
|
120
|
+
getActiveSubscriptions() {
|
|
121
|
+
return this._protocolClient?.getActiveSubscriptions() ?? [];
|
|
122
|
+
}
|
|
123
|
+
dispatch(channel, action) {
|
|
124
|
+
this._protocolClient?.dispatch(channel, action);
|
|
125
|
+
}
|
|
126
|
+
authenticate(params) {
|
|
127
|
+
return this._requireClient().authenticate(params);
|
|
128
|
+
}
|
|
129
|
+
listSessions() {
|
|
130
|
+
return this._requireClient().listSessions();
|
|
131
|
+
}
|
|
132
|
+
createSession(config) {
|
|
133
|
+
return this._requireClient().createSession(config);
|
|
134
|
+
}
|
|
135
|
+
resolveSessionConfig(params) {
|
|
136
|
+
return this._requireClient().resolveSessionConfig(params);
|
|
137
|
+
}
|
|
138
|
+
sessionConfigCompletions(params) {
|
|
139
|
+
return this._requireClient().sessionConfigCompletions(params);
|
|
140
|
+
}
|
|
141
|
+
completions(params) {
|
|
142
|
+
return this._requireClient().completions(params);
|
|
143
|
+
}
|
|
144
|
+
getCompletionTriggerCharacters() {
|
|
145
|
+
return this._requireClient().getCompletionTriggerCharacters();
|
|
146
|
+
}
|
|
147
|
+
disposeSession(session) {
|
|
148
|
+
return this._requireClient().disposeSession(session);
|
|
149
|
+
}
|
|
150
|
+
createTerminal(params) {
|
|
151
|
+
return this._requireClient().createTerminal(params);
|
|
152
|
+
}
|
|
153
|
+
disposeTerminal(terminal) {
|
|
154
|
+
return this._requireClient().disposeTerminal(terminal);
|
|
155
|
+
}
|
|
156
|
+
invokeChangesetOperation(params) {
|
|
157
|
+
return this._requireClient().invokeChangesetOperation(params);
|
|
158
|
+
}
|
|
159
|
+
resourceList(uri) {
|
|
160
|
+
return this._requireClient().resourceList(uri);
|
|
161
|
+
}
|
|
162
|
+
resourceRead(uri) {
|
|
163
|
+
return this._requireClient().resourceRead(uri);
|
|
164
|
+
}
|
|
165
|
+
resourceWrite(params) {
|
|
166
|
+
return this._requireClient().resourceWrite(params);
|
|
167
|
+
}
|
|
168
|
+
resourceCopy(params) {
|
|
169
|
+
return this._requireClient().resourceCopy(params);
|
|
170
|
+
}
|
|
171
|
+
resourceDelete(params) {
|
|
172
|
+
return this._requireClient().resourceDelete(params);
|
|
173
|
+
}
|
|
174
|
+
resourceMove(params) {
|
|
175
|
+
return this._requireClient().resourceMove(params);
|
|
176
|
+
}
|
|
177
|
+
resourceResolve(params) {
|
|
178
|
+
return this._requireClient().resourceResolve(params);
|
|
179
|
+
}
|
|
180
|
+
resourceMkdir(params) {
|
|
181
|
+
return this._requireClient().resourceMkdir(params);
|
|
182
|
+
}
|
|
183
|
+
createResourceWatch(params) {
|
|
184
|
+
return this._requireClient().createResourceWatch(params);
|
|
185
|
+
}
|
|
186
|
+
watchResource(params) {
|
|
187
|
+
return this._requireClient().watchResource(params);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
EditorRemoteAgentHostServiceClient = ( __decorate([( __param(0, IRemoteAgentService)), ( __param(1, IConfigurationService)), ( __param(2, IInstantiationService)), ( __param(3, ILogService))], EditorRemoteAgentHostServiceClient));
|
|
191
|
+
|
|
192
|
+
export { EditorRemoteAgentHostServiceClient };
|