@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.
Files changed (341) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js +21 -5
  3. package/package.json +5 -5
  4. package/vscode/src/vs/base/common/defaultAccount.d.ts +69 -0
  5. package/vscode/src/vs/base/common/defaultAccount.js +12 -0
  6. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +91 -22
  7. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +301 -68
  8. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +24 -5
  9. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +89 -16
  10. package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +17 -5
  11. package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +73 -10
  12. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +32 -6
  13. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +32 -20
  14. package/vscode/src/vs/platform/agentHost/common/agentHostPermissionService.d.ts +37 -0
  15. package/vscode/src/vs/platform/agentHost/common/agentHostPermissionService.js +15 -0
  16. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +242 -201
  17. package/vscode/src/vs/platform/agentHost/common/agentService.js +3 -1
  18. package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.d.ts +35 -0
  19. package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.js +106 -0
  20. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +38 -30
  21. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +2 -1
  22. package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +114 -4
  23. package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +10 -10
  24. package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +52 -19
  25. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +42 -0
  26. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +7 -0
  27. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +42 -41
  28. package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.d.ts +6 -6
  29. package/vscode/src/vs/platform/agentHost/common/transportConstants.d.ts +15 -0
  30. package/vscode/src/vs/platform/agentHost/common/transportConstants.js +6 -0
  31. package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +4 -3
  32. package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +4 -3
  33. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +4 -2
  34. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +15 -7
  35. package/vscode/src/vs/workbench/contrib/browserView/common/browserChatToolReferenceNames.d.ts +19 -0
  36. package/vscode/src/vs/workbench/contrib/browserView/common/browserChatToolReferenceNames.js +17 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  38. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
  39. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
  40. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +14 -10
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +64 -59
  42. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  43. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +31 -16
  44. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +18 -9
  45. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +16 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +8 -8
  47. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +30 -5
  48. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  49. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +8 -7
  50. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  51. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  52. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  53. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +12 -12
  54. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
  55. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +27 -18
  56. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  57. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +11 -11
  58. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  59. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +21 -20
  60. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +22 -22
  61. package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.d.ts +12 -0
  62. package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.js +171 -0
  63. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +1 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
  65. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +4 -4
  66. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  67. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +1 -1
  68. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +3 -2
  69. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +12 -10
  70. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.d.ts +28 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +99 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.d.ts +2 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.js +11 -4
  74. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +9 -3
  75. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +63 -53
  76. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +2 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +10 -7
  78. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +3 -3
  79. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  80. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  81. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  82. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +5 -4
  83. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +25 -48
  84. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  85. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  86. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +5 -0
  87. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +8 -4
  88. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +99 -39
  89. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +2 -2
  90. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +17 -30
  91. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +78 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +38 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +35 -37
  94. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +347 -326
  95. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +6 -2
  96. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +1 -11
  97. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +113 -109
  98. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +37 -15
  99. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +436 -134
  100. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
  101. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +2 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +52 -26
  103. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -1
  104. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +2 -1
  105. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +13 -5
  106. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +23 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +60 -0
  108. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +25 -0
  109. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +93 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +9 -2
  111. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +73 -104
  112. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +272 -41
  113. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +12 -2
  114. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +30 -1
  115. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +430 -185
  116. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +5 -2
  117. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +44 -3
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +480 -279
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.d.ts +138 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.js +221 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +84 -0
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +1216 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +2 -1
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +32 -4
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +26 -19
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +28 -25
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +25 -24
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -1
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +68 -33
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +3 -2
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +1 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +650 -6
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +2 -2
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
  147. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +29 -0
  148. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +390 -0
  149. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  150. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
  151. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
  152. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  153. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +18 -3
  154. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  155. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +11 -11
  156. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -2
  157. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
  158. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
  159. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  160. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
  161. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -7
  162. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
  163. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +1 -7
  164. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +6 -87
  165. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +1 -1
  166. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +116 -182
  167. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +12 -39
  168. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
  169. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +31 -31
  170. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  171. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +61 -41
  172. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  173. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  174. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +27 -27
  175. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +2 -0
  176. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +16 -13
  177. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +20 -0
  178. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +106 -36
  179. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +25 -7
  180. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +629 -425
  181. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +9 -1
  182. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +105 -29
  183. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.d.ts +1 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +175 -148
  185. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +20 -33
  186. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +9 -2
  187. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
  188. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  189. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
  190. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
  191. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  192. package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.d.ts +58 -0
  193. package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +339 -0
  194. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
  195. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/media/planReviewFeedback.css +160 -0
  196. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.d.ts +9 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +123 -0
  198. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.d.ts +37 -0
  199. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +572 -0
  200. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.d.ts +36 -0
  201. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.js +167 -0
  202. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +49 -7
  203. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +315 -19
  204. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +45 -24
  205. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
  206. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
  207. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  208. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +44 -40
  209. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +5 -5
  210. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  211. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +4 -1
  212. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  213. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  214. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  215. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  216. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  217. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
  218. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
  219. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +9 -1
  220. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +111 -52
  221. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +3 -7
  222. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +13 -47
  223. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +3 -2
  224. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +4 -8
  225. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.d.ts +18 -0
  226. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.js +56 -0
  227. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +3 -7
  228. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +14 -52
  229. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  230. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +3 -1
  231. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +17 -2
  232. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
  233. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +23 -12
  234. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +39 -0
  235. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +136 -0
  236. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.d.ts +72 -0
  237. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.js +56 -0
  238. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +7 -0
  239. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +14 -1
  240. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +41 -26
  241. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +30 -12
  242. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  243. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  244. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +2 -5
  245. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +25 -6
  246. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  247. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +2 -2
  248. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +5 -4
  249. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +1 -0
  250. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +108 -45
  251. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -3
  252. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +3 -1
  253. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +20 -1
  254. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +65 -26
  255. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +5 -3
  256. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +38 -11
  257. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +17 -1
  258. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +165 -16
  259. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +1 -0
  260. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +62 -1
  261. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
  262. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -1
  263. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
  264. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +1 -3
  265. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +15 -21
  266. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +1 -3
  267. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +18 -24
  268. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +4 -2
  269. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +203 -180
  270. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  271. package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.d.ts +30 -0
  272. package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.js +35 -0
  273. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +2 -1
  274. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +27 -2
  275. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.d.ts +1 -1
  276. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +14 -49
  277. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +0 -16
  278. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +35 -177
  279. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -8
  280. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.d.ts +1 -2
  281. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +2 -3
  282. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +4 -4
  283. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -11
  284. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  285. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  286. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +13 -13
  287. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  288. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  289. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  290. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  291. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  292. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +29 -3
  293. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +129 -3
  294. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -2
  295. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +2 -1
  296. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +14 -6
  297. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  298. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +1 -4
  299. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +12 -38
  300. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  301. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +4 -4
  302. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
  303. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.d.ts +12 -7
  304. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +77 -70
  305. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  306. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  307. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  308. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  309. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.d.ts +32 -0
  310. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +232 -0
  311. package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.d.ts +83 -0
  312. package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.js +243 -0
  313. package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +0 -749
  314. package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.js +0 -14
  315. package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.d.ts +0 -17
  316. package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.js +0 -5
  317. package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +0 -40
  318. package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.js +0 -14
  319. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +0 -61
  320. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +0 -638
  321. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +0 -131
  322. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +0 -363
  323. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +0 -24
  324. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +0 -306
  325. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.d.ts +0 -23
  326. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +0 -97
  327. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatStatusWidget.css +0 -57
  328. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -50
  329. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -29
  330. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
  331. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -78
  332. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
  333. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
  334. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
  335. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
  336. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -242
  337. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1701
  338. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -191
  339. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -728
  340. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +0 -14
  341. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +0 -69
