@codingame/monaco-vscode-chat-service-override 31.0.0 → 32.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.d.ts +1 -1
- package/index.js +21 -5
- package/package.json +5 -5
- package/vscode/src/vs/base/common/defaultAccount.d.ts +69 -0
- package/vscode/src/vs/base/common/defaultAccount.js +12 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +91 -22
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +301 -68
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +24 -5
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +89 -16
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +17 -5
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +73 -10
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +32 -6
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +32 -20
- package/vscode/src/vs/platform/agentHost/common/agentHostPermissionService.d.ts +37 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostPermissionService.js +15 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +242 -201
- package/vscode/src/vs/platform/agentHost/common/agentService.js +3 -1
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.d.ts +35 -0
- package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.js +106 -0
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +38 -30
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +2 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +114 -4
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +10 -10
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +52 -19
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +42 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +7 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +42 -41
- package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.d.ts +6 -6
- package/vscode/src/vs/platform/agentHost/common/transportConstants.d.ts +15 -0
- package/vscode/src/vs/platform/agentHost/common/transportConstants.js +6 -0
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +4 -3
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +4 -3
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +4 -2
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +15 -7
- package/vscode/src/vs/workbench/contrib/browserView/common/browserChatToolReferenceNames.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/browserView/common/browserChatToolReferenceNames.js +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +14 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +64 -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 +31 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +18 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +30 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +8 -7
- 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 +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +21 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +12 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +99 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.js +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +63 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +10 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +25 -48
- 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.js +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +99 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +17 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +35 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +347 -326
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +1 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +113 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +37 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +436 -134
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +52 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +93 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +73 -104
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +272 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +30 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +430 -185
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +44 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +480 -279
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.d.ts +138 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.js +221 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +1216 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +32 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +26 -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 +28 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +25 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +68 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +650 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +390 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +18 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +1 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +6 -87
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +116 -182
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +12 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +61 -41
- 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 +27 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +16 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +106 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +25 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +629 -425
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +105 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +175 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +20 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +9 -2
- 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/githubRepoFetcher.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +339 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/media/planReviewFeedback.css +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +572 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.js +167 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +49 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +315 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +45 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +44 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +111 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +13 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.js +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +14 -52
- 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 +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +17 -2
- 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 +23 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +136 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.d.ts +72 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.js +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +14 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +41 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +30 -12
- 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 +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +25 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +108 -45
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +65 -26
- 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 +38 -11
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +165 -16
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +62 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -1
- 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.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +15 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +18 -24
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +203 -180
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.js +35 -0
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +27 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +14 -49
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +35 -177
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +4 -4
- 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 +13 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +29 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +129 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +14 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +1 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +12 -38
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +77 -70
- 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/browser/tools/terminalOutputCompressor.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +232 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.d.ts +83 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.js +243 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +0 -749
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.js +0 -14
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.d.ts +0 -17
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.js +0 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +0 -40
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.js +0 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +0 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +0 -638
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +0 -131
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +0 -363
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +0 -306
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +0 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatStatusWidget.css +0 -57
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -78
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -242
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1701
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -191
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -728
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +0 -69
|
@@ -32,8 +32,8 @@ import { activeChatController } from './terminalChatControllerHolder.js';
|
|
|
32
32
|
|
|
33
33
|
registerActiveXtermAction({
|
|
34
34
|
id: TerminalChatCommandId.Start,
|
|
35
|
-
title: ( localize2(
|
|
36
|
-
category: ( localize2(
|
|
35
|
+
title: ( localize2(14265, "Open Inline Chat")),
|
|
36
|
+
category: ( localize2(14266, "Terminal")),
|
|
37
37
|
keybinding: {
|
|
38
38
|
primary: KeyMod.CtrlCmd | KeyCode.KeyI,
|
|
39
39
|
when: ( ContextKeyExpr.and(TerminalContextKeys.focusInAny)),
|
|
@@ -77,7 +77,7 @@ registerActiveXtermAction({
|
|
|
77
77
|
});
|
|
78
78
|
registerActiveXtermAction({
|
|
79
79
|
id: TerminalChatCommandId.Close,
|
|
80
|
-
title: ( localize2(
|
|
80
|
+
title: ( localize2(14267, "Close")),
|
|
81
81
|
category: AbstractInlineChatAction.category,
|
|
82
82
|
keybinding: {
|
|
83
83
|
primary: KeyCode.Escape,
|
|
@@ -102,8 +102,8 @@ registerActiveXtermAction({
|
|
|
102
102
|
});
|
|
103
103
|
registerActiveXtermAction({
|
|
104
104
|
id: TerminalChatCommandId.RunCommand,
|
|
105
|
-
title: ( localize2(
|
|
106
|
-
shortTitle: ( localize2(
|
|
105
|
+
title: ( localize2(14268, "Run Chat Command")),
|
|
106
|
+
shortTitle: ( localize2(14269, "Run")),
|
|
107
107
|
category: AbstractInlineChatAction.category,
|
|
108
108
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(
|
|
109
109
|
TerminalContextKeys.processSupported,
|
|
@@ -131,8 +131,8 @@ registerActiveXtermAction({
|
|
|
131
131
|
});
|
|
132
132
|
registerActiveXtermAction({
|
|
133
133
|
id: TerminalChatCommandId.RunFirstCommand,
|
|
134
|
-
title: ( localize2(
|
|
135
|
-
shortTitle: ( localize2(
|
|
134
|
+
title: ( localize2(14270, "Run First Chat Command")),
|
|
135
|
+
shortTitle: ( localize2(14271, "Run First")),
|
|
136
136
|
category: AbstractInlineChatAction.category,
|
|
137
137
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(
|
|
138
138
|
TerminalContextKeys.processSupported,
|
|
@@ -160,8 +160,8 @@ registerActiveXtermAction({
|
|
|
160
160
|
});
|
|
161
161
|
registerActiveXtermAction({
|
|
162
162
|
id: TerminalChatCommandId.InsertCommand,
|
|
163
|
-
title: ( localize2(
|
|
164
|
-
shortTitle: ( localize2(
|
|
163
|
+
title: ( localize2(14272, "Insert Chat Command")),
|
|
164
|
+
shortTitle: ( localize2(14273, "Insert")),
|
|
165
165
|
category: AbstractInlineChatAction.category,
|
|
166
166
|
icon: Codicon.insert,
|
|
167
167
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(
|
|
@@ -190,8 +190,8 @@ registerActiveXtermAction({
|
|
|
190
190
|
});
|
|
191
191
|
registerActiveXtermAction({
|
|
192
192
|
id: TerminalChatCommandId.InsertFirstCommand,
|
|
193
|
-
title: ( localize2(
|
|
194
|
-
shortTitle: ( localize2(
|
|
193
|
+
title: ( localize2(14274, "Insert First Chat Command")),
|
|
194
|
+
shortTitle: ( localize2(14275, "Insert First")),
|
|
195
195
|
category: AbstractInlineChatAction.category,
|
|
196
196
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(
|
|
197
197
|
TerminalContextKeys.processSupported,
|
|
@@ -219,7 +219,7 @@ registerActiveXtermAction({
|
|
|
219
219
|
});
|
|
220
220
|
registerActiveXtermAction({
|
|
221
221
|
id: TerminalChatCommandId.RerunRequest,
|
|
222
|
-
title: ( localize2(
|
|
222
|
+
title: ( localize2(14276, "Rerun Request")),
|
|
223
223
|
f1: false,
|
|
224
224
|
icon: Codicon.refresh,
|
|
225
225
|
category: AbstractInlineChatAction.category,
|
|
@@ -260,7 +260,7 @@ registerActiveXtermAction({
|
|
|
260
260
|
});
|
|
261
261
|
registerActiveXtermAction({
|
|
262
262
|
id: TerminalChatCommandId.ViewInChat,
|
|
263
|
-
title: ( localize2(
|
|
263
|
+
title: ( localize2(14277, "View in Chat")),
|
|
264
264
|
category: AbstractInlineChatAction.category,
|
|
265
265
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(
|
|
266
266
|
TerminalContextKeys.processSupported,
|
|
@@ -286,8 +286,8 @@ registerAction2(class ShowChatTerminalsAction extends Action2 {
|
|
|
286
286
|
constructor() {
|
|
287
287
|
super({
|
|
288
288
|
id: TerminalChatCommandId.ViewHiddenChatTerminals,
|
|
289
|
-
title: ( localize2(
|
|
290
|
-
category: ( localize2(
|
|
289
|
+
title: ( localize2(14278, "View Hidden Chat Terminals")),
|
|
290
|
+
category: ( localize2(14279, "Terminal")),
|
|
291
291
|
f1: true,
|
|
292
292
|
precondition: ( ContextKeyExpr.and(TerminalChatContextKeys.hasHiddenChatTerminals, ChatContextKeys.enabled)),
|
|
293
293
|
menu: [{
|
|
@@ -329,7 +329,7 @@ registerAction2(class ShowChatTerminalsAction extends Action2 {
|
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
331
|
const items = [];
|
|
332
|
-
const lastCommandLocalized = command => ( localize2(
|
|
332
|
+
const lastCommandLocalized = command => ( localize2(14280, "Last: {0}", command)).value;
|
|
333
333
|
const MAX_DETAIL_LENGTH = 80;
|
|
334
334
|
const metas = [];
|
|
335
335
|
for (const instance of ( all.values())) {
|
|
@@ -381,10 +381,10 @@ registerAction2(class ShowChatTerminalsAction extends Action2 {
|
|
|
381
381
|
});
|
|
382
382
|
}
|
|
383
383
|
const qp = quickInputService.createQuickPick();
|
|
384
|
-
qp.placeholder = ( localize2(
|
|
384
|
+
qp.placeholder = ( localize2(14281, "Select a chat terminal to show and focus")).value;
|
|
385
385
|
qp.items = items;
|
|
386
386
|
qp.canSelectMany = false;
|
|
387
|
-
qp.title = ( localize2(
|
|
387
|
+
qp.title = ( localize2(14282, "Chat Terminals")).value;
|
|
388
388
|
qp.matchOnDescription = true;
|
|
389
389
|
qp.matchOnDetail = true;
|
|
390
390
|
const qpDisposables = ( new DisposableStore());
|
|
@@ -442,14 +442,14 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
442
442
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
443
443
|
command: {
|
|
444
444
|
id: TerminalChatCommandId.FocusMostRecentChatTerminal,
|
|
445
|
-
title: ( localize(
|
|
445
|
+
title: ( localize(14283, "Chat: Focus Most Recent Terminal"))
|
|
446
446
|
},
|
|
447
447
|
when: ChatContextKeys.inChatSession
|
|
448
448
|
});
|
|
449
449
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
450
450
|
command: {
|
|
451
451
|
id: TerminalChatCommandId.FocusMostRecentChatTerminalOutput,
|
|
452
|
-
title: ( localize(
|
|
452
|
+
title: ( localize(14284, "Chat: Focus Most Recent Terminal Output"))
|
|
453
453
|
},
|
|
454
454
|
when: ChatContextKeys.inChatSession
|
|
455
455
|
});
|
package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts
CHANGED
|
@@ -9,10 +9,21 @@ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
9
9
|
import { IChatAcceptInputOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
10
10
|
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
11
11
|
import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service";
|
|
12
|
-
import { IChatResponseModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
12
|
+
import { IChatModel, IChatResponseModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
13
13
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
14
|
-
import { InlineChatWidget } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatWidget";
|
|
14
|
+
import { IInlineChatWidgetConstructionOptions, InlineChatWidget } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatWidget";
|
|
15
15
|
import { ITerminalInstance, type IXtermTerminal } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
16
|
+
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
17
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
18
|
+
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
19
|
+
import { IAccessibleViewService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView.service";
|
|
20
|
+
import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service";
|
|
21
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
22
|
+
import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
|
|
23
|
+
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
24
|
+
import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service";
|
|
25
|
+
import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service";
|
|
26
|
+
import { IChatWidgetLocationOptions } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatWidget";
|
|
16
27
|
export declare class TerminalChatWidget extends Disposable {
|
|
17
28
|
private readonly _terminalElement;
|
|
18
29
|
private readonly _instance;
|
|
@@ -25,7 +36,7 @@ export declare class TerminalChatWidget extends Disposable {
|
|
|
25
36
|
private readonly _onDidHide;
|
|
26
37
|
readonly onDidHide: Event<void>;
|
|
27
38
|
private readonly _inlineChatWidget;
|
|
28
|
-
get inlineChatWidget():
|
|
39
|
+
get inlineChatWidget(): TerminalInlineChatWidget;
|
|
29
40
|
private readonly _focusTracker;
|
|
30
41
|
private readonly _focusedContextKey;
|
|
31
42
|
private readonly _visibleContextKey;
|
|
@@ -69,3 +80,18 @@ export declare class TerminalChatWidget extends Disposable {
|
|
|
69
80
|
cancel(): void;
|
|
70
81
|
viewInChat(): Promise<void>;
|
|
71
82
|
}
|
|
83
|
+
declare class TerminalInlineChatWidget extends InlineChatWidget {
|
|
84
|
+
private _modelService;
|
|
85
|
+
constructor(location: IChatWidgetLocationOptions, options: IInlineChatWidgetConstructionOptions, instantiationService: IInstantiationService, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, accessibilityService: IAccessibilityService, configurationService: IConfigurationService, accessibleViewService: IAccessibleViewService, textModelResolverService: ITextModelService, chatService: IChatService, hoverService: IHoverService, chatEntitlementService: IChatEntitlementService, markdownRendererService: IMarkdownRendererService, _modelService: IModelService);
|
|
86
|
+
get value(): string;
|
|
87
|
+
set value(value: string);
|
|
88
|
+
selectAll(): void;
|
|
89
|
+
set placeholder(value: string);
|
|
90
|
+
toggleStatus(show: boolean): void;
|
|
91
|
+
updateToolbar(show: boolean): void;
|
|
92
|
+
get responseContent(): string | undefined;
|
|
93
|
+
getChatModel(): IChatModel | undefined;
|
|
94
|
+
setChatModel(chatModel: IChatModel): void;
|
|
95
|
+
getCodeBlockInfo(codeBlockIndex: number): Promise<ITextModel | undefined>;
|
|
96
|
+
}
|
|
97
|
+
export {};
|
|
@@ -25,6 +25,17 @@ import { MENU_INLINE_CHAT_WIDGET_SECONDARY } from '@codingame/monaco-vscode-kate
|
|
|
25
25
|
import { TerminalStickyScrollContribution } from '@codingame/monaco-vscode-xterm-common/vscode/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollContribution';
|
|
26
26
|
import * as terminalChatWidget from './media/terminalChatWidget.css';
|
|
27
27
|
import { TerminalChatContextKeys, MENU_TERMINAL_CHAT_WIDGET_INPUT_SIDE_TOOLBAR, TerminalChatCommandId, MENU_TERMINAL_CHAT_WIDGET_STATUS } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat';
|
|
28
|
+
import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
|
|
29
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
30
|
+
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
31
|
+
import { IAccessibleViewService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView.service';
|
|
32
|
+
import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
33
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
34
|
+
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
35
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
36
|
+
import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
|
|
37
|
+
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
38
|
+
import { Selection } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection';
|
|
28
39
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
29
40
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
30
41
|
|
|
@@ -91,7 +102,7 @@ let TerminalChatWidget = class TerminalChatWidget extends Disposable {
|
|
|
91
102
|
this._container = createElement("div");
|
|
92
103
|
this._container.classList.add("terminal-inline-chat");
|
|
93
104
|
this._terminalElement.appendChild(this._container);
|
|
94
|
-
this._inlineChatWidget = instantiationService.createInstance(
|
|
105
|
+
this._inlineChatWidget = instantiationService.createInstance(TerminalInlineChatWidget, {
|
|
95
106
|
location: ChatAgentLocation.Terminal,
|
|
96
107
|
resolveData: () => {
|
|
97
108
|
return undefined;
|
|
@@ -127,7 +138,7 @@ let TerminalChatWidget = class TerminalChatWidget extends Disposable {
|
|
|
127
138
|
Event.fromObservableLight(this._inlineChatWidget.chatWidget.input.selectedLanguageModel),
|
|
128
139
|
Event.debounce(this._xterm.raw.onCursorMove, () => void 0, MicrotaskDelay)
|
|
129
140
|
)(() => this._relayout()));
|
|
130
|
-
const observer = this._register(( new DisposableResizeObserver(() => this._relayout())));
|
|
141
|
+
const observer = this._register(( new DisposableResizeObserver("TerminalChatWidget.terminalElementResize", () => this._relayout())));
|
|
131
142
|
observer.observe(this._terminalElement);
|
|
132
143
|
this._resetPlaceholder();
|
|
133
144
|
this._container.appendChild(this._inlineChatWidget.domNode);
|
|
@@ -187,7 +198,7 @@ let TerminalChatWidget = class TerminalChatWidget extends Disposable {
|
|
|
187
198
|
}
|
|
188
199
|
_resetPlaceholder() {
|
|
189
200
|
const defaultAgent = this._chatAgentService.getDefaultAgent(ChatAgentLocation.Terminal);
|
|
190
|
-
this.inlineChatWidget.placeholder = defaultAgent?.description ?? ( localize(
|
|
201
|
+
this.inlineChatWidget.placeholder = defaultAgent?.description ?? ( localize(14285, "Ask about commands"));
|
|
191
202
|
}
|
|
192
203
|
async reveal() {
|
|
193
204
|
await this._createSession();
|
|
@@ -420,5 +431,120 @@ let TerminalChatWidget = class TerminalChatWidget extends Disposable {
|
|
|
420
431
|
}
|
|
421
432
|
};
|
|
422
433
|
TerminalChatWidget = ( __decorate([( __param(3, IContextKeyService)), ( __param(4, IChatService)), ( __param(5, IStorageService)), ( __param(6, IInstantiationService)), ( __param(7, IChatAgentService)), ( __param(8, IChatWidgetService))], TerminalChatWidget));
|
|
434
|
+
let TerminalInlineChatWidget = class TerminalInlineChatWidget extends InlineChatWidget {
|
|
435
|
+
constructor(
|
|
436
|
+
location,
|
|
437
|
+
options,
|
|
438
|
+
instantiationService,
|
|
439
|
+
contextKeyService,
|
|
440
|
+
keybindingService,
|
|
441
|
+
accessibilityService,
|
|
442
|
+
configurationService,
|
|
443
|
+
accessibleViewService,
|
|
444
|
+
textModelResolverService,
|
|
445
|
+
chatService,
|
|
446
|
+
hoverService,
|
|
447
|
+
chatEntitlementService,
|
|
448
|
+
markdownRendererService,
|
|
449
|
+
_modelService
|
|
450
|
+
) {
|
|
451
|
+
super(
|
|
452
|
+
location,
|
|
453
|
+
options,
|
|
454
|
+
instantiationService,
|
|
455
|
+
contextKeyService,
|
|
456
|
+
keybindingService,
|
|
457
|
+
accessibilityService,
|
|
458
|
+
configurationService,
|
|
459
|
+
accessibleViewService,
|
|
460
|
+
textModelResolverService,
|
|
461
|
+
chatService,
|
|
462
|
+
hoverService,
|
|
463
|
+
chatEntitlementService,
|
|
464
|
+
markdownRendererService
|
|
465
|
+
);
|
|
466
|
+
this._modelService = _modelService;
|
|
467
|
+
}
|
|
468
|
+
get value() {
|
|
469
|
+
return this.chatWidget.getInput();
|
|
470
|
+
}
|
|
471
|
+
set value(value) {
|
|
472
|
+
this.chatWidget.setInput(value);
|
|
473
|
+
}
|
|
474
|
+
selectAll() {
|
|
475
|
+
this.chatWidget.inputEditor.setSelection(( new Selection(1, 1, Number.MAX_SAFE_INTEGER, 1)));
|
|
476
|
+
}
|
|
477
|
+
set placeholder(value) {
|
|
478
|
+
this.chatWidget.setInputPlaceholder(value);
|
|
479
|
+
}
|
|
480
|
+
toggleStatus(show) {
|
|
481
|
+
this._elements.toolbar1.classList.toggle("hidden", !show);
|
|
482
|
+
this._elements.toolbar2.classList.toggle("hidden", !show);
|
|
483
|
+
this._elements.status.classList.toggle("hidden", !show);
|
|
484
|
+
this._elements.infoLabel.classList.toggle("hidden", !show);
|
|
485
|
+
this._onDidChangeHeight.fire();
|
|
486
|
+
}
|
|
487
|
+
updateToolbar(show) {
|
|
488
|
+
this._elements.root.classList.toggle("toolbar", show);
|
|
489
|
+
this._elements.toolbar1.classList.toggle("hidden", !show);
|
|
490
|
+
this._elements.toolbar2.classList.toggle("hidden", !show);
|
|
491
|
+
this._elements.status.classList.toggle("actions", show);
|
|
492
|
+
this._elements.infoLabel.classList.toggle("hidden", show);
|
|
493
|
+
this._onDidChangeHeight.fire();
|
|
494
|
+
}
|
|
495
|
+
get responseContent() {
|
|
496
|
+
const requests = this.chatWidget.viewModel?.model.getRequests();
|
|
497
|
+
return requests?.at(-1)?.response?.response.toString();
|
|
498
|
+
}
|
|
499
|
+
getChatModel() {
|
|
500
|
+
return this.chatWidget.viewModel?.model;
|
|
501
|
+
}
|
|
502
|
+
setChatModel(chatModel) {
|
|
503
|
+
chatModel.inputModel.setState({
|
|
504
|
+
inputText: "",
|
|
505
|
+
selections: []
|
|
506
|
+
});
|
|
507
|
+
this.chatWidget.setModel(chatModel);
|
|
508
|
+
}
|
|
509
|
+
async getCodeBlockInfo(codeBlockIndex) {
|
|
510
|
+
const {
|
|
511
|
+
viewModel
|
|
512
|
+
} = this.chatWidget;
|
|
513
|
+
if (!viewModel) {
|
|
514
|
+
return undefined;
|
|
515
|
+
}
|
|
516
|
+
const items = viewModel.getItems().filter(i => isResponseVM(i));
|
|
517
|
+
const item = items.at(-1);
|
|
518
|
+
if (!item) {
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
const codeBlocks = this.chatWidget.getCodeBlockInfosForResponse(item);
|
|
522
|
+
const info = codeBlocks[codeBlockIndex];
|
|
523
|
+
if (info?.uri) {
|
|
524
|
+
return this._modelService.getModel(info.uri) ?? undefined;
|
|
525
|
+
}
|
|
526
|
+
const markdown = item.response.getMarkdown();
|
|
527
|
+
let currentCodeBlockIndex = 0;
|
|
528
|
+
let foundText;
|
|
529
|
+
for (const line of markdown.split("\n")) {
|
|
530
|
+
if (line.startsWith("```") && foundText === undefined) {
|
|
531
|
+
foundText = "";
|
|
532
|
+
} else if (line.startsWith("```") && foundText !== undefined) {
|
|
533
|
+
if (currentCodeBlockIndex === codeBlockIndex) {
|
|
534
|
+
break;
|
|
535
|
+
}
|
|
536
|
+
currentCodeBlockIndex++;
|
|
537
|
+
foundText = undefined;
|
|
538
|
+
} else if (foundText !== undefined) {
|
|
539
|
+
foundText += (foundText ? "\n" : "") + line;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
if (foundText !== undefined && currentCodeBlockIndex === codeBlockIndex) {
|
|
543
|
+
return this._modelService.createModel(foundText, null, undefined, true);
|
|
544
|
+
}
|
|
545
|
+
return undefined;
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
TerminalInlineChatWidget = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IContextKeyService)), ( __param(4, IKeybindingService)), ( __param(5, IAccessibilityService)), ( __param(6, IConfigurationService)), ( __param(7, IAccessibleViewService)), ( __param(8, ITextModelService)), ( __param(9, IChatService)), ( __param(10, IHoverService)), ( __param(11, IChatEntitlementService)), ( __param(12, IMarkdownRendererService)), ( __param(13, IModelService))], TerminalInlineChatWidget));
|
|
423
549
|
|
|
424
550
|
export { TerminalChatWidget };
|
package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js
CHANGED
|
@@ -84,9 +84,10 @@ async function getTaskForTool(
|
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
let tasksForWorkspace;
|
|
87
|
-
const
|
|
87
|
+
const getPathForCompare = uri => uri.path.replace(/\/$/, "").toLowerCase();
|
|
88
|
+
const workspaceFolderPath = getPathForCompare(URI.file(workspaceFolder));
|
|
88
89
|
for (const [folder, tasks] of workspaceFolderToTaskMap) {
|
|
89
|
-
if (( URI.parse(folder))
|
|
90
|
+
if (getPathForCompare(( URI.parse(folder))) === workspaceFolderPath) {
|
|
90
91
|
tasksForWorkspace = tasks;
|
|
91
92
|
break;
|
|
92
93
|
}
|
|
@@ -3,6 +3,7 @@ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
3
3
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
4
|
import { type IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
5
5
|
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
6
|
+
import { IToolResultCompressor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/toolResultCompressor.service";
|
|
6
7
|
export declare class ChatAgentToolsContribution extends Disposable implements IWorkbenchContribution {
|
|
7
8
|
private readonly _instantiationService;
|
|
8
9
|
private readonly _toolsService;
|
|
@@ -10,7 +11,7 @@ export declare class ChatAgentToolsContribution extends Disposable implements IW
|
|
|
10
11
|
static readonly ID = "terminal.chatAgentTools";
|
|
11
12
|
private readonly _runInTerminalToolRegistration;
|
|
12
13
|
private _runInTerminalToolRegistrationVersion;
|
|
13
|
-
constructor(_instantiationService: IInstantiationService, _toolsService: ILanguageModelToolsService, _configurationService: IConfigurationService);
|
|
14
|
+
constructor(_instantiationService: IInstantiationService, _toolsService: ILanguageModelToolsService, _configurationService: IConfigurationService, toolResultCompressor: IToolResultCompressor);
|
|
14
15
|
private _runInTerminalTool;
|
|
15
16
|
private _registerRunInTerminalTool;
|
|
16
17
|
}
|
|
@@ -14,6 +14,7 @@ import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monac
|
|
|
14
14
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
15
15
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
16
16
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
17
|
+
import { IToolResultCompressor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/toolResultCompressor.service';
|
|
17
18
|
import { registerActiveInstanceAction, sharedWhenClause } from '@codingame/monaco-vscode-xterm-common/vscode/vs/workbench/contrib/terminal/browser/terminalActions';
|
|
18
19
|
import { TerminalContextMenuGroup } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminalMenus';
|
|
19
20
|
import { TerminalContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminalContextKey';
|
|
@@ -30,6 +31,7 @@ import { createRunInTerminalToolData, RunInTerminalTool } from '@codingame/monac
|
|
|
30
31
|
import { CreateAndRunTaskTool, CreateAndRunTaskToolData } from './tools/task/createAndRunTaskTool.js';
|
|
31
32
|
import { GetTaskOutputTool, GetTaskOutputToolData } from './tools/task/getTaskOutputTool.js';
|
|
32
33
|
import { RunTaskTool, RunTaskToolData } from './tools/task/runTaskTool.js';
|
|
34
|
+
import { registerTerminalCompressors } from './tools/terminalOutputCompressor.js';
|
|
33
35
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
34
36
|
import '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService';
|
|
35
37
|
import { isNumber } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
@@ -86,13 +88,19 @@ let ChatAgentToolsContribution = class ChatAgentToolsContribution extends Dispos
|
|
|
86
88
|
static {
|
|
87
89
|
this.ID = "terminal.chatAgentTools";
|
|
88
90
|
}
|
|
89
|
-
constructor(
|
|
91
|
+
constructor(
|
|
92
|
+
_instantiationService,
|
|
93
|
+
_toolsService,
|
|
94
|
+
_configurationService,
|
|
95
|
+
toolResultCompressor
|
|
96
|
+
) {
|
|
90
97
|
super();
|
|
91
98
|
this._instantiationService = _instantiationService;
|
|
92
99
|
this._toolsService = _toolsService;
|
|
93
100
|
this._configurationService = _configurationService;
|
|
94
101
|
this._runInTerminalToolRegistration = this._register(( new MutableDisposable()));
|
|
95
102
|
this._runInTerminalToolRegistrationVersion = 0;
|
|
103
|
+
registerTerminalCompressors(toolResultCompressor);
|
|
96
104
|
const confirmTerminalCommandTool = _instantiationService.createInstance(ConfirmTerminalCommandTool);
|
|
97
105
|
this._register(
|
|
98
106
|
_toolsService.registerTool(ConfirmTerminalCommandToolData, confirmTerminalCommandTool)
|
|
@@ -129,7 +137,7 @@ let ChatAgentToolsContribution = class ChatAgentToolsContribution extends Dispos
|
|
|
129
137
|
this._register(_toolsService.executeToolSet.addTool(CreateAndRunTaskToolData));
|
|
130
138
|
this._register(_toolsService.readToolSet.addTool(GetTaskOutputToolData));
|
|
131
139
|
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
|
132
|
-
if (e.affectsConfiguration(AgentSandboxSettingId.AgentSandboxEnabled) || e.affectsConfiguration(AgentSandboxSettingId.DeprecatedAgentSandboxEnabled) || e.affectsConfiguration(AgentNetworkDomainSettingId.AllowedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeniedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedOldAllowedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedOldDeniedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedSandboxAllowedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedSandboxDeniedNetworkDomains) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.AgentSandboxLinuxFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxLinuxFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.AgentSandboxMacFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxMacFileSystem)) {
|
|
140
|
+
if (e.affectsConfiguration(AgentSandboxSettingId.AgentSandboxEnabled) || e.affectsConfiguration(AgentSandboxSettingId.DeprecatedAgentSandboxEnabled) || e.affectsConfiguration(AgentSandboxSettingId.AgentSandboxAllowUnsandboxedCommands) || e.affectsConfiguration(AgentNetworkDomainSettingId.AllowedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeniedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedOldAllowedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedOldDeniedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedSandboxAllowedNetworkDomains) || e.affectsConfiguration(AgentNetworkDomainSettingId.DeprecatedSandboxDeniedNetworkDomains) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.AgentSandboxLinuxFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxLinuxFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.AgentSandboxMacFileSystem) || e.affectsConfiguration(TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxMacFileSystem)) {
|
|
133
141
|
this._registerRunInTerminalTool();
|
|
134
142
|
}
|
|
135
143
|
}));
|
|
@@ -154,7 +162,7 @@ let ChatAgentToolsContribution = class ChatAgentToolsContribution extends Dispos
|
|
|
154
162
|
});
|
|
155
163
|
}
|
|
156
164
|
};
|
|
157
|
-
ChatAgentToolsContribution = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, ILanguageModelToolsService)), ( __param(2, IConfigurationService))], ChatAgentToolsContribution));
|
|
165
|
+
ChatAgentToolsContribution = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, ILanguageModelToolsService)), ( __param(2, IConfigurationService)), ( __param(3, IToolResultCompressor))], ChatAgentToolsContribution));
|
|
158
166
|
registerWorkbenchContribution2(
|
|
159
167
|
ChatAgentToolsContribution.ID,
|
|
160
168
|
ChatAgentToolsContribution,
|
|
@@ -162,7 +170,7 @@ registerWorkbenchContribution2(
|
|
|
162
170
|
);
|
|
163
171
|
registerActiveInstanceAction({
|
|
164
172
|
id: TerminalChatAgentToolsCommandId.ChatAddTerminalSelection,
|
|
165
|
-
title: ( localize(
|
|
173
|
+
title: ( localize(14292, "Add Terminal Selection to Chat")),
|
|
166
174
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, sharedWhenClause.terminalAvailable)),
|
|
167
175
|
menu: [{
|
|
168
176
|
id: MenuId.TerminalInstanceContext,
|
|
@@ -183,8 +191,8 @@ registerActiveInstanceAction({
|
|
|
183
191
|
chatView.attachmentModel.addContext({
|
|
184
192
|
id: `terminal-selection-${Date.now()}`,
|
|
185
193
|
kind: "generic",
|
|
186
|
-
name: ( localize(
|
|
187
|
-
fullName: ( localize(
|
|
194
|
+
name: ( localize(14293, "Terminal Selection")),
|
|
195
|
+
fullName: ( localize(14293, "Terminal Selection")),
|
|
188
196
|
value: selection,
|
|
189
197
|
icon: Codicon.terminal
|
|
190
198
|
});
|
|
@@ -12,7 +12,7 @@ const GetTerminalLastCommandToolData = {
|
|
|
12
12
|
id: TerminalToolId.TerminalLastCommand,
|
|
13
13
|
toolReferenceName: "terminalLastCommand",
|
|
14
14
|
legacyToolReferenceFullNames: ["runCommands/terminalLastCommand"],
|
|
15
|
-
displayName: ( localize(
|
|
15
|
+
displayName: ( localize(14308, "Get Terminal Last Command")),
|
|
16
16
|
modelDescription: "Get the last command run in the active terminal.",
|
|
17
17
|
source: ToolDataSource.Internal,
|
|
18
18
|
icon: Codicon.terminal
|
|
@@ -24,8 +24,8 @@ let GetTerminalLastCommandTool = class GetTerminalLastCommandTool extends Dispos
|
|
|
24
24
|
}
|
|
25
25
|
async prepareToolInvocation(context, token) {
|
|
26
26
|
return {
|
|
27
|
-
invocationMessage: ( localize(
|
|
28
|
-
pastTenseMessage: ( localize(
|
|
27
|
+
invocationMessage: ( localize(14309, "Getting last terminal command")),
|
|
28
|
+
pastTenseMessage: ( localize(14310, "Got last terminal command"))
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
async invoke(invocation, _countTokens, _progress, token) {
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import type { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import { ITerminalService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
4
3
|
import { type CountTokensCallback, type IPreparedToolInvocation, type IToolData, type IToolImpl, type IToolInvocation, type IToolInvocationPreparationContext, type IToolResult, type ToolProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
5
4
|
export declare const GetTerminalOutputToolData: IToolData;
|
|
6
5
|
export interface IGetTerminalOutputInputParams {
|
|
7
6
|
id?: string;
|
|
8
|
-
terminalId?: number;
|
|
9
7
|
}
|
|
10
8
|
export declare class GetTerminalOutputTool extends Disposable implements IToolImpl {
|
|
11
|
-
|
|
12
|
-
constructor(_terminalService: ITerminalService);
|
|
9
|
+
constructor();
|
|
13
10
|
prepareToolInvocation(context: IToolInvocationPreparationContext, token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
|
|
14
11
|
invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
|
|
15
12
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
2
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
4
3
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
4
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
-
import { ITerminalService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
|
|
7
5
|
import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
8
|
-
import { getOutput } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers';
|
|
9
6
|
import { RunInTerminalTool } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool';
|
|
10
7
|
import { TerminalToolId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/terminalToolIds';
|
|
11
8
|
|
|
@@ -13,8 +10,8 @@ const GetTerminalOutputToolData = {
|
|
|
13
10
|
id: TerminalToolId.GetTerminalOutput,
|
|
14
11
|
toolReferenceName: "getTerminalOutput",
|
|
15
12
|
legacyToolReferenceFullNames: ["runCommands/getTerminalOutput"],
|
|
16
|
-
displayName: ( localize(
|
|
17
|
-
modelDescription: `Get output from
|
|
13
|
+
displayName: ( localize(14311, "Get Terminal Output")),
|
|
14
|
+
modelDescription: `Get output from an active terminal execution (identified by the \`id\` returned from ${TerminalToolId.RunInTerminal}).`,
|
|
18
15
|
icon: Codicon.terminal,
|
|
19
16
|
source: ToolDataSource.Internal,
|
|
20
17
|
inputSchema: {
|
|
@@ -22,52 +19,30 @@ const GetTerminalOutputToolData = {
|
|
|
22
19
|
properties: {
|
|
23
20
|
id: {
|
|
24
21
|
type: "string",
|
|
25
|
-
description: `The ID of
|
|
22
|
+
description: `The ID of an active terminal execution to check (returned by ${TerminalToolId.RunInTerminal} for async executions, or for sync executions that timed out and were moved to the background). This must be the exact opaque UUID returned by that tool; terminal names, labels, or integers are invalid.`,
|
|
26
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}$"
|
|
27
|
-
},
|
|
28
|
-
terminalId: {
|
|
29
|
-
type: "number",
|
|
30
|
-
description: "The numeric instanceId of a terminal. Use this to get output from terminals not started by the agent (e.g., user-created terminals or foreground terminals). Provide either 'id' or 'terminalId', not both."
|
|
31
24
|
}
|
|
32
|
-
}
|
|
25
|
+
},
|
|
26
|
+
required: ["id"]
|
|
33
27
|
}
|
|
34
28
|
};
|
|
35
|
-
|
|
36
|
-
constructor(
|
|
29
|
+
class GetTerminalOutputTool extends Disposable {
|
|
30
|
+
constructor() {
|
|
37
31
|
super();
|
|
38
|
-
this._terminalService = _terminalService;
|
|
39
32
|
}
|
|
40
33
|
async prepareToolInvocation(context, token) {
|
|
41
34
|
return {
|
|
42
|
-
invocationMessage: ( localize(
|
|
43
|
-
pastTenseMessage: ( localize(
|
|
35
|
+
invocationMessage: ( localize(14312, "Checking terminal output")),
|
|
36
|
+
pastTenseMessage: ( localize(14313, "Checked terminal output"))
|
|
44
37
|
};
|
|
45
38
|
}
|
|
46
39
|
async invoke(invocation, _countTokens, _progress, token) {
|
|
47
40
|
const args = invocation.parameters;
|
|
48
|
-
if (!args.id
|
|
41
|
+
if (!args.id) {
|
|
49
42
|
return {
|
|
50
43
|
content: [{
|
|
51
44
|
kind: "text",
|
|
52
|
-
value:
|
|
53
|
-
}]
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
if (args.terminalId !== undefined && !args.id) {
|
|
57
|
-
const instance = this._terminalService.getInstanceFromId(args.terminalId);
|
|
58
|
-
if (!instance) {
|
|
59
|
-
return {
|
|
60
|
-
content: [{
|
|
61
|
-
kind: "text",
|
|
62
|
-
value: `Error: No terminal found with instanceId ${args.terminalId}. The terminal may have been closed.`
|
|
63
|
-
}]
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
const output = getOutput(instance);
|
|
67
|
-
return {
|
|
68
|
-
content: [{
|
|
69
|
-
kind: "text",
|
|
70
|
-
value: `Output of terminal ${args.terminalId}:\n${output}`
|
|
45
|
+
value: `Error: 'id' (the persistent terminal UUID returned by ${TerminalToolId.RunInTerminal} in async mode) must be provided.`
|
|
71
46
|
}]
|
|
72
47
|
};
|
|
73
48
|
}
|
|
@@ -87,7 +62,6 @@ let GetTerminalOutputTool = class GetTerminalOutputTool extends Disposable {
|
|
|
87
62
|
}]
|
|
88
63
|
};
|
|
89
64
|
}
|
|
90
|
-
}
|
|
91
|
-
GetTerminalOutputTool = ( __decorate([( __param(0, ITerminalService))], GetTerminalOutputTool));
|
|
65
|
+
}
|
|
92
66
|
|
|
93
67
|
export { GetTerminalOutputTool, GetTerminalOutputToolData };
|
|
@@ -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(14314, "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(14315, "Reading terminal selection")),
|
|
27
|
+
pastTenseMessage: ( localize(14316, "Read terminal selection"))
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
async invoke(invocation, _countTokens, _progress, token) {
|
|
@@ -9,7 +9,7 @@ import { TerminalToolId } from '@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
9
9
|
const KillTerminalToolData = {
|
|
10
10
|
id: TerminalToolId.KillTerminal,
|
|
11
11
|
toolReferenceName: "killTerminal",
|
|
12
|
-
displayName: ( localize(
|
|
12
|
+
displayName: ( localize(14317, "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} in async mode (legacy: isBackground=true).`,
|
|
14
14
|
icon: Codicon.terminal,
|
|
15
15
|
source: ToolDataSource.Internal,
|
|
@@ -28,8 +28,8 @@ const KillTerminalToolData = {
|
|
|
28
28
|
class KillTerminalTool extends Disposable {
|
|
29
29
|
async prepareToolInvocation(_context, _token) {
|
|
30
30
|
return {
|
|
31
|
-
invocationMessage: ( localize(
|
|
32
|
-
pastTenseMessage: ( localize(
|
|
31
|
+
invocationMessage: ( localize(14318, "Killing terminal")),
|
|
32
|
+
pastTenseMessage: ( localize(14319, "Killed terminal"))
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
async invoke(invocation, _countTokens, _progress, _token) {
|
|
@@ -44,8 +44,8 @@ class KillTerminalTool extends Disposable {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
const finalOutput = execution.getOutput();
|
|
47
|
+
RunInTerminalTool.markKilledByTool(args.id);
|
|
47
48
|
execution.instance.dispose();
|
|
48
|
-
RunInTerminalTool.removeExecution(args.id);
|
|
49
49
|
const outputSummary = finalOutput ? `Final output before termination:\n${finalOutput}` : "No output was captured.";
|
|
50
50
|
return {
|
|
51
51
|
content: [{
|