@codingame/monaco-vscode-chat-service-override 33.0.9 → 34.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.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,98 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
4
|
+
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
5
|
+
import { TelemetryTrustedValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetryUtils';
|
|
6
|
+
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
7
|
+
import { ShellIntegrationQuality } from './toolTerminalCreator.js';
|
|
8
|
+
|
|
9
|
+
let RunInTerminalToolTelemetry = class RunInTerminalToolTelemetry {
|
|
10
|
+
constructor(_telemetryService, _configurationService) {
|
|
11
|
+
this._telemetryService = _telemetryService;
|
|
12
|
+
this._configurationService = _configurationService;
|
|
13
|
+
}
|
|
14
|
+
logPrepare(state) {
|
|
15
|
+
const subCommandsSanitized = ( state.subCommands.map(e => {
|
|
16
|
+
const commandName = e.split(" ")[0];
|
|
17
|
+
let sanitizedCommandName = commandName.toLowerCase();
|
|
18
|
+
if (!( commandAllowList.has(sanitizedCommandName))) {
|
|
19
|
+
if (/^(?:[A-Z][a-z0-9]+)+(?:-(?:[A-Z][a-z0-9]+))*$/.test(commandName)) {
|
|
20
|
+
sanitizedCommandName = "(unknown:pwsh)";
|
|
21
|
+
} else if (/^[a-z0-9_\-\.\\\/:;]+$/i.test(commandName)) {
|
|
22
|
+
const properties = [];
|
|
23
|
+
if (/[a-z]/.test(commandName)) {
|
|
24
|
+
properties.push("ascii_lower");
|
|
25
|
+
}
|
|
26
|
+
if (/[A-Z]/.test(commandName)) {
|
|
27
|
+
properties.push("ascii_upper");
|
|
28
|
+
}
|
|
29
|
+
if (/[0-9]/.test(commandName)) {
|
|
30
|
+
properties.push("numeric");
|
|
31
|
+
}
|
|
32
|
+
const chars = [];
|
|
33
|
+
for (const c of [".", "-", "_", "/", "\\", ":", ";"]) {
|
|
34
|
+
if (commandName.includes(c)) {
|
|
35
|
+
chars.push(c);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
sanitizedCommandName = `(unknown:${properties.join(",")}:${chars.join("")})`;
|
|
39
|
+
} else if (/[^\x00-\x7F]/.test(commandName)) {
|
|
40
|
+
sanitizedCommandName = "(unknown:unicode)";
|
|
41
|
+
} else {
|
|
42
|
+
sanitizedCommandName = "(unknown)";
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return sanitizedCommandName;
|
|
46
|
+
}));
|
|
47
|
+
this._telemetryService.publicLog2("toolUse.runInTerminal.prepare", {
|
|
48
|
+
terminalToolSessionId: state.terminalToolSessionId,
|
|
49
|
+
subCommands: ( new TelemetryTrustedValue(JSON.stringify(subCommandsSanitized))),
|
|
50
|
+
autoApproveAllowed: state.autoApproveAllowed,
|
|
51
|
+
autoApproveResult: state.autoApproveResult,
|
|
52
|
+
autoApproveReason: state.autoApproveReason,
|
|
53
|
+
autoApproveDefault: state.autoApproveDefault
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
logInvoke(instance, state) {
|
|
57
|
+
this._telemetryService.publicLog2("toolUse.runInTerminal", {
|
|
58
|
+
terminalSessionId: instance.sessionId,
|
|
59
|
+
terminalToolSessionId: state.terminalToolSessionId,
|
|
60
|
+
result: state.error ?? "success",
|
|
61
|
+
strategy: state.shellIntegrationQuality === ShellIntegrationQuality.Rich ? 2 : state.shellIntegrationQuality === ShellIntegrationQuality.Basic ? 1 : 0,
|
|
62
|
+
userEditedCommand: state.didUserEditCommand ? 1 : 0,
|
|
63
|
+
toolEditedCommand: state.didToolEditCommand ? 1 : 0,
|
|
64
|
+
isBackground: state.isBackground ? 1 : 0,
|
|
65
|
+
isNewSession: state.isNewSession ? 1 : 0,
|
|
66
|
+
isSandbox: state.isSandboxWrapped ? 1 : 0,
|
|
67
|
+
requestUnsandboxedExecutionReason: state.requestUnsandboxedExecutionReason,
|
|
68
|
+
outputLineCount: state.outputLineCount,
|
|
69
|
+
nonZeroExitCode: state.exitCode === undefined ? -1 : state.exitCode === 0 ? 0 : 1,
|
|
70
|
+
exitCodeValue: state.exitCode ?? -1,
|
|
71
|
+
timingConnectMs: state.timingConnectMs,
|
|
72
|
+
timingExecuteMs: state.timingExecuteMs,
|
|
73
|
+
pollDurationMs: state.pollDurationMs ?? 0,
|
|
74
|
+
terminalExecutionIdleBeforeTimeout: state.terminalExecutionIdleBeforeTimeout ?? false,
|
|
75
|
+
inputUserChars: state.inputUserChars,
|
|
76
|
+
inputUserSigint: state.inputUserSigint,
|
|
77
|
+
inputToolManualAcceptCount: state.inputToolManualAcceptCount ?? 0,
|
|
78
|
+
inputToolManualRejectCount: state.inputToolManualRejectCount ?? 0,
|
|
79
|
+
inputToolManualChars: state.inputToolManualChars ?? 0,
|
|
80
|
+
inputToolManualShownCount: state.inputToolManualShownCount ?? 0,
|
|
81
|
+
inputToolFreeFormInputShownCount: state.inputToolFreeFormInputShownCount ?? 0,
|
|
82
|
+
inputToolFreeFormInputCount: state.inputToolFreeFormInputCount ?? 0,
|
|
83
|
+
compressOutputEnabled: this._configurationService.getValue(ChatConfiguration.CompressOutputEnabled) === true
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
RunInTerminalToolTelemetry = ( __decorate([( __param(0, ITelemetryService)), ( __param(1, IConfigurationService))], RunInTerminalToolTelemetry));
|
|
88
|
+
const commandAllowList = ( new Set([
|
|
89
|
+
"!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "~", "{", "}", "<", ">",
|
|
90
|
+
".", "7z", "alias", "assoc", "attrib", "awk", "basename", "bg", "blkid", "bunzip2", "bzip2", "cat", "cd", "certutil", "chkdsk", "chmod", "chown", "cipher", "clear", "cls", "cmp", "column", "comm", "compact", "compress", "copy", "cp", "curl", "cut", "date", "dd", "del", "df", "diff", "dig", "dir", "dirname", "diskpart", "dism", "disown", "du", "echo", "env", "erase", "eval", "expand", "export", "fc", "fdisk", "fg", "file", "find", "findstr", "fmt", "fold", "forfiles", "format", "free", "fsck", "git", "gpupdate", "grep", "groupadd", "groups", "gunzip", "gzip", "hash", "head", "hexdump", "history", "host", "htop", "icacls", "id", "ifconfig", "iostat", "ip", "ipconfig", "iptables", "jobs", "jq", "kill", "killall", "less", "ln", "locate", "ls", "lsblk", "lscpu", "lsof", "man", "mkdir", "mklink", "more", "mount", "move", "mv", "nbtstat", "nc/netcat", "net", "netstat", "nice", "nl", "nohup", "nslookup", "nslookup", "od", "passwd", "paste", "pathping", "pause", "pgrep", "ping", "pkill", "powercfg", "pr", "printenv", "ps", "pwd", "query", "rar", "readlink", "realpath", "reg", "rem", "ren", "rename", "renice", "rev", "rm", "rmdir", "robocopy", "route", "rsync", "sc", "schtasks", "scp", "sed", "seq", "set", "setx", "sfc", "shred", "shuf", "shutdown", "sleep", "sort", "source", "split", "ss", "ssh", "stat", "strings", "su", "subst", "sudo", "systeminfo", "tac", "tail", "tar", "tee", "telnet", "test", "time", "top", "touch", "tr", "traceroute", "tracert", "tree", "true", "truncate", "type", "type", "umask", "umount", "unalias", "uname", "uncompress", "unexpand", "uniq", "unlink", "unrar", "unzip", "uptime", "useradd", "usermod", "vmstat", "vol", "watch", "wc", "wget", "where", "whereis", "which", "who", "whoami", "wmic", "xargs", "xcopy", "xxd", "xz", "yes", "zcat", "zip", "zless", "zmore",
|
|
91
|
+
"bitbucket", "bzr", "cvs", "gh", "git", "glab", "hg", "svn", "fossil", "p4",
|
|
92
|
+
"adb", "ansible", "apk", "apt-get", "apt", "aws", "az", "brew", "bundle", "cargo", "choco", "clang", "cmake", "composer", "conan", "conda", "dnf", "docker-compose", "docker", "dotnet", "emacs", "esbuild", "eslint", "flatpak", "flutter", "fnm", "g++", "gcc", "gcloud", "go", "gradle", "helm", "java", "javac", "jest", "julia", "kotlin", "kubectl", "lua", "make", "mocha", "mvn", "n", "nano", "node", "npm", "nvm", "pacman", "perl", "php", "phpunit", "pip", "pipenv", "pnpm", "pod", "podman", "poetry", "python", "r", "rollup", "ruby", "rustc", "rustup", "snap", "swift", "terraform", "tsc", "tslint", "vagrant", "vcpkg", "vi", "vim", "vite", "vitest", "webpack", "yarn", "yum", "zypper",
|
|
93
|
+
"aider", "amp", "claude", "codex", "copilot", "gemini", "toad", "q",
|
|
94
|
+
"taskkill", "taskkill.exe",
|
|
95
|
+
"add-content", "compare-object", "convertfrom-json", "convertto-json", "copy-item", "format-custom", "format-list", "format-table", "format-wide", "get-childitem", "get-command", "get-content", "get-date", "get-help", "get-location", "get-process", "get-random", "get-service", "invoke-expression", "invoke-restmethod", "invoke-webrequest", "join-path", "measure-command", "measure-object", "move-item", "new-item", "out-file", "remove-item", "restart-computer", "select-object", "select-string", "select-xml", "set-acl", "set-content", "set-itemproperty", "sort-object", "split-path", "start-process", "start-sleep", "stop-process", "test-path", "write-host", "write-output",
|
|
96
|
+
"iex", "irm", "iwr", "rd", "ri", "sp", "spps"]));
|
|
97
|
+
|
|
98
|
+
export { RunInTerminalToolTelemetry };
|
package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { IToolInvocationContext, ToolProgress } from "@codingame/monaco-vscode-a
|
|
|
8
8
|
import { Task } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/tasks/common/tasks";
|
|
9
9
|
import { ITaskService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/tasks/common/taskService.service";
|
|
10
10
|
import { ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
11
|
-
import { IExecution, IPollingResult, OutputMonitorState } from "
|
|
11
|
+
import { IExecution, IPollingResult, OutputMonitorState } from "./tools/monitoring/types.js";
|
|
12
12
|
import type { IMarker as IXtermMarker } from "@xterm/xterm";
|
|
13
13
|
export declare function getTaskDefinition(id: string): {
|
|
14
14
|
taskLabel: string;
|
package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js
CHANGED
|
@@ -3,9 +3,9 @@ import { timeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/asyn
|
|
|
3
3
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
4
4
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
5
5
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
6
|
-
import { getOutput } from '
|
|
7
|
-
import { OutputMonitor } from '
|
|
8
|
-
import { OutputMonitorState } from '
|
|
6
|
+
import { getOutput } from './outputHelpers.js';
|
|
7
|
+
import { OutputMonitor } from './tools/monitoring/outputMonitor.js';
|
|
8
|
+
import { OutputMonitorState } from './tools/monitoring/types.js';
|
|
9
9
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
10
10
|
import { isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
11
11
|
|
|
@@ -20,20 +20,22 @@ import { TerminalContextMenuGroup } from '@codingame/monaco-vscode-api/vscode/vs
|
|
|
20
20
|
import { TerminalContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminalContextKey';
|
|
21
21
|
import { TerminalChatAgentToolsCommandId } from '../common/terminal.chatAgentTools.js';
|
|
22
22
|
import { TerminalChatAgentToolsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration';
|
|
23
|
-
import { AgentNetworkDomainSettingId } from '
|
|
23
|
+
import { AgentNetworkDomainSettingId } from '../../../../../platform/networkFilter/common/settings.js';
|
|
24
|
+
import { AgentHostSandboxForwarder } from './agentHostSandboxForwarder.js';
|
|
24
25
|
import { GetTerminalLastCommandTool, GetTerminalLastCommandToolData } from './tools/getTerminalLastCommandTool.js';
|
|
25
26
|
import { KillTerminalTool, KillTerminalToolData } from './tools/killTerminalTool.js';
|
|
26
27
|
import { GetTerminalOutputTool, GetTerminalOutputToolData } from './tools/getTerminalOutputTool.js';
|
|
27
28
|
import { SendToTerminalTool, SendToTerminalToolData } from './tools/sendToTerminalTool.js';
|
|
28
29
|
import { GetTerminalSelectionTool, GetTerminalSelectionToolData } from './tools/getTerminalSelectionTool.js';
|
|
29
30
|
import { ConfirmTerminalCommandTool, ConfirmTerminalCommandToolData } from './tools/runInTerminalConfirmationTool.js';
|
|
30
|
-
import { createRunInTerminalToolData, RunInTerminalTool } from '
|
|
31
|
+
import { createRunInTerminalToolData, RunInTerminalTool } from './tools/runInTerminalTool.js';
|
|
31
32
|
import { CreateAndRunTaskTool, CreateAndRunTaskToolData } from './tools/task/createAndRunTaskTool.js';
|
|
32
33
|
import { GetTaskOutputTool, GetTaskOutputToolData } from './tools/task/getTaskOutputTool.js';
|
|
33
34
|
import { RunTaskTool, RunTaskToolData } from './tools/task/runTaskTool.js';
|
|
34
35
|
import { registerTerminalCompressors } from './tools/terminalOutputCompressor.js';
|
|
35
36
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
36
|
-
import '@codingame/monaco-vscode-
|
|
37
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
38
|
+
import '../common/terminalSandboxService.js';
|
|
37
39
|
import { isNumber } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
38
40
|
|
|
39
41
|
let ShellIntegrationTimeoutMigrationContribution = class ShellIntegrationTimeoutMigrationContribution extends Disposable {
|
|
@@ -137,7 +139,7 @@ let ChatAgentToolsContribution = class ChatAgentToolsContribution extends Dispos
|
|
|
137
139
|
this._register(_toolsService.executeToolSet.addTool(CreateAndRunTaskToolData));
|
|
138
140
|
this._register(_toolsService.readToolSet.addTool(GetTaskOutputToolData));
|
|
139
141
|
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
|
140
|
-
if (e.affectsConfiguration(AgentSandboxSettingId.AgentSandboxEnabled) || e.affectsConfiguration(AgentSandboxSettingId.DeprecatedAgentSandboxEnabled) || e.affectsConfiguration(AgentSandboxSettingId.AgentSandboxAllowUnsandboxedCommands) || e.affectsConfiguration(AgentNetworkDomainSettingId.AllowedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeniedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedOldAllowedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedOldDeniedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedSandboxAllowedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedSandboxDeniedNetworkDomains) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.AgentSandboxLinuxFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxLinuxFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.AgentSandboxMacFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxMacFileSystem)) {
|
|
142
|
+
if (e.affectsConfiguration(AgentSandboxSettingId.AgentSandboxEnabled) || e.affectsConfiguration(AgentSandboxSettingId.AgentSandboxWindowsEnabled) || e.affectsConfiguration(AgentSandboxSettingId.DeprecatedAgentSandboxEnabled) || e.affectsConfiguration(AgentSandboxSettingId.AgentSandboxAllowUnsandboxedCommands) || e.affectsConfiguration(AgentNetworkDomainSettingId.AllowedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeniedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedOldAllowedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedOldDeniedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedSandboxAllowedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedSandboxDeniedNetworkDomains) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.AgentSandboxLinuxFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxLinuxFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.AgentSandboxMacFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxMacFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.AgentSandboxWindowsFileSystem)) {
|
|
141
143
|
this._registerRunInTerminalTool();
|
|
142
144
|
}
|
|
143
145
|
}));
|
|
@@ -168,9 +170,14 @@ registerWorkbenchContribution2(
|
|
|
168
170
|
ChatAgentToolsContribution,
|
|
169
171
|
WorkbenchPhase.AfterRestored
|
|
170
172
|
);
|
|
173
|
+
registerWorkbenchContribution2(
|
|
174
|
+
AgentHostSandboxForwarder.ID,
|
|
175
|
+
AgentHostSandboxForwarder,
|
|
176
|
+
WorkbenchPhase.AfterRestored
|
|
177
|
+
);
|
|
171
178
|
registerActiveInstanceAction({
|
|
172
179
|
id: TerminalChatAgentToolsCommandId.ChatAddTerminalSelection,
|
|
173
|
-
title: ( localize(
|
|
180
|
+
title: ( localize(14636, "Add Terminal Selection to Chat")),
|
|
174
181
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, sharedWhenClause.terminalAvailable)),
|
|
175
182
|
menu: [{
|
|
176
183
|
id: MenuId.TerminalInstanceContext,
|
|
@@ -191,8 +198,8 @@ registerActiveInstanceAction({
|
|
|
191
198
|
chatView.attachmentModel.addContext({
|
|
192
199
|
id: `terminal-selection-${Date.now()}`,
|
|
193
200
|
kind: "generic",
|
|
194
|
-
name: ( localize(
|
|
195
|
-
fullName: ( localize(
|
|
201
|
+
name: ( localize(14637, "Terminal Selection")),
|
|
202
|
+
fullName: ( localize(14637, "Terminal Selection")),
|
|
196
203
|
value: selection,
|
|
197
204
|
icon: Codicon.terminal
|
|
198
205
|
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
|
|
3
|
+
import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service";
|
|
4
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
+
import { ITerminalProfile } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal";
|
|
6
|
+
import { ITerminalLogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal.service";
|
|
7
|
+
import { type ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
8
|
+
import { ITerminalService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
9
|
+
export declare enum ShellIntegrationQuality {
|
|
10
|
+
None = "none",
|
|
11
|
+
Basic = "basic",
|
|
12
|
+
Rich = "rich"
|
|
13
|
+
}
|
|
14
|
+
export interface IToolTerminal {
|
|
15
|
+
instance: ITerminalInstance;
|
|
16
|
+
shellIntegrationQuality: ShellIntegrationQuality;
|
|
17
|
+
receivedUserInput?: boolean;
|
|
18
|
+
isBackground?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare class ToolTerminalCreator {
|
|
21
|
+
private readonly _accessibilityService;
|
|
22
|
+
private readonly _configurationService;
|
|
23
|
+
private readonly _logService;
|
|
24
|
+
private readonly _terminalService;
|
|
25
|
+
/**
|
|
26
|
+
* The shell preference cached for the lifetime of the window. This allows skipping previous
|
|
27
|
+
* shell approaches that failed in previous runs to save time.
|
|
28
|
+
*/
|
|
29
|
+
private static _lastSuccessfulShell;
|
|
30
|
+
constructor(_accessibilityService: IAccessibilityService, _configurationService: IConfigurationService, _logService: ITerminalLogService, _terminalService: ITerminalService);
|
|
31
|
+
createTerminal(shellOrProfile: string | ITerminalProfile, os: OperatingSystem, token: CancellationToken): Promise<IToolTerminal>;
|
|
32
|
+
/**
|
|
33
|
+
* Synchronously update shell integration quality based on the terminal instance's current
|
|
34
|
+
* capabilities. This is a defensive change to avoid no shell integration being sticky
|
|
35
|
+
* https://github.com/microsoft/vscode/issues/260880
|
|
36
|
+
*
|
|
37
|
+
* Only upgrade quality just in case.
|
|
38
|
+
*/
|
|
39
|
+
refreshShellIntegrationQuality(toolTerminal: IToolTerminal): void;
|
|
40
|
+
private _createCopilotTerminal;
|
|
41
|
+
private _waitForShellIntegration;
|
|
42
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { raceTimeout, DeferredPromise, disposableTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
5
|
+
import { CancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
6
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
|
+
import { DisposableStore, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
9
|
+
import { isNumber, isObject, hasKey, isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
10
|
+
import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
11
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
12
|
+
import { TerminalCapability } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities';
|
|
13
|
+
import { PromptInputState } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel';
|
|
14
|
+
import { TerminalSettingId } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal';
|
|
15
|
+
import { ITerminalLogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal.service';
|
|
16
|
+
import { ITerminalService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
|
|
17
|
+
import { getShellIntegrationTimeout } from '@codingame/monaco-vscode-xterm-common/vscode/vs/workbench/contrib/terminal/common/terminalEnvironment';
|
|
18
|
+
import { TerminalChatAgentToolsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration';
|
|
19
|
+
import { isBash, isZsh, isFish, isPowerShell } from './runInTerminalHelpers.js';
|
|
20
|
+
|
|
21
|
+
var ToolTerminalCreator_1;
|
|
22
|
+
var ShellLaunchType;
|
|
23
|
+
(function(ShellLaunchType) {
|
|
24
|
+
ShellLaunchType[ShellLaunchType["Unknown"] = 0] = "Unknown";
|
|
25
|
+
ShellLaunchType[ShellLaunchType["Default"] = 1] = "Default";
|
|
26
|
+
ShellLaunchType[ShellLaunchType["Fallback"] = 2] = "Fallback";
|
|
27
|
+
})(ShellLaunchType || (ShellLaunchType = {}));
|
|
28
|
+
var ShellIntegrationQuality;
|
|
29
|
+
(function(ShellIntegrationQuality) {
|
|
30
|
+
ShellIntegrationQuality["None"] = "none";
|
|
31
|
+
ShellIntegrationQuality["Basic"] = "basic";
|
|
32
|
+
ShellIntegrationQuality["Rich"] = "rich";
|
|
33
|
+
})(ShellIntegrationQuality || (ShellIntegrationQuality = {}));
|
|
34
|
+
let ToolTerminalCreator = class ToolTerminalCreator {
|
|
35
|
+
static {
|
|
36
|
+
ToolTerminalCreator_1 = this;
|
|
37
|
+
}
|
|
38
|
+
static {
|
|
39
|
+
this._lastSuccessfulShell = ShellLaunchType.Unknown;
|
|
40
|
+
}
|
|
41
|
+
constructor(
|
|
42
|
+
_accessibilityService,
|
|
43
|
+
_configurationService,
|
|
44
|
+
_logService,
|
|
45
|
+
_terminalService
|
|
46
|
+
) {
|
|
47
|
+
this._accessibilityService = _accessibilityService;
|
|
48
|
+
this._configurationService = _configurationService;
|
|
49
|
+
this._logService = _logService;
|
|
50
|
+
this._terminalService = _terminalService;
|
|
51
|
+
}
|
|
52
|
+
async createTerminal(shellOrProfile, os, token) {
|
|
53
|
+
const instance = await this._createCopilotTerminal(shellOrProfile, os);
|
|
54
|
+
const toolTerminal = {
|
|
55
|
+
instance,
|
|
56
|
+
shellIntegrationQuality: ShellIntegrationQuality.None
|
|
57
|
+
};
|
|
58
|
+
let processReadyTimestamp = 0;
|
|
59
|
+
const initResult = await Promise.any([
|
|
60
|
+
instance.processReady.then(() => processReadyTimestamp = Date.now()),
|
|
61
|
+
Event.toPromise(instance.onExit)
|
|
62
|
+
]);
|
|
63
|
+
if (!isNumber(initResult) && isObject(initResult) && hasKey(initResult, {
|
|
64
|
+
message: true
|
|
65
|
+
})) {
|
|
66
|
+
throw ( new Error(initResult.message));
|
|
67
|
+
}
|
|
68
|
+
const siInjectionEnabled = this._configurationService.getValue(TerminalSettingId.ShellIntegrationEnabled) === true;
|
|
69
|
+
const waitTime = getShellIntegrationTimeout(
|
|
70
|
+
this._configurationService,
|
|
71
|
+
siInjectionEnabled,
|
|
72
|
+
instance.hasRemoteAuthority,
|
|
73
|
+
processReadyTimestamp
|
|
74
|
+
);
|
|
75
|
+
if (ToolTerminalCreator_1._lastSuccessfulShell !== ShellLaunchType.Fallback || siInjectionEnabled) {
|
|
76
|
+
this._logService.info(
|
|
77
|
+
`ToolTerminalCreator#createTerminal: Waiting ${waitTime}ms for shell integration`
|
|
78
|
+
);
|
|
79
|
+
const shellIntegrationQuality = await this._waitForShellIntegration(instance, waitTime);
|
|
80
|
+
if (token.isCancellationRequested) {
|
|
81
|
+
instance.dispose();
|
|
82
|
+
throw ( new CancellationError());
|
|
83
|
+
}
|
|
84
|
+
if (shellIntegrationQuality === ShellIntegrationQuality.Rich) {
|
|
85
|
+
const commandDetection = instance.capabilities.get(TerminalCapability.CommandDetection);
|
|
86
|
+
if (commandDetection?.promptInputModel.state === PromptInputState.Unknown) {
|
|
87
|
+
this._logService.info(
|
|
88
|
+
`ToolTerminalCreator#createTerminal: Waiting up to 2s for PromptInputModel state to change`
|
|
89
|
+
);
|
|
90
|
+
const didStart = await raceTimeout(Event.toPromise(commandDetection.onCommandStarted), 2000);
|
|
91
|
+
if (!didStart) {
|
|
92
|
+
this._logService.info(
|
|
93
|
+
`ToolTerminalCreator#createTerminal: PromptInputModel state did not change within timeout`
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (shellIntegrationQuality !== ShellIntegrationQuality.None) {
|
|
99
|
+
ToolTerminalCreator_1._lastSuccessfulShell = ShellLaunchType.Default;
|
|
100
|
+
toolTerminal.shellIntegrationQuality = shellIntegrationQuality;
|
|
101
|
+
return toolTerminal;
|
|
102
|
+
}
|
|
103
|
+
} else {
|
|
104
|
+
this._logService.info(
|
|
105
|
+
`ToolTerminalCreator#createTerminal: Skipping wait for shell integration - last successful launch type ${ToolTerminalCreator_1._lastSuccessfulShell}`
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
ToolTerminalCreator_1._lastSuccessfulShell = ShellLaunchType.Fallback;
|
|
109
|
+
return toolTerminal;
|
|
110
|
+
}
|
|
111
|
+
refreshShellIntegrationQuality(toolTerminal) {
|
|
112
|
+
const commandDetection = toolTerminal.instance.capabilities.get(TerminalCapability.CommandDetection);
|
|
113
|
+
if (commandDetection) {
|
|
114
|
+
if (toolTerminal.shellIntegrationQuality === ShellIntegrationQuality.None || toolTerminal.shellIntegrationQuality === ShellIntegrationQuality.Basic) {
|
|
115
|
+
toolTerminal.shellIntegrationQuality = commandDetection.hasRichCommandDetection ? ShellIntegrationQuality.Rich : ShellIntegrationQuality.Basic;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
_createCopilotTerminal(shellOrProfile, os) {
|
|
120
|
+
const shellPath = isString(shellOrProfile) ? shellOrProfile : shellOrProfile.path;
|
|
121
|
+
const env = {
|
|
122
|
+
AI_AGENT: "github_copilot_vscode_agent",
|
|
123
|
+
COPILOT_AGENT: "1",
|
|
124
|
+
GIT_PAGER: "cat",
|
|
125
|
+
GIT_MERGE_AUTOEDIT: "no",
|
|
126
|
+
GIT_EDITOR: ":"
|
|
127
|
+
};
|
|
128
|
+
const preventShellHistory = this._configurationService.getValue(TerminalChatAgentToolsSettingId.PreventShellHistory) === true;
|
|
129
|
+
if (preventShellHistory) {
|
|
130
|
+
if (isBash(shellPath, os) || isZsh(shellPath, os) || isFish(shellPath, os) || isPowerShell(shellPath, os)) {
|
|
131
|
+
env["VSCODE_PREVENT_SHELL_HISTORY"] = "1";
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (isZsh(shellPath, os)) {
|
|
135
|
+
env["VSCODE_AGENT_ZSH_FIXUPS"] = "1";
|
|
136
|
+
}
|
|
137
|
+
const config = {
|
|
138
|
+
icon: ThemeIcon.fromId(Codicon.chatSparkle.id),
|
|
139
|
+
hideFromUser: true,
|
|
140
|
+
forcePersist: true,
|
|
141
|
+
env
|
|
142
|
+
};
|
|
143
|
+
if (isString(shellOrProfile)) {
|
|
144
|
+
config.executable = shellOrProfile;
|
|
145
|
+
} else {
|
|
146
|
+
config.executable = shellOrProfile.path;
|
|
147
|
+
config.args = shellOrProfile.args;
|
|
148
|
+
config.icon = shellOrProfile.icon ?? config.icon;
|
|
149
|
+
config.color = shellOrProfile.color;
|
|
150
|
+
config.env = {
|
|
151
|
+
...config.env,
|
|
152
|
+
...shellOrProfile.env
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
return this._terminalService.createTerminal({
|
|
156
|
+
config
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
_waitForShellIntegration(instance, timeoutMs) {
|
|
160
|
+
const store = ( new DisposableStore());
|
|
161
|
+
const result = ( new DeferredPromise());
|
|
162
|
+
const isScreenReaderOptimized = this._accessibilityService.isScreenReaderOptimized();
|
|
163
|
+
const effectiveTimeoutMs = timeoutMs > 0 && isScreenReaderOptimized ? timeoutMs + 3000 : timeoutMs;
|
|
164
|
+
this._logService.info(
|
|
165
|
+
`ToolTerminalCreator#_waitForShellIntegration: base ${timeoutMs}ms, effective ${effectiveTimeoutMs}ms, screenReaderOptimized=${isScreenReaderOptimized}`
|
|
166
|
+
);
|
|
167
|
+
const siNoneTimer = store.add(( new MutableDisposable()));
|
|
168
|
+
siNoneTimer.value = disposableTimeout(() => {
|
|
169
|
+
this._logService.info(
|
|
170
|
+
`ToolTerminalCreator#_waitForShellIntegration: Timed out ${effectiveTimeoutMs}ms, using no SI`
|
|
171
|
+
);
|
|
172
|
+
result.complete(ShellIntegrationQuality.None);
|
|
173
|
+
}, effectiveTimeoutMs);
|
|
174
|
+
if (instance.capabilities.get(TerminalCapability.CommandDetection)?.hasRichCommandDetection) {
|
|
175
|
+
siNoneTimer.clear();
|
|
176
|
+
this._logService.info(
|
|
177
|
+
`ToolTerminalCreator#_waitForShellIntegration: Rich SI available immediately`
|
|
178
|
+
);
|
|
179
|
+
result.complete(ShellIntegrationQuality.Rich);
|
|
180
|
+
} else {
|
|
181
|
+
const onSetRichCommandDetection = store.add(
|
|
182
|
+
this._terminalService.createOnInstanceCapabilityEvent(TerminalCapability.CommandDetection, e => e.onSetRichCommandDetection)
|
|
183
|
+
);
|
|
184
|
+
store.add(onSetRichCommandDetection.event(e => {
|
|
185
|
+
if (e.instance !== instance) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
siNoneTimer.clear();
|
|
189
|
+
this._logService.info(
|
|
190
|
+
`ToolTerminalCreator#_waitForShellIntegration: Rich SI available eventually`
|
|
191
|
+
);
|
|
192
|
+
result.complete(ShellIntegrationQuality.Rich);
|
|
193
|
+
}));
|
|
194
|
+
const commandDetection = instance.capabilities.get(TerminalCapability.CommandDetection);
|
|
195
|
+
if (commandDetection) {
|
|
196
|
+
siNoneTimer.clear();
|
|
197
|
+
store.add(disposableTimeout(() => {
|
|
198
|
+
this._logService.info(
|
|
199
|
+
`ToolTerminalCreator#_waitForShellIntegration: Timed out 200ms, using basic SI`
|
|
200
|
+
);
|
|
201
|
+
result.complete(ShellIntegrationQuality.Basic);
|
|
202
|
+
}, 200));
|
|
203
|
+
} else {
|
|
204
|
+
store.add(instance.capabilities.onDidAddCommandDetectionCapability(e => {
|
|
205
|
+
siNoneTimer.clear();
|
|
206
|
+
store.add(disposableTimeout(() => {
|
|
207
|
+
this._logService.info(
|
|
208
|
+
`ToolTerminalCreator#_waitForShellIntegration: Timed out 200ms, using basic SI (via listener)`
|
|
209
|
+
);
|
|
210
|
+
result.complete(ShellIntegrationQuality.Basic);
|
|
211
|
+
}, 200));
|
|
212
|
+
}));
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
result.p.finally(() => {
|
|
216
|
+
this._logService.info(
|
|
217
|
+
`ToolTerminalCreator#_waitForShellIntegration: Promise complete, disposing store`
|
|
218
|
+
);
|
|
219
|
+
store.dispose();
|
|
220
|
+
});
|
|
221
|
+
return result.p;
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
ToolTerminalCreator = ToolTerminalCreator_1 = ( __decorate([( __param(0, IAccessibilityService)), ( __param(1, IConfigurationService)), ( __param(2, ITerminalLogService)), ( __param(3, ITerminalService))], ToolTerminalCreator));
|
|
225
|
+
|
|
226
|
+
export { ShellIntegrationQuality, ToolTerminalCreator };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import type { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
|
|
3
|
+
import type { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { ITerminalChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
7
|
+
import type { IAutoApproveRule, INpmScriptAutoApproveRule } from "../commandLineAnalyzer.js";
|
|
8
|
+
export interface ICommandApprovalResultWithReason {
|
|
9
|
+
result: ICommandApprovalResult;
|
|
10
|
+
reason: string;
|
|
11
|
+
rule?: IAutoApproveRule | INpmScriptAutoApproveRule;
|
|
12
|
+
}
|
|
13
|
+
export type ICommandApprovalResult = "approved" | "denied" | "noMatch";
|
|
14
|
+
export declare class CommandLineAutoApprover extends Disposable {
|
|
15
|
+
private readonly _configurationService;
|
|
16
|
+
private readonly _terminalChatService;
|
|
17
|
+
private _denyListRules;
|
|
18
|
+
private _allowListRules;
|
|
19
|
+
private _allowListCommandLineRules;
|
|
20
|
+
private _denyListCommandLineRules;
|
|
21
|
+
private readonly _npmScriptAutoApprover;
|
|
22
|
+
constructor(_configurationService: IConfigurationService, instantiationService: IInstantiationService, _terminalChatService: ITerminalChatService);
|
|
23
|
+
updateConfiguration(): void;
|
|
24
|
+
isCommandAutoApproved(command: string, shell: string, os: OperatingSystem, cwd: URI | undefined, chatSessionResource?: URI): Promise<ICommandApprovalResultWithReason>;
|
|
25
|
+
isCommandLineAutoApproved(commandLine: string, chatSessionResource?: URI): ICommandApprovalResultWithReason;
|
|
26
|
+
private _getSessionRules;
|
|
27
|
+
private _commandMatchesRule;
|
|
28
|
+
private _mapAutoApproveConfigToRules;
|
|
29
|
+
private _convertAutoApproveEntryToRegex;
|
|
30
|
+
private _doConvertAutoApproveEntryToRegex;
|
|
31
|
+
}
|