@codingame/monaco-vscode-chat-service-override 30.0.0 → 31.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 +21 -3
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +125 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +393 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +65 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +453 -0
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +28 -0
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +81 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +75 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +180 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +202 -51
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +182 -0
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +282 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +303 -32
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.js +14 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.js +9 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +30 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +662 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +12 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +9 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.d.ts +17 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.js +5 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +5 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.js +14 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.d.ts +42 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.js +7 -0
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +118 -0
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +551 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +22 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +83 -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 +59 -59
- 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.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +113 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +81 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +47 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +15 -10
- 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 +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +13 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +58 -23
- 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.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +24 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +29 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.js +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +65 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
- 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 +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +28 -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 +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +80 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +20 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +30 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +131 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +363 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +31 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +374 -764
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +222 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +20 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +269 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +249 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +5 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +14 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +113 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +202 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +246 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +162 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +306 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +581 -257
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +245 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +25 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +3 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +103 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +80 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +20 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +128 -65
- 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 +28 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- 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.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +11 -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 +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +10 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +4 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +4 -310
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +3 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +61 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +0 -110
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +46 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +17 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +96 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +21 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +15 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +315 -263
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +196 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +56 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- 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/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +26 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +48 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +2 -2
- 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.d.ts +11 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +226 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatModelCountTelemetry.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatModelCountTelemetry.js +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +108 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +7 -7
- 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/chatStatusWidget.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +9 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +21 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +26 -59
- 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 +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +46 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugEvents.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugEvents.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +32 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +152 -26
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +5 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +265 -261
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +28 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +75 -7
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +9 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +32 -4
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +10 -25
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +7 -52
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +58 -466
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +36 -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.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +168 -182
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +49 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +491 -462
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +16 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +18 -12
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +24 -4
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +145 -68
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +25 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +19 -17
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +5 -17
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +77 -157
- 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 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +29 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
- 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 +12 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +49 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +9 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +13 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +319 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +8 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +15 -15
- 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/services/agentHost/common/agentHostFileSystemService.d.ts +21 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +35 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +0 -94
- package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +0 -16
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +0 -578
- package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +0 -206
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +0 -114
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +0 -860
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +0 -27
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +0 -58
- package/vscode/src/vs/platform/browserElements/common/browserElements.js +0 -16
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +0 -18
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/media/simpleBrowserOverlay.css +0 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +0 -443
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +0 -132
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatUsageWidget.css +0 -69
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +0 -66
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +0 -158
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +0 -142
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +0 -45
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +0 -164
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +0 -163
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +0 -142
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +0 -29
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +0 -137
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +0 -174
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +0 -39
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +0 -32
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +0 -249
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +0 -92
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +0 -209
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +0 -106
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +0 -392
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +0 -45
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +0 -243
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +0 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +0 -310
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +0 -168
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +0 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +0 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +0 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +0 -44
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +0 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +0 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +0 -29
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +0 -33
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +0 -28
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +0 -118
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +0 -1019
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +0 -49
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +0 -23
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +0 -150
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +0 -1619
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +0 -118
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.js +0 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +0 -130
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +0 -122
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +0 -482
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
2
|
-
import type { ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
3
|
-
import { ShellIntegrationQuality } from "./toolTerminalCreator.js";
|
|
4
|
-
export declare class RunInTerminalToolTelemetry {
|
|
5
|
-
private readonly _telemetryService;
|
|
6
|
-
constructor(_telemetryService: ITelemetryService);
|
|
7
|
-
logPrepare(state: {
|
|
8
|
-
terminalToolSessionId: string | undefined;
|
|
9
|
-
subCommands: string[];
|
|
10
|
-
autoApproveAllowed: "allowed" | "needsOptIn" | "off";
|
|
11
|
-
autoApproveResult: "approved" | "denied" | "manual";
|
|
12
|
-
autoApproveReason: "subCommand" | "commandLine" | undefined;
|
|
13
|
-
autoApproveDefault: boolean | undefined;
|
|
14
|
-
}): void;
|
|
15
|
-
logInvoke(instance: ITerminalInstance, state: {
|
|
16
|
-
terminalToolSessionId: string | undefined;
|
|
17
|
-
didUserEditCommand: boolean;
|
|
18
|
-
didToolEditCommand: boolean;
|
|
19
|
-
error: string | undefined;
|
|
20
|
-
isBackground: boolean;
|
|
21
|
-
isNewSession: boolean;
|
|
22
|
-
isSandboxWrapped: boolean;
|
|
23
|
-
shellIntegrationQuality: ShellIntegrationQuality;
|
|
24
|
-
outputLineCount: number;
|
|
25
|
-
timingConnectMs: number;
|
|
26
|
-
timingExecuteMs: number;
|
|
27
|
-
pollDurationMs: number | undefined;
|
|
28
|
-
terminalExecutionIdleBeforeTimeout: boolean | undefined;
|
|
29
|
-
exitCode: number | undefined;
|
|
30
|
-
inputUserChars: number;
|
|
31
|
-
inputUserSigint: boolean;
|
|
32
|
-
inputToolManualAcceptCount: number | undefined;
|
|
33
|
-
inputToolManualRejectCount: number | undefined;
|
|
34
|
-
inputToolManualChars: number | undefined;
|
|
35
|
-
inputToolAutoAcceptCount: number | undefined;
|
|
36
|
-
inputToolAutoChars: number | undefined;
|
|
37
|
-
inputToolManualShownCount: number | undefined;
|
|
38
|
-
inputToolFreeFormInputShownCount: number | undefined;
|
|
39
|
-
inputToolFreeFormInputCount: number | undefined;
|
|
40
|
-
}): void;
|
|
41
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
4
|
-
import { TelemetryTrustedValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetryUtils';
|
|
5
|
-
import { ShellIntegrationQuality } from './toolTerminalCreator.js';
|
|
6
|
-
|
|
7
|
-
let RunInTerminalToolTelemetry = class RunInTerminalToolTelemetry {
|
|
8
|
-
constructor(_telemetryService) {
|
|
9
|
-
this._telemetryService = _telemetryService;
|
|
10
|
-
}
|
|
11
|
-
logPrepare(state) {
|
|
12
|
-
const subCommandsSanitized = ( state.subCommands.map(e => {
|
|
13
|
-
const commandName = e.split(" ")[0];
|
|
14
|
-
let sanitizedCommandName = commandName.toLowerCase();
|
|
15
|
-
if (!( commandAllowList.has(sanitizedCommandName))) {
|
|
16
|
-
if (/^(?:[A-Z][a-z0-9]+)+(?:-(?:[A-Z][a-z0-9]+))*$/.test(commandName)) {
|
|
17
|
-
sanitizedCommandName = "(unknown:pwsh)";
|
|
18
|
-
} else if (/^[a-z0-9_\-\.\\\/:;]+$/i.test(commandName)) {
|
|
19
|
-
const properties = [];
|
|
20
|
-
if (/[a-z]/.test(commandName)) {
|
|
21
|
-
properties.push("ascii_lower");
|
|
22
|
-
}
|
|
23
|
-
if (/[A-Z]/.test(commandName)) {
|
|
24
|
-
properties.push("ascii_upper");
|
|
25
|
-
}
|
|
26
|
-
if (/[0-9]/.test(commandName)) {
|
|
27
|
-
properties.push("numeric");
|
|
28
|
-
}
|
|
29
|
-
const chars = [];
|
|
30
|
-
for (const c of [".", "-", "_", "/", "\\", ":", ";"]) {
|
|
31
|
-
if (commandName.includes(c)) {
|
|
32
|
-
chars.push(c);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
sanitizedCommandName = `(unknown:${properties.join(",")}:${chars.join("")})`;
|
|
36
|
-
} else if (/[^\x00-\x7F]/.test(commandName)) {
|
|
37
|
-
sanitizedCommandName = "(unknown:unicode)";
|
|
38
|
-
} else {
|
|
39
|
-
sanitizedCommandName = "(unknown)";
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return sanitizedCommandName;
|
|
43
|
-
}));
|
|
44
|
-
this._telemetryService.publicLog2("toolUse.runInTerminal.prepare", {
|
|
45
|
-
terminalToolSessionId: state.terminalToolSessionId,
|
|
46
|
-
subCommands: ( new TelemetryTrustedValue(JSON.stringify(subCommandsSanitized))),
|
|
47
|
-
autoApproveAllowed: state.autoApproveAllowed,
|
|
48
|
-
autoApproveResult: state.autoApproveResult,
|
|
49
|
-
autoApproveReason: state.autoApproveReason,
|
|
50
|
-
autoApproveDefault: state.autoApproveDefault
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
logInvoke(instance, state) {
|
|
54
|
-
this._telemetryService.publicLog2("toolUse.runInTerminal", {
|
|
55
|
-
terminalSessionId: instance.sessionId,
|
|
56
|
-
terminalToolSessionId: state.terminalToolSessionId,
|
|
57
|
-
result: state.error ?? "success",
|
|
58
|
-
strategy: state.shellIntegrationQuality === ShellIntegrationQuality.Rich ? 2 : state.shellIntegrationQuality === ShellIntegrationQuality.Basic ? 1 : 0,
|
|
59
|
-
userEditedCommand: state.didUserEditCommand ? 1 : 0,
|
|
60
|
-
toolEditedCommand: state.didToolEditCommand ? 1 : 0,
|
|
61
|
-
isBackground: state.isBackground ? 1 : 0,
|
|
62
|
-
isNewSession: state.isNewSession ? 1 : 0,
|
|
63
|
-
isSandbox: state.isSandboxWrapped ? 1 : 0,
|
|
64
|
-
outputLineCount: state.outputLineCount,
|
|
65
|
-
nonZeroExitCode: state.exitCode === undefined ? -1 : state.exitCode === 0 ? 0 : 1,
|
|
66
|
-
timingConnectMs: state.timingConnectMs,
|
|
67
|
-
timingExecuteMs: state.timingExecuteMs,
|
|
68
|
-
pollDurationMs: state.pollDurationMs ?? 0,
|
|
69
|
-
terminalExecutionIdleBeforeTimeout: state.terminalExecutionIdleBeforeTimeout ?? false,
|
|
70
|
-
inputUserChars: state.inputUserChars,
|
|
71
|
-
inputUserSigint: state.inputUserSigint,
|
|
72
|
-
inputToolManualAcceptCount: state.inputToolManualAcceptCount ?? 0,
|
|
73
|
-
inputToolManualRejectCount: state.inputToolManualRejectCount ?? 0,
|
|
74
|
-
inputToolManualChars: state.inputToolManualChars ?? 0,
|
|
75
|
-
inputToolManualShownCount: state.inputToolManualShownCount ?? 0,
|
|
76
|
-
inputToolFreeFormInputShownCount: state.inputToolFreeFormInputShownCount ?? 0,
|
|
77
|
-
inputToolFreeFormInputCount: state.inputToolFreeFormInputCount ?? 0
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
RunInTerminalToolTelemetry = ( __decorate([( __param(0, ITelemetryService))], RunInTerminalToolTelemetry));
|
|
82
|
-
const commandAllowList = ( new Set([
|
|
83
|
-
"!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "~", "{", "}", "<", ">",
|
|
84
|
-
".", "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",
|
|
85
|
-
"bitbucket", "bzr", "cvs", "gh", "git", "glab", "hg", "svn", "fossil", "p4",
|
|
86
|
-
"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",
|
|
87
|
-
"aider", "amp", "claude", "codex", "copilot", "gemini", "toad", "q",
|
|
88
|
-
"taskkill", "taskkill.exe",
|
|
89
|
-
"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",
|
|
90
|
-
"iex", "irm", "iwr", "rd", "ri", "sp", "spps"]));
|
|
91
|
-
|
|
92
|
-
export { RunInTerminalToolTelemetry };
|
|
@@ -1,40 +0,0 @@
|
|
|
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 { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
-
import { ITerminalProfile } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal";
|
|
5
|
-
import { ITerminalLogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal.service";
|
|
6
|
-
import { type ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
7
|
-
import { ITerminalService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
8
|
-
export declare enum ShellIntegrationQuality {
|
|
9
|
-
None = "none",
|
|
10
|
-
Basic = "basic",
|
|
11
|
-
Rich = "rich"
|
|
12
|
-
}
|
|
13
|
-
export interface IToolTerminal {
|
|
14
|
-
instance: ITerminalInstance;
|
|
15
|
-
shellIntegrationQuality: ShellIntegrationQuality;
|
|
16
|
-
receivedUserInput?: boolean;
|
|
17
|
-
isBackground?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare class ToolTerminalCreator {
|
|
20
|
-
private readonly _configurationService;
|
|
21
|
-
private readonly _logService;
|
|
22
|
-
private readonly _terminalService;
|
|
23
|
-
/**
|
|
24
|
-
* The shell preference cached for the lifetime of the window. This allows skipping previous
|
|
25
|
-
* shell approaches that failed in previous runs to save time.
|
|
26
|
-
*/
|
|
27
|
-
private static _lastSuccessfulShell;
|
|
28
|
-
constructor(_configurationService: IConfigurationService, _logService: ITerminalLogService, _terminalService: ITerminalService);
|
|
29
|
-
createTerminal(shellOrProfile: string | ITerminalProfile, os: OperatingSystem, token: CancellationToken): Promise<IToolTerminal>;
|
|
30
|
-
/**
|
|
31
|
-
* Synchronously update shell integration quality based on the terminal instance's current
|
|
32
|
-
* capabilities. This is a defensive change to avoid no shell integration being sticky
|
|
33
|
-
* https://github.com/microsoft/vscode/issues/260880
|
|
34
|
-
*
|
|
35
|
-
* Only upgrade quality just in case.
|
|
36
|
-
*/
|
|
37
|
-
refreshShellIntegrationQuality(toolTerminal: IToolTerminal): void;
|
|
38
|
-
private _createCopilotTerminal;
|
|
39
|
-
private _waitForShellIntegration;
|
|
40
|
-
}
|
|
@@ -1,209 +0,0 @@
|
|
|
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 { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
11
|
-
import { TerminalCapability } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities';
|
|
12
|
-
import { PromptInputState } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel';
|
|
13
|
-
import { TerminalSettingId } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal';
|
|
14
|
-
import { ITerminalLogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal.service';
|
|
15
|
-
import { ITerminalService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
|
|
16
|
-
import { getShellIntegrationTimeout } from '@codingame/monaco-vscode-xterm-common/vscode/vs/workbench/contrib/terminal/common/terminalEnvironment';
|
|
17
|
-
import { TerminalChatAgentToolsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration';
|
|
18
|
-
import { isBash, isZsh, isFish, isPowerShell } from './runInTerminalHelpers.js';
|
|
19
|
-
|
|
20
|
-
var ToolTerminalCreator_1;
|
|
21
|
-
var ShellLaunchType;
|
|
22
|
-
(function(ShellLaunchType) {
|
|
23
|
-
ShellLaunchType[ShellLaunchType["Unknown"] = 0] = "Unknown";
|
|
24
|
-
ShellLaunchType[ShellLaunchType["Default"] = 1] = "Default";
|
|
25
|
-
ShellLaunchType[ShellLaunchType["Fallback"] = 2] = "Fallback";
|
|
26
|
-
})(ShellLaunchType || (ShellLaunchType = {}));
|
|
27
|
-
var ShellIntegrationQuality;
|
|
28
|
-
(function(ShellIntegrationQuality) {
|
|
29
|
-
ShellIntegrationQuality["None"] = "none";
|
|
30
|
-
ShellIntegrationQuality["Basic"] = "basic";
|
|
31
|
-
ShellIntegrationQuality["Rich"] = "rich";
|
|
32
|
-
})(ShellIntegrationQuality || (ShellIntegrationQuality = {}));
|
|
33
|
-
let ToolTerminalCreator = class ToolTerminalCreator {
|
|
34
|
-
static {
|
|
35
|
-
ToolTerminalCreator_1 = this;
|
|
36
|
-
}
|
|
37
|
-
static {
|
|
38
|
-
this._lastSuccessfulShell = ShellLaunchType.Unknown;
|
|
39
|
-
}
|
|
40
|
-
constructor(_configurationService, _logService, _terminalService) {
|
|
41
|
-
this._configurationService = _configurationService;
|
|
42
|
-
this._logService = _logService;
|
|
43
|
-
this._terminalService = _terminalService;
|
|
44
|
-
}
|
|
45
|
-
async createTerminal(shellOrProfile, os, token) {
|
|
46
|
-
const instance = await this._createCopilotTerminal(shellOrProfile, os);
|
|
47
|
-
const toolTerminal = {
|
|
48
|
-
instance,
|
|
49
|
-
shellIntegrationQuality: ShellIntegrationQuality.None
|
|
50
|
-
};
|
|
51
|
-
let processReadyTimestamp = 0;
|
|
52
|
-
const initResult = await Promise.any([
|
|
53
|
-
instance.processReady.then(() => processReadyTimestamp = Date.now()),
|
|
54
|
-
Event.toPromise(instance.onExit)
|
|
55
|
-
]);
|
|
56
|
-
if (!isNumber(initResult) && isObject(initResult) && hasKey(initResult, {
|
|
57
|
-
message: true
|
|
58
|
-
})) {
|
|
59
|
-
throw ( new Error(initResult.message));
|
|
60
|
-
}
|
|
61
|
-
const siInjectionEnabled = this._configurationService.getValue(TerminalSettingId.ShellIntegrationEnabled) === true;
|
|
62
|
-
const waitTime = getShellIntegrationTimeout(
|
|
63
|
-
this._configurationService,
|
|
64
|
-
siInjectionEnabled,
|
|
65
|
-
instance.hasRemoteAuthority,
|
|
66
|
-
processReadyTimestamp
|
|
67
|
-
);
|
|
68
|
-
if (ToolTerminalCreator_1._lastSuccessfulShell !== ShellLaunchType.Fallback || siInjectionEnabled) {
|
|
69
|
-
this._logService.info(
|
|
70
|
-
`ToolTerminalCreator#createTerminal: Waiting ${waitTime}ms for shell integration`
|
|
71
|
-
);
|
|
72
|
-
const shellIntegrationQuality = await this._waitForShellIntegration(instance, waitTime);
|
|
73
|
-
if (token.isCancellationRequested) {
|
|
74
|
-
instance.dispose();
|
|
75
|
-
throw ( new CancellationError());
|
|
76
|
-
}
|
|
77
|
-
if (shellIntegrationQuality === ShellIntegrationQuality.Rich) {
|
|
78
|
-
const commandDetection = instance.capabilities.get(TerminalCapability.CommandDetection);
|
|
79
|
-
if (commandDetection?.promptInputModel.state === PromptInputState.Unknown) {
|
|
80
|
-
this._logService.info(
|
|
81
|
-
`ToolTerminalCreator#createTerminal: Waiting up to 2s for PromptInputModel state to change`
|
|
82
|
-
);
|
|
83
|
-
const didStart = await raceTimeout(Event.toPromise(commandDetection.onCommandStarted), 2000);
|
|
84
|
-
if (!didStart) {
|
|
85
|
-
this._logService.info(
|
|
86
|
-
`ToolTerminalCreator#createTerminal: PromptInputModel state did not change within timeout`
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
if (shellIntegrationQuality !== ShellIntegrationQuality.None) {
|
|
92
|
-
ToolTerminalCreator_1._lastSuccessfulShell = ShellLaunchType.Default;
|
|
93
|
-
toolTerminal.shellIntegrationQuality = shellIntegrationQuality;
|
|
94
|
-
return toolTerminal;
|
|
95
|
-
}
|
|
96
|
-
} else {
|
|
97
|
-
this._logService.info(
|
|
98
|
-
`ToolTerminalCreator#createTerminal: Skipping wait for shell integration - last successful launch type ${ToolTerminalCreator_1._lastSuccessfulShell}`
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
ToolTerminalCreator_1._lastSuccessfulShell = ShellLaunchType.Fallback;
|
|
102
|
-
return toolTerminal;
|
|
103
|
-
}
|
|
104
|
-
refreshShellIntegrationQuality(toolTerminal) {
|
|
105
|
-
const commandDetection = toolTerminal.instance.capabilities.get(TerminalCapability.CommandDetection);
|
|
106
|
-
if (commandDetection) {
|
|
107
|
-
if (toolTerminal.shellIntegrationQuality === ShellIntegrationQuality.None || toolTerminal.shellIntegrationQuality === ShellIntegrationQuality.Basic) {
|
|
108
|
-
toolTerminal.shellIntegrationQuality = commandDetection.hasRichCommandDetection ? ShellIntegrationQuality.Rich : ShellIntegrationQuality.Basic;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
_createCopilotTerminal(shellOrProfile, os) {
|
|
113
|
-
const shellPath = isString(shellOrProfile) ? shellOrProfile : shellOrProfile.path;
|
|
114
|
-
const env = {
|
|
115
|
-
GIT_PAGER: "cat",
|
|
116
|
-
GIT_MERGE_AUTOEDIT: "no",
|
|
117
|
-
GIT_EDITOR: ":"
|
|
118
|
-
};
|
|
119
|
-
const preventShellHistory = this._configurationService.getValue(TerminalChatAgentToolsSettingId.PreventShellHistory) === true;
|
|
120
|
-
if (preventShellHistory) {
|
|
121
|
-
if (isBash(shellPath, os) || isZsh(shellPath, os) || isFish(shellPath, os) || isPowerShell(shellPath, os)) {
|
|
122
|
-
env["VSCODE_PREVENT_SHELL_HISTORY"] = "1";
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
const config = {
|
|
126
|
-
icon: ThemeIcon.fromId(Codicon.chatSparkle.id),
|
|
127
|
-
hideFromUser: true,
|
|
128
|
-
forcePersist: true,
|
|
129
|
-
env
|
|
130
|
-
};
|
|
131
|
-
if (isString(shellOrProfile)) {
|
|
132
|
-
config.executable = shellOrProfile;
|
|
133
|
-
} else {
|
|
134
|
-
config.executable = shellOrProfile.path;
|
|
135
|
-
config.args = shellOrProfile.args;
|
|
136
|
-
config.icon = shellOrProfile.icon ?? config.icon;
|
|
137
|
-
config.color = shellOrProfile.color;
|
|
138
|
-
config.env = {
|
|
139
|
-
...config.env,
|
|
140
|
-
...shellOrProfile.env
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
return this._terminalService.createTerminal({
|
|
144
|
-
config
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
_waitForShellIntegration(instance, timeoutMs) {
|
|
148
|
-
const store = ( new DisposableStore());
|
|
149
|
-
const result = ( new DeferredPromise());
|
|
150
|
-
const siNoneTimer = store.add(( new MutableDisposable()));
|
|
151
|
-
siNoneTimer.value = disposableTimeout(() => {
|
|
152
|
-
this._logService.info(
|
|
153
|
-
`ToolTerminalCreator#_waitForShellIntegration: Timed out ${timeoutMs}ms, using no SI`
|
|
154
|
-
);
|
|
155
|
-
result.complete(ShellIntegrationQuality.None);
|
|
156
|
-
}, timeoutMs);
|
|
157
|
-
if (instance.capabilities.get(TerminalCapability.CommandDetection)?.hasRichCommandDetection) {
|
|
158
|
-
siNoneTimer.clear();
|
|
159
|
-
this._logService.info(
|
|
160
|
-
`ToolTerminalCreator#_waitForShellIntegration: Rich SI available immediately`
|
|
161
|
-
);
|
|
162
|
-
result.complete(ShellIntegrationQuality.Rich);
|
|
163
|
-
} else {
|
|
164
|
-
const onSetRichCommandDetection = store.add(
|
|
165
|
-
this._terminalService.createOnInstanceCapabilityEvent(TerminalCapability.CommandDetection, e => e.onSetRichCommandDetection)
|
|
166
|
-
);
|
|
167
|
-
store.add(onSetRichCommandDetection.event(e => {
|
|
168
|
-
if (e.instance !== instance) {
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
siNoneTimer.clear();
|
|
172
|
-
this._logService.info(
|
|
173
|
-
`ToolTerminalCreator#_waitForShellIntegration: Rich SI available eventually`
|
|
174
|
-
);
|
|
175
|
-
result.complete(ShellIntegrationQuality.Rich);
|
|
176
|
-
}));
|
|
177
|
-
const commandDetection = instance.capabilities.get(TerminalCapability.CommandDetection);
|
|
178
|
-
if (commandDetection) {
|
|
179
|
-
siNoneTimer.clear();
|
|
180
|
-
store.add(disposableTimeout(() => {
|
|
181
|
-
this._logService.info(
|
|
182
|
-
`ToolTerminalCreator#_waitForShellIntegration: Timed out 200ms, using basic SI`
|
|
183
|
-
);
|
|
184
|
-
result.complete(ShellIntegrationQuality.Basic);
|
|
185
|
-
}, 200));
|
|
186
|
-
} else {
|
|
187
|
-
store.add(instance.capabilities.onDidAddCommandDetectionCapability(e => {
|
|
188
|
-
siNoneTimer.clear();
|
|
189
|
-
store.add(disposableTimeout(() => {
|
|
190
|
-
this._logService.info(
|
|
191
|
-
`ToolTerminalCreator#_waitForShellIntegration: Timed out 200ms, using basic SI (via listener)`
|
|
192
|
-
);
|
|
193
|
-
result.complete(ShellIntegrationQuality.Basic);
|
|
194
|
-
}, 200));
|
|
195
|
-
}));
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
result.p.finally(() => {
|
|
199
|
-
this._logService.info(
|
|
200
|
-
`ToolTerminalCreator#_waitForShellIntegration: Promise complete, disposing store`
|
|
201
|
-
);
|
|
202
|
-
store.dispose();
|
|
203
|
-
});
|
|
204
|
-
return result.p;
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
ToolTerminalCreator = ToolTerminalCreator_1 = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, ITerminalLogService)), ( __param(2, ITerminalService))], ToolTerminalCreator));
|
|
208
|
-
|
|
209
|
-
export { ShellIntegrationQuality, ToolTerminalCreator };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import { type CountTokensCallback, type IPreparedToolInvocation, type IToolData, type IToolImpl, type IToolInvocation, type IToolInvocationPreparationContext, type IToolResult, type ToolProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
4
|
-
export declare const AwaitTerminalToolData: IToolData;
|
|
5
|
-
export interface IAwaitTerminalInputParams {
|
|
6
|
-
id: string;
|
|
7
|
-
timeout: number;
|
|
8
|
-
}
|
|
9
|
-
export declare class AwaitTerminalTool extends Disposable implements IToolImpl {
|
|
10
|
-
prepareToolInvocation(_context: IToolInvocationPreparationContext, _token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
11
|
-
invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
12
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { CancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
3
|
-
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
4
|
-
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
-
import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
7
|
-
import { RunInTerminalTool } from './runInTerminalTool.js';
|
|
8
|
-
import { TerminalToolId } from './toolIds.js';
|
|
9
|
-
import { timeout, raceCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
10
|
-
|
|
11
|
-
const AwaitTerminalToolData = {
|
|
12
|
-
id: TerminalToolId.AwaitTerminal,
|
|
13
|
-
toolReferenceName: "awaitTerminal",
|
|
14
|
-
displayName: ( localize(13864, "Await Terminal")),
|
|
15
|
-
modelDescription: "Wait for a background terminal command to complete. Returns the output, exit code, or timeout status.",
|
|
16
|
-
icon: Codicon.terminal,
|
|
17
|
-
source: ToolDataSource.Internal,
|
|
18
|
-
inputSchema: {
|
|
19
|
-
type: "object",
|
|
20
|
-
properties: {
|
|
21
|
-
id: {
|
|
22
|
-
type: "string",
|
|
23
|
-
description: `The ID of the terminal to await (returned by ${TerminalToolId.RunInTerminal} when isBackground=true).`
|
|
24
|
-
},
|
|
25
|
-
timeout: {
|
|
26
|
-
type: "number",
|
|
27
|
-
description: "Timeout in milliseconds. If the command does not complete within this time, returns the output collected so far with a timeout indicator. Use 0 for no timeout."
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
required: ["id", "timeout"]
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
class AwaitTerminalTool extends Disposable {
|
|
34
|
-
async prepareToolInvocation(_context, _token) {
|
|
35
|
-
return {
|
|
36
|
-
invocationMessage: ( localize(13865, "Awaiting terminal completion")),
|
|
37
|
-
pastTenseMessage: ( localize(13866, "Awaited terminal completion"))
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
async invoke(invocation, _countTokens, _progress, token) {
|
|
41
|
-
const args = invocation.parameters;
|
|
42
|
-
const execution = RunInTerminalTool.getExecution(args.id);
|
|
43
|
-
if (!execution) {
|
|
44
|
-
return {
|
|
45
|
-
content: [{
|
|
46
|
-
kind: "text",
|
|
47
|
-
value: `Error: No active terminal execution found with ID ${args.id}. The terminal may have already completed or the ID is invalid.`
|
|
48
|
-
}]
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
try {
|
|
52
|
-
let result;
|
|
53
|
-
const timeoutMs = Math.max(0, args.timeout);
|
|
54
|
-
const hasTimeout = timeoutMs > 0;
|
|
55
|
-
if (hasTimeout) {
|
|
56
|
-
const timeoutPromise = timeout(timeoutMs).then(() => ({
|
|
57
|
-
type: "timeout"
|
|
58
|
-
}));
|
|
59
|
-
const completionPromise = raceCancellationError(execution.completionPromise, token).then(r => ({
|
|
60
|
-
type: "completed",
|
|
61
|
-
result: r
|
|
62
|
-
}));
|
|
63
|
-
const raceResult = await Promise.race([completionPromise, timeoutPromise]);
|
|
64
|
-
if (raceResult.type === "timeout") {
|
|
65
|
-
const partialOutput = execution.getOutput();
|
|
66
|
-
return {
|
|
67
|
-
toolMetadata: {
|
|
68
|
-
exitCode: undefined,
|
|
69
|
-
timedOut: true
|
|
70
|
-
},
|
|
71
|
-
content: [{
|
|
72
|
-
kind: "text",
|
|
73
|
-
value: `Terminal ${args.id} timed out after ${timeoutMs}ms. Output collected so far:\n${partialOutput}`
|
|
74
|
-
}]
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
result = raceResult.result;
|
|
78
|
-
} else {
|
|
79
|
-
result = await raceCancellationError(execution.completionPromise, token);
|
|
80
|
-
}
|
|
81
|
-
const output = execution.getOutput();
|
|
82
|
-
const exitCodeText = result.exitCode !== undefined ? ` (exit code: ${result.exitCode})` : "";
|
|
83
|
-
return {
|
|
84
|
-
toolMetadata: {
|
|
85
|
-
exitCode: result.exitCode
|
|
86
|
-
},
|
|
87
|
-
content: [{
|
|
88
|
-
kind: "text",
|
|
89
|
-
value: `Terminal ${args.id} completed${exitCodeText}:\n${output}`
|
|
90
|
-
}]
|
|
91
|
-
};
|
|
92
|
-
} catch (e) {
|
|
93
|
-
if (e instanceof CancellationError) {
|
|
94
|
-
throw e;
|
|
95
|
-
}
|
|
96
|
-
return {
|
|
97
|
-
content: [{
|
|
98
|
-
kind: "text",
|
|
99
|
-
value: `Error awaiting terminal ${args.id}: ${e instanceof Error ? e.message : String(e)}`
|
|
100
|
-
}]
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export { AwaitTerminalTool, AwaitTerminalToolData };
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
}
|