@@ -7,7 +7,7 @@ import { TerminalToolId } from '@codingame/monaco-vscode-api/vscode/vs/workbench
7
7
 
8
8
  const ConfirmTerminalCommandToolData = {
9
9
  id: TerminalToolId.ConfirmTerminalCommand,
10
- displayName: ( localize(14036, "Confirm Terminal Command")),
10
+ displayName: ( localize(14325, "Confirm Terminal Command")),
11
11
  modelDescription: [
12
12
  "This tool allows you to get explicit user confirmation for a terminal command without executing it.",
13
13
  "",
@@ -25,7 +25,7 @@ const ConfirmTerminalCommandToolData = {
25
25
  "",
26
26
  "After confirmation, use a tool to actually execute the command."
27
27
  ].join("\n"),
28
- userDescription: ( localize(14037, "Tool for confirming terminal commands")),
28
+ userDescription: ( localize(14326, "Tool for confirming terminal commands")),
29
29
  source: ToolDataSource.Internal,
30
30
  icon: Codicon.shield,
31
31
  inputSchema: {
@@ -1,24 +1,22 @@
1
- import type { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
1
+ import { 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
3
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
4
4
  import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
5
5
  import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
6
6
  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";
7
7
  import { ITerminalChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
8
- import { ITerminalService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
9
8
  export declare const SendToTerminalToolData: IToolData;
10
9
  export interface ISendToTerminalInputParams {
11
- id?: string;
12
- terminalId?: number;
10
+ id: string;
13
11
  command: string;
12
+ waitForOutput?: boolean;
14
13
  }
15
14
  export declare class SendToTerminalTool extends Disposable implements IToolImpl {
16
15
  private readonly _configurationService;
17
16
  private readonly _chatService;
18
17
  private readonly _chatWidgetService;
19
18
  private readonly _terminalChatService;
20
- private readonly _terminalService;
21
- constructor(_configurationService: IConfigurationService, _chatService: IChatService, _chatWidgetService: IChatWidgetService, _terminalChatService: ITerminalChatService, _terminalService: ITerminalService);
19
+ constructor(_configurationService: IConfigurationService, _chatService: IChatService, _chatWidgetService: IChatWidgetService, _terminalChatService: ITerminalChatService);
22
20
  prepareToolInvocation(context: IToolInvocationPreparationContext, _token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
23
21
  /**
24
22
  * Returns a human-friendly label for the target terminal, using the
@@ -47,7 +45,14 @@ export declare class SendToTerminalTool extends Disposable implements IToolImpl
47
45
  private _getQuestionText;
48
46
  /**
49
47
  * Checks whether a carousel answer value matches the command text being sent.
48
+ * An empty/unprovided answer matches an empty command (i.e. pressing Enter to
49
+ * accept the default), since that is the expected way to skip a question.
50
50
  */
51
51
  private _answerMatchesCommand;
52
- invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, _token: CancellationToken): Promise<IToolResult>;
52
+ invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
53
+ /**
54
+ * Waits for the terminal to become idle (no new output for a sustained period)
55
+ * and returns the output produced since the given marker.
56
+ */
57
+ private _waitForIdleOutput;
53
58
  }
@@ -1,6 +1,7 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { timeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
4
+ import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
4
5
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
5
6
  import { MarkdownString, appendEscapedMarkdownInlineCode, createCommandUri, isMarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
6
7
  import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
@@ -13,7 +14,7 @@ import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/c
13
14
  import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
14
15
  import { ITerminalService, ITerminalChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
15
16
  import { getOutput } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers';
16
- import { buildCommandDisplayText, normalizeCommandForExecution } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers';
17
+ import { buildCommandDisplayText, isMultilineCommand, normalizeCommandForExecution } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers';
17
18
  import { RunInTerminalTool } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool';
18
19
  import { isSessionAutoApproveLevel } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove';
19
20
  import { TerminalToolId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/terminalToolIds';
@@ -21,8 +22,8 @@ import { TerminalToolId } from '@codingame/monaco-vscode-api/vscode/vs/workbench
21
22
  const SendToTerminalToolData = {
22
23
  id: TerminalToolId.SendToTerminal,
23
24
  toolReferenceName: "sendToTerminal",
24
- displayName: ( localize(14081, "Send to Terminal")),
25
- modelDescription: `Send input text to a terminal session. This can target either a persistent terminal started with ${TerminalToolId.RunInTerminal} in async mode (using 'id') or any foreground terminal visible in the terminal panel (using 'terminalId'). The 'command' field may be empty or whitespace to press Enter (useful for interactive prompts). The result includes the last few lines of terminal output captured shortly after sending.`,
25
+ displayName: ( localize(14380, "Send to Terminal")),
26
+ modelDescription: `Send input text to an active terminal execution (identified by the \`id\` returned from ${TerminalToolId.RunInTerminal}). The 'command' field may be empty or whitespace to press Enter (useful for interactive prompts). By default, returns the last 20 lines of terminal output captured shortly after sending. Set 'waitForOutput' to true for interactive programs (games, REPLs, etc.) to wait until the terminal becomes idle before returning output — this gives you the program's response to your input.`,
26
27
  icon: Codicon.terminal,
27
28
  source: ToolDataSource.Internal,
28
29
  inputSchema: {
@@ -30,19 +31,19 @@ const SendToTerminalToolData = {
30
31
  properties: {
31
32
  id: {
32
33
  type: "string",
33
- description: `The ID of a persistent terminal session to send a command to (returned by ${TerminalToolId.RunInTerminal} in async mode). Provide either 'id' or 'terminalId', not both.`,
34
+ description: `The ID of an active terminal execution to send a command to (returned by ${TerminalToolId.RunInTerminal} for async executions, or for sync executions that timed out and were moved to the background).`,
34
35
  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}$"
35
36
  },
36
- terminalId: {
37
- type: "number",
38
- description: "The numeric instanceId of a terminal. Use this to send input to terminals not started by the agent (e.g., user-created terminals or terminals that need interactive input). Provide either 'id' or 'terminalId', not both."
39
- },
40
37
  command: {
41
38
  type: "string",
42
39
  description: "The input text to send to the terminal. The text is sent followed by Enter. Provide an empty or whitespace string to send just Enter (for interactive prompts)."
40
+ },
41
+ waitForOutput: {
42
+ type: "boolean",
43
+ description: "When true, waits for the terminal to become idle (no new output for a short period) before returning, instead of returning immediately. Use this for interactive programs where you need to see the full response to your input. Defaults to false."
43
44
  }
44
45
  },
45
- required: ["command"]
46
+ required: ["id", "command"]
46
47
  }
47
48
  };
48
49
  const FocusTerminalByIdCommandId = "workbench.action.terminal.chat.focusTerminalById";
@@ -70,15 +71,13 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
70
71
  _configurationService,
71
72
  _chatService,
72
73
  _chatWidgetService,
73
- _terminalChatService,
74
- _terminalService
74
+ _terminalChatService
75
75
  ) {
76
76
  super();
77
77
  this._configurationService = _configurationService;
78
78
  this._chatService = _chatService;
79
79
  this._chatWidgetService = _chatWidgetService;
80
80
  this._terminalChatService = _terminalChatService;
81
- this._terminalService = _terminalService;
82
81
  }
83
82
  async prepareToolInvocation(context, _token) {
84
83
  const args = context.parameters;
@@ -88,16 +87,16 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
88
87
  const pastTenseMessage = ( new MarkdownString());
89
88
  const questionText = this._getQuestionContextForTerminal(context.chatSessionResource, args);
90
89
  if (isEmptyInput) {
91
- invocationMessage.appendMarkdown(( localize(14082, "Pressing `Enter` in terminal")));
92
- pastTenseMessage.appendMarkdown(( localize(14083, "Pressed `Enter` in terminal")));
90
+ invocationMessage.appendMarkdown(( localize(14381, "Pressing `Enter` in terminal")));
91
+ pastTenseMessage.appendMarkdown(( localize(14382, "Pressed `Enter` in terminal")));
93
92
  } else {
94
93
  const displayCommand = buildCommandDisplayText(args.command);
95
94
  const safeInlineCode = appendEscapedMarkdownInlineCode(displayCommand);
96
- invocationMessage.appendMarkdown(( localize(14084, "Sending {0} to terminal", safeInlineCode)));
97
- pastTenseMessage.appendMarkdown(( localize(14085, "Sent {0} to terminal", safeInlineCode)));
95
+ invocationMessage.appendMarkdown(( localize(14383, "Sending {0} to terminal", safeInlineCode)));
96
+ pastTenseMessage.appendMarkdown(( localize(14384, "Sent {0} to terminal", safeInlineCode)));
98
97
  }
99
98
  if (questionText) {
100
- const replyPrefix = ` (${( localize(14086, "replying to: "))}`;
99
+ const replyPrefix = ` (${( localize(14385, "replying to: "))}`;
101
100
  invocationMessage.appendMarkdown(replyPrefix);
102
101
  invocationMessage.appendText(questionText);
103
102
  invocationMessage.appendMarkdown(")");
@@ -112,15 +111,15 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
112
111
  }
113
112
  }));
114
113
  const safeTerminalLabel = appendEscapedMarkdownInlineCode(terminalLabel);
115
- const baseMessage = isEmptyInput ? ( localize(14087, "Press `Enter` in terminal {0}", safeTerminalLabel)) : ( localize(
116
- 14088,
114
+ const baseMessage = isEmptyInput ? ( localize(14386, "Press `Enter` in terminal {0}", safeTerminalLabel)) : ( localize(
115
+ 14387,
117
116
  "Run {0} in terminal {1}",
118
117
  appendEscapedMarkdownInlineCode(buildCommandDisplayText(args.command)),
119
118
  safeTerminalLabel
120
119
  ));
121
120
  if (instanceId !== undefined) {
122
121
  const focusUri = createCommandUri(FocusTerminalByIdCommandId, instanceId);
123
- confirmationMessage.appendMarkdown(`${baseMessage} — [${( localize(14089, "Focus Terminal"))}](${focusUri})`);
122
+ confirmationMessage.appendMarkdown(`${baseMessage} — [${( localize(14388, "Focus Terminal"))}](${focusUri})`);
124
123
  } else {
125
124
  confirmationMessage.appendMarkdown(baseMessage);
126
125
  }
@@ -134,7 +133,7 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
134
133
  const isAnsweringQuestion = questionText !== undefined;
135
134
  const shouldShowConfirmation = (!isSessionAutoApproved && !isAnsweringQuestion) || context.forceConfirmationReason !== undefined;
136
135
  const confirmationMessages = shouldShowConfirmation ? {
137
- title: ( localize(14090, "Send to Terminal")),
136
+ title: ( localize(14389, "Send to Terminal")),
138
137
  message: confirmationMessage,
139
138
  allowAutoConfirm: undefined
140
139
  } : undefined;
@@ -151,18 +150,9 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
151
150
  return execution.instance.title;
152
151
  }
153
152
  }
154
- if (args.terminalId !== undefined) {
155
- const instance = this._terminalService.getInstanceFromId(args.terminalId);
156
- if (instance) {
157
- return instance.title;
158
- }
159
- }
160
- return args.id ?? String(args.terminalId ?? "");
153
+ return args.id ?? "";
161
154
  }
162
155
  _getTerminalInstanceId(args) {
163
- if (args.terminalId !== undefined) {
164
- return args.terminalId;
165
- }
166
156
  if (args.id) {
167
157
  const execution = RunInTerminalTool.getExecution(args.id);
168
158
  if (execution) {
@@ -179,7 +169,7 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
179
169
  if (!model) {
180
170
  return undefined;
181
171
  }
182
- if (!args.id && args.terminalId === undefined) {
172
+ if (!args.id) {
183
173
  return undefined;
184
174
  }
185
175
  const commandText = args.command?.trim();
@@ -199,9 +189,7 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
199
189
  if (!candidate.terminalId || candidate.questions.length === 0) {
200
190
  continue;
201
191
  }
202
- const matchesById = !!args.id && candidate.terminalId === args.id;
203
- const matchesByInstanceId = args.terminalId !== undefined && RunInTerminalTool.getExecution(candidate.terminalId)?.instance.instanceId === args.terminalId;
204
- if (matchesById || matchesByInstanceId) {
192
+ if (candidate.terminalId === args.id) {
205
193
  carouselIndex = j;
206
194
  carousel = candidate;
207
195
  break;
@@ -238,7 +226,7 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
238
226
  }
239
227
  _answerMatchesCommand(answer, commandText) {
240
228
  if (answer === undefined) {
241
- return false;
229
+ return commandText === "";
242
230
  }
243
231
  if (typeof answer === "string") {
244
232
  return answer.trim() === commandText;
@@ -250,45 +238,29 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
250
238
  if (( multi.selectedValues.some(v => v.trim() === commandText))) {
251
239
  return true;
252
240
  }
253
- return multi.freeformValue?.trim() === commandText;
241
+ if (multi.freeformValue?.trim() === commandText) {
242
+ return true;
243
+ }
244
+ return commandText === "" && multi.selectedValues.length === 0 && !multi.freeformValue?.trim();
254
245
  }
255
246
  if (hasKey(answer, {
256
247
  selectedValue: true
257
248
  })) {
258
249
  const single = answer;
259
- return single.selectedValue?.trim() === commandText || single.freeformValue?.trim() === commandText;
250
+ if (single.selectedValue?.trim() === commandText || single.freeformValue?.trim() === commandText) {
251
+ return true;
252
+ }
253
+ return commandText === "" && !single.selectedValue?.trim() && !single.freeformValue?.trim();
260
254
  }
261
255
  return false;
262
256
  }
263
- async invoke(invocation, _countTokens, _progress, _token) {
257
+ async invoke(invocation, _countTokens, _progress, token) {
264
258
  const args = invocation.parameters;
265
- if (!args.id && args.terminalId === undefined) {
266
- return {
267
- content: [{
268
- kind: "text",
269
- value: "Error: Either 'id' (persistent terminal UUID) or 'terminalId' (foreground terminal instanceId) must be provided."
270
- }]
271
- };
272
- }
273
- if (args.terminalId !== undefined && !args.id) {
274
- const instance = this._terminalService.getInstanceFromId(args.terminalId);
275
- if (!instance) {
276
- return {
277
- content: [{
278
- kind: "text",
279
- value: `Error: No terminal found with instanceId ${args.terminalId}. The terminal may have been closed.`
280
- }]
281
- };
282
- }
283
- await instance.sendText(normalizeCommandForExecution(args.command), true);
284
- await timeout(100);
285
- const recentOutput = getOutput(instance, undefined, {
286
- lastNLines: 5
287
- });
259
+ if (!args.id) {
288
260
  return {
289
261
  content: [{
290
262
  kind: "text",
291
- value: `Successfully sent command to foreground terminal ${args.terminalId}.${recentOutput ? `\n\nTerminal output (last 5 lines):\n${recentOutput}` : ""}`
263
+ value: `Error: 'id' (the active terminal execution UUID returned by ${TerminalToolId.RunInTerminal}) must be provided.`
292
264
  }]
293
265
  };
294
266
  }
@@ -301,19 +273,54 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
301
273
  }]
302
274
  };
303
275
  }
304
- await execution.instance.sendText(normalizeCommandForExecution(args.command), true);
305
- await timeout(100);
306
- const recentOutput = getOutput(execution.instance, undefined, {
307
- lastNLines: 5
308
- });
276
+ const startMarker = execution.instance.registerMarker?.();
277
+ if (isMultilineCommand(args.command)) {
278
+ await execution.instance.sendText(args.command, true, true);
279
+ } else {
280
+ await execution.instance.sendText(normalizeCommandForExecution(args.command), true);
281
+ }
282
+ let recentOutput;
283
+ if (args.waitForOutput) {
284
+ recentOutput = await this._waitForIdleOutput(execution, startMarker, token);
285
+ } else {
286
+ await timeout(2000, token);
287
+ recentOutput = getOutput(execution.instance, startMarker ?? undefined, {
288
+ lastNLines: 20
289
+ });
290
+ }
309
291
  return {
310
292
  content: [{
311
293
  kind: "text",
312
- value: `Successfully sent command to terminal ${args.id}.${recentOutput ? `\n\nTerminal output (last 5 lines):\n${recentOutput}` : ""}`
294
+ value: `Successfully sent command to terminal ${args.id}.${recentOutput ? `\n\nTerminal output:\n${recentOutput}` : ""}`
313
295
  }]
314
296
  };
315
297
  }
298
+ async _waitForIdleOutput(execution, startMarker, token) {
299
+ const maxWaitMs = 30_000;
300
+ const idleThresholdMs = 2_000;
301
+ const pollIntervalMs = 500;
302
+ let waited = 0;
303
+ let lastDataTime = Date.now();
304
+ const cts = ( new CancellationTokenSource(token));
305
+ const dataListener = execution.instance.onData(() => {
306
+ lastDataTime = Date.now();
307
+ });
308
+ try {
309
+ while (!cts.token.isCancellationRequested && waited < maxWaitMs) {
310
+ await timeout(pollIntervalMs, cts.token);
311
+ waited += pollIntervalMs;
312
+ const timeSinceLastData = Date.now() - lastDataTime;
313
+ if (timeSinceLastData >= idleThresholdMs) {
314
+ break;
315
+ }
316
+ }
317
+ } finally {
318
+ dataListener.dispose();
319
+ cts.dispose();
320
+ }
321
+ return getOutput(execution.instance, startMarker ?? undefined);
322
+ }
316
323
  };
317
- SendToTerminalTool = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IChatService)), ( __param(2, IChatWidgetService)), ( __param(3, ITerminalChatService)), ( __param(4, ITerminalService))], SendToTerminalTool));
324
+ SendToTerminalTool = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IChatService)), ( __param(2, IChatWidgetService)), ( __param(3, ITerminalChatService))], SendToTerminalTool));
318
325
 
