@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,58 @@
|
|
|
1
|
+
import type { QueryCapture } from "@codingame/monaco-vscode-api/external/@vscode/tree-sitter-wasm/wasm/tree-sitter";
|
|
2
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { ITreeSitterLibraryService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/treeSitter/treeSitterLibraryService.service";
|
|
4
|
+
import type { ITerminalSandboxCommand } from "../../../../../platform/sandbox/common/terminalSandboxService.js";
|
|
5
|
+
export declare enum TreeSitterCommandParserLanguage {
|
|
6
|
+
Bash = "bash",
|
|
7
|
+
PowerShell = "powershell"
|
|
8
|
+
}
|
|
9
|
+
export declare class TreeSitterCommandParser extends Disposable {
|
|
10
|
+
private readonly _treeSitterLibraryService;
|
|
11
|
+
private readonly _parser;
|
|
12
|
+
private readonly _treeCache;
|
|
13
|
+
private readonly _commandFileWriteParsers;
|
|
14
|
+
constructor(_treeSitterLibraryService: ITreeSitterLibraryService);
|
|
15
|
+
extractSubCommands(languageId: TreeSitterCommandParserLanguage, commandLine: string): Promise<string[]>;
|
|
16
|
+
extractPwshDoubleAmpersandChainOperators(commandLine: string): Promise<QueryCapture[]>;
|
|
17
|
+
/**
|
|
18
|
+
* Extracts executable command invocations from the command line and returns
|
|
19
|
+
* normalized command details for sandbox allow-listing.
|
|
20
|
+
*
|
|
21
|
+
* Example: `PATH=/bin /usr/bin/git commit -S -m "test" && npm install`
|
|
22
|
+
* returns:
|
|
23
|
+
* `[
|
|
24
|
+
* { keyword: 'git', args: ['commit', '-S', '-m', 'test'] },
|
|
25
|
+
* { keyword: 'npm', args: ['install'] }
|
|
26
|
+
* ]`.
|
|
27
|
+
*/
|
|
28
|
+
extractCommands(languageId: TreeSitterCommandParserLanguage, commandLine: string): Promise<ITerminalSandboxCommand[]>;
|
|
29
|
+
getFileWrites(languageId: TreeSitterCommandParserLanguage, commandLine: string): Promise<string[]>;
|
|
30
|
+
/**
|
|
31
|
+
* Extracts file targets from commands that perform file writes beyond shell redirections.
|
|
32
|
+
* Uses registered command parsers (e.g., for `sed -i`) to detect command-specific file writes.
|
|
33
|
+
* Returns an array of file paths that would be modified.
|
|
34
|
+
*/
|
|
35
|
+
getCommandFileWrites(languageId: TreeSitterCommandParserLanguage, commandLine: string): Promise<string[]>;
|
|
36
|
+
private _queryTree;
|
|
37
|
+
/**
|
|
38
|
+
* Converts a command token to the stable keyword used by sandbox allow-list
|
|
39
|
+
* rules by stripping quotes, path segments, and common executable suffixes.
|
|
40
|
+
*/
|
|
41
|
+
private _normalizeCommandKeyword;
|
|
42
|
+
/**
|
|
43
|
+
* Parses a single tree-sitter command node into command details, ignoring
|
|
44
|
+
* leading environment variable assignments such as `NODE_ENV=test npm run build`.
|
|
45
|
+
*/
|
|
46
|
+
private _parseCommand;
|
|
47
|
+
/**
|
|
48
|
+
* Splits enough shell syntax for sandbox allow-listing: whitespace separates
|
|
49
|
+
* tokens, quotes are removed, and backslash escapes preserve the escaped char.
|
|
50
|
+
*/
|
|
51
|
+
private _splitCommandTokens;
|
|
52
|
+
/**
|
|
53
|
+
* Returns true for simple shell-style environment variable assignments that
|
|
54
|
+
* can prefix a command invocation.
|
|
55
|
+
*/
|
|
56
|
+
private _isVariableAssignment;
|
|
57
|
+
private _doQuery;
|
|
58
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
|
+
import { BugIndicatingError, ErrorNoTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
5
|
+
import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
|
|
6
|
+
import { Disposable, MutableDisposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { win32, posix } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
8
|
+
import { ITreeSitterLibraryService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/treeSitter/treeSitterLibraryService.service';
|
|
9
|
+
import { SedFileWriteParser } from './commandParsers/sedFileWriteParser.js';
|
|
10
|
+
|
|
11
|
+
var TreeSitterCommandParserLanguage;
|
|
12
|
+
(function(TreeSitterCommandParserLanguage) {
|
|
13
|
+
TreeSitterCommandParserLanguage["Bash"] = "bash";
|
|
14
|
+
TreeSitterCommandParserLanguage["PowerShell"] = "powershell";
|
|
15
|
+
})(TreeSitterCommandParserLanguage || (TreeSitterCommandParserLanguage = {}));
|
|
16
|
+
const pwshFlagEqualsRegex = /(^|\s)(-{1,2}[\w-]+)=/g;
|
|
17
|
+
function maskPwshFlagEquals(commandLine) {
|
|
18
|
+
return commandLine.replace(pwshFlagEqualsRegex, (_, pre, flag) => `${pre}${flag} `);
|
|
19
|
+
}
|
|
20
|
+
let TreeSitterCommandParser = class TreeSitterCommandParser extends Disposable {
|
|
21
|
+
constructor(_treeSitterLibraryService) {
|
|
22
|
+
super();
|
|
23
|
+
this._treeSitterLibraryService = _treeSitterLibraryService;
|
|
24
|
+
this._treeCache = this._register(( new TreeCache()));
|
|
25
|
+
this._commandFileWriteParsers = [( new SedFileWriteParser())];
|
|
26
|
+
this._parser = ( new Lazy(
|
|
27
|
+
() => this._treeSitterLibraryService.getParserClass().then(ParserCtor => ( new ParserCtor()))
|
|
28
|
+
));
|
|
29
|
+
}
|
|
30
|
+
async extractSubCommands(languageId, commandLine) {
|
|
31
|
+
if (languageId === TreeSitterCommandParserLanguage.PowerShell) {
|
|
32
|
+
const masked = maskPwshFlagEquals(commandLine);
|
|
33
|
+
if (masked !== commandLine) {
|
|
34
|
+
const captures = await this._queryTree(languageId, masked, "(command) @command");
|
|
35
|
+
return ( captures.map(e => commandLine.substring(e.node.startIndex, e.node.endIndex)));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const captures = await this._queryTree(languageId, commandLine, "(command) @command");
|
|
39
|
+
return ( captures.map(e => e.node.text));
|
|
40
|
+
}
|
|
41
|
+
async extractPwshDoubleAmpersandChainOperators(commandLine) {
|
|
42
|
+
const captures = await this._queryTree(
|
|
43
|
+
TreeSitterCommandParserLanguage.PowerShell,
|
|
44
|
+
commandLine,
|
|
45
|
+
["(", " (pipeline", " (pipeline_chain_tail) @double.ampersand)", ")"].join("\n")
|
|
46
|
+
);
|
|
47
|
+
return captures;
|
|
48
|
+
}
|
|
49
|
+
async extractCommands(languageId, commandLine) {
|
|
50
|
+
const commands = [];
|
|
51
|
+
for (const commandText of await this.extractSubCommands(languageId, commandLine)) {
|
|
52
|
+
const command = this._parseCommand(commandText);
|
|
53
|
+
if (command) {
|
|
54
|
+
commands.push(command);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return commands;
|
|
58
|
+
}
|
|
59
|
+
async getFileWrites(languageId, commandLine) {
|
|
60
|
+
let query;
|
|
61
|
+
switch (languageId) {
|
|
62
|
+
case TreeSitterCommandParserLanguage.Bash:
|
|
63
|
+
query = [
|
|
64
|
+
"(file_redirect",
|
|
65
|
+
" destination: [(word) (string (string_content)) (raw_string) (concatenation)] @file)"
|
|
66
|
+
].join("\n");
|
|
67
|
+
break;
|
|
68
|
+
case TreeSitterCommandParserLanguage.PowerShell:
|
|
69
|
+
query = ["(redirection", " (redirected_file_name) @file)"].join("\n");
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
const captures = await this._queryTree(languageId, commandLine, query);
|
|
73
|
+
return ( captures.map(e => e.node.text.trim()));
|
|
74
|
+
}
|
|
75
|
+
async getCommandFileWrites(languageId, commandLine) {
|
|
76
|
+
if (languageId !== TreeSitterCommandParserLanguage.Bash) {
|
|
77
|
+
return [];
|
|
78
|
+
}
|
|
79
|
+
const query = "(command) @command";
|
|
80
|
+
const captures = await this._queryTree(languageId, commandLine, query);
|
|
81
|
+
const result = [];
|
|
82
|
+
for (const capture of captures) {
|
|
83
|
+
const commandText = capture.node.text;
|
|
84
|
+
for (const parser of this._commandFileWriteParsers) {
|
|
85
|
+
if (parser.canHandle(commandText)) {
|
|
86
|
+
result.push(...parser.extractFileWrites(commandText));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
async _queryTree(languageId, commandLine, querySource) {
|
|
93
|
+
const {
|
|
94
|
+
tree,
|
|
95
|
+
query
|
|
96
|
+
} = await this._doQuery(languageId, commandLine, querySource);
|
|
97
|
+
return query.captures(tree.rootNode);
|
|
98
|
+
}
|
|
99
|
+
_normalizeCommandKeyword(token) {
|
|
100
|
+
const unquoted = token.replace(/^['"]|['"]$/g, "");
|
|
101
|
+
if (!unquoted) {
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
const pathBase = unquoted.includes("\\") ? win32.basename(unquoted) : posix.basename(unquoted);
|
|
105
|
+
const normalized = pathBase.toLowerCase().replace(/\.(?:exe|cmd|bat|ps1)$/i, "");
|
|
106
|
+
return normalized || undefined;
|
|
107
|
+
}
|
|
108
|
+
_parseCommand(commandText) {
|
|
109
|
+
const tokens = this._splitCommandTokens(commandText);
|
|
110
|
+
let commandIndex = 0;
|
|
111
|
+
while (commandIndex < tokens.length && this._isVariableAssignment(tokens[commandIndex])) {
|
|
112
|
+
commandIndex++;
|
|
113
|
+
}
|
|
114
|
+
const keyword = this._normalizeCommandKeyword(tokens[commandIndex] ?? "");
|
|
115
|
+
if (!keyword) {
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
keyword,
|
|
120
|
+
args: tokens.slice(commandIndex + 1)
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
_splitCommandTokens(commandText) {
|
|
124
|
+
const tokens = [];
|
|
125
|
+
let current = "";
|
|
126
|
+
let quote;
|
|
127
|
+
let escaping = false;
|
|
128
|
+
for (const char of commandText.trim()) {
|
|
129
|
+
if (escaping) {
|
|
130
|
+
current += char;
|
|
131
|
+
escaping = false;
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (char === "\\" && quote !== "'") {
|
|
135
|
+
escaping = true;
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
if (quote) {
|
|
139
|
+
if (char === quote) {
|
|
140
|
+
quote = undefined;
|
|
141
|
+
} else {
|
|
142
|
+
current += char;
|
|
143
|
+
}
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
if (char === "'" || char === "\"") {
|
|
147
|
+
quote = char;
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
if (/\s/.test(char)) {
|
|
151
|
+
if (current) {
|
|
152
|
+
tokens.push(current);
|
|
153
|
+
current = "";
|
|
154
|
+
}
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
current += char;
|
|
158
|
+
}
|
|
159
|
+
if (escaping) {
|
|
160
|
+
current += "\\";
|
|
161
|
+
}
|
|
162
|
+
if (current) {
|
|
163
|
+
tokens.push(current);
|
|
164
|
+
}
|
|
165
|
+
return tokens;
|
|
166
|
+
}
|
|
167
|
+
_isVariableAssignment(token) {
|
|
168
|
+
return /^[A-Za-z_][A-Za-z0-9_]*=.*/.test(token);
|
|
169
|
+
}
|
|
170
|
+
async _doQuery(languageId, commandLine, querySource) {
|
|
171
|
+
const language = await this._treeSitterLibraryService.getLanguagePromise(languageId);
|
|
172
|
+
if (!language) {
|
|
173
|
+
throw ( new BugIndicatingError("Failed to fetch language grammar"));
|
|
174
|
+
}
|
|
175
|
+
let tree = this._treeCache.get(languageId, commandLine);
|
|
176
|
+
if (!tree) {
|
|
177
|
+
const parser = await this._parser.value;
|
|
178
|
+
parser.setLanguage(language);
|
|
179
|
+
const parsedTree = parser.parse(commandLine);
|
|
180
|
+
if (!parsedTree) {
|
|
181
|
+
throw ( new ErrorNoTelemetry("Failed to parse tree"));
|
|
182
|
+
}
|
|
183
|
+
tree = parsedTree;
|
|
184
|
+
this._treeCache.set(languageId, commandLine, tree);
|
|
185
|
+
}
|
|
186
|
+
const query = await this._treeSitterLibraryService.createQuery(language, querySource);
|
|
187
|
+
if (!query) {
|
|
188
|
+
throw ( new BugIndicatingError("Failed to create tree sitter query"));
|
|
189
|
+
}
|
|
190
|
+
return {
|
|
191
|
+
tree,
|
|
192
|
+
query
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
TreeSitterCommandParser = ( __decorate([( __param(0, ITreeSitterLibraryService))], TreeSitterCommandParser));
|
|
197
|
+
class TreeCache extends Disposable {
|
|
198
|
+
constructor() {
|
|
199
|
+
super();
|
|
200
|
+
this._cache = ( new Map());
|
|
201
|
+
this._clearScheduler = this._register(( new MutableDisposable()));
|
|
202
|
+
this._register(toDisposable(() => this._cache.clear()));
|
|
203
|
+
}
|
|
204
|
+
get(languageId, commandLine) {
|
|
205
|
+
this._resetClearTimer();
|
|
206
|
+
return this._cache.get(this._getCacheKey(languageId, commandLine));
|
|
207
|
+
}
|
|
208
|
+
set(languageId, commandLine, tree) {
|
|
209
|
+
this._resetClearTimer();
|
|
210
|
+
this._cache.set(this._getCacheKey(languageId, commandLine), tree);
|
|
211
|
+
}
|
|
212
|
+
_getCacheKey(languageId, commandLine) {
|
|
213
|
+
return `${languageId}:${commandLine}`;
|
|
214
|
+
}
|
|
215
|
+
_resetClearTimer() {
|
|
216
|
+
this._clearScheduler.value = ( new RunOnceScheduler(() => {
|
|
217
|
+
this._cache.clear();
|
|
218
|
+
}, 10000));
|
|
219
|
+
this._clearScheduler.value.schedule();
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export { TreeSitterCommandParser, TreeSitterCommandParserLanguage };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
2
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
3
|
+
/** Setting IDs that affect the engine's sandbox configuration (modern + deprecated). */
|
|
4
|
+
export declare const SANDBOX_SETTING_KEYS: readonly string[];
|
|
5
|
+
/**
|
|
6
|
+
* Reads a single sandbox-related setting from `IConfigurationService`,
|
|
7
|
+
* preferring the modern key and falling back to its deprecated peers in
|
|
8
|
+
* order. Boolean values for `chat.agent.sandbox.enabled` (legacy) are
|
|
9
|
+
* normalized to the modern `'on' | 'off'` enum. Returns `undefined` when
|
|
10
|
+
* no user value is configured.
|
|
11
|
+
*/
|
|
12
|
+
export declare function readSandboxSetting<T>(configurationService: IConfigurationService, logService: ILogService, settingId: string): T | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Reads the currently-configured sandbox values for forwarding to an agent
|
|
15
|
+
* host. The returned record is keyed by the prefix-free agent-host sandbox
|
|
16
|
+
* sub-keys ({@link AgentHostSandboxKey}); keys without a user value are
|
|
17
|
+
* omitted entirely. Callers should nest this under the agent host's
|
|
18
|
+
* top-level `sandbox` config key when dispatching a `RootConfigChanged`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function readAgentHostSandboxValues(configurationService: IConfigurationService, logService: ILogService): Record<string, unknown>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
|
|
2
|
+
import { AgentNetworkDomainSettingId } from '../../../../../platform/networkFilter/common/settings.js';
|
|
3
|
+
import { AgentSandboxSettingId, AgentSandboxEnabledValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/settings';
|
|
4
|
+
import { sandboxSettingIdToAgentHostKey } from '../../../../../platform/agentHost/common/sandboxConfigSchema.js';
|
|
5
|
+
|
|
6
|
+
const SANDBOX_SETTING_KEYS = [
|
|
7
|
+
AgentSandboxSettingId.AgentSandboxEnabled,
|
|
8
|
+
AgentSandboxSettingId.AgentSandboxWindowsEnabled,
|
|
9
|
+
AgentSandboxSettingId.AgentSandboxAllowUnsandboxedCommands,
|
|
10
|
+
AgentSandboxSettingId.AgentSandboxAutoApproveUnsandboxedCommands,
|
|
11
|
+
AgentSandboxSettingId.AgentSandboxLinuxFileSystem,
|
|
12
|
+
AgentSandboxSettingId.AgentSandboxMacFileSystem,
|
|
13
|
+
AgentSandboxSettingId.AgentSandboxWindowsFileSystem,
|
|
14
|
+
AgentSandboxSettingId.AgentSandboxWindowsSchemaVersion,
|
|
15
|
+
AgentSandboxSettingId.AgentSandboxAdvancedRuntime,
|
|
16
|
+
AgentSandboxSettingId.DeprecatedAgentSandboxEnabled,
|
|
17
|
+
AgentSandboxSettingId.DeprecatedAgentSandboxLinuxFileSystem,
|
|
18
|
+
AgentSandboxSettingId.DeprecatedAgentSandboxMacFileSystem,
|
|
19
|
+
AgentNetworkDomainSettingId.AllowedNetworkDomains,
|
|
20
|
+
AgentNetworkDomainSettingId.DeniedNetworkDomains,
|
|
21
|
+
AgentNetworkDomainSettingId.DeprecatedSandboxAllowedNetworkDomains,
|
|
22
|
+
AgentNetworkDomainSettingId.DeprecatedSandboxDeniedNetworkDomains,
|
|
23
|
+
AgentNetworkDomainSettingId.DeprecatedOldAllowedNetworkDomains,
|
|
24
|
+
AgentNetworkDomainSettingId.DeprecatedOldDeniedNetworkDomains
|
|
25
|
+
];
|
|
26
|
+
const DEPRECATED_SANDBOX_FALLBACKS = {
|
|
27
|
+
[AgentSandboxSettingId.AgentSandboxEnabled]: [AgentSandboxSettingId.DeprecatedAgentSandboxEnabled],
|
|
28
|
+
[AgentSandboxSettingId.AgentSandboxLinuxFileSystem]: [AgentSandboxSettingId.DeprecatedAgentSandboxLinuxFileSystem],
|
|
29
|
+
[AgentSandboxSettingId.AgentSandboxMacFileSystem]: [AgentSandboxSettingId.DeprecatedAgentSandboxMacFileSystem],
|
|
30
|
+
[AgentNetworkDomainSettingId.AllowedNetworkDomains]: [
|
|
31
|
+
AgentNetworkDomainSettingId.DeprecatedSandboxAllowedNetworkDomains,
|
|
32
|
+
AgentNetworkDomainSettingId.DeprecatedOldAllowedNetworkDomains
|
|
33
|
+
],
|
|
34
|
+
[AgentNetworkDomainSettingId.DeniedNetworkDomains]: [
|
|
35
|
+
AgentNetworkDomainSettingId.DeprecatedSandboxDeniedNetworkDomains,
|
|
36
|
+
AgentNetworkDomainSettingId.DeprecatedOldDeniedNetworkDomains
|
|
37
|
+
]
|
|
38
|
+
};
|
|
39
|
+
function readSandboxSetting(configurationService, logService, settingId) {
|
|
40
|
+
const modern = configurationService.inspect(settingId);
|
|
41
|
+
if (modern.userValue !== undefined) {
|
|
42
|
+
return normalizeSandboxSettingValue(settingId, modern.value);
|
|
43
|
+
}
|
|
44
|
+
const deprecatedFallbacks = DEPRECATED_SANDBOX_FALLBACKS[settingId];
|
|
45
|
+
if (deprecatedFallbacks?.length) {
|
|
46
|
+
const userConfiguredKeys = ( configurationService.keys()).user;
|
|
47
|
+
for (const deprecatedId of deprecatedFallbacks) {
|
|
48
|
+
const deprecated = configurationService.inspect(deprecatedId);
|
|
49
|
+
if (deprecated.userValue !== undefined && userConfiguredKeys.includes(deprecatedId)) {
|
|
50
|
+
logService.warn(
|
|
51
|
+
`SandboxSettingsReader: Using deprecated setting ${deprecatedId} because ${settingId} is not set. Please update your settings to use ${settingId} instead.`
|
|
52
|
+
);
|
|
53
|
+
return normalizeSandboxSettingValue(settingId, deprecated.value);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return normalizeSandboxSettingValue(settingId, modern.value);
|
|
58
|
+
}
|
|
59
|
+
function readAgentHostSandboxValues(configurationService, logService) {
|
|
60
|
+
const values = {};
|
|
61
|
+
for (const [settingId, sandboxKey] of Object.entries(sandboxSettingIdToAgentHostKey)) {
|
|
62
|
+
const value = readSandboxSetting(configurationService, logService, settingId);
|
|
63
|
+
if (value !== undefined) {
|
|
64
|
+
values[sandboxKey] = value;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return values;
|
|
68
|
+
}
|
|
69
|
+
function normalizeSandboxSettingValue(settingId, value) {
|
|
70
|
+
if (settingId === AgentSandboxSettingId.AgentSandboxEnabled || settingId === AgentSandboxSettingId.DeprecatedAgentSandboxEnabled) {
|
|
71
|
+
if (value === true) {
|
|
72
|
+
return AgentSandboxEnabledValue.On;
|
|
73
|
+
}
|
|
74
|
+
if (value === false) {
|
|
75
|
+
return AgentSandboxEnabledValue.Off;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { SANDBOX_SETTING_KEYS, readAgentHostSandboxValues, readSandboxSetting };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
|
|
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 { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
|
|
7
|
+
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
8
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
9
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
10
|
+
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
11
|
+
import { ISandboxHelperService } from "@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/sandboxHelperService.service";
|
|
12
|
+
import { ISandboxDependencyInstallTerminal, TerminalSandboxPrerequisiteCheck, type ISandboxDependencyInstallOptions, type ISandboxDependencyInstallResult, type ITerminalSandboxCommand, type ITerminalSandboxPrecheckInputs, type ITerminalSandboxPrerequisiteCheckResult, type ITerminalSandboxResolvedNetworkDomains, type ITerminalSandboxWrapResult } from "../../../../../platform/sandbox/common/terminalSandboxService.js";
|
|
13
|
+
import { ITerminalSandboxService } from "@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/terminalSandboxService.service";
|
|
14
|
+
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
15
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
16
|
+
import { IRemoteAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
17
|
+
import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
|
|
18
|
+
export { ITerminalSandboxService, TerminalSandboxPrerequisiteCheck, ISandboxDependencyInstallOptions, ISandboxDependencyInstallResult, ISandboxDependencyInstallTerminal, ITerminalSandboxCommand, ITerminalSandboxPrecheckInputs, ITerminalSandboxPrerequisiteCheckResult, ITerminalSandboxResolvedNetworkDomains, ITerminalSandboxWrapResult };
|
|
19
|
+
export declare class TerminalSandboxService extends Disposable implements ITerminalSandboxService {
|
|
20
|
+
private readonly _configurationService;
|
|
21
|
+
private readonly _environmentService;
|
|
22
|
+
private readonly _logService;
|
|
23
|
+
private readonly _remoteAgentService;
|
|
24
|
+
private readonly _workspaceContextService;
|
|
25
|
+
private readonly _productService;
|
|
26
|
+
private readonly _sandboxHelperService;
|
|
27
|
+
private readonly _chatService;
|
|
28
|
+
readonly _serviceBrand: undefined;
|
|
29
|
+
private readonly _engine;
|
|
30
|
+
private readonly _remoteEnvDetailsPromise;
|
|
31
|
+
private _remoteEnvDetails;
|
|
32
|
+
private readonly _onDidChangeRoots;
|
|
33
|
+
constructor(_configurationService: IConfigurationService, fileService: IFileService, _environmentService: IEnvironmentService, _logService: ILogService, _remoteAgentService: IRemoteAgentService, _workspaceContextService: IWorkspaceContextService, _productService: IProductService, lifecycleService: ILifecycleService, _sandboxHelperService: ISandboxHelperService, _chatService: IChatService, instantiationService: IInstantiationService);
|
|
34
|
+
isEnabled(precheckInputs?: ITerminalSandboxPrecheckInputs): Promise<boolean>;
|
|
35
|
+
isSandboxAllowNetworkEnabled(precheckInputs?: ITerminalSandboxPrecheckInputs): Promise<boolean>;
|
|
36
|
+
getOS(): Promise<OperatingSystem>;
|
|
37
|
+
wrapCommand(command: string, requestUnsandboxedExecution?: boolean, shell?: string, cwd?: URI, commandDetails?: readonly ITerminalSandboxCommand[], requestAllowNetwork?: boolean): Promise<ITerminalSandboxWrapResult>;
|
|
38
|
+
checkForSandboxingPrereqs(forceRefresh?: boolean, precheckInputs?: ITerminalSandboxPrecheckInputs): Promise<ITerminalSandboxPrerequisiteCheckResult>;
|
|
39
|
+
getSandboxConfigPath(forceRefresh?: boolean, precheckInputs?: ITerminalSandboxPrecheckInputs): Promise<string | undefined>;
|
|
40
|
+
getTempDir(): URI | undefined;
|
|
41
|
+
setNeedsForceUpdateConfigFile(): void;
|
|
42
|
+
getResolvedNetworkDomains(): ITerminalSandboxResolvedNetworkDomains;
|
|
43
|
+
getMissingSandboxDependencies(): Promise<string[]>;
|
|
44
|
+
private _resolveRemoteEnv;
|
|
45
|
+
private _resolveOS;
|
|
46
|
+
private _readSandboxSetting;
|
|
47
|
+
private _resolveRuntimeInfo;
|
|
48
|
+
private _toWindowsPath;
|
|
49
|
+
private _resolveUserHome;
|
|
50
|
+
private _resolveSandboxTempDir;
|
|
51
|
+
private _resolveWorkspaceStorageReadRoot;
|
|
52
|
+
private _getSandboxWindowTempDirName;
|
|
53
|
+
private _resolveSandboxDependencyStatus;
|
|
54
|
+
private _resolveWindowsMxcFilesystemPolicy;
|
|
55
|
+
private _resolveWindowsMxcEnvironment;
|
|
56
|
+
private _resolveWindowsMxcSandboxPayload;
|
|
57
|
+
installMissingSandboxDependencies(missingDependencies: string[], sessionResource: URI | undefined, token: CancellationToken, options: ISandboxDependencyInstallOptions): Promise<ISandboxDependencyInstallResult>;
|
|
58
|
+
/**
|
|
59
|
+
* Shows a chat elicitation that keeps the "Install" flow grounded in chat while
|
|
60
|
+
* the user focuses the terminal and types a sudo password.
|
|
61
|
+
*/
|
|
62
|
+
private _createMissingDependencyPasswordPrompt;
|
|
63
|
+
}
|