@codingame/monaco-vscode-chat-service-override 29.1.1 → 30.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 +5 -2
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +37 -39
- package/vscode/src/vs/platform/agentHost/common/agentService.js +3 -1
- package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +11 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +4 -4
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +132 -42
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +54 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +15 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +5 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +188 -51
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +7 -6
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +7 -2
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.d.ts +6 -0
- package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +14 -0
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +18 -0
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +13 -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 +37 -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.js +10 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +37 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -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 +6 -6
- 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 +20 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +18 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +482 -0
- 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 +10 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +43 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +74 -76
- 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 +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +27 -35
- 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/agentSessions/localAgentSessionsController.d.ts +5 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +86 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +38 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +38 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +427 -167
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +37 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +108 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +28 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +3 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +65 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +64 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +288 -195
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +21 -21
- 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 +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 +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 +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +21 -21
- 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/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -0
- 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 +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +19 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +54 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +50 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +86 -17
- 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 +29 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +65 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +24 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -6
- 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/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/pluginInstallService.d.ts +3 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +54 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +24 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +72 -14
- 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.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/promptFileContributions.js +181 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +3 -3
- 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 +8 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +37 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +28 -23
- 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.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +1 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +148 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
- 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 +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +16 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +158 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +8 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +155 -76
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +1 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -6
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +31 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +228 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +190 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +25 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +130 -107
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +19 -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 +2 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +169 -266
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +12 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +149 -206
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +27 -22
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +20 -8
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +183 -43
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +21 -21
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -11
- 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 +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +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 +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +4 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +26 -23
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +4 -9
- 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.js +16 -6
- 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 +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +150 -50
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +2 -2
- 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.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +66 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +239 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +0 -208
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +0 -637
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +0 -384
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +0 -47
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +0 -55
- /package/vscode/src/vs/workbench/contrib/chat/{common → browser}/promptSyntax/promptFileContributions.d.ts +0 -0
|
@@ -10,8 +10,8 @@ const GetTerminalOutputToolData = {
|
|
|
10
10
|
id: TerminalToolId.GetTerminalOutput,
|
|
11
11
|
toolReferenceName: "getTerminalOutput",
|
|
12
12
|
legacyToolReferenceFullNames: ["runCommands/getTerminalOutput"],
|
|
13
|
-
displayName: ( localize(
|
|
14
|
-
modelDescription: `Get the output of a terminal command previously started with ${TerminalToolId.RunInTerminal}
|
|
13
|
+
displayName: ( localize(13884, "Get Terminal Output")),
|
|
14
|
+
modelDescription: `Get the output of a background terminal command previously started with ${TerminalToolId.RunInTerminal}. The ID must be the exact opaque value returned by ${TerminalToolId.RunInTerminal} when isBackground=true; terminal names, labels, and integers are not valid IDs.`,
|
|
15
15
|
icon: Codicon.terminal,
|
|
16
16
|
source: ToolDataSource.Internal,
|
|
17
17
|
inputSchema: {
|
|
@@ -19,7 +19,8 @@ const GetTerminalOutputToolData = {
|
|
|
19
19
|
properties: {
|
|
20
20
|
id: {
|
|
21
21
|
type: "string",
|
|
22
|
-
description:
|
|
22
|
+
description: `The ID of the background terminal to check (returned by ${TerminalToolId.RunInTerminal} when isBackground=true). This must be the exact opaque ID returned by that tool; terminal names, labels, or integers are invalid.`,
|
|
23
|
+
pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
26
|
required: ["id"]
|
|
@@ -28,16 +29,25 @@ const GetTerminalOutputToolData = {
|
|
|
28
29
|
class GetTerminalOutputTool extends Disposable {
|
|
29
30
|
async prepareToolInvocation(context, token) {
|
|
30
31
|
return {
|
|
31
|
-
invocationMessage: ( localize(
|
|
32
|
-
pastTenseMessage: ( localize(
|
|
32
|
+
invocationMessage: ( localize(13885, "Checking background terminal output")),
|
|
33
|
+
pastTenseMessage: ( localize(13886, "Checked background terminal output"))
|
|
33
34
|
};
|
|
34
35
|
}
|
|
35
36
|
async invoke(invocation, _countTokens, _progress, token) {
|
|
36
37
|
const args = invocation.parameters;
|
|
38
|
+
const execution = RunInTerminalTool.getExecution(args.id);
|
|
39
|
+
if (!execution) {
|
|
40
|
+
return {
|
|
41
|
+
content: [{
|
|
42
|
+
kind: "text",
|
|
43
|
+
value: `Error: No active terminal execution found with ID ${args.id}. The ID must be the exact value returned by ${TerminalToolId.RunInTerminal} for a background command.`
|
|
44
|
+
}]
|
|
45
|
+
};
|
|
46
|
+
}
|
|
37
47
|
return {
|
|
38
48
|
content: [{
|
|
39
49
|
kind: "text",
|
|
40
|
-
value: `Output of terminal ${args.id}:\n${
|
|
50
|
+
value: `Output of terminal ${args.id}:\n${execution.getOutput()}`
|
|
41
51
|
}]
|
|
42
52
|
};
|
|
43
53
|
}
|
|
@@ -11,7 +11,7 @@ const GetTerminalSelectionToolData = {
|
|
|
11
11
|
id: TerminalToolId.TerminalSelection,
|
|
12
12
|
toolReferenceName: "terminalSelection",
|
|
13
13
|
legacyToolReferenceFullNames: ["runCommands/terminalSelection"],
|
|
14
|
-
displayName: ( localize(
|
|
14
|
+
displayName: ( localize(13887, "Get Terminal Selection")),
|
|
15
15
|
modelDescription: "Get the current selection in the active terminal.",
|
|
16
16
|
source: ToolDataSource.Internal,
|
|
17
17
|
icon: Codicon.terminal
|
|
@@ -23,8 +23,8 @@ let GetTerminalSelectionTool = class GetTerminalSelectionTool extends Disposable
|
|
|
23
23
|
}
|
|
24
24
|
async prepareToolInvocation(context, token) {
|
|
25
25
|
return {
|
|
26
|
-
invocationMessage: ( localize(
|
|
27
|
-
pastTenseMessage: ( localize(
|
|
26
|
+
invocationMessage: ( localize(13888, "Reading terminal selection")),
|
|
27
|
+
pastTenseMessage: ( localize(13889, "Read terminal selection"))
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
async invoke(invocation, _countTokens, _progress, token) {
|
|
@@ -9,7 +9,7 @@ import { TerminalToolId } from './toolIds.js';
|
|
|
9
9
|
const KillTerminalToolData = {
|
|
10
10
|
id: TerminalToolId.KillTerminal,
|
|
11
11
|
toolReferenceName: "killTerminal",
|
|
12
|
-
displayName: ( localize(
|
|
12
|
+
displayName: ( localize(13890, "Kill Terminal")),
|
|
13
13
|
modelDescription: `Kill a terminal by its ID. Use this to clean up terminals that are no longer needed (e.g., after stopping a server or when a long-running task completes). The terminal ID is returned by ${TerminalToolId.RunInTerminal} when isBackground=true.`,
|
|
14
14
|
icon: Codicon.terminal,
|
|
15
15
|
source: ToolDataSource.Internal,
|
|
@@ -27,8 +27,8 @@ const KillTerminalToolData = {
|
|
|
27
27
|
class KillTerminalTool extends Disposable {
|
|
28
28
|
async prepareToolInvocation(_context, _token) {
|
|
29
29
|
return {
|
|
30
|
-
invocationMessage: ( localize(
|
|
31
|
-
pastTenseMessage: ( localize(
|
|
30
|
+
invocationMessage: ( localize(13891, "Killing terminal")),
|
|
31
|
+
pastTenseMessage: ( localize(13892, "Killed terminal"))
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
async invoke(invocation, _countTokens, _progress, _token) {
|
|
@@ -683,11 +683,11 @@ let OutputMonitor = class OutputMonitor extends Disposable {
|
|
|
683
683
|
const {
|
|
684
684
|
promise: userPrompt,
|
|
685
685
|
part
|
|
686
|
-
} = this._createElicitationPart(token, execution.sessionResource, ( new MarkdownString(( localize(
|
|
687
|
-
|
|
686
|
+
} = this._createElicitationPart(token, execution.sessionResource, ( new MarkdownString(( localize(13893, "The terminal is awaiting input.")))), ( new MarkdownString(( localize(
|
|
687
|
+
13894,
|
|
688
688
|
"{0}\nPlease provide the required input to the terminal.\n\n",
|
|
689
689
|
confirmationPrompt.prompt
|
|
690
|
-
)))), "", ( localize(
|
|
690
|
+
)))), "", ( localize(13895, "Focus terminal")), undefined, () => {
|
|
691
691
|
this._showInstance(execution.instance.instanceId);
|
|
692
692
|
return focusTerminalSelection;
|
|
693
693
|
});
|
|
@@ -740,13 +740,13 @@ let OutputMonitor = class OutputMonitor extends Disposable {
|
|
|
740
740
|
const {
|
|
741
741
|
promise: userPrompt,
|
|
742
742
|
part
|
|
743
|
-
} = this._createElicitationPart(token, execution.sessionResource, ( new MarkdownString(( localize(
|
|
744
|
-
|
|
743
|
+
} = this._createElicitationPart(token, execution.sessionResource, ( new MarkdownString(( localize(13896, "The terminal is awaiting input.")))), ( new MarkdownString(( localize(
|
|
744
|
+
13897,
|
|
745
745
|
"{0}\n Do you want to send `{1}`{2} followed by `Enter` to the terminal?",
|
|
746
746
|
confirmationPrompt.prompt,
|
|
747
747
|
suggestedOptionValue,
|
|
748
748
|
isString(suggestedOption) ? "" : suggestedOption.description ? " (" + suggestedOption.description + ")" : ""
|
|
749
|
-
)))), "", ( localize(
|
|
749
|
+
)))), "", ( localize(13898, "Allow")), ( localize(13899, "Focus Terminal")), async value => {
|
|
750
750
|
let option = undefined;
|
|
751
751
|
if (value === true) {
|
|
752
752
|
option = suggestedOptionValue;
|
|
@@ -1001,9 +1001,9 @@ function detectsNonInteractiveHelpPattern(cursorLine) {
|
|
|
1001
1001
|
].some(e => e.test(cursorLine)));
|
|
1002
1002
|
}
|
|
1003
1003
|
const taskFinishMessages = [(
|
|
1004
|
-
localize(
|
|
1005
|
-
localize(
|
|
1006
|
-
localize(
|
|
1004
|
+
localize(13900, "Terminal will be reused by tasks, press any key to close it.")), ( localize(13901, "Terminal will be reused by tasks, press any key to close it.")), (
|
|
1005
|
+
localize(13902, "Press any key to close the terminal.")), ( localize(13903, "Press any key to close the terminal.")), (
|
|
1006
|
+
localize(13904, "The terminal will be reused by tasks. Press any key to close."))];
|
|
1007
1007
|
const normalizedTaskFinishMessages = ( taskFinishMessages.map(msg => msg.replace(/[\s.,:;!?"'`()[\]{}<>\-_/\\]+/g, "").toLowerCase()));
|
|
1008
1008
|
function detectsVSCodeTaskFinishMessage(cursorLine) {
|
|
1009
1009
|
const compact = cursorLine.replace(/[\s.,:;!?"'`()[\]{}<>\-_/\\]+/g, "").toLowerCase();
|
|
@@ -7,7 +7,7 @@ import { TerminalToolId } from './toolIds.js';
|
|
|
7
7
|
|
|
8
8
|
const ConfirmTerminalCommandToolData = {
|
|
9
9
|
id: TerminalToolId.ConfirmTerminalCommand,
|
|
10
|
-
displayName: ( localize(
|
|
10
|
+
displayName: ( localize(13905, "Confirm Terminal Command")),
|
|
11
11
|
modelDescription: [
|
|
12
12
|
"This tool allows you to get explicit user confirmation for a terminal command without executing it.",
|
|
13
13
|
"",
|
|
@@ -25,7 +25,7 @@ const ConfirmTerminalCommandToolData = {
|
|
|
25
25
|
"",
|
|
26
26
|
"After confirmation, use a tool to actually execute the command."
|
|
27
27
|
].join("\n"),
|
|
28
|
-
userDescription: ( localize(
|
|
28
|
+
userDescription: ( localize(13906, "Tool for confirming terminal commands")),
|
|
29
29
|
source: ToolDataSource.Internal,
|
|
30
30
|
icon: Codicon.shield,
|
|
31
31
|
inputSchema: {
|
|
@@ -5,7 +5,7 @@ import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/
|
|
|
5
5
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
6
6
|
import { CancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
7
7
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
|
-
import { MarkdownString
|
|
8
|
+
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
9
9
|
import { Disposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
10
10
|
import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
11
11
|
import { getMediaMime } from '@codingame/monaco-vscode-api/vscode/vs/base/common/mime';
|
|
@@ -65,9 +65,12 @@ import { TerminalChatCommandId } from '@codingame/monaco-vscode-xterm-common/vsc
|
|
|
65
65
|
import { clamp } from '@codingame/monaco-vscode-api/vscode/vs/base/common/numbers';
|
|
66
66
|
import { SandboxOutputAnalyzer } from './sandboxOutputAnalyzer.js';
|
|
67
67
|
import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
|
|
68
|
+
import { TerminalSandboxPrerequisiteCheck } from '../../common/terminalSandboxService.js';
|
|
68
69
|
import { ITerminalSandboxService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.service';
|
|
70
|
+
import { LanguageModelPartAudience } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
|
|
69
71
|
|
|
70
72
|
var RunInTerminalTool_1;
|
|
73
|
+
const TERMINAL_SANDBOX_DOCUMENTATION_URL = "https://aka.ms/vscode-sandboxing";
|
|
71
74
|
const TOOL_REFERENCE_NAME = "runInTerminal";
|
|
72
75
|
const LEGACY_TOOL_REFERENCE_FULL_NAMES = ["runCommands/runInTerminal"];
|
|
73
76
|
function createPowerShellModelDescription(shell, isSandboxEnabled, networkDomains) {
|
|
@@ -114,7 +117,8 @@ function createPowerShellModelDescription(shell, isSandboxEnabled, networkDomain
|
|
|
114
117
|
"- Prefer idiomatic PowerShell like Get-ChildItem instead of dir or ls for file listings",
|
|
115
118
|
"- Use Test-Path to check file/directory existence",
|
|
116
119
|
"- Be specific with Select-Object properties to avoid excessive output",
|
|
117
|
-
"- Avoid printing credentials unless absolutely required"
|
|
120
|
+
"- Avoid printing credentials unless absolutely required",
|
|
121
|
+
`- NEVER run Start-Sleep or similar wait commands. If you need to wait for a background process, use ${TerminalToolId.AwaitTerminal} or ${TerminalToolId.GetTerminalOutput} instead`
|
|
118
122
|
);
|
|
119
123
|
return parts.join("\n");
|
|
120
124
|
}
|
|
@@ -184,7 +188,8 @@ Best Practices:
|
|
|
184
188
|
- Quote variables: "$var" instead of $var to handle spaces
|
|
185
189
|
- Use find with -exec or xargs for file operations
|
|
186
190
|
- Be specific with commands to avoid excessive output
|
|
187
|
-
- Avoid printing credentials unless absolutely required
|
|
191
|
+
- Avoid printing credentials unless absolutely required
|
|
192
|
+
- NEVER run sleep or similar wait commands in a terminal. If you need to wait for a background process, use ${TerminalToolId.AwaitTerminal} or ${TerminalToolId.GetTerminalOutput} instead`);
|
|
188
193
|
return parts.join("");
|
|
189
194
|
}
|
|
190
195
|
function createBashModelDescription(isSandboxEnabled, networkDomains) {
|
|
@@ -245,9 +250,9 @@ async function createRunInTerminalToolData(accessor) {
|
|
|
245
250
|
id: TerminalToolId.RunInTerminal,
|
|
246
251
|
toolReferenceName: TOOL_REFERENCE_NAME,
|
|
247
252
|
legacyToolReferenceFullNames: LEGACY_TOOL_REFERENCE_FULL_NAMES,
|
|
248
|
-
displayName: ( localize(
|
|
253
|
+
displayName: ( localize(13907, "Run in Terminal")),
|
|
249
254
|
modelDescription,
|
|
250
|
-
userDescription: ( localize(
|
|
255
|
+
userDescription: ( localize(13908, "Run commands in the terminal")),
|
|
251
256
|
source: ToolDataSource.Internal,
|
|
252
257
|
icon: Codicon.terminal,
|
|
253
258
|
inputSchema: {
|
|
@@ -267,7 +272,7 @@ async function createRunInTerminalToolData(accessor) {
|
|
|
267
272
|
},
|
|
268
273
|
isBackground: {
|
|
269
274
|
type: "boolean",
|
|
270
|
-
description: `Whether the command starts a background process.\n\n- If true, a new shell will be spawned where the cwd is the workspace directory and will run asynchronously in the background and you will not see the output.\n\n- If false, a single shell is shared between all non-background terminals where the cwd starts at the workspace directory and is remembered until that terminal is moved to the background, the tool call will block on the command finishing and only then you will get the output.\n\nExamples of background processes: building in watch mode, starting a server. You can check the output of a background process later on by using ${TerminalToolId.GetTerminalOutput}.`
|
|
275
|
+
description: `Whether the command starts a background process.\n\n- If true, a new shell will be spawned where the cwd is the workspace directory and will run asynchronously in the background and you will not see the output.\n\n- If false, a single shell is shared between all non-background terminals where the cwd starts at the workspace directory and is remembered until that terminal is moved to the background, the tool call will block on the command finishing and only then you will get the output.\n\nExamples of background processes: building in watch mode, starting a server. You can check the output of a background process later on by using ${TerminalToolId.GetTerminalOutput}. If unsure whether a command will be long-running, prefer isBackground=true.`
|
|
271
276
|
},
|
|
272
277
|
timeout: {
|
|
273
278
|
type: "number",
|
|
@@ -284,7 +289,7 @@ async function createRunInTerminalToolData(accessor) {
|
|
|
284
289
|
}
|
|
285
290
|
} : {})
|
|
286
291
|
},
|
|
287
|
-
required: ["command", "explanation", "goal", "isBackground"
|
|
292
|
+
required: ["command", "explanation", "goal", "isBackground"]
|
|
288
293
|
}
|
|
289
294
|
};
|
|
290
295
|
}
|
|
@@ -295,7 +300,7 @@ var TerminalToolStorageKeysInternal;
|
|
|
295
300
|
const telemetryIgnoredSequences = [
|
|
296
301
|
"\u001b[I",
|
|
297
302
|
"\u001b[O"];
|
|
298
|
-
const altBufferMessage = "\n" + ( localize(
|
|
303
|
+
const altBufferMessage = "\n" + ( localize(13909, "The command opened the alternate buffer."));
|
|
299
304
|
let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
300
305
|
static {
|
|
301
306
|
RunInTerminalTool_1 = this;
|
|
@@ -425,7 +430,7 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
425
430
|
this._removeTerminalAssociations(e);
|
|
426
431
|
}));
|
|
427
432
|
this._register(this._chatService.onDidDisposeSession(e => {
|
|
428
|
-
for (const resource of e.
|
|
433
|
+
for (const resource of e.sessionResources) {
|
|
429
434
|
this._cleanupSessionTerminals(resource);
|
|
430
435
|
}
|
|
431
436
|
}));
|
|
@@ -435,13 +440,13 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
435
440
|
if (partialInput && typeof partialInput === "object" && partialInput.command) {
|
|
436
441
|
const normalizedCommand = normalizeTerminalCommandForDisplay(partialInput.command).replace(/\r\n|\r|\n/g, " ");
|
|
437
442
|
const truncatedCommand = normalizedCommand.length > 80 ? normalizedCommand.substring(0, 77) + "..." : normalizedCommand;
|
|
438
|
-
const invocationMessage = partialInput.isBackground ? ( new MarkdownString(( localize(
|
|
443
|
+
const invocationMessage = partialInput.isBackground ? ( new MarkdownString(( localize(13910, "Running `{0}` in background", truncatedCommand)))) : ( new MarkdownString(( localize(13911, "Running `{0}`", truncatedCommand))));
|
|
439
444
|
return {
|
|
440
445
|
invocationMessage
|
|
441
446
|
};
|
|
442
447
|
}
|
|
443
448
|
return {
|
|
444
|
-
invocationMessage: ( localize(
|
|
449
|
+
invocationMessage: ( localize(13912, "Running command"))
|
|
445
450
|
};
|
|
446
451
|
}
|
|
447
452
|
async prepareToolInvocation(context, token) {
|
|
@@ -454,7 +459,7 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
454
459
|
instance = toolTerminal.instance;
|
|
455
460
|
}
|
|
456
461
|
}
|
|
457
|
-
const [os, shell, cwd,
|
|
462
|
+
const [os, shell, cwd, sandboxPrereqs] = await Promise.all([this._osBackend, this._profileFetcher.getCopilotShell(), (async () => {
|
|
458
463
|
let cwd = await instance?.getCwdResource();
|
|
459
464
|
if (!cwd) {
|
|
460
465
|
const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot();
|
|
@@ -462,9 +467,11 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
462
467
|
cwd = workspaceFolder?.uri;
|
|
463
468
|
}
|
|
464
469
|
return cwd;
|
|
465
|
-
})(), this._terminalSandboxService.
|
|
470
|
+
})(), this._terminalSandboxService.checkForSandboxingPrereqs()]);
|
|
466
471
|
const language = os === OperatingSystem.Windows ? "pwsh" : "sh";
|
|
472
|
+
const isTerminalSandboxEnabled = sandboxPrereqs.enabled;
|
|
467
473
|
const requiresUnsandboxConfirmation = isTerminalSandboxEnabled && args.requestUnsandboxedExecution === true;
|
|
474
|
+
const missingDependencies = sandboxPrereqs.failedCheck === TerminalSandboxPrerequisiteCheck.Dependencies && sandboxPrereqs.missingDependencies?.length ? sandboxPrereqs.missingDependencies : undefined;
|
|
468
475
|
const terminalToolSessionId = generateUuid();
|
|
469
476
|
const terminalCommandId = `tool-${generateUuid()}`;
|
|
470
477
|
let rewrittenCommand = args.command;
|
|
@@ -503,8 +510,22 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
503
510
|
language,
|
|
504
511
|
isBackground: args.isBackground,
|
|
505
512
|
requestUnsandboxedExecution: requiresUnsandboxConfirmation,
|
|
506
|
-
requestUnsandboxedExecutionReason: args.requestUnsandboxedExecutionReason
|
|
513
|
+
requestUnsandboxedExecutionReason: args.requestUnsandboxedExecutionReason,
|
|
514
|
+
missingSandboxDependencies: missingDependencies
|
|
507
515
|
};
|
|
516
|
+
let sandboxConfirmationMessageForMissingDeps = undefined;
|
|
517
|
+
if (missingDependencies) {
|
|
518
|
+
const depsList = missingDependencies.join(", ");
|
|
519
|
+
sandboxConfirmationMessageForMissingDeps = {
|
|
520
|
+
title: ( localize(13913, "Missing Sandbox Dependencies")),
|
|
521
|
+
message: ( new MarkdownString(( localize(
|
|
522
|
+
13914,
|
|
523
|
+
"The following dependencies required for sandboxed execution are not installed: {0}. Would you like to install them?",
|
|
524
|
+
depsList
|
|
525
|
+
)))),
|
|
526
|
+
customButtons: [( localize(13915, "Install")), ( localize(13916, "Cancel"))]
|
|
527
|
+
};
|
|
528
|
+
}
|
|
508
529
|
const alternativeRecommendation = getRecommendedToolsOverRunInTerminal(args.command, this._languageModelToolsService);
|
|
509
530
|
if (alternativeRecommendation) {
|
|
510
531
|
toolSpecificData.alternativeRecommendation = alternativeRecommendation;
|
|
@@ -598,16 +619,16 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
598
619
|
cdPrefix
|
|
599
620
|
};
|
|
600
621
|
confirmationTitle = args.isBackground ? ( localize(
|
|
601
|
-
|
|
622
|
+
13917,
|
|
602
623
|
"Run `{0}` command in background within `{1}`?",
|
|
603
624
|
shellType,
|
|
604
625
|
directoryLabel
|
|
605
|
-
)) : ( localize(
|
|
626
|
+
)) : ( localize(13918, "Run `{0}` command within `{1}`?", shellType, directoryLabel));
|
|
606
627
|
} else {
|
|
607
628
|
toolSpecificData.confirmation = {
|
|
608
629
|
commandLine: commandToDisplay
|
|
609
630
|
};
|
|
610
|
-
confirmationTitle = args.isBackground ? ( localize(
|
|
631
|
+
confirmationTitle = args.isBackground ? ( localize(13919, "Run `{0}` command in background?", shellType)) : ( localize(13920, "Run `{0}` command?", shellType));
|
|
611
632
|
}
|
|
612
633
|
const commandForPresenter = extractedCd?.command ?? commandToDisplay;
|
|
613
634
|
let presenterInput = commandForPresenter;
|
|
@@ -626,31 +647,49 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
626
647
|
language: presenterResult.language ?? undefined
|
|
627
648
|
};
|
|
628
649
|
if (extractedCd && toolSpecificData.confirmation?.cwdLabel) {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
650
|
+
if (presenterResult.languageDisplayName) {
|
|
651
|
+
confirmationTitle = args.isBackground ? ( localize(
|
|
652
|
+
13921,
|
|
653
|
+
"Run `{0}` command in `{1}` in background within `{2}`?",
|
|
654
|
+
presenterResult.languageDisplayName,
|
|
655
|
+
shellType,
|
|
656
|
+
toolSpecificData.confirmation.cwdLabel
|
|
657
|
+
)) : ( localize(
|
|
658
|
+
13922,
|
|
659
|
+
"Run `{0}` command in `{1}` within `{2}`?",
|
|
660
|
+
presenterResult.languageDisplayName,
|
|
661
|
+
shellType,
|
|
662
|
+
toolSpecificData.confirmation.cwdLabel
|
|
663
|
+
));
|
|
664
|
+
} else {
|
|
665
|
+
confirmationTitle = args.isBackground ? ( localize(
|
|
666
|
+
13923,
|
|
667
|
+
"Run command in `{0}` in background within `{1}`?",
|
|
668
|
+
shellType,
|
|
669
|
+
toolSpecificData.confirmation.cwdLabel
|
|
670
|
+
)) : ( localize(
|
|
671
|
+
13924,
|
|
672
|
+
"Run command in `{0}` within `{1}`?",
|
|
673
|
+
shellType,
|
|
674
|
+
toolSpecificData.confirmation.cwdLabel
|
|
675
|
+
));
|
|
676
|
+
}
|
|
642
677
|
} else {
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
678
|
+
if (presenterResult.languageDisplayName) {
|
|
679
|
+
confirmationTitle = args.isBackground ? ( localize(
|
|
680
|
+
13925,
|
|
681
|
+
"Run `{0}` command in `{1}` in background?",
|
|
682
|
+
presenterResult.languageDisplayName,
|
|
683
|
+
shellType
|
|
684
|
+
)) : ( localize(
|
|
685
|
+
13926,
|
|
686
|
+
"Run `{0}` command in `{1}`?",
|
|
687
|
+
presenterResult.languageDisplayName,
|
|
688
|
+
shellType
|
|
689
|
+
));
|
|
690
|
+
} else {
|
|
691
|
+
confirmationTitle = args.isBackground ? ( localize(13927, "Run command in `{0}` in background?", shellType)) : ( localize(13928, "Run command in `{0}`?", shellType));
|
|
692
|
+
}
|
|
654
693
|
}
|
|
655
694
|
if (!presenterResult.processOtherPresenters) {
|
|
656
695
|
break;
|
|
@@ -659,16 +698,26 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
659
698
|
}
|
|
660
699
|
}
|
|
661
700
|
if (requiresUnsandboxConfirmation) {
|
|
662
|
-
confirmationTitle = args.isBackground ? ( localize(
|
|
701
|
+
confirmationTitle = args.isBackground ? ( localize(
|
|
702
|
+
13929,
|
|
703
|
+
"Run `{0}` command outside the [sandbox]({1}) in background?",
|
|
704
|
+
shellType,
|
|
705
|
+
TERMINAL_SANDBOX_DOCUMENTATION_URL
|
|
706
|
+
)) : ( localize(
|
|
707
|
+
13930,
|
|
708
|
+
"Run `{0}` command outside the [sandbox]({1})?",
|
|
709
|
+
shellType,
|
|
710
|
+
TERMINAL_SANDBOX_DOCUMENTATION_URL
|
|
711
|
+
));
|
|
663
712
|
}
|
|
664
713
|
const shouldShowConfirmation = (!isFinalAutoApproved && !isSessionAutoApproved) || context.forceConfirmationReason !== undefined;
|
|
665
714
|
const confirmationMessage = requiresUnsandboxConfirmation ? ( new MarkdownString(( localize(
|
|
666
|
-
|
|
715
|
+
13931,
|
|
667
716
|
"Explanation: {0}\n\nGoal: {1}\n\nReason for leaving the sandbox: {2}",
|
|
668
717
|
args.explanation,
|
|
669
718
|
args.goal,
|
|
670
|
-
args.requestUnsandboxedExecutionReason || ( localize(
|
|
671
|
-
)))) : ( new MarkdownString(( localize(
|
|
719
|
+
args.requestUnsandboxedExecutionReason || ( localize(13932, "The model indicated that this command needs unsandboxed access."))
|
|
720
|
+
)))) : ( new MarkdownString(( localize(13933, "Explanation: {0}\n\nGoal: {1}", args.explanation, args.goal))));
|
|
672
721
|
const confirmationMessages = shouldShowConfirmation ? {
|
|
673
722
|
title: confirmationTitle,
|
|
674
723
|
message: confirmationMessage,
|
|
@@ -678,12 +727,11 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
678
727
|
} : undefined;
|
|
679
728
|
const rawDisplayCommand = toolSpecificData.commandLine.forDisplay ?? toolSpecificData.commandLine.toolEdited ?? toolSpecificData.commandLine.original;
|
|
680
729
|
const displayCommand = rawDisplayCommand.length > 80 ? rawDisplayCommand.substring(0, 77) + "..." : rawDisplayCommand;
|
|
681
|
-
const
|
|
682
|
-
const invocationMessage = toolSpecificData.commandLine.isSandboxWrapped ? args.isBackground ? ( new MarkdownString(( localize(13862, "Running `{0}` in sandbox in background", escapedDisplayCommand)))) : ( new MarkdownString(( localize(13863, "Running `{0}` in sandbox", escapedDisplayCommand)))) : args.isBackground ? ( new MarkdownString(( localize(13864, "Running `{0}` in background", escapedDisplayCommand)))) : ( new MarkdownString(( localize(13865, "Running `{0}`", escapedDisplayCommand))));
|
|
730
|
+
const invocationMessage = toolSpecificData.commandLine.isSandboxWrapped ? args.isBackground ? ( new MarkdownString(( localize(13934, "Running `{0}` in sandbox in background", displayCommand)))) : ( new MarkdownString(( localize(13935, "Running `{0}` in sandbox", displayCommand)))) : args.isBackground ? ( new MarkdownString(( localize(13936, "Running `{0}` in background", displayCommand)))) : ( new MarkdownString(( localize(13937, "Running `{0}`", displayCommand))));
|
|
683
731
|
return {
|
|
684
732
|
invocationMessage,
|
|
685
733
|
icon: toolSpecificData.commandLine.isSandboxWrapped ? Codicon.terminalSecure : Codicon.terminal,
|
|
686
|
-
confirmationMessages,
|
|
734
|
+
confirmationMessages: sandboxConfirmationMessageForMissingDeps ?? confirmationMessages,
|
|
687
735
|
toolSpecificData
|
|
688
736
|
};
|
|
689
737
|
}
|
|
@@ -717,6 +765,56 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
717
765
|
}]
|
|
718
766
|
};
|
|
719
767
|
}
|
|
768
|
+
if (toolSpecificData.missingSandboxDependencies?.length) {
|
|
769
|
+
const installButton = ( localize(13915, "Install"));
|
|
770
|
+
if (invocation.selectedCustomButton === installButton) {
|
|
771
|
+
const sessionResource = invocation.context.sessionResource;
|
|
772
|
+
const {
|
|
773
|
+
exitCode
|
|
774
|
+
} = await this._terminalSandboxService.installMissingSandboxDependencies(toolSpecificData.missingSandboxDependencies, sessionResource, token, {
|
|
775
|
+
createTerminal: async () => this._terminalService.createTerminal({}),
|
|
776
|
+
focusTerminal: async terminal => {
|
|
777
|
+
this._terminalService.setActiveInstance(terminal);
|
|
778
|
+
await this._terminalService.revealTerminal(terminal, true);
|
|
779
|
+
terminal.focus();
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
if (exitCode !== undefined && exitCode !== 0) {
|
|
783
|
+
return {
|
|
784
|
+
content: [{
|
|
785
|
+
kind: "text",
|
|
786
|
+
value: ( localize(
|
|
787
|
+
13938,
|
|
788
|
+
"Sandbox dependency installation failed (exit code {0}). The command was not executed.",
|
|
789
|
+
exitCode
|
|
790
|
+
))
|
|
791
|
+
}]
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
if (exitCode === undefined) {
|
|
795
|
+
return {
|
|
796
|
+
content: [{
|
|
797
|
+
kind: "text",
|
|
798
|
+
value: ( localize(
|
|
799
|
+
13939,
|
|
800
|
+
"Could not determine whether sandbox dependency installation succeeded. The command was not executed."
|
|
801
|
+
))
|
|
802
|
+
}]
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
this._logService.info(
|
|
806
|
+
"RunInTerminalTool: Sandbox dependency installation succeeded, proceeding with command execution"
|
|
807
|
+
);
|
|
808
|
+
} else {
|
|
809
|
+
this._logService.info("RunInTerminalTool: User cancelled sandbox dependency installation");
|
|
810
|
+
return {
|
|
811
|
+
content: [{
|
|
812
|
+
kind: "text",
|
|
813
|
+
value: ( localize(13940, "Sandbox dependency installation was cancelled by the user."))
|
|
814
|
+
}]
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
}
|
|
720
818
|
const args = invocation.parameters;
|
|
721
819
|
this._logService.debug(`RunInTerminalTool: Invoking with options ${JSON.stringify(args)}`);
|
|
722
820
|
let toolResultMessage;
|
|
@@ -1009,6 +1107,7 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
1009
1107
|
didUserEditCommand,
|
|
1010
1108
|
didToolEditCommand,
|
|
1011
1109
|
isBackground: args.isBackground,
|
|
1110
|
+
isSandboxWrapped: toolSpecificData.commandLine.isSandboxWrapped === true,
|
|
1012
1111
|
shellIntegrationQuality: toolTerminal.shellIntegrationQuality,
|
|
1013
1112
|
error,
|
|
1014
1113
|
isNewSession,
|
|
@@ -1052,7 +1151,7 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
1052
1151
|
}
|
|
1053
1152
|
if (didTimeout && timeoutValue !== undefined && timeoutValue > 0) {
|
|
1054
1153
|
resultText.push(
|
|
1055
|
-
`Note: Command timed out after ${timeoutValue}ms
|
|
1154
|
+
`Note: Command timed out after ${timeoutValue}ms and was moved to the background. The command may still be running in terminal ID ${termId}. Use ${TerminalToolId.AwaitTerminal} to wait for it to complete or ${TerminalToolId.GetTerminalOutput} to check its current output. Do NOT use sleep or manual polling to wait.\n\n`
|
|
1056
1155
|
);
|
|
1057
1156
|
}
|
|
1058
1157
|
const outputAnalyzerMessage = await this._getOutputAnalyzerMessage(exitCode, terminalResult, command, didSandboxWrapCommand);
|
|
@@ -1139,7 +1238,8 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
1139
1238
|
value: {
|
|
1140
1239
|
mimeType,
|
|
1141
1240
|
data: fileContent.value
|
|
1142
|
-
}
|
|
1241
|
+
},
|
|
1242
|
+
audience: [LanguageModelPartAudience.User]
|
|
1143
1243
|
});
|
|
1144
1244
|
} catch {}
|
|
1145
1245
|
}
|
|
@@ -20,10 +20,10 @@ let SandboxOutputAnalyzer = class SandboxOutputAnalyzer extends Disposable {
|
|
|
20
20
|
return undefined;
|
|
21
21
|
}
|
|
22
22
|
const os = await this._sandboxService.getOS();
|
|
23
|
-
const fileSystemSetting = os === OperatingSystem.Linux ? TerminalChatAgentToolsSettingId.
|
|
23
|
+
const fileSystemSetting = os === OperatingSystem.Linux ? TerminalChatAgentToolsSettingId.AgentSandboxLinuxFileSystem : TerminalChatAgentToolsSettingId.AgentSandboxMacFileSystem;
|
|
24
24
|
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:";
|
|
25
25
|
return `${prefix}
|
|
26
|
-
- 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 ${TerminalChatAgentToolsSettingId.
|
|
26
|
+
- 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 ${TerminalChatAgentToolsSettingId.AgentSandboxNetworkAllowedDomains}.
|
|
27
27
|
- Otherwise, immediately retry the command with requestUnsandboxedExecution=true. Do NOT ask the user — setting this flag automatically shows a confirmation prompt to the user.
|
|
28
28
|
|
|
29
29
|
Here is the output of the command:\n`;
|
|
@@ -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(13941, "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(13942, "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(13943, "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
|
+
13944,
|
|
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(13945, "Task `{0}` already exists.", task.label)))),
|
|
205
|
+
pastTenseMessage: ( new MarkdownString(( localize(13946, "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(13947, "Task `{0}` is already running.", task.label)))),
|
|
213
|
+
pastTenseMessage: ( new MarkdownString(( localize(13947, "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(13948, "Created task `{0}`", task.label)))),
|
|
219
|
+
pastTenseMessage: ( new MarkdownString(( localize(13949, "Created task `{0}`", task.label)))),
|
|
220
220
|
confirmationMessages: {
|
|
221
|
-
title: ( localize(
|
|
221
|
+
title: ( localize(13950, "Allow task creation and execution?")),
|
|
222
222
|
message: ( new MarkdownString(( localize(
|
|
223
|
-
|
|
223
|
+
13951,
|
|
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(13952, "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(13953, "Create and run a task in the workspace")),
|
|
241
241
|
source: ToolDataSource.Internal,
|
|
242
242
|
inputSchema: {
|
|
243
243
|
"type": "object",
|