319
326
  export { SendToTerminalTool, SendToTerminalToolData };
@@ -79,7 +79,7 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
79
79
  });
80
80
  }
81
81
  _progress.report({
82
- message: ( new MarkdownString(( localize(14091, "Resolving the task"))))
82
+ message: ( new MarkdownString(( localize(14390, "Resolving the task"))))
83
83
  });
84
84
  let task;
85
85
  const start = Date.now();
@@ -96,7 +96,7 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
96
96
  kind: "text",
97
97
  value: `Task not found: ${args.task.label}`
98
98
  }],
99
- toolResultMessage: ( new MarkdownString(( localize(14092, "Task not found: `{0}`", args.task.label))))
99
+ toolResultMessage: ( new MarkdownString(( localize(14391, "Task not found: `{0}`", args.task.label))))
100
100
  };
101
101
  }
102
102
  const preRunMarkersStore = ( new DisposableStore());
@@ -113,7 +113,7 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
113
113
  }
114
114
  }
115
115
  _progress.report({
116
- message: ( new MarkdownString(( localize(14093, "Running task `{0}`", args.task.label))))
116
+ message: ( new MarkdownString(( localize(14392, "Running task `{0}`", args.task.label))))
117
117
  });
118
118
  const raceResult = await Promise.race([
119
119
  this._tasksService.run(task, undefined, TaskRunSource.ChatAgent),
@@ -131,7 +131,7 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
131
131
  value: `Task started but no terminal was found for: ${args.task.label}`
132
132
  }],
133
133
  toolResultMessage: ( new MarkdownString(( localize(
134
- 14094,
134
+ 14393,
135
135
  "Task started but no terminal was found for: `{0}`",
136
136
  args.task.label
137
137
  ))))
@@ -201,26 +201,26 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
201
201
  const allTasks = await this._tasksService.tasks();
202
202
  if (allTasks?.find(t => t._label === task.label)) {
203
203
  return {
204
- invocationMessage: ( new MarkdownString(( localize(14095, "Task `{0}` already exists.", task.label)))),
205
- pastTenseMessage: ( new MarkdownString(( localize(14096, "Task `{0}` already exists.", task.label)))),
204
+ invocationMessage: ( new MarkdownString(( localize(14394, "Task `{0}` already exists.", task.label)))),
205
+ pastTenseMessage: ( new MarkdownString(( localize(14395, "Task `{0}` already exists.", task.label)))),
206
206
  confirmationMessages: undefined
207
207
  };
208
208
  }
209
209
  const activeTasks = await this._tasksService.getActiveTasks();
210
210
  if (activeTasks.find(t => t._label === task.label)) {
211
211
  return {
212
- invocationMessage: ( new MarkdownString(( localize(14097, "Task `{0}` is already running.", task.label)))),
213
- pastTenseMessage: ( new MarkdownString(( localize(14097, "Task `{0}` is already running.", task.label)))),
212
+ invocationMessage: ( new MarkdownString(( localize(14396, "Task `{0}` is already running.", task.label)))),
213
+ pastTenseMessage: ( new MarkdownString(( localize(14396, "Task `{0}` is already running.", task.label)))),
214
214
  confirmationMessages: undefined
215
215
  };
216
216
  }
217
217
  return {
218
- invocationMessage: ( new MarkdownString(( localize(14098, "Created task `{0}`", task.label)))),
219
- pastTenseMessage: ( new MarkdownString(( localize(14099, "Created task `{0}`", task.label)))),
218
+ invocationMessage: ( new MarkdownString(( localize(14397, "Created task `{0}`", task.label)))),
219
+ pastTenseMessage: ( new MarkdownString(( localize(14398, "Created task `{0}`", task.label)))),
220
220
  confirmationMessages: {
221
- title: ( localize(14100, "Allow task creation and execution?")),
221
+ title: ( localize(14399, "Allow task creation and execution?")),
222
222
  message: ( new MarkdownString(( localize(
223
- 14101,
223
+ 14400,
224
224
  "A task `{0}` with command `{1}`{2} will be created.",
225
225
  task.label,
226
226
  task.command,
@@ -235,9 +235,9 @@ const CreateAndRunTaskToolData = {
235
235
  id: TerminalToolId.CreateAndRunTask,
236
236
  toolReferenceName: "createAndRunTask",
237
237
  legacyToolReferenceFullNames: ["runTasks/createAndRunTask"],
238
- displayName: ( localize(14102, "Create and run Task")),
238
+ displayName: ( localize(14401, "Create and run Task")),
239
239
  modelDescription: "Creates and runs a build, run, or custom task for the workspace by generating or adding to a tasks.json file based on the project structure (such as package.json or README.md). If the user asks to build, run, launch and they have no tasks.json file, use this tool. If they ask to create or add a task, use this tool.",
240
- userDescription: ( localize(14103, "Create and run a task in the workspace")),
240
+ userDescription: ( localize(14402, "Create and run a task in the workspace")),
241
241
  source: ToolDataSource.Internal,
242
242
  inputSchema: {
243
243
  "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(14104, "Get Task Output")),
21
+ displayName: ( localize(14403, "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(14105, "Task not found: `{0}`", args.id))))
68
+ invocationMessage: ( new MarkdownString(( localize(14404, "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(14106, "The task `{0}` is already running.", taskLabel))))
75
+ invocationMessage: ( new MarkdownString(( localize(14405, "The task `{0}` is already running.", taskLabel))))
76
76
  };
77
77
  }
78
78
  return {
79
- invocationMessage: ( new MarkdownString(( localize(14107, "Checking output for task `{0}`", taskLabel)))),
80
- pastTenseMessage: ( new MarkdownString(( localize(14108, "Checked output for task `{0}`", taskLabel))))
79
+ invocationMessage: ( new MarkdownString(( localize(14406, "Checking output for task `{0}`", taskLabel)))),
80
+ pastTenseMessage: ( new MarkdownString(( localize(14407, "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(14105, "Task not found: `{0}`", args.id))))
100
+ toolResultMessage: ( new MarkdownString(( localize(14404, "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(14109, "Terminal not found for task `{0}`", taskLabel))))
115
+ toolResultMessage: ( new MarkdownString(( localize(14408, "Terminal not found for task `{0}`", taskLabel))))
116
116
  };
117
117
  }
118
118
  const startMarkersByTerminalInstanceId = task.configurationProperties.isBackground ? ( new Map()) : undefined;
@@ -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(14110, "Task not found: `{0}`", args.id))))
60
+ toolResultMessage: ( new MarkdownString(( localize(14409, "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(14111, "The task `{0}` is already running.", taskLabel))))
71
+ toolResultMessage: ( new MarkdownString(( localize(14410, "The task `{0}` is already running.", taskLabel))))
72
72
  };
73
73
  }
74
74
  const dependencyTasks = await resolveDependencyTasks(task, args.workspaceFolder, this._configurationService, this._tasksService);
@@ -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(14112, "Task started but no terminal was found for: `{0}`", taskLabel))))
97
+ toolResultMessage: ( new MarkdownString(( localize(14411, "Task started but no terminal was found for: `{0}`", taskLabel))))
98
98
  };
99
99
  }
100
100
  const terminals = this._terminalService.instances.filter(t => ( resources.some(r => r.path === t.resource.path && r.scheme === t.resource.scheme)));
@@ -104,7 +104,7 @@ let RunTaskTool = class RunTaskTool {
104
104
  kind: "text",
105
105
  value: `Task started but no terminal was found for: ${taskLabel}`
106
106
  }],
107
- toolResultMessage: ( new MarkdownString(( localize(14112, "Task started but no terminal was found for: `{0}`", taskLabel))))
107
+ toolResultMessage: ( new MarkdownString(( localize(14411, "Task started but no terminal was found for: `{0}`", taskLabel))))
108
108
  };
109
109
  }
110
110
  const store = ( new DisposableStore());
@@ -179,29 +179,29 @@ let RunTaskTool = class RunTaskTool {
179
179
  );
180
180
  if (!task) {
181
181
  return {
182
- invocationMessage: ( new MarkdownString(( localize(14110, "Task not found: `{0}`", args.id))))
182
+ invocationMessage: ( new MarkdownString(( localize(14409, "Task not found: `{0}`", args.id))))
183
183
  };
184
184
  }
185
185
  const taskLabel = task._label;
186
186
  const activeTasks = await this._tasksService.getActiveTasks();
187
187
  if (task && activeTasks.includes(task)) {
188
188
  return {
189
- invocationMessage: ( new MarkdownString(( localize(14113, "The task is already running."))))
189
+ invocationMessage: ( new MarkdownString(( localize(14412, "The task is already running."))))
190
190
  };
191
191
  }
192
192
  if (await this._isTaskActive(task)) {
193
193
  return {
194
- invocationMessage: ( new MarkdownString(( localize(14114, "`{0}` is already running.", taskLabel)))),
195
- pastTenseMessage: ( new MarkdownString(( localize(14115, "`{0}` was already running.", taskLabel)))),
194
+ invocationMessage: ( new MarkdownString(( localize(14413, "`{0}` is already running.", taskLabel)))),
195
+ pastTenseMessage: ( new MarkdownString(( localize(14414, "`{0}` was already running.", taskLabel)))),
196
196
  confirmationMessages: undefined
197
197
  };
198
198
  }
199
199
  return {
200
- invocationMessage: ( new MarkdownString(( localize(14116, "Running `{0}`", taskLabel)))),
201
- pastTenseMessage: ( new MarkdownString(task?.configurationProperties.isBackground ? ( localize(14117, "Started `{0}`", taskLabel)) : ( localize(14118, "Ran `{0}`", taskLabel)))),
200
+ invocationMessage: ( new MarkdownString(( localize(14415, "Running `{0}`", taskLabel)))),
201
+ pastTenseMessage: ( new MarkdownString(task?.configurationProperties.isBackground ? ( localize(14416, "Started `{0}`", taskLabel)) : ( localize(14417, "Ran `{0}`", taskLabel)))),
202
202
  confirmationMessages: task ? {
203
- title: ( localize(14119, "Allow task run?")),
204
- message: ( localize(14120, "Allow to run the task `{0}`?", taskLabel))
203
+ title: ( localize(14418, "Allow task run?")),
204
+ message: ( localize(14419, "Allow to run the task `{0}`?", taskLabel))
205
205
  } : undefined
206
206
  };
207
207
  }
@@ -211,9 +211,9 @@ const RunTaskToolData = {
211
211
  id: TerminalToolId.RunTask,
212
212
  toolReferenceName: "runTask",
213
213
  legacyToolReferenceFullNames: ["runTasks/runTask"],
214
- displayName: ( localize(14121, "Run Task")),
214
+ displayName: ( localize(14420, "Run Task")),
215
215
  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.`,
216
- userDescription: ( localize(14122, "Run tasks in the workspace")),
216
+ userDescription: ( localize(14421, "Run tasks in the workspace")),
217
217
  icon: Codicon.tools,
218
218
  source: ToolDataSource.Internal,
219
219
  when: TasksAvailableContext,
@@ -26,7 +26,7 @@ function toolResultMessageFromResponse(
26
26
  ) {
27
27
  let resultSummary = "";
28
28
  if (result?.exitCode) {
29
- resultSummary = ( localize(14123, "Task `{0}` failed with exit code {1}.", taskLabel, result.exitCode));
29
+ resultSummary = ( localize(14422, "Task `{0}` failed with exit code {1}.", taskLabel, result.exitCode));
30
30
  } else {
31
31
  resultSummary += `\`${taskLabel}\` task `;
32
32
  const problemCount = toolResultDetails.length;
@@ -0,0 +1,32 @@
1
+ import { IToolResultFilter } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/toolResultCompressor";
2
+ import { IToolResultCompressor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/toolResultCompressor.service";
3
+ /**
4
+ * Returns the "head" of a shell command — the first executable word, after
5
+ * skipping common env-var assignments like `FOO=bar baz`. `sub` is the first
6
+ * non-long-flag token after the head, so `git --no-pager diff` yields
7
+ * `{ head: 'git', sub: 'diff' }`. Returns `undefined` when the command can't
8
+ * be parsed.
9
+ */
10
+ export declare function parseCommandHead(command: string | undefined): {
11
+ head: string;
12
+ sub: string | undefined;
13
+ } | undefined;
14
+ /**
15
+ * Compresses `git diff` / `git show` output by reducing context lines to a
16
+ * tighter window and dropping the huge no-op chunks that diffs of generated
17
+ * files (lockfiles, snapshots) produce.
18
+ */
19
+ export declare const gitDiffFilter: IToolResultFilter;
20
+ /**
21
+ * Compresses `ls -l` / `ls -la` output by dropping permission/owner/size
22
+ * columns and keeping only the entry name. Plain `ls` is already terse and
23
+ * passes through.
24
+ */
25
+ export declare const lsFilter: IToolResultFilter;
26
+ /**
27
+ * Compresses `npm install` / `yarn` / `pnpm install` output by stripping
28
+ * progress lines and audit summary noise, keeping the package summary plus
29
+ * any error/warning lines.
30
+ */
31
+ export declare const npmInstallFilter: IToolResultFilter;
32
+ export declare function registerTerminalCompressors(compressor: IToolResultCompressor): void;