@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,29 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
|
+
import { ITerminalSandboxService } from "../../common/terminalSandboxService.js";
|
|
4
|
+
import type { IOutputAnalyzer, IOutputAnalyzerOptions } from "./outputAnalyzer.js";
|
|
5
|
+
export declare class SandboxOutputAnalyzer extends Disposable implements IOutputAnalyzer {
|
|
6
|
+
private readonly _sandboxService;
|
|
7
|
+
private readonly _configurationService;
|
|
8
|
+
constructor(_sandboxService: ITerminalSandboxService, _configurationService: IConfigurationService);
|
|
9
|
+
analyze(options: IOutputAnalyzerOptions): Promise<string | undefined>;
|
|
10
|
+
/**
|
|
11
|
+
* Checks whether the command output contains strings that typically indicate
|
|
12
|
+
* the sandbox blocked the operation. Used when exit code is unavailable.
|
|
13
|
+
*
|
|
14
|
+
* The output may contain newlines inserted by terminal wrapping, so we
|
|
15
|
+
* strip them before testing.
|
|
16
|
+
*/
|
|
17
|
+
private _outputLooksSandboxBlocked;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Checks whether the command output contains strings that typically indicate
|
|
21
|
+
* the sandbox blocked the operation. The output may contain newlines inserted
|
|
22
|
+
* by terminal wrapping, so we strip them before testing.
|
|
23
|
+
*/
|
|
24
|
+
export declare function outputLooksSandboxBlocked(output: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Checks whether output clearly suggests a network failure. This is used only
|
|
27
|
+
* to prevent automatic unsandboxing; retry selection is left to the model.
|
|
28
|
+
*/
|
|
29
|
+
export declare function outputLooksSandboxNetworkBlocked(output: string): boolean;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { OperatingSystem } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
5
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
6
|
+
import '../../common/terminalSandboxService.js';
|
|
7
|
+
import { TerminalChatAgentToolsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration';
|
|
8
|
+
import { AgentNetworkDomainSettingId } from '../../../../../../platform/networkFilter/common/settings.js';
|
|
9
|
+
import { AgentSandboxSettingId } from '@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/settings';
|
|
10
|
+
import { ITerminalSandboxService } from '@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/terminalSandboxService.service';
|
|
11
|
+
|
|
12
|
+
let SandboxOutputAnalyzer = class SandboxOutputAnalyzer extends Disposable {
|
|
13
|
+
constructor(_sandboxService, _configurationService) {
|
|
14
|
+
super();
|
|
15
|
+
this._sandboxService = _sandboxService;
|
|
16
|
+
this._configurationService = _configurationService;
|
|
17
|
+
}
|
|
18
|
+
async analyze(options) {
|
|
19
|
+
if (!options.isSandboxWrapped) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
const knownFailure = options.exitCode !== undefined && options.exitCode !== 0;
|
|
23
|
+
const suspectedFailure = !knownFailure && options.exitCode === undefined && this._outputLooksSandboxBlocked(options.exitResult);
|
|
24
|
+
if (!knownFailure && !suspectedFailure) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
const os = await this._sandboxService.getOS();
|
|
28
|
+
let fileSystemSetting;
|
|
29
|
+
switch (os) {
|
|
30
|
+
case OperatingSystem.Linux:
|
|
31
|
+
fileSystemSetting = TerminalChatAgentToolsSettingId.AgentSandboxLinuxFileSystem;
|
|
32
|
+
break;
|
|
33
|
+
case OperatingSystem.Windows:
|
|
34
|
+
fileSystemSetting = TerminalChatAgentToolsSettingId.AgentSandboxWindowsFileSystem;
|
|
35
|
+
break;
|
|
36
|
+
default:
|
|
37
|
+
fileSystemSetting = TerminalChatAgentToolsSettingId.AgentSandboxMacFileSystem;
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
const prefix = knownFailure ? "Command failed while running in sandboxed mode. If the command failed due to sandboxing:" : "Command ran in sandboxed mode and may have been blocked by the sandbox. If the command failed due to sandboxing:";
|
|
41
|
+
const retryWithAllowNetworkRequests = this._configurationService.getValue(AgentSandboxSettingId.AgentSandboxRetryWithAllowNetworkRequests) === true;
|
|
42
|
+
const networkRecovery = retryWithAllowNetworkRequests ? "- If you determine from the output that the failure was caused by blocked network access, immediately retry the command with requestAllowNetwork=true and provide requestAllowNetworkReason. This keeps the command sandboxed with unrestricted network access and automatically shows a confirmation prompt to the user.\n- If it is not a network restriction, or the command still fails after retrying with requestAllowNetwork=true, immediately retry the command with requestUnsandboxedExecution=true and provide requestUnsandboxedExecutionReason. Do NOT ask the user - setting this flag automatically shows a confirmation prompt to the user." : "- Sandboxed execution with unrestricted network access is disabled by chat.agent.sandbox.retryWithAllowNetworkRequests. Do not set requestAllowNetwork=true.\n- If the command cannot be made to work by updating sandbox rules, immediately retry it with requestUnsandboxedExecution=true and provide requestUnsandboxedExecutionReason. Do NOT ask the user - setting this flag automatically shows a confirmation prompt to the user.";
|
|
43
|
+
return `${prefix}
|
|
44
|
+
- If it would be reasonable to extend the sandbox rules, work with the user to update allowWrite for file system access problems in ${fileSystemSetting}, or to add required domains to ${AgentNetworkDomainSettingId.AllowedNetworkDomains}.
|
|
45
|
+
${networkRecovery}
|
|
46
|
+
|
|
47
|
+
Here is the output of the command:\n`;
|
|
48
|
+
}
|
|
49
|
+
_outputLooksSandboxBlocked(output) {
|
|
50
|
+
return outputLooksSandboxBlocked(output);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
SandboxOutputAnalyzer = ( __decorate([( __param(0, ITerminalSandboxService)), ( __param(1, IConfigurationService))], SandboxOutputAnalyzer));
|
|
54
|
+
function outputLooksSandboxBlocked(output) {
|
|
55
|
+
const normalized = output.replace(/\n/g, " ");
|
|
56
|
+
return /Operation not permitted|Permission denied|Read-only file system|sandbox-exec|bwrap|sandbox_violation/i.test(normalized);
|
|
57
|
+
}
|
|
58
|
+
function outputLooksSandboxNetworkBlocked(output) {
|
|
59
|
+
const normalized = output.replace(/\n/g, " ");
|
|
60
|
+
return /Could not resolve host|Temporary failure in name resolution|Name or service not known|EAI_AGAIN|ENETUNREACH|Network is unreachable|network (?:access )?(?:blocked|disabled)|(?:connect|socket).*(?:Operation not permitted|Permission denied)|(?:Operation not permitted|Permission denied).*(?:connect|socket)/i.test(normalized);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { SandboxOutputAnalyzer, outputLooksSandboxBlocked, outputLooksSandboxNetworkBlocked };
|
|
@@ -13,16 +13,16 @@ import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workb
|
|
|
13
13
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
14
14
|
import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
15
15
|
import { ITerminalService, ITerminalChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
|
|
16
|
-
import { getOutput } from '
|
|
17
|
-
import { buildCommandDisplayText, isMultilineCommand, normalizeCommandForExecution } from '
|
|
18
|
-
import { RunInTerminalTool } from '
|
|
19
|
-
import { isSessionAutoApproveLevel } from '
|
|
16
|
+
import { getOutput } from '../outputHelpers.js';
|
|
17
|
+
import { buildCommandDisplayText, isMultilineCommand, normalizeCommandForExecution } from '../runInTerminalHelpers.js';
|
|
18
|
+
import { RunInTerminalTool } from './runInTerminalTool.js';
|
|
19
|
+
import { isSessionAutoApproveLevel } from './terminalToolAutoApprove.js';
|
|
20
20
|
import { TerminalToolId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/terminalToolIds';
|
|
21
21
|
|
|
22
22
|
const SendToTerminalToolData = {
|
|
23
23
|
id: TerminalToolId.SendToTerminal,
|
|
24
24
|
toolReferenceName: "sendToTerminal",
|
|
25
|
-
displayName: ( localize(
|
|
25
|
+
displayName: ( localize(14734, "Send to Terminal")),
|
|
26
26
|
modelDescription: `Send input text to an active terminal execution (identified by the \`id\` returned from ${TerminalToolId.RunInTerminal}). The 'command' field may be empty or whitespace to press Enter (useful for interactive prompts). By default, returns the last 20 lines of terminal output captured shortly after sending. Set 'waitForOutput' to true for interactive programs (games, REPLs, etc.) to wait until the terminal becomes idle before returning output — this gives you the program's response to your input.`,
|
|
27
27
|
icon: Codicon.terminal,
|
|
28
28
|
source: ToolDataSource.Internal,
|
|
@@ -90,16 +90,16 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
|
|
|
90
90
|
const pastTenseMessage = ( new MarkdownString());
|
|
91
91
|
const questionText = this._getQuestionContextForTerminal(context.chatSessionResource, args);
|
|
92
92
|
if (isEmptyInput) {
|
|
93
|
-
invocationMessage.appendMarkdown(( localize(
|
|
94
|
-
pastTenseMessage.appendMarkdown(( localize(
|
|
93
|
+
invocationMessage.appendMarkdown(( localize(14735, "Pressing `Enter` in terminal")));
|
|
94
|
+
pastTenseMessage.appendMarkdown(( localize(14736, "Pressed `Enter` in terminal")));
|
|
95
95
|
} else {
|
|
96
96
|
const displayCommand = buildCommandDisplayText(args.command);
|
|
97
97
|
const safeInlineCode = appendEscapedMarkdownInlineCode(displayCommand);
|
|
98
|
-
invocationMessage.appendMarkdown(( localize(
|
|
99
|
-
pastTenseMessage.appendMarkdown(( localize(
|
|
98
|
+
invocationMessage.appendMarkdown(( localize(14737, "Sending {0} to terminal", safeInlineCode)));
|
|
99
|
+
pastTenseMessage.appendMarkdown(( localize(14738, "Sent {0} to terminal", safeInlineCode)));
|
|
100
100
|
}
|
|
101
101
|
if (questionText) {
|
|
102
|
-
const replyPrefix = ` (${( localize(
|
|
102
|
+
const replyPrefix = ` (${( localize(14739, "replying to: "))}`;
|
|
103
103
|
invocationMessage.appendMarkdown(replyPrefix);
|
|
104
104
|
invocationMessage.appendText(questionText);
|
|
105
105
|
invocationMessage.appendMarkdown(")");
|
|
@@ -114,15 +114,15 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
|
|
|
114
114
|
}
|
|
115
115
|
}));
|
|
116
116
|
const safeTerminalLabel = appendEscapedMarkdownInlineCode(terminalLabel);
|
|
117
|
-
const baseMessage = isEmptyInput ? ( localize(
|
|
118
|
-
|
|
117
|
+
const baseMessage = isEmptyInput ? ( localize(14740, "Press `Enter` in terminal {0}", safeTerminalLabel)) : ( localize(
|
|
118
|
+
14741,
|
|
119
119
|
"Run {0} in terminal {1}",
|
|
120
120
|
appendEscapedMarkdownInlineCode(buildCommandDisplayText(args.command)),
|
|
121
121
|
safeTerminalLabel
|
|
122
122
|
));
|
|
123
123
|
if (instanceId !== undefined) {
|
|
124
124
|
const focusUri = createCommandUri(FocusTerminalByIdCommandId, instanceId);
|
|
125
|
-
confirmationMessage.appendMarkdown(`${baseMessage} — [${( localize(
|
|
125
|
+
confirmationMessage.appendMarkdown(`${baseMessage} — [${( localize(14742, "Focus Terminal"))}](${focusUri})`);
|
|
126
126
|
} else {
|
|
127
127
|
confirmationMessage.appendMarkdown(baseMessage);
|
|
128
128
|
}
|
|
@@ -136,7 +136,7 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
|
|
|
136
136
|
const isAnsweringQuestion = questionText !== undefined;
|
|
137
137
|
const shouldShowConfirmation = (!isSessionAutoApproved && !isAnsweringQuestion) || context.forceConfirmationReason !== undefined;
|
|
138
138
|
const confirmationMessages = shouldShowConfirmation ? {
|
|
139
|
-
title: ( localize(
|
|
139
|
+
title: ( localize(14743, "Send to Terminal")),
|
|
140
140
|
message: confirmationMessage,
|
|
141
141
|
allowAutoConfirm: undefined
|
|
142
142
|
} : undefined;
|
|
@@ -79,7 +79,7 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
_progress.report({
|
|
82
|
-
message: ( new MarkdownString(( localize(
|
|
82
|
+
message: ( new MarkdownString(( localize(14744, "Resolving the task"))))
|
|
83
83
|
});
|
|
84
84
|
let task;
|
|
85
85
|
const start = Date.now();
|
|
@@ -96,7 +96,7 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
|
|
|
96
96
|
kind: "text",
|
|
97
97
|
value: `Task not found: ${args.task.label}`
|
|
98
98
|
}],
|
|
99
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
99
|
+
toolResultMessage: ( new MarkdownString(( localize(14745, "Task not found: `{0}`", args.task.label))))
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
const preRunMarkersStore = ( new DisposableStore());
|
|
@@ -113,7 +113,7 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
_progress.report({
|
|
116
|
-
message: ( new MarkdownString(( localize(
|
|
116
|
+
message: ( new MarkdownString(( localize(14746, "Running task `{0}`", args.task.label))))
|
|
117
117
|
});
|
|
118
118
|
const raceResult = await Promise.race([
|
|
119
119
|
this._tasksService.run(task, undefined, TaskRunSource.ChatAgent),
|
|
@@ -131,7 +131,7 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
|
|
|
131
131
|
value: `Task started but no terminal was found for: ${args.task.label}`
|
|
132
132
|
}],
|
|
133
133
|
toolResultMessage: ( new MarkdownString(( localize(
|
|
134
|
-
|
|
134
|
+
14747,
|
|
135
135
|
"Task started but no terminal was found for: `{0}`",
|
|
136
136
|
args.task.label
|
|
137
137
|
))))
|
|
@@ -201,26 +201,26 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
|
|
|
201
201
|
const allTasks = await this._tasksService.tasks();
|
|
202
202
|
if (allTasks?.find(t => t._label === task.label)) {
|
|
203
203
|
return {
|
|
204
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
205
|
-
pastTenseMessage: ( new MarkdownString(( localize(
|
|
204
|
+
invocationMessage: ( new MarkdownString(( localize(14748, "Task `{0}` already exists.", task.label)))),
|
|
205
|
+
pastTenseMessage: ( new MarkdownString(( localize(14749, "Task `{0}` already exists.", task.label)))),
|
|
206
206
|
confirmationMessages: undefined
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
209
|
const activeTasks = await this._tasksService.getActiveTasks();
|
|
210
210
|
if (activeTasks.find(t => t._label === task.label)) {
|
|
211
211
|
return {
|
|
212
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
213
|
-
pastTenseMessage: ( new MarkdownString(( localize(
|
|
212
|
+
invocationMessage: ( new MarkdownString(( localize(14750, "Task `{0}` is already running.", task.label)))),
|
|
213
|
+
pastTenseMessage: ( new MarkdownString(( localize(14750, "Task `{0}` is already running.", task.label)))),
|
|
214
214
|
confirmationMessages: undefined
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
return {
|
|
218
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
219
|
-
pastTenseMessage: ( new MarkdownString(( localize(
|
|
218
|
+
invocationMessage: ( new MarkdownString(( localize(14751, "Created task `{0}`", task.label)))),
|
|
219
|
+
pastTenseMessage: ( new MarkdownString(( localize(14752, "Created task `{0}`", task.label)))),
|
|
220
220
|
confirmationMessages: {
|
|
221
|
-
title: ( localize(
|
|
221
|
+
title: ( localize(14753, "Allow task creation and execution?")),
|
|
222
222
|
message: ( new MarkdownString(( localize(
|
|
223
|
-
|
|
223
|
+
14754,
|
|
224
224
|
"A task `{0}` with command `{1}`{2} will be created.",
|
|
225
225
|
task.label,
|
|
226
226
|
task.command,
|
|
@@ -235,9 +235,9 @@ const CreateAndRunTaskToolData = {
|
|
|
235
235
|
id: TerminalToolId.CreateAndRunTask,
|
|
236
236
|
toolReferenceName: "createAndRunTask",
|
|
237
237
|
legacyToolReferenceFullNames: ["runTasks/createAndRunTask"],
|
|
238
|
-
displayName: ( localize(
|
|
238
|
+
displayName: ( localize(14755, "Create and run Task")),
|
|
239
239
|
modelDescription: "Creates and runs a build, run, or custom task for the workspace by generating or adding to a tasks.json file based on the project structure (such as package.json or README.md). If the user asks to build, run, launch and they have no tasks.json file, use this tool. If they ask to create or add a task, use this tool.",
|
|
240
|
-
userDescription: ( localize(
|
|
240
|
+
userDescription: ( localize(14756, "Create and run a task in the workspace")),
|
|
241
241
|
source: ToolDataSource.Internal,
|
|
242
242
|
inputSchema: {
|
|
243
243
|
"type": "object",
|
|
@@ -17,7 +17,7 @@ const GetTaskOutputToolData = {
|
|
|
17
17
|
id: TerminalToolId.GetTaskOutput,
|
|
18
18
|
toolReferenceName: "getTaskOutput",
|
|
19
19
|
legacyToolReferenceFullNames: ["runTasks/getTaskOutput"],
|
|
20
|
-
displayName: ( localize(
|
|
20
|
+
displayName: ( localize(14757, "Get Task Output")),
|
|
21
21
|
modelDescription: "Get the output of a task",
|
|
22
22
|
source: ToolDataSource.Internal,
|
|
23
23
|
inputSchema: {
|
|
@@ -63,19 +63,19 @@ let GetTaskOutputTool = class GetTaskOutputTool extends Disposable {
|
|
|
63
63
|
);
|
|
64
64
|
if (!task) {
|
|
65
65
|
return {
|
|
66
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
66
|
+
invocationMessage: ( new MarkdownString(( localize(14758, "Task not found: `{0}`", args.id))))
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
const taskLabel = task._label;
|
|
70
70
|
const activeTasks = await this._tasksService.getActiveTasks();
|
|
71
71
|
if (activeTasks.includes(task)) {
|
|
72
72
|
return {
|
|
73
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
73
|
+
invocationMessage: ( new MarkdownString(( localize(14759, "The task `{0}` is already running.", taskLabel))))
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
return {
|
|
77
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
78
|
-
pastTenseMessage: ( new MarkdownString(( localize(
|
|
77
|
+
invocationMessage: ( new MarkdownString(( localize(14760, "Checking output for task `{0}`", taskLabel)))),
|
|
78
|
+
pastTenseMessage: ( new MarkdownString(( localize(14761, "Checked output for task `{0}`", taskLabel))))
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
async invoke(invocation, _countTokens, _progress, token) {
|
|
@@ -95,7 +95,7 @@ let GetTaskOutputTool = class GetTaskOutputTool extends Disposable {
|
|
|
95
95
|
kind: "text",
|
|
96
96
|
value: `Task not found: ${args.id}`
|
|
97
97
|
}],
|
|
98
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
98
|
+
toolResultMessage: ( new MarkdownString(( localize(14758, "Task not found: `{0}`", args.id))))
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
const dependencyTasks = await resolveDependencyTasks(task, args.workspaceFolder, this._configurationService, this._tasksService);
|
|
@@ -110,7 +110,7 @@ let GetTaskOutputTool = class GetTaskOutputTool extends Disposable {
|
|
|
110
110
|
kind: "text",
|
|
111
111
|
value: `Terminal not found for task ${taskLabel}`
|
|
112
112
|
}],
|
|
113
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
113
|
+
toolResultMessage: ( new MarkdownString(( localize(14762, "Terminal not found for task `{0}`", taskLabel))))
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
const startMarkersByTerminalInstanceId = task.configurationProperties.isBackground ? ( new Map()) : undefined;
|
|
@@ -56,7 +56,7 @@ let RunTaskTool = class RunTaskTool {
|
|
|
56
56
|
kind: "text",
|
|
57
57
|
value: `Task not found: ${args.id}`
|
|
58
58
|
}],
|
|
59
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
59
|
+
toolResultMessage: ( new MarkdownString(( localize(14763, "Task not found: `{0}`", args.id))))
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
const taskLabel = task._label;
|
|
@@ -67,7 +67,7 @@ let RunTaskTool = class RunTaskTool {
|
|
|
67
67
|
kind: "text",
|
|
68
68
|
value: `The task ${taskLabel} is already running.`
|
|
69
69
|
}],
|
|
70
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
70
|
+
toolResultMessage: ( new MarkdownString(( localize(14764, "The task `{0}` is already running.", taskLabel))))
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
const dependencyTasks = await resolveDependencyTasks(task, args.workspaceFolder, this._configurationService, this._tasksService);
|
|
@@ -93,7 +93,7 @@ let RunTaskTool = class RunTaskTool {
|
|
|
93
93
|
kind: "text",
|
|
94
94
|
value: `Task started but no terminal was found for: ${taskLabel}`
|
|
95
95
|
}],
|
|
96
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
96
|
+
toolResultMessage: ( new MarkdownString(( localize(14765, "Task started but no terminal was found for: `{0}`", taskLabel))))
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
const terminals = this._terminalService.instances.filter(t => ( resources.some(r => r.path === t.resource.path && r.scheme === t.resource.scheme)));
|
|
@@ -103,7 +103,7 @@ let RunTaskTool = class RunTaskTool {
|
|
|
103
103
|
kind: "text",
|
|
104
104
|
value: `Task started but no terminal was found for: ${taskLabel}`
|
|
105
105
|
}],
|
|
106
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
106
|
+
toolResultMessage: ( new MarkdownString(( localize(14765, "Task started but no terminal was found for: `{0}`", taskLabel))))
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
const store = ( new DisposableStore());
|
|
@@ -178,29 +178,29 @@ let RunTaskTool = class RunTaskTool {
|
|
|
178
178
|
);
|
|
179
179
|
if (!task) {
|
|
180
180
|
return {
|
|
181
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
181
|
+
invocationMessage: ( new MarkdownString(( localize(14763, "Task not found: `{0}`", args.id))))
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
const taskLabel = task._label;
|
|
185
185
|
const activeTasks = await this._tasksService.getActiveTasks();
|
|
186
186
|
if (task && activeTasks.includes(task)) {
|
|
187
187
|
return {
|
|
188
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
188
|
+
invocationMessage: ( new MarkdownString(( localize(14766, "The task is already running."))))
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
191
|
if (await this._isTaskActive(task)) {
|
|
192
192
|
return {
|
|
193
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
194
|
-
pastTenseMessage: ( new MarkdownString(( localize(
|
|
193
|
+
invocationMessage: ( new MarkdownString(( localize(14767, "`{0}` is already running.", taskLabel)))),
|
|
194
|
+
pastTenseMessage: ( new MarkdownString(( localize(14768, "`{0}` was already running.", taskLabel)))),
|
|
195
195
|
confirmationMessages: undefined
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
198
|
return {
|
|
199
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
200
|
-
pastTenseMessage: ( new MarkdownString(task?.configurationProperties.isBackground ? ( localize(
|
|
199
|
+
invocationMessage: ( new MarkdownString(( localize(14769, "Running `{0}`", taskLabel)))),
|
|
200
|
+
pastTenseMessage: ( new MarkdownString(task?.configurationProperties.isBackground ? ( localize(14770, "Started `{0}`", taskLabel)) : ( localize(14771, "Ran `{0}`", taskLabel)))),
|
|
201
201
|
confirmationMessages: task ? {
|
|
202
|
-
title: ( localize(
|
|
203
|
-
message: ( localize(
|
|
202
|
+
title: ( localize(14772, "Allow task run?")),
|
|
203
|
+
message: ( localize(14773, "Allow to run the task `{0}`?", taskLabel))
|
|
204
204
|
} : undefined
|
|
205
205
|
};
|
|
206
206
|
}
|
|
@@ -210,9 +210,9 @@ const RunTaskToolData = {
|
|
|
210
210
|
id: TerminalToolId.RunTask,
|
|
211
211
|
toolReferenceName: "runTask",
|
|
212
212
|
legacyToolReferenceFullNames: ["runTasks/runTask"],
|
|
213
|
-
displayName: ( localize(
|
|
213
|
+
displayName: ( localize(14774, "Run Task")),
|
|
214
214
|
modelDescription: `Runs a VS Code task.\n\n- If you see that an appropriate task exists for building or running code, prefer to use this tool to run the task instead of using the ${TerminalToolId.RunInTerminal} tool.\n- Make sure that any appropriate build or watch task is running before trying to run tests or execute code.\n- If the user asks to run a task, use this tool to do so.`,
|
|
215
|
-
userDescription: ( localize(
|
|
215
|
+
userDescription: ( localize(14775, "Run tasks in the workspace")),
|
|
216
216
|
icon: Codicon.tools,
|
|
217
217
|
source: ToolDataSource.Internal,
|
|
218
218
|
inputSchema: {
|
|
@@ -2,7 +2,7 @@ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
|
2
2
|
import { Location } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
3
3
|
import { Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
4
4
|
import { ITaskSummary } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/tasks/common/taskService";
|
|
5
|
-
import { OutputMonitorState } from "
|
|
5
|
+
import { OutputMonitorState } from "../monitoring/types.js";
|
|
6
6
|
import { MarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
|
|
7
7
|
export declare function toolResultDetailsFromResponse(terminalResults: {
|
|
8
8
|
output: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
|
-
import { OutputMonitorState } from '
|
|
3
|
+
import { OutputMonitorState } from '../monitoring/types.js';
|
|
4
4
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
5
5
|
|
|
6
6
|
function toolResultDetailsFromResponse(terminalResults) {
|
|
@@ -26,7 +26,7 @@ function toolResultMessageFromResponse(
|
|
|
26
26
|
) {
|
|
27
27
|
let resultSummary = "";
|
|
28
28
|
if (result?.exitCode) {
|
|
29
|
-
resultSummary = ( localize(
|
|
29
|
+
resultSummary = ( localize(14776, "Task `{0}` failed with exit code {1}.", taskLabel, result.exitCode));
|
|
30
30
|
} else {
|
|
31
31
|
resultSummary += `\`${taskLabel}\` task `;
|
|
32
32
|
const problemCount = toolResultDetails.length;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IChatTerminalToolInvocationData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
2
|
+
import { ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
3
|
+
import { ITerminalLogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal.service";
|
|
4
|
+
export declare class TerminalCommandArtifactCollector {
|
|
5
|
+
private readonly _logService;
|
|
6
|
+
constructor(_logService: ITerminalLogService);
|
|
7
|
+
capture(toolSpecificData: IChatTerminalToolInvocationData, instance: ITerminalInstance, commandId: string | undefined): Promise<void>;
|
|
8
|
+
private _captureCommandOutput;
|
|
9
|
+
/**
|
|
10
|
+
* Captures output from a partial/current command that hasn't finished yet.
|
|
11
|
+
* This is used when the command is cancelled mid-execution.
|
|
12
|
+
*/
|
|
13
|
+
private _capturePartialCommandOutput;
|
|
14
|
+
private _applyTheme;
|
|
15
|
+
private _createTerminalCommandUri;
|
|
16
|
+
private _tryGetCommand;
|
|
17
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { getCommandOutputSnapshot } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror';
|
|
4
|
+
import { TerminalCapability } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities';
|
|
5
|
+
import { ITerminalLogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal.service';
|
|
6
|
+
|
|
7
|
+
let TerminalCommandArtifactCollector = class TerminalCommandArtifactCollector {
|
|
8
|
+
constructor(_logService) {
|
|
9
|
+
this._logService = _logService;
|
|
10
|
+
}
|
|
11
|
+
async capture(toolSpecificData, instance, commandId) {
|
|
12
|
+
if (commandId) {
|
|
13
|
+
try {
|
|
14
|
+
toolSpecificData.terminalCommandUri = this._createTerminalCommandUri(instance, commandId);
|
|
15
|
+
} catch (error) {
|
|
16
|
+
this._logService.warn(
|
|
17
|
+
`RunInTerminalTool: Failed to create terminal command URI for ${commandId}`,
|
|
18
|
+
error
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
const command = await this._tryGetCommand(instance, commandId);
|
|
22
|
+
if (command) {
|
|
23
|
+
toolSpecificData.terminalCommandState = {
|
|
24
|
+
exitCode: command.exitCode,
|
|
25
|
+
timestamp: command.timestamp,
|
|
26
|
+
duration: command.duration
|
|
27
|
+
};
|
|
28
|
+
const snapshot = await this._captureCommandOutput(instance, command);
|
|
29
|
+
if (snapshot) {
|
|
30
|
+
toolSpecificData.terminalCommandOutput = snapshot;
|
|
31
|
+
}
|
|
32
|
+
this._applyTheme(toolSpecificData, instance);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const partialSnapshot = await this._capturePartialCommandOutput(instance, commandId);
|
|
36
|
+
if (partialSnapshot) {
|
|
37
|
+
toolSpecificData.terminalCommandOutput = partialSnapshot;
|
|
38
|
+
this._logService.debug(`RunInTerminalTool: Captured partial command output for ${commandId}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
this._applyTheme(toolSpecificData, instance);
|
|
42
|
+
}
|
|
43
|
+
async _captureCommandOutput(instance, command) {
|
|
44
|
+
try {
|
|
45
|
+
await instance.xtermReadyPromise;
|
|
46
|
+
} catch {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
const xterm = instance.xterm;
|
|
50
|
+
if (!xterm) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
return getCommandOutputSnapshot(xterm, command, (reason, error) => {
|
|
54
|
+
const suffix = reason === "fallback" ? " (fallback)" : "";
|
|
55
|
+
this._logService.debug(`RunInTerminalTool: Failed to snapshot command output${suffix}`, error);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
async _capturePartialCommandOutput(instance, commandId) {
|
|
59
|
+
try {
|
|
60
|
+
await instance.xtermReadyPromise;
|
|
61
|
+
} catch {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
const xterm = instance.xterm;
|
|
65
|
+
if (!xterm) {
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
const commandDetection = instance.capabilities.get(TerminalCapability.CommandDetection);
|
|
69
|
+
const currentCommand = commandDetection?.currentCommand;
|
|
70
|
+
if (currentCommand && currentCommand.id === commandId) {
|
|
71
|
+
const executedMarker = currentCommand.commandExecutedMarker;
|
|
72
|
+
if (executedMarker && !executedMarker.isDisposed) {
|
|
73
|
+
try {
|
|
74
|
+
const raw = xterm.raw;
|
|
75
|
+
const buffer = raw.buffer.active;
|
|
76
|
+
const endLine = buffer.baseY + buffer.cursorY;
|
|
77
|
+
const startLine = executedMarker.line;
|
|
78
|
+
const lineCount = Math.max(endLine - startLine, 0);
|
|
79
|
+
if (lineCount > 0) {
|
|
80
|
+
const text = await xterm.getRangeAsVT(executedMarker, undefined, true);
|
|
81
|
+
if (text) {
|
|
82
|
+
return {
|
|
83
|
+
text,
|
|
84
|
+
lineCount
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
} catch (error) {
|
|
89
|
+
this._logService.debug(`RunInTerminalTool: Failed to capture partial command output`, error);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
95
|
+
_applyTheme(toolSpecificData, instance) {
|
|
96
|
+
const theme = instance.xterm?.getXtermTheme();
|
|
97
|
+
if (theme) {
|
|
98
|
+
toolSpecificData.terminalTheme = {
|
|
99
|
+
background: theme.background,
|
|
100
|
+
foreground: theme.foreground
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
_createTerminalCommandUri(instance, commandId) {
|
|
105
|
+
const params = ( new URLSearchParams(instance.resource.query));
|
|
106
|
+
params.set("command", commandId);
|
|
107
|
+
return instance.resource.with({
|
|
108
|
+
query: ( params.toString())
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
async _tryGetCommand(instance, commandId) {
|
|
112
|
+
const commandDetection = instance.capabilities.get(TerminalCapability.CommandDetection);
|
|
113
|
+
return commandDetection?.commands.find(c => c.id === commandId);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
TerminalCommandArtifactCollector = ( __decorate([( __param(0, ITerminalLogService))], TerminalCommandArtifactCollector));
|
|
117
|
+
|
|
118
|
+
export { TerminalCommandArtifactCollector };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
4
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
5
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
6
|
+
/**
|
|
7
|
+
* Returns true if the chat session's permission level (Autopilot/Bypass Approvals)
|
|
8
|
+
* auto-approves all tool calls, unless enterprise policy restricts it.
|
|
9
|
+
* Checks both the request-stamped level and the live picker level.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isSessionAutoApproveLevel(chatSessionResource: URI, configurationService: IConfigurationService, chatWidgetService: IChatWidgetService, chatService: IChatService): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Checks whether a terminal tool is eligible for auto-approval based on user configuration.
|
|
14
|
+
* @param toolReferenceName The tool's reference name (e.g. 'runInTerminal', 'sendToTerminal').
|
|
15
|
+
* @param legacyToolReferenceFullNames Legacy names to check for backward compatibility.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isToolEligibleForTerminalAutoApproval(toolReferenceName: string, configurationService: IConfigurationService, legacyToolReferenceFullNames?: string[]): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Determines whether terminal auto-approve rules are allowed to take effect.
|
|
20
|
+
* This checks the setting enablement, the opt-in warning acceptance, and the per-tool eligibility.
|
|
21
|
+
*/
|
|
22
|
+
export declare function isTerminalAutoApproveAllowed(toolReferenceName: string, configurationService: IConfigurationService, storageService: IStorageService, legacyToolReferenceFullNames?: string[]): boolean;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
import { StorageScope } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
3
|
+
import { TerminalToolConfirmationStorageKeys } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart';
|
|
4
|
+
import { ChatConfiguration, isAutoApproveLevel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
5
|
+
import { TerminalChatAgentToolsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration';
|
|
6
|
+
|
|
7
|
+
function isSessionAutoApproveLevel(chatSessionResource, configurationService, chatWidgetService, chatService) {
|
|
8
|
+
const inspected = configurationService.inspect(ChatConfiguration.GlobalAutoApprove);
|
|
9
|
+
if (inspected.policyValue === false) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
const widget = chatWidgetService.getWidgetBySessionResource(chatSessionResource)
|
|
13
|
+
?? chatWidgetService.lastFocusedWidget;
|
|
14
|
+
if (widget && isAutoApproveLevel(widget.input.currentModeInfo.permissionLevel)) {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
const model = chatService.getSession(chatSessionResource);
|
|
18
|
+
const request = model?.getRequests().at(-1);
|
|
19
|
+
return isAutoApproveLevel(request?.modeInfo?.permissionLevel);
|
|
20
|
+
}
|
|
21
|
+
function isToolEligibleForTerminalAutoApproval(toolReferenceName, configurationService, legacyToolReferenceFullNames) {
|
|
22
|
+
const config = configurationService.getValue(ChatConfiguration.EligibleForAutoApproval);
|
|
23
|
+
if (config && typeof config === 'object') {
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(config, toolReferenceName)) {
|
|
25
|
+
return config[toolReferenceName];
|
|
26
|
+
}
|
|
27
|
+
if (legacyToolReferenceFullNames) {
|
|
28
|
+
for (const legacyName of legacyToolReferenceFullNames) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(config, legacyName)) {
|
|
30
|
+
return config[legacyName];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
function isTerminalAutoApproveAllowed(toolReferenceName, configurationService, storageService, legacyToolReferenceFullNames) {
|
|
38
|
+
const isEligible = isToolEligibleForTerminalAutoApproval(toolReferenceName, configurationService, legacyToolReferenceFullNames);
|
|
39
|
+
const isAutoApproveEnabled = configurationService.getValue(TerminalChatAgentToolsSettingId.EnableAutoApprove) === true;
|
|
40
|
+
const isAutoApproveWarningAccepted = storageService.getBoolean(TerminalToolConfirmationStorageKeys.TerminalAutoApproveWarningAccepted, StorageScope.APPLICATION, false);
|
|
41
|
+
return isEligible && isAutoApproveEnabled && isAutoApproveWarningAccepted;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { isSessionAutoApproveLevel, isTerminalAutoApproveAllowed, isToolEligibleForTerminalAutoApproval };
|