@codingame/monaco-vscode-chat-service-override 26.2.2 → 28.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 +35 -2
- package/package.json +5 -5
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +15 -0
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +53 -0
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +219 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +89 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +251 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +123 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +278 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +76 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +299 -0
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +67 -0
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +263 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +85 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +397 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +27 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +74 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +54 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +87 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +71 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +43 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +154 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -8
- 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 +53 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +18 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +49 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +537 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.js +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/media/agentPluginEditor.css +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +282 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +634 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +10 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +74 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +4 -2
- 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 +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +90 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +20 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +43 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +84 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.d.ts → localAgentSessionsController.d.ts} +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.js → localAgentSessionsController.js} +24 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +179 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +987 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +246 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +878 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +692 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +936 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +702 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +30 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +36 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +622 -391
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +419 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +198 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +314 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +64 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +611 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +504 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +914 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +128 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +467 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +113 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +126 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +279 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +788 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +32 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +6 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditorController.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +16 -15
- 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 +63 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +26 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +2 -2
- 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.d.ts +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +40 -413
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +38 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +56 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +15 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +138 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +166 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +37 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +394 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +118 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +245 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.js +234 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +88 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +624 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.js +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +88 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +28 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +175 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +99 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +489 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +364 -279
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +69 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +76 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +67 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +187 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +242 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +311 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +29 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +8 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +126 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +9 -5
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +46 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +65 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +16 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +15 -6
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +28 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +190 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +208 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +19 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +261 -105
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +21 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -6
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +16 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +13 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +144 -11
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +36 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +119 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +748 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +146 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +672 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +35 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +3 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +7 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +10 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +26 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +293 -94
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +86 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +121 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +1422 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +48 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +404 -132
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +17 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +40 -28
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +14 -2
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +54 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +12 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +27 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +265 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +6 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +18 -81
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +10 -10
- 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 +6 -6
- 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/media/terminalChatWidget.css +6 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +35 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +1 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +13 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +3 -1
- 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/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- 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.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +302 -69
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +63 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +31 -0
- 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 +7 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +46 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +0 -587
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -51
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +0 -71
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +0 -293
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.js +0 -31
|
@@ -2,11 +2,13 @@ import type { Task } from "@codingame/monaco-vscode-api/vscode/vs/workbench/cont
|
|
|
2
2
|
import type { ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
3
3
|
import type { ILinkLocation } from "../../taskHelpers.js";
|
|
4
4
|
import type { IMarker as XtermMarker } from "@xterm/xterm";
|
|
5
|
+
import type { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
6
|
export interface IConfirmationPrompt {
|
|
6
7
|
prompt: string;
|
|
7
8
|
options: string[];
|
|
8
9
|
descriptions?: string[];
|
|
9
10
|
detectedRequestForFreeFormInput: boolean;
|
|
11
|
+
suggestedInput?: string;
|
|
10
12
|
}
|
|
11
13
|
export interface IExecution {
|
|
12
14
|
getOutput: (marker?: XtermMarker) => string;
|
|
@@ -14,7 +16,7 @@ export interface IExecution {
|
|
|
14
16
|
task?: Task | Pick<Task, "configurationProperties">;
|
|
15
17
|
dependencyTasks?: Task[];
|
|
16
18
|
instance: Pick<ITerminalInstance, "sendText" | "instanceId" | "onDidInputData" | "onDisposed" | "onData" | "focus" | "registerMarker">;
|
|
17
|
-
|
|
19
|
+
sessionResource: URI | undefined;
|
|
18
20
|
}
|
|
19
21
|
export interface IPollingResult {
|
|
20
22
|
output: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
3
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
4
3
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
4
|
import { ToolDataSource, ToolInvocationPresentation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
6
5
|
import { RunInTerminalTool } from './runInTerminalTool.js';
|
|
@@ -8,7 +7,7 @@ import { TerminalToolId } from './toolIds.js';
|
|
|
8
7
|
|
|
9
8
|
const ConfirmTerminalCommandToolData = {
|
|
10
9
|
id: TerminalToolId.ConfirmTerminalCommand,
|
|
11
|
-
displayName: ( localize(
|
|
10
|
+
displayName: ( localize(13591, "Confirm Terminal Command")),
|
|
12
11
|
modelDescription: [
|
|
13
12
|
"This tool allows you to get explicit user confirmation for a terminal command without executing it.",
|
|
14
13
|
"",
|
|
@@ -26,7 +25,7 @@ const ConfirmTerminalCommandToolData = {
|
|
|
26
25
|
"",
|
|
27
26
|
"After confirmation, use a tool to actually execute the command."
|
|
28
27
|
].join("\n"),
|
|
29
|
-
userDescription: ( localize(
|
|
28
|
+
userDescription: ( localize(13592, "Tool for confirming terminal commands")),
|
|
30
29
|
source: ToolDataSource.Internal,
|
|
31
30
|
icon: Codicon.shield,
|
|
32
31
|
inputSchema: {
|
|
@@ -50,13 +49,6 @@ const ConfirmTerminalCommandToolData = {
|
|
|
50
49
|
};
|
|
51
50
|
class ConfirmTerminalCommandTool extends RunInTerminalTool {
|
|
52
51
|
async prepareToolInvocation(context, token) {
|
|
53
|
-
try {
|
|
54
|
-
const sessionUri = context.chatSessionId ? ( URI.parse(context.chatSessionId)) : undefined;
|
|
55
|
-
const sessionId = sessionUri ? this._chatService.getSession(sessionUri)?.sessionId : undefined;
|
|
56
|
-
if (sessionId) {
|
|
57
|
-
context.chatSessionId = sessionId;
|
|
58
|
-
}
|
|
59
|
-
} catch {}
|
|
60
52
|
const preparedInvocation = await super.prepareToolInvocation(context, token);
|
|
61
53
|
if (preparedInvocation) {
|
|
62
54
|
preparedInvocation.presentation = ToolInvocationPresentation.HiddenAfterComplete;
|
|
@@ -69,6 +69,7 @@ export declare class RunInTerminalTool extends Disposable implements IToolImpl {
|
|
|
69
69
|
private readonly _commandLineRewriters;
|
|
70
70
|
private readonly _commandLineAnalyzers;
|
|
71
71
|
private readonly _commandLinePresenters;
|
|
72
|
+
private readonly _outputAnalyzers;
|
|
72
73
|
protected readonly _sessionTerminalAssociations: ResourceMap<IToolTerminal>;
|
|
73
74
|
protected readonly _osBackend: Promise<OperatingSystem>;
|
|
74
75
|
private static readonly _activeExecutions;
|
|
@@ -85,6 +86,12 @@ export declare class RunInTerminalTool extends Disposable implements IToolImpl {
|
|
|
85
86
|
static removeExecution(id: string): boolean;
|
|
86
87
|
constructor(_chatService: IChatService, _configurationService: IConfigurationService, _historyService: IHistoryService, _instantiationService: IInstantiationService, _labelService: ILabelService, _languageModelToolsService: ILanguageModelToolsService, _remoteAgentService: IRemoteAgentService, _storageService: IStorageService, _terminalChatService: ITerminalChatService, _logService: ITerminalLogService, _terminalService: ITerminalService, _workspaceContextService: IWorkspaceContextService, _chatWidgetService: IChatWidgetService);
|
|
87
88
|
prepareToolInvocation(context: IToolInvocationPreparationContext, token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
89
|
+
/**
|
|
90
|
+
* Returns true if the chat session's permission level (Autopilot/Bypass Approvals)
|
|
91
|
+
* auto-approves all tool calls, unless enterprise policy restricts it.
|
|
92
|
+
* Checks both the request-stamped level and the live picker level.
|
|
93
|
+
*/
|
|
94
|
+
private _isSessionAutoApproveLevel;
|
|
88
95
|
invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
89
96
|
private _handleTerminalVisibility;
|
|
90
97
|
/**
|
|
@@ -57,10 +57,11 @@ import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs
|
|
|
57
57
|
import { IHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/history/common/history.service';
|
|
58
58
|
import { TerminalCommandArtifactCollector } from './terminalCommandArtifactCollector.js';
|
|
59
59
|
import { isNumber, isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
60
|
-
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
60
|
+
import { ChatConfiguration, isAutoApproveLevel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
61
61
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
62
62
|
import { TerminalChatCommandId } from '@codingame/monaco-vscode-xterm-common/vscode/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat';
|
|
63
63
|
import { clamp } from '@codingame/monaco-vscode-api/vscode/vs/base/common/numbers';
|
|
64
|
+
import { SandboxOutputAnalyzer } from './sandboxOutputAnalyzer.js';
|
|
64
65
|
|
|
65
66
|
var RunInTerminalTool_1;
|
|
66
67
|
const TOOL_REFERENCE_NAME = "runInTerminal";
|
|
@@ -193,9 +194,9 @@ async function createRunInTerminalToolData(accessor) {
|
|
|
193
194
|
id: TerminalToolId.RunInTerminal,
|
|
194
195
|
toolReferenceName: TOOL_REFERENCE_NAME,
|
|
195
196
|
legacyToolReferenceFullNames: LEGACY_TOOL_REFERENCE_FULL_NAMES,
|
|
196
|
-
displayName: ( localize(
|
|
197
|
+
displayName: ( localize(13593, "Run in Terminal")),
|
|
197
198
|
modelDescription,
|
|
198
|
-
userDescription: ( localize(
|
|
199
|
+
userDescription: ( localize(13594, "Run commands in the terminal")),
|
|
199
200
|
source: ToolDataSource.Internal,
|
|
200
201
|
icon: Codicon.terminal,
|
|
201
202
|
inputSchema: {
|
|
@@ -233,7 +234,7 @@ var TerminalToolStorageKeysInternal;
|
|
|
233
234
|
const telemetryIgnoredSequences = [
|
|
234
235
|
"\u001b[I",
|
|
235
236
|
"\u001b[O"];
|
|
236
|
-
const altBufferMessage = ( localize(
|
|
237
|
+
const altBufferMessage = "\n" + ( localize(13595, "The command opened the alternate buffer."));
|
|
237
238
|
let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
238
239
|
static {
|
|
239
240
|
RunInTerminalTool_1 = this;
|
|
@@ -322,6 +323,9 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
322
323
|
( new PythonCommandLinePresenter()),
|
|
323
324
|
( new RubyCommandLinePresenter())
|
|
324
325
|
];
|
|
326
|
+
this._outputAnalyzers = [
|
|
327
|
+
this._register(this._instantiationService.createInstance(SandboxOutputAnalyzer))
|
|
328
|
+
];
|
|
325
329
|
this._register(
|
|
326
330
|
Event.runAndSubscribe(this._configurationService.onDidChangeConfiguration, e => {
|
|
327
331
|
if (!e || e.affectsConfiguration(TerminalChatAgentToolsSettingId.EnableAutoApprove)) {
|
|
@@ -350,7 +354,7 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
350
354
|
}
|
|
351
355
|
async prepareToolInvocation(context, token) {
|
|
352
356
|
const args = context.parameters;
|
|
353
|
-
const chatSessionResource = context.chatSessionResource
|
|
357
|
+
const chatSessionResource = context.chatSessionResource;
|
|
354
358
|
let instance;
|
|
355
359
|
if (chatSessionResource) {
|
|
356
360
|
const toolTerminal = this._sessionTerminalAssociations.get(chatSessionResource);
|
|
@@ -490,16 +494,16 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
490
494
|
cdPrefix
|
|
491
495
|
};
|
|
492
496
|
confirmationTitle = args.isBackground ? ( localize(
|
|
493
|
-
|
|
497
|
+
13596,
|
|
494
498
|
"Run `{0}` command in background within `{1}`?",
|
|
495
499
|
shellType,
|
|
496
500
|
directoryLabel
|
|
497
|
-
)) : ( localize(
|
|
501
|
+
)) : ( localize(13597, "Run `{0}` command within `{1}`?", shellType, directoryLabel));
|
|
498
502
|
} else {
|
|
499
503
|
toolSpecificData.confirmation = {
|
|
500
504
|
commandLine: commandToDisplay
|
|
501
505
|
};
|
|
502
|
-
confirmationTitle = args.isBackground ? ( localize(
|
|
506
|
+
confirmationTitle = args.isBackground ? ( localize(13598, "Run `{0}` command in background?", shellType)) : ( localize(13599, "Run `{0}` command?", shellType));
|
|
503
507
|
}
|
|
504
508
|
const commandForPresenter = extractedCd?.command ?? commandToDisplay;
|
|
505
509
|
let presenterInput = commandForPresenter;
|
|
@@ -519,13 +523,13 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
519
523
|
};
|
|
520
524
|
if (extractedCd && toolSpecificData.confirmation?.cwdLabel) {
|
|
521
525
|
confirmationTitle = args.isBackground ? ( localize(
|
|
522
|
-
|
|
526
|
+
13600,
|
|
523
527
|
"Run `{0}` command in `{1}` in background within `{2}`?",
|
|
524
528
|
presenterResult.languageDisplayName,
|
|
525
529
|
shellType,
|
|
526
530
|
toolSpecificData.confirmation.cwdLabel
|
|
527
531
|
)) : ( localize(
|
|
528
|
-
|
|
532
|
+
13601,
|
|
529
533
|
"Run `{0}` command in `{1}` within `{2}`?",
|
|
530
534
|
presenterResult.languageDisplayName,
|
|
531
535
|
shellType,
|
|
@@ -533,12 +537,12 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
533
537
|
));
|
|
534
538
|
} else {
|
|
535
539
|
confirmationTitle = args.isBackground ? ( localize(
|
|
536
|
-
|
|
540
|
+
13602,
|
|
537
541
|
"Run `{0}` command in `{1}` in background?",
|
|
538
542
|
presenterResult.languageDisplayName,
|
|
539
543
|
shellType
|
|
540
544
|
)) : ( localize(
|
|
541
|
-
|
|
545
|
+
13603,
|
|
542
546
|
"Run `{0}` command in `{1}`?",
|
|
543
547
|
presenterResult.languageDisplayName,
|
|
544
548
|
shellType
|
|
@@ -550,10 +554,11 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
550
554
|
presenterInput = presenterResult.commandLine;
|
|
551
555
|
}
|
|
552
556
|
}
|
|
553
|
-
const
|
|
557
|
+
const isSessionAutoApproved = chatSessionResource && this._isSessionAutoApproveLevel(chatSessionResource);
|
|
558
|
+
const shouldShowConfirmation = (!isFinalAutoApproved && !isSessionAutoApproved) || context.forceConfirmationReason !== undefined;
|
|
554
559
|
const confirmationMessages = shouldShowConfirmation ? {
|
|
555
560
|
title: confirmationTitle,
|
|
556
|
-
message: ( new MarkdownString(( localize(
|
|
561
|
+
message: ( new MarkdownString(( localize(13604, "Explanation: {0}\n\nGoal: {1}", args.explanation, args.goal)))),
|
|
557
562
|
disclaimer,
|
|
558
563
|
terminalCustomActions: customActions
|
|
559
564
|
} : undefined;
|
|
@@ -562,11 +567,27 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
562
567
|
toolSpecificData
|
|
563
568
|
};
|
|
564
569
|
}
|
|
570
|
+
_isSessionAutoApproveLevel(chatSessionResource) {
|
|
571
|
+
const inspected = this._configurationService.inspect(ChatConfiguration.GlobalAutoApprove);
|
|
572
|
+
if (inspected.policyValue === false) {
|
|
573
|
+
return false;
|
|
574
|
+
}
|
|
575
|
+
const widget = this._chatWidgetService.getWidgetBySessionResource(chatSessionResource) ?? this._chatWidgetService.lastFocusedWidget;
|
|
576
|
+
if (widget && isAutoApproveLevel(widget.input.currentModeInfo.permissionLevel)) {
|
|
577
|
+
return true;
|
|
578
|
+
}
|
|
579
|
+
const model = this._chatService.getSession(chatSessionResource);
|
|
580
|
+
const request = model?.getRequests().at(-1);
|
|
581
|
+
return isAutoApproveLevel(request?.modeInfo?.permissionLevel);
|
|
582
|
+
}
|
|
565
583
|
async invoke(invocation, _countTokens, _progress, token) {
|
|
566
584
|
const toolSpecificData = invocation.toolSpecificData;
|
|
567
585
|
if (!toolSpecificData) {
|
|
568
586
|
throw ( new Error("toolSpecificData must be provided for this tool"));
|
|
569
587
|
}
|
|
588
|
+
if (!invocation.context) {
|
|
589
|
+
throw ( new Error("Invocation context must be provided for this tool"));
|
|
590
|
+
}
|
|
570
591
|
const commandId = toolSpecificData.terminalCommandId;
|
|
571
592
|
if (toolSpecificData.alternativeRecommendation) {
|
|
572
593
|
return {
|
|
@@ -579,8 +600,7 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
579
600
|
const args = invocation.parameters;
|
|
580
601
|
this._logService.debug(`RunInTerminalTool: Invoking with options ${JSON.stringify(args)}`);
|
|
581
602
|
let toolResultMessage;
|
|
582
|
-
const chatSessionResource = invocation.context
|
|
583
|
-
const chatSessionId = chatSessionResourceToId(chatSessionResource);
|
|
603
|
+
const chatSessionResource = invocation.context.sessionResource;
|
|
584
604
|
const command = toolSpecificData.commandLine.userEdited ?? toolSpecificData.commandLine.toolEdited ?? toolSpecificData.commandLine.original;
|
|
585
605
|
const didUserEditCommand = (toolSpecificData.commandLine.userEdited !== undefined && toolSpecificData.commandLine.userEdited !== toolSpecificData.commandLine.original);
|
|
586
606
|
const didToolEditCommand = (!didUserEditCommand && toolSpecificData.commandLine.toolEdited !== undefined && toolSpecificData.commandLine.toolEdited !== toolSpecificData.commandLine.original);
|
|
@@ -594,7 +614,7 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
594
614
|
const terminalToolSessionId = toolSpecificData.terminalToolSessionId;
|
|
595
615
|
const store = ( new DisposableStore());
|
|
596
616
|
this._logService.debug(
|
|
597
|
-
`RunInTerminalTool: Creating ${args.isBackground ? "background" : "foreground"} terminal. termId=${termId},
|
|
617
|
+
`RunInTerminalTool: Creating ${args.isBackground ? "background" : "foreground"} terminal. termId=${termId}, chatSessionResource=${chatSessionResource}`
|
|
598
618
|
);
|
|
599
619
|
const toolTerminal = await this._initTerminal(
|
|
600
620
|
chatSessionResource,
|
|
@@ -661,7 +681,7 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
661
681
|
try {
|
|
662
682
|
const execution = this._instantiationService.createInstance(
|
|
663
683
|
ActiveTerminalExecution,
|
|
664
|
-
|
|
684
|
+
chatSessionResource,
|
|
665
685
|
termId,
|
|
666
686
|
toolTerminal,
|
|
667
687
|
commandDetection,
|
|
@@ -680,7 +700,7 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
680
700
|
if (!outputMonitor) {
|
|
681
701
|
outputMonitor = store.add(this._instantiationService.createInstance(OutputMonitor, {
|
|
682
702
|
instance: toolTerminal.instance,
|
|
683
|
-
|
|
703
|
+
sessionResource: chatSessionResource,
|
|
684
704
|
getOutput: marker => execution.getOutput(marker ?? startMarker)
|
|
685
705
|
}, undefined, invocation.context, token, command));
|
|
686
706
|
}
|
|
@@ -794,6 +814,13 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
794
814
|
this._logService.debug(`RunInTerminalTool: Threw exception`);
|
|
795
815
|
if (e instanceof CancellationError) {
|
|
796
816
|
await this._commandArtifactCollector.capture(toolSpecificData, toolTerminal.instance, commandId);
|
|
817
|
+
const state = toolSpecificData.terminalCommandState ?? {};
|
|
818
|
+
if (state.exitCode === undefined) {
|
|
819
|
+
state.exitCode = -1;
|
|
820
|
+
state.timestamp = state.timestamp ?? timingStart;
|
|
821
|
+
state.duration = state.duration ?? Math.max(0, Date.now() - state.timestamp);
|
|
822
|
+
}
|
|
823
|
+
toolSpecificData.terminalCommandState = state;
|
|
797
824
|
}
|
|
798
825
|
RunInTerminalTool_1._activeExecutions.get(termId)?.dispose();
|
|
799
826
|
RunInTerminalTool_1._activeExecutions.delete(termId);
|
|
@@ -859,6 +886,21 @@ let RunInTerminalTool = class RunInTerminalTool extends Disposable {
|
|
|
859
886
|
`Note: This terminal execution was moved to the background using the ID ${termId}\n`
|
|
860
887
|
);
|
|
861
888
|
}
|
|
889
|
+
let outputAnalyzerMessage;
|
|
890
|
+
for (const analyzer of this._outputAnalyzers) {
|
|
891
|
+
const message = await analyzer.analyze({
|
|
892
|
+
exitCode,
|
|
893
|
+
exitResult: terminalResult,
|
|
894
|
+
commandLine: command
|
|
895
|
+
});
|
|
896
|
+
if (message) {
|
|
897
|
+
outputAnalyzerMessage = message;
|
|
898
|
+
break;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
if (outputAnalyzerMessage) {
|
|
902
|
+
resultText.push(`${outputAnalyzerMessage}\n`);
|
|
903
|
+
}
|
|
862
904
|
resultText.push(terminalResult);
|
|
863
905
|
const isError = exitCode !== undefined && exitCode !== 0;
|
|
864
906
|
return {
|
|
@@ -1069,7 +1111,7 @@ let ActiveTerminalExecution = class ActiveTerminalExecution extends Disposable {
|
|
|
1069
1111
|
return this._toolTerminal.instance;
|
|
1070
1112
|
}
|
|
1071
1113
|
constructor(
|
|
1072
|
-
|
|
1114
|
+
sessionResource,
|
|
1073
1115
|
termId,
|
|
1074
1116
|
toolTerminal,
|
|
1075
1117
|
commandDetection,
|
|
@@ -1077,7 +1119,7 @@ let ActiveTerminalExecution = class ActiveTerminalExecution extends Disposable {
|
|
|
1077
1119
|
_instantiationService
|
|
1078
1120
|
) {
|
|
1079
1121
|
super();
|
|
1080
|
-
this.
|
|
1122
|
+
this.sessionResource = sessionResource;
|
|
1081
1123
|
this.termId = termId;
|
|
1082
1124
|
this._instantiationService = _instantiationService;
|
|
1083
1125
|
this._toolTerminal = toolTerminal;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { ITerminalSandboxService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.service";
|
|
3
|
+
import type { IOutputAnalyzer, IOutputAnalyzerOptions } from "./outputAnalyzer.js";
|
|
4
|
+
export declare class SandboxOutputAnalyzer extends Disposable implements IOutputAnalyzer {
|
|
5
|
+
private readonly _sandboxService;
|
|
6
|
+
constructor(_sandboxService: ITerminalSandboxService);
|
|
7
|
+
analyze(options: IOutputAnalyzerOptions): Promise<string | undefined>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { ITerminalSandboxService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.service';
|
|
6
|
+
import { TerminalChatAgentToolsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration';
|
|
7
|
+
|
|
8
|
+
let SandboxOutputAnalyzer = class SandboxOutputAnalyzer extends Disposable {
|
|
9
|
+
constructor(_sandboxService) {
|
|
10
|
+
super();
|
|
11
|
+
this._sandboxService = _sandboxService;
|
|
12
|
+
}
|
|
13
|
+
async analyze(options) {
|
|
14
|
+
if (options.exitCode === undefined || options.exitCode === 0) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
if (!(await this._sandboxService.isEnabled())) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
return localize(
|
|
21
|
+
13605,
|
|
22
|
+
"Command failed while running in sandboxed mode. Use the command result to determine the scenario. If the issue is filesystem permissions, update allowWrite in {0} (Linux) or {1} (macOS). If the issue is domain/network related, add the required domains to {2}.allowedDomains.",
|
|
23
|
+
TerminalChatAgentToolsSettingId.TerminalSandboxLinuxFileSystem,
|
|
24
|
+
TerminalChatAgentToolsSettingId.TerminalSandboxMacFileSystem,
|
|
25
|
+
TerminalChatAgentToolsSettingId.TerminalSandboxNetwork
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
SandboxOutputAnalyzer = ( __decorate([( __param(0, ITerminalSandboxService))], SandboxOutputAnalyzer));
|
|
30
|
+
|
|
31
|
+
export { SandboxOutputAnalyzer };
|
|
@@ -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(13606, "Resolving the task"))))
|
|
83
83
|
});
|
|
84
84
|
let task;
|
|
85
85
|
const start = Date.now();
|
|
@@ -96,11 +96,11 @@ 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(13607, "Task not found: `{0}`", args.task.label))))
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
_progress.report({
|
|
103
|
-
message: ( new MarkdownString(( localize(
|
|
103
|
+
message: ( new MarkdownString(( localize(13608, "Running task `{0}`", args.task.label))))
|
|
104
104
|
});
|
|
105
105
|
const raceResult = await Promise.race([
|
|
106
106
|
this._tasksService.run(task, undefined, TaskRunSource.ChatAgent),
|
|
@@ -119,7 +119,7 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
|
|
|
119
119
|
value: `Task started but no terminal was found for: ${args.task.label}`
|
|
120
120
|
}],
|
|
121
121
|
toolResultMessage: ( new MarkdownString(( localize(
|
|
122
|
-
|
|
122
|
+
13609,
|
|
123
123
|
"Task started but no terminal was found for: `{0}`",
|
|
124
124
|
args.task.label
|
|
125
125
|
))))
|
|
@@ -182,26 +182,26 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
|
|
|
182
182
|
const allTasks = await this._tasksService.tasks();
|
|
183
183
|
if (allTasks?.find(t => t._label === task.label)) {
|
|
184
184
|
return {
|
|
185
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
186
|
-
pastTenseMessage: ( new MarkdownString(( localize(
|
|
185
|
+
invocationMessage: ( new MarkdownString(( localize(13610, "Task `{0}` already exists.", task.label)))),
|
|
186
|
+
pastTenseMessage: ( new MarkdownString(( localize(13611, "Task `{0}` already exists.", task.label)))),
|
|
187
187
|
confirmationMessages: undefined
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
190
|
const activeTasks = await this._tasksService.getActiveTasks();
|
|
191
191
|
if (activeTasks.find(t => t._label === task.label)) {
|
|
192
192
|
return {
|
|
193
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
194
|
-
pastTenseMessage: ( new MarkdownString(( localize(
|
|
193
|
+
invocationMessage: ( new MarkdownString(( localize(13612, "Task `{0}` is already running.", task.label)))),
|
|
194
|
+
pastTenseMessage: ( new MarkdownString(( localize(13612, "Task `{0}` is already running.", task.label)))),
|
|
195
195
|
confirmationMessages: undefined
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
198
|
return {
|
|
199
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
200
|
-
pastTenseMessage: ( new MarkdownString(( localize(
|
|
199
|
+
invocationMessage: ( new MarkdownString(( localize(13613, "Created task `{0}`", task.label)))),
|
|
200
|
+
pastTenseMessage: ( new MarkdownString(( localize(13614, "Created task `{0}`", task.label)))),
|
|
201
201
|
confirmationMessages: {
|
|
202
|
-
title: ( localize(
|
|
202
|
+
title: ( localize(13615, "Allow task creation and execution?")),
|
|
203
203
|
message: ( new MarkdownString(( localize(
|
|
204
|
-
|
|
204
|
+
13616,
|
|
205
205
|
"A task `{0}` with command `{1}`{2} will be created.",
|
|
206
206
|
task.label,
|
|
207
207
|
task.command,
|
|
@@ -216,9 +216,9 @@ const CreateAndRunTaskToolData = {
|
|
|
216
216
|
id: TerminalToolId.CreateAndRunTask,
|
|
217
217
|
toolReferenceName: "createAndRunTask",
|
|
218
218
|
legacyToolReferenceFullNames: ["runTasks/createAndRunTask"],
|
|
219
|
-
displayName: ( localize(
|
|
219
|
+
displayName: ( localize(13617, "Create and run Task")),
|
|
220
220
|
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.",
|
|
221
|
-
userDescription: ( localize(
|
|
221
|
+
userDescription: ( localize(13618, "Create and run a task in the workspace")),
|
|
222
222
|
source: ToolDataSource.Internal,
|
|
223
223
|
inputSchema: {
|
|
224
224
|
"type": "object",
|
|
@@ -18,7 +18,7 @@ const GetTaskOutputToolData = {
|
|
|
18
18
|
id: TerminalToolId.GetTaskOutput,
|
|
19
19
|
toolReferenceName: "getTaskOutput",
|
|
20
20
|
legacyToolReferenceFullNames: ["runTasks/getTaskOutput"],
|
|
21
|
-
displayName: ( localize(
|
|
21
|
+
displayName: ( localize(13619, "Get Task Output")),
|
|
22
22
|
modelDescription: "Get the output of a task",
|
|
23
23
|
source: ToolDataSource.Internal,
|
|
24
24
|
when: TasksAvailableContext,
|
|
@@ -65,19 +65,19 @@ let GetTaskOutputTool = class GetTaskOutputTool extends Disposable {
|
|
|
65
65
|
);
|
|
66
66
|
if (!task) {
|
|
67
67
|
return {
|
|
68
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
68
|
+
invocationMessage: ( new MarkdownString(( localize(13620, "Task not found: `{0}`", args.id))))
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
const taskLabel = task._label;
|
|
72
72
|
const activeTasks = await this._tasksService.getActiveTasks();
|
|
73
73
|
if (activeTasks.includes(task)) {
|
|
74
74
|
return {
|
|
75
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
75
|
+
invocationMessage: ( new MarkdownString(( localize(13621, "The task `{0}` is already running.", taskLabel))))
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
return {
|
|
79
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
80
|
-
pastTenseMessage: ( new MarkdownString(( localize(
|
|
79
|
+
invocationMessage: ( new MarkdownString(( localize(13622, "Checking output for task `{0}`", taskLabel)))),
|
|
80
|
+
pastTenseMessage: ( new MarkdownString(( localize(13623, "Checked output for task `{0}`", taskLabel))))
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
async invoke(invocation, _countTokens, _progress, token) {
|
|
@@ -97,7 +97,7 @@ let GetTaskOutputTool = class GetTaskOutputTool extends Disposable {
|
|
|
97
97
|
kind: "text",
|
|
98
98
|
value: `Task not found: ${args.id}`
|
|
99
99
|
}],
|
|
100
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
100
|
+
toolResultMessage: ( new MarkdownString(( localize(13620, "Task not found: `{0}`", args.id))))
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
const dependencyTasks = await resolveDependencyTasks(task, args.workspaceFolder, this._configurationService, this._tasksService);
|
|
@@ -112,7 +112,7 @@ let GetTaskOutputTool = class GetTaskOutputTool extends Disposable {
|
|
|
112
112
|
kind: "text",
|
|
113
113
|
value: `Terminal not found for task ${taskLabel}`
|
|
114
114
|
}],
|
|
115
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
115
|
+
toolResultMessage: ( new MarkdownString(( localize(13624, "Terminal not found for task `{0}`", taskLabel))))
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
const store = ( new DisposableStore());
|
|
@@ -57,7 +57,7 @@ let RunTaskTool = class RunTaskTool {
|
|
|
57
57
|
kind: "text",
|
|
58
58
|
value: `Task not found: ${args.id}`
|
|
59
59
|
}],
|
|
60
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
60
|
+
toolResultMessage: ( new MarkdownString(( localize(13625, "Task not found: `{0}`", args.id))))
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
const taskLabel = task._label;
|
|
@@ -68,7 +68,7 @@ let RunTaskTool = class RunTaskTool {
|
|
|
68
68
|
kind: "text",
|
|
69
69
|
value: `The task ${taskLabel} is already running.`
|
|
70
70
|
}],
|
|
71
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
71
|
+
toolResultMessage: ( new MarkdownString(( localize(13626, "The task `{0}` is already running.", taskLabel))))
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
const raceResult = await Promise.race([
|
|
@@ -84,7 +84,7 @@ let RunTaskTool = class RunTaskTool {
|
|
|
84
84
|
kind: "text",
|
|
85
85
|
value: `Task started but no terminal was found for: ${taskLabel}`
|
|
86
86
|
}],
|
|
87
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
87
|
+
toolResultMessage: ( new MarkdownString(( localize(13627, "Task started but no terminal was found for: `{0}`", taskLabel))))
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
const terminals = this._terminalService.instances.filter(t => ( resources.some(r => r.path === t.resource.path && r.scheme === t.resource.scheme)));
|
|
@@ -94,7 +94,7 @@ let RunTaskTool = class RunTaskTool {
|
|
|
94
94
|
kind: "text",
|
|
95
95
|
value: `Task started but no terminal was found for: ${taskLabel}`
|
|
96
96
|
}],
|
|
97
|
-
toolResultMessage: ( new MarkdownString(( localize(
|
|
97
|
+
toolResultMessage: ( new MarkdownString(( localize(13627, "Task started but no terminal was found for: `{0}`", taskLabel))))
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
const store = ( new DisposableStore());
|
|
@@ -161,29 +161,29 @@ let RunTaskTool = class RunTaskTool {
|
|
|
161
161
|
);
|
|
162
162
|
if (!task) {
|
|
163
163
|
return {
|
|
164
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
164
|
+
invocationMessage: ( new MarkdownString(( localize(13625, "Task not found: `{0}`", args.id))))
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
167
|
const taskLabel = task._label;
|
|
168
168
|
const activeTasks = await this._tasksService.getActiveTasks();
|
|
169
169
|
if (task && activeTasks.includes(task)) {
|
|
170
170
|
return {
|
|
171
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
171
|
+
invocationMessage: ( new MarkdownString(( localize(13628, "The task is already running."))))
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
174
|
if (await this._isTaskActive(task)) {
|
|
175
175
|
return {
|
|
176
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
177
|
-
pastTenseMessage: ( new MarkdownString(( localize(
|
|
176
|
+
invocationMessage: ( new MarkdownString(( localize(13629, "`{0}` is already running.", taskLabel)))),
|
|
177
|
+
pastTenseMessage: ( new MarkdownString(( localize(13630, "`{0}` was already running.", taskLabel)))),
|
|
178
178
|
confirmationMessages: undefined
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
181
|
return {
|
|
182
|
-
invocationMessage: ( new MarkdownString(( localize(
|
|
183
|
-
pastTenseMessage: ( new MarkdownString(task?.configurationProperties.isBackground ? ( localize(
|
|
182
|
+
invocationMessage: ( new MarkdownString(( localize(13631, "Running `{0}`", taskLabel)))),
|
|
183
|
+
pastTenseMessage: ( new MarkdownString(task?.configurationProperties.isBackground ? ( localize(13632, "Started `{0}`", taskLabel)) : ( localize(13633, "Ran `{0}`", taskLabel)))),
|
|
184
184
|
confirmationMessages: task ? {
|
|
185
|
-
title: ( localize(
|
|
186
|
-
message: ( localize(
|
|
185
|
+
title: ( localize(13634, "Allow task run?")),
|
|
186
|
+
message: ( localize(13635, "Allow to run the task `{0}`?", taskLabel))
|
|
187
187
|
} : undefined
|
|
188
188
|
};
|
|
189
189
|
}
|
|
@@ -193,9 +193,9 @@ const RunTaskToolData = {
|
|
|
193
193
|
id: TerminalToolId.RunTask,
|
|
194
194
|
toolReferenceName: "runTask",
|
|
195
195
|
legacyToolReferenceFullNames: ["runTasks/runTask"],
|
|
196
|
-
displayName: ( localize(
|
|
196
|
+
displayName: ( localize(13636, "Run Task")),
|
|
197
197
|
modelDescription: `Runs a VS Code task.\n\n- If you see that an appropriate task exists for building or running code, prefer to use this tool to run the task instead of using the ${TerminalToolId.RunInTerminal} tool.\n- Make sure that any appropriate build or watch task is running before trying to run tests or execute code.\n- If the user asks to run a task, use this tool to do so.`,
|
|
198
|
-
userDescription: ( localize(
|
|
198
|
+
userDescription: ( localize(13637, "Run tasks in the workspace")),
|
|
199
199
|
icon: Codicon.tools,
|
|
200
200
|
source: ToolDataSource.Internal,
|
|
201
201
|
when: TasksAvailableContext,
|
|
@@ -26,7 +26,7 @@ function toolResultMessageFromResponse(
|
|
|
26
26
|
) {
|
|
27
27
|
let resultSummary = "";
|
|
28
28
|
if (result?.exitCode) {
|
|
29
|
-
resultSummary = ( localize(
|
|
29
|
+
resultSummary = ( localize(13638, "Task `{0}` failed with exit code {1}.", taskLabel, result.exitCode));
|
|
30
30
|
} else {
|
|
31
31
|
resultSummary += `\`${taskLabel}\` task `;
|
|
32
32
|
const problemCount = toolResultDetails.length;
|
|
@@ -5,6 +5,7 @@ import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
5
5
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
6
6
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
7
7
|
import { IRemoteAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
8
|
+
import { ITrustedDomainService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/url/common/trustedDomainService.service";
|
|
8
9
|
import { ITerminalSandboxService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.service";
|
|
9
10
|
export declare class TerminalSandboxService extends Disposable implements ITerminalSandboxService {
|
|
10
11
|
private readonly _configurationService;
|
|
@@ -12,8 +13,10 @@ export declare class TerminalSandboxService extends Disposable implements ITermi
|
|
|
12
13
|
private readonly _environmentService;
|
|
13
14
|
private readonly _logService;
|
|
14
15
|
private readonly _remoteAgentService;
|
|
16
|
+
private readonly _trustedDomainService;
|
|
15
17
|
readonly _serviceBrand: undefined;
|
|
16
18
|
private _srtPath;
|
|
19
|
+
private _rgPath;
|
|
17
20
|
private _srtPathResolved;
|
|
18
21
|
private _execPath?;
|
|
19
22
|
private _sandboxConfigPath;
|
|
@@ -24,14 +27,17 @@ export declare class TerminalSandboxService extends Disposable implements ITermi
|
|
|
24
27
|
private _remoteEnvDetails;
|
|
25
28
|
private _appRoot;
|
|
26
29
|
private _os;
|
|
27
|
-
|
|
30
|
+
private _defaultWritePaths;
|
|
31
|
+
constructor(_configurationService: IConfigurationService, _fileService: IFileService, _environmentService: IEnvironmentService, _logService: ILogService, _remoteAgentService: IRemoteAgentService, _trustedDomainService: ITrustedDomainService);
|
|
28
32
|
isEnabled(): Promise<boolean>;
|
|
29
33
|
wrapCommand(command: string): string;
|
|
30
34
|
getTempDir(): URI | undefined;
|
|
31
35
|
setNeedsForceUpdateConfigFile(): void;
|
|
32
36
|
getSandboxConfigPath(forceRefresh?: boolean): Promise<string | undefined>;
|
|
37
|
+
private _quoteShellArgument;
|
|
33
38
|
private _resolveSrtPath;
|
|
34
39
|
private _createSandboxConfig;
|
|
35
40
|
private _pathJoin;
|
|
36
41
|
private _initTempDir;
|
|
42
|
+
private _addTrustedDomainsToAllowedDomains;
|
|
37
43
|
}
|