@codingame/monaco-vscode-chat-service-override 32.0.2 → 33.0.4

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 (257) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js +15 -5
  3. package/package.json +5 -5
  4. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +170 -24
  5. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +372 -66
  6. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +18 -1
  7. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +160 -31
  8. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.d.ts +8 -0
  9. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +19 -0
  10. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +134 -0
  11. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +257 -0
  12. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +84 -3
  13. package/vscode/src/vs/platform/agentHost/common/agentService.js +9 -1
  14. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +61 -1
  15. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +61 -1
  16. package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.js +3 -1
  17. package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +1 -1
  18. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +1 -1
  19. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +1 -1
  20. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +4 -4
  21. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +1 -1
  22. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +2 -7
  23. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +8 -29
  24. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  25. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +60 -60
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +10 -6
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +10 -1
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +180 -174
  36. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  37. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  38. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  39. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +12 -12
  40. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +12 -12
  42. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  43. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +11 -11
  44. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  45. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
  46. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +20 -20
  47. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +64 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +330 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.d.ts +24 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +77 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +6 -6
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +51 -0
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +267 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +4 -3
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +53 -53
  61. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
  62. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
  63. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  65. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  66. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
  67. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +5 -4
  68. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +30 -28
  69. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  70. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  71. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +26 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +14 -14
  73. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +7 -6
  74. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +150 -119
  75. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +45 -44
  76. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +0 -1
  77. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +58 -76
  78. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
  79. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +25 -25
  80. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +2 -2
  81. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +2 -2
  82. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +3 -3
  83. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +2 -6
  84. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +88 -70
  85. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +82 -56
  86. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +10 -8
  87. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +2 -6
  88. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +89 -71
  89. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.d.ts +1 -1
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +2 -2843
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.d.ts +1 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +2934 -0
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +99 -99
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +4 -4
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +53 -20
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +4 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +131 -61
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +22 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +23 -3
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +91 -15
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +23 -21
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -28
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +14 -14
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +15 -4
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +203 -163
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +1 -3
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +31 -54
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.d.ts +1 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +88 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
  146. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +17 -4
  147. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.d.ts +8 -0
  148. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +91 -0
  149. package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.d.ts +52 -0
  150. package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.js +82 -0
  151. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +21 -1
  152. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +55 -18
  153. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
  154. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  155. package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.d.ts +51 -0
  156. package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.js +106 -0
  157. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +4 -2
  158. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
  159. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
  160. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +38 -0
  161. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +59 -0
  162. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
  163. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +25 -25
  164. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
  165. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
  166. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  167. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
  168. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
  169. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  170. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +4 -6
  171. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  172. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  173. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  174. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  175. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  176. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
  177. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
  178. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +1 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +38 -28
  180. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -7
  181. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.d.ts +5 -1
  182. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.js +106 -7
  183. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -8
  184. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.d.ts +28 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +75 -0
  186. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  187. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/{toolInvocationParts/chatToolOutputStateCache.d.ts → chatOutputPartStateCache.d.ts} +5 -6
  188. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/{toolInvocationParts/chatToolOutputStateCache.js → chatOutputPartStateCache.js} +19 -11
  189. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
  190. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +58 -26
  191. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +9 -9
  192. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
  193. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  194. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  195. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
  196. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +18 -9
  197. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  198. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +13 -5
  199. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +6 -2
  200. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
  201. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +19 -18
  202. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
  203. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +1 -2
  204. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
  205. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +6 -7
  206. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +14 -15
  207. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +155 -156
  208. package/vscode/src/vs/workbench/contrib/chat/common/tools/copilotToolIds.d.ts +6 -0
  209. package/vscode/src/vs/workbench/contrib/chat/common/tools/copilotToolIds.js +12 -0
  210. package/vscode/src/vs/workbench/contrib/chat/common/tools/toolResultCompressor.d.ts +88 -0
  211. package/vscode/src/vs/workbench/contrib/chat/common/tools/toolResultCompressor.js +25 -0
  212. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  213. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.d.ts +1 -0
  214. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +237 -0
  215. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.d.ts +66 -0
  216. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +600 -0
  217. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.d.ts +18 -0
  218. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +47 -0
  219. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselTypes.d.ts +22 -0
  220. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselTypes.js +7 -0
  221. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/media/imageCarousel.css +298 -0
  222. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
  223. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  224. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
  225. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  226. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  227. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  228. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  229. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  230. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +12 -1
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +78 -7
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +15 -11
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -9
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -16
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandParser.d.ts +60 -0
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandParser.js +286 -0
  248. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.d.ts +24 -0
  249. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.js +285 -0
  250. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.d.ts +19 -12
  251. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +415 -47
  252. package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.d.ts +2 -7
  253. package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +1 -1
  254. package/vscode/src/vs/base/common/defaultAccount.d.ts +0 -69
  255. package/vscode/src/vs/base/common/defaultAccount.js +0 -12
  256. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +0 -15
  257. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +0 -85
@@ -2,6 +2,6 @@
2
2
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
3
3
  import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
4
4
 
5
- const CTX_NOTEBOOK_CHAT_HAS_AGENT = ( new RawContextKey("notebookChatAgentRegistered", false, ( localize(11564, "Whether a chat agent for notebook is registered"))));
5
+ const CTX_NOTEBOOK_CHAT_HAS_AGENT = ( new RawContextKey("notebookChatAgentRegistered", false, ( localize(11691, "Whether a chat agent for notebook is registered"))));
6
6
 
7
7
  export { CTX_NOTEBOOK_CHAT_HAS_AGENT };
@@ -13,42 +13,42 @@ import { IRemoteCodingAgentsService } from '@codingame/monaco-vscode-api/vscode/
13
13
  const extensionPoint = ExtensionsRegistry.registerExtensionPoint({
14
14
  extensionPoint: "remoteCodingAgents",
15
15
  jsonSchema: {
16
- description: ( localize(12646, "Contributes remote coding agent integrations to the chat widget.")),
16
+ description: ( localize(12776, "Contributes remote coding agent integrations to the chat widget.")),
17
17
  type: "array",
18
18
  items: {
19
19
  type: "object",
20
20
  properties: {
21
21
  id: {
22
- description: ( localize(12647, "A unique identifier for this item.")),
22
+ description: ( localize(12777, "A unique identifier for this item.")),
23
23
  type: "string"
24
24
  },
25
25
  command: {
26
26
  description: ( localize(
27
- 12648,
27
+ 12778,
28
28
  "Identifier of the command to execute. The command must be declared in the \"commands\" section."
29
29
  )),
30
30
  type: "string"
31
31
  },
32
32
  displayName: {
33
33
  description: ( localize(
34
- 12649,
34
+ 12779,
35
35
  "A user-friendly name for this item which is used for display in menus."
36
36
  )),
37
37
  type: "string"
38
38
  },
39
39
  description: {
40
- description: ( localize(12650, "Description of the remote agent for use in menus and tooltips.")),
40
+ description: ( localize(12780, "Description of the remote agent for use in menus and tooltips.")),
41
41
  type: "string"
42
42
  },
43
43
  followUpRegex: {
44
44
  description: ( localize(
45
- 12651,
45
+ 12781,
46
46
  "The last occurrence of pattern in an existing chat conversation is sent to the contributing extension to facilitate follow-up responses."
47
47
  )),
48
48
  type: "string"
49
49
  },
50
50
  when: {
51
- description: ( localize(12652, "Condition which must be true to show this item.")),
51
+ description: ( localize(12782, "Condition which must be true to show this item.")),
52
52
  type: "string"
53
53
  }
54
54
  },
@@ -37,68 +37,68 @@ function getAccessibilityHelpText(accessor) {
37
37
  const focusResponseKeybinding = keybindingService.lookupKeybinding("chat.action.focus")?.getAriaLabel();
38
38
  const focusInputKeybinding = keybindingService.lookupKeybinding("workbench.action.chat.focusInput")?.getAriaLabel();
39
39
  content.push(( localize(
40
- 14274,
40
+ 14404,
41
41
  "Inline chat occurs within a terminal. It is useful for suggesting terminal commands. Keep in mind that AI generated code may be incorrect."
42
42
  )));
43
43
  content.push(( localize(
44
- 14275,
44
+ 14405,
45
45
  "It can be activated using the command: Terminal: Start Chat ({0}), which will focus the input box.",
46
46
  startChatKeybinding
47
47
  )));
48
48
  content.push(makeRequestKeybinding ? ( localize(
49
- 14276,
49
+ 14406,
50
50
  "The input box is where the user can type a request and can make the request ({0}). The widget will be closed and all content will be discarded when the Escape key is pressed and the terminal will regain focus.",
51
51
  makeRequestKeybinding
52
52
  )) : ( localize(
53
- 14277,
53
+ 14407,
54
54
  "The input box is where the user can type a request and can make the request by tabbing to the Make Request button, which is not currently triggerable via keybindings. The widget will be closed and all content will be discarded when the Escape key is pressed and the terminal will regain focus."
55
55
  )));
56
56
  content.push(openAccessibleViewKeybinding ? ( localize(
57
- 14278,
57
+ 14408,
58
58
  "The response can be inspected in the accessible view ({0}).",
59
59
  openAccessibleViewKeybinding
60
60
  )) : ( localize(
61
- 14279,
61
+ 14409,
62
62
  "With the input box focused, inspect the response in the accessible view via the Open Accessible View command, which is currently not triggerable by a keybinding."
63
63
  )));
64
64
  content.push(focusResponseKeybinding ? ( localize(
65
- 14280,
65
+ 14410,
66
66
  "Reach the response from the input box ({0}).",
67
67
  focusResponseKeybinding
68
68
  )) : ( localize(
69
- 14281,
69
+ 14411,
70
70
  "Reach the response from the input box by tabbing or assigning a keybinding for the command: Focus Terminal Response."
71
71
  )));
72
72
  content.push(focusInputKeybinding ? ( localize(
73
- 14282,
73
+ 14412,
74
74
  "Reach the input box from the response ({0}).",
75
75
  focusInputKeybinding
76
76
  )) : ( localize(
77
- 14283,
77
+ 14413,
78
78
  "Reach the response from the input box by shift+tabbing or assigning a keybinding for the command: Focus Terminal Input."
79
79
  )));
80
80
  content.push(runCommandKeybinding ? ( localize(
81
- 14284,
81
+ 14414,
82
82
  "With focus in the input box or command editor, the Terminal: Run Chat Command ({0}) action.",
83
83
  runCommandKeybinding
84
84
  )) : ( localize(
85
- 14285,
85
+ 14415,
86
86
  "Run a command by tabbing to the button as the action is currently not triggerable by a keybinding."
87
87
  )));
88
88
  content.push(insertCommandKeybinding ? ( localize(
89
- 14286,
89
+ 14416,
90
90
  "With focus in the input box command editor, the Terminal: Insert Chat Command ({0}) action.",
91
91
  insertCommandKeybinding
92
92
  )) : ( localize(
93
- 14287,
93
+ 14417,
94
94
  "Insert a command by tabbing to the button as the action is currently not triggerable by a keybinding."
95
95
  )));
96
96
  content.push(( localize(
97
- 14288,
97
+ 14418,
98
98
  "Use tab to reach conditional parts like commands, status, message responses and more."
99
99
  )));
100
100
  content.push(( localize(
101
- 14289,
101
+ 14419,
102
102
  "Accessibility Signals can be changed via settings with a prefix of signals.chat. By default, if a request takes more than 4 seconds, you will hear a sound indicating that progress is still occurring."
103
103
  )));
104
104
  return content.join("\n");
@@ -32,8 +32,8 @@ import { activeChatController } from './terminalChatControllerHolder.js';
32
32
 
33
33
  registerActiveXtermAction({
34
34
  id: TerminalChatCommandId.Start,
35
- title: ( localize2(14290, "Open Inline Chat")),
36
- category: ( localize2(14291, "Terminal")),
35
+ title: ( localize2(14420, "Open Inline Chat")),
36
+ category: ( localize2(14421, "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(14292, "Close")),
80
+ title: ( localize2(14422, "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(14293, "Run Chat Command")),
106
- shortTitle: ( localize2(14294, "Run")),
105
+ title: ( localize2(14423, "Run Chat Command")),
106
+ shortTitle: ( localize2(14424, "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(14295, "Run First Chat Command")),
135
- shortTitle: ( localize2(14296, "Run First")),
134
+ title: ( localize2(14425, "Run First Chat Command")),
135
+ shortTitle: ( localize2(14426, "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(14297, "Insert Chat Command")),
164
- shortTitle: ( localize2(14298, "Insert")),
163
+ title: ( localize2(14427, "Insert Chat Command")),
164
+ shortTitle: ( localize2(14428, "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(14299, "Insert First Chat Command")),
194
- shortTitle: ( localize2(14300, "Insert First")),
193
+ title: ( localize2(14429, "Insert First Chat Command")),
194
+ shortTitle: ( localize2(14430, "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(14301, "Rerun Request")),
222
+ title: ( localize2(14431, "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(14302, "View in Chat")),
263
+ title: ( localize2(14432, "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(14303, "View Hidden Chat Terminals")),
290
- category: ( localize2(14304, "Terminal")),
289
+ title: ( localize2(14433, "View Hidden Chat Terminals")),
290
+ category: ( localize2(14434, "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(14305, "Last: {0}", command)).value;
332
+ const lastCommandLocalized = command => ( localize2(14435, "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(14306, "Select a chat terminal to show and focus")).value;
384
+ qp.placeholder = ( localize2(14436, "Select a chat terminal to show and focus")).value;
385
385
  qp.items = items;
386
386
  qp.canSelectMany = false;
387
- qp.title = ( localize2(14307, "Chat Terminals")).value;
387
+ qp.title = ( localize2(14437, "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(14308, "Chat: Focus Most Recent Terminal"))
445
+ title: ( localize(14438, "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(14309, "Chat: Focus Most Recent Terminal Output"))
452
+ title: ( localize(14439, "Chat: Focus Most Recent Terminal Output"))
453
453
  },
454
454
  when: ChatContextKeys.inChatSession
455
455
  });
@@ -198,7 +198,7 @@ let TerminalChatWidget = class TerminalChatWidget extends Disposable {
198
198
  }
199
199
  _resetPlaceholder() {
200
200
  const defaultAgent = this._chatAgentService.getDefaultAgent(ChatAgentLocation.Terminal);
201
- this.inlineChatWidget.placeholder = defaultAgent?.description ?? ( localize(14310, "Ask about commands"));
201
+ this.inlineChatWidget.placeholder = defaultAgent?.description ?? ( localize(14440, "Ask about commands"));
202
202
  }
203
203
  async reveal() {
204
204
  await this._createSession();
@@ -170,7 +170,7 @@ registerWorkbenchContribution2(
170
170
  );
171
171
  registerActiveInstanceAction({
172
172
  id: TerminalChatAgentToolsCommandId.ChatAddTerminalSelection,
173
- title: ( localize(14317, "Add Terminal Selection to Chat")),
173
+ title: ( localize(14447, "Add Terminal Selection to Chat")),
174
174
  precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, sharedWhenClause.terminalAvailable)),
175
175
  menu: [{
176
176
  id: MenuId.TerminalInstanceContext,
@@ -191,8 +191,8 @@ registerActiveInstanceAction({
191
191
  chatView.attachmentModel.addContext({
192
192
  id: `terminal-selection-${Date.now()}`,
193
193
  kind: "generic",
194
- name: ( localize(14318, "Terminal Selection")),
195
- fullName: ( localize(14318, "Terminal Selection")),
194
+ name: ( localize(14448, "Terminal Selection")),
195
+ fullName: ( localize(14448, "Terminal Selection")),
196
196
  value: selection,
197
197
  icon: Codicon.terminal
198
198
  });
@@ -12,7 +12,7 @@ const GetTerminalLastCommandToolData = {
12
12
  id: TerminalToolId.TerminalLastCommand,
13
13
  toolReferenceName: "terminalLastCommand",
14
14
  legacyToolReferenceFullNames: ["runCommands/terminalLastCommand"],
15
- displayName: ( localize(14333, "Get Terminal Last Command")),
15
+ displayName: ( localize(14463, "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(14334, "Getting last terminal command")),
28
- pastTenseMessage: ( localize(14335, "Got last terminal command"))
27
+ invocationMessage: ( localize(14464, "Getting last terminal command")),
28
+ pastTenseMessage: ( localize(14465, "Got last terminal command"))
29
29
  };
30
30
  }
31
31
  async invoke(invocation, _countTokens, _progress, token) {
@@ -1,12 +1,23 @@
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 { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
4
  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
+ import { ITerminalService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
4
6
  export declare const GetTerminalOutputToolData: IToolData;
5
7
  export interface IGetTerminalOutputInputParams {
6
8
  id?: string;
7
9
  }
8
10
  export declare class GetTerminalOutputTool extends Disposable implements IToolImpl {
9
- constructor();
11
+ private readonly _configurationService;
12
+ private static readonly _maxOutputSnapshots;
13
+ private readonly _lastOutputSnapshotByExecutionId;
14
+ constructor(_configurationService: IConfigurationService, terminalService: ITerminalService);
10
15
  prepareToolInvocation(context: IToolInvocationPreparationContext, token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
11
16
  invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
17
+ private _formatOutput;
18
+ private _rememberOutput;
19
+ private _createOutputSnapshot;
20
+ private _forgetTerminalInstance;
21
+ private _hashOutput;
22
+ dispose(): void;
12
23
  }
@@ -1,16 +1,22 @@
1
1
 
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
2
3
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
4
+ import { StringSHA1 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/hash';
3
5
  import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
6
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
7
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
5
8
  import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
9
+ import { ITerminalService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
10
+ import { TerminalChatAgentToolsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration';
6
11
  import { RunInTerminalTool } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool';
7
12
  import { TerminalToolId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/terminalToolIds';
8
13
 
14
+ var GetTerminalOutputTool_1;
9
15
  const GetTerminalOutputToolData = {
10
16
  id: TerminalToolId.GetTerminalOutput,
11
17
  toolReferenceName: "getTerminalOutput",
12
18
  legacyToolReferenceFullNames: ["runCommands/getTerminalOutput"],
13
- displayName: ( localize(14336, "Get Terminal Output")),
19
+ displayName: ( localize(14466, "Get Terminal Output")),
14
20
  modelDescription: `Get output from an active terminal execution (identified by the \`id\` returned from ${TerminalToolId.RunInTerminal}).`,
15
21
  icon: Codicon.terminal,
16
22
  source: ToolDataSource.Internal,
@@ -26,14 +32,25 @@ const GetTerminalOutputToolData = {
26
32
  required: ["id"]
27
33
  }
28
34
  };
29
- class GetTerminalOutputTool extends Disposable {
30
- constructor() {
35
+ let GetTerminalOutputTool = class GetTerminalOutputTool extends Disposable {
36
+ static {
37
+ GetTerminalOutputTool_1 = this;
38
+ }
39
+ static {
40
+ this._maxOutputSnapshots = 100;
41
+ }
42
+ constructor(_configurationService, terminalService) {
31
43
  super();
44
+ this._configurationService = _configurationService;
45
+ this._lastOutputSnapshotByExecutionId = ( new Map());
46
+ this._register(
47
+ terminalService.onDidDisposeInstance(instance => this._forgetTerminalInstance(instance.instanceId))
48
+ );
32
49
  }
33
50
  async prepareToolInvocation(context, token) {
34
51
  return {
35
- invocationMessage: ( localize(14337, "Checking terminal output")),
36
- pastTenseMessage: ( localize(14338, "Checked terminal output"))
52
+ invocationMessage: ( localize(14467, "Checking terminal output")),
53
+ pastTenseMessage: ( localize(14468, "Checked terminal output"))
37
54
  };
38
55
  }
39
56
  async invoke(invocation, _countTokens, _progress, token) {
@@ -48,6 +65,7 @@ class GetTerminalOutputTool extends Disposable {
48
65
  }
49
66
  const execution = RunInTerminalTool.getExecution(args.id);
50
67
  if (!execution) {
68
+ this._lastOutputSnapshotByExecutionId.delete(args.id);
51
69
  return {
52
70
  content: [{
53
71
  kind: "text",
@@ -58,10 +76,63 @@ class GetTerminalOutputTool extends Disposable {
58
76
  return {
59
77
  content: [{
60
78
  kind: "text",
61
- value: `Output of terminal ${args.id}:\n${execution.getOutput()}`
79
+ value: this._formatOutput(args.id, execution.instance.instanceId, execution.getOutput())
62
80
  }]
63
81
  };
64
82
  }
65
- }
83
+ _formatOutput(id, terminalInstanceId, output) {
84
+ if (!this._configurationService.getValue(TerminalChatAgentToolsSettingId.OutputDeltas)) {
85
+ this._lastOutputSnapshotByExecutionId.clear();
86
+ return `Output of terminal ${id}:\n${output}`;
87
+ }
88
+ const previousOutputSnapshot = this._lastOutputSnapshotByExecutionId.get(id);
89
+ const currentOutputSnapshot = this._createOutputSnapshot(terminalInstanceId, output);
90
+ this._rememberOutput(id, currentOutputSnapshot);
91
+ if (previousOutputSnapshot === undefined) {
92
+ return `Output of terminal ${id}:\n${output}`;
93
+ }
94
+ if (currentOutputSnapshot.length === previousOutputSnapshot.length && currentOutputSnapshot.hash === previousOutputSnapshot.hash) {
95
+ return `Output of terminal ${id} unchanged since previous poll (${output.length} characters already shown). No new output.`;
96
+ }
97
+ if (output.length > previousOutputSnapshot.length && this._hashOutput(output, previousOutputSnapshot.length) === previousOutputSnapshot.hash) {
98
+ const delta = output.slice(previousOutputSnapshot.length);
99
+ return `Output of terminal ${id} since previous poll (${delta.length} new characters, ${output.length} total characters):\n${delta}`;
100
+ }
101
+ return `Output of terminal ${id} changed since previous poll; returning current output (${output.length} characters):\n${output}`;
102
+ }
103
+ _rememberOutput(id, snapshot) {
104
+ if (!( this._lastOutputSnapshotByExecutionId.has(id)) && this._lastOutputSnapshotByExecutionId.size >= GetTerminalOutputTool_1._maxOutputSnapshots) {
105
+ const oldestId = ( this._lastOutputSnapshotByExecutionId.keys()).next().value;
106
+ if (oldestId !== undefined) {
107
+ this._lastOutputSnapshotByExecutionId.delete(oldestId);
108
+ }
109
+ }
110
+ this._lastOutputSnapshotByExecutionId.set(id, snapshot);
111
+ }
112
+ _createOutputSnapshot(terminalInstanceId, output) {
113
+ return {
114
+ terminalInstanceId,
115
+ length: output.length,
116
+ hash: this._hashOutput(output)
117
+ };
118
+ }
119
+ _forgetTerminalInstance(terminalInstanceId) {
120
+ for (const [id, snapshot] of this._lastOutputSnapshotByExecutionId) {
121
+ if (snapshot.terminalInstanceId === terminalInstanceId) {
122
+ this._lastOutputSnapshotByExecutionId.delete(id);
123
+ }
124
+ }
125
+ }
126
+ _hashOutput(output, length = output.length) {
127
+ const sha = ( new StringSHA1());
128
+ sha.update(length === output.length ? output : output.slice(0, length));
129
+ return sha.digest();
130
+ }
131
+ dispose() {
132
+ this._lastOutputSnapshotByExecutionId.clear();
133
+ super.dispose();
134
+ }
135
+ };
136
+ GetTerminalOutputTool = GetTerminalOutputTool_1 = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, ITerminalService))], GetTerminalOutputTool));
66
137
 
67
138
  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(14339, "Get Terminal Selection")),
14
+ displayName: ( localize(14469, "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(14340, "Reading terminal selection")),
27
- pastTenseMessage: ( localize(14341, "Read terminal selection"))
26
+ invocationMessage: ( localize(14470, "Reading terminal selection")),
27
+ pastTenseMessage: ( localize(14471, "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(14342, "Kill Terminal")),
12
+ displayName: ( localize(14472, "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(14343, "Killing terminal")),
32
- pastTenseMessage: ( localize(14344, "Killed terminal"))
31
+ invocationMessage: ( localize(14473, "Killing terminal")),
32
+ pastTenseMessage: ( localize(14474, "Killed terminal"))
33
33
  };
34
34
  }
35
35
  async invoke(invocation, _countTokens, _progress, _token) {
@@ -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(14350, "Confirm Terminal Command")),
10
+ displayName: ( localize(14480, "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(14351, "Tool for confirming terminal commands")),
28
+ userDescription: ( localize(14481, "Tool for confirming terminal commands")),
29
29
  source: ToolDataSource.Internal,
30
30
  icon: Codicon.shield,
31
31
  inputSchema: {
@@ -22,7 +22,7 @@ import { TerminalToolId } from '@codingame/monaco-vscode-api/vscode/vs/workbench
22
22
  const SendToTerminalToolData = {
23
23
  id: TerminalToolId.SendToTerminal,
24
24
  toolReferenceName: "sendToTerminal",
25
- displayName: ( localize(14405, "Send to Terminal")),
25
+ displayName: ( localize(14535, "Send to Terminal")),
26
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.`,
27
27
  icon: Codicon.terminal,
28
28
  source: ToolDataSource.Internal,
@@ -46,6 +46,9 @@ const SendToTerminalToolData = {
46
46
  required: ["id", "command"]
47
47
  }
48
48
  };
49
+ function isCancelSignal(command) {
50
+ return /^[\u0003\u0004\u001c]$/.test(command.trim());
51
+ }
49
52
  const FocusTerminalByIdCommandId = "workbench.action.terminal.chat.focusTerminalById";
50
53
  CommandsRegistry.registerCommand(FocusTerminalByIdCommandId, async (accessor, instanceId) => {
51
54
  const terminalService = accessor.get(ITerminalService);
@@ -87,16 +90,16 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
87
90
  const pastTenseMessage = ( new MarkdownString());
88
91
  const questionText = this._getQuestionContextForTerminal(context.chatSessionResource, args);
89
92
  if (isEmptyInput) {
90
- invocationMessage.appendMarkdown(( localize(14406, "Pressing `Enter` in terminal")));
91
- pastTenseMessage.appendMarkdown(( localize(14407, "Pressed `Enter` in terminal")));
93
+ invocationMessage.appendMarkdown(( localize(14536, "Pressing `Enter` in terminal")));
94
+ pastTenseMessage.appendMarkdown(( localize(14537, "Pressed `Enter` in terminal")));
92
95
  } else {
93
96
  const displayCommand = buildCommandDisplayText(args.command);
94
97
  const safeInlineCode = appendEscapedMarkdownInlineCode(displayCommand);
95
- invocationMessage.appendMarkdown(( localize(14408, "Sending {0} to terminal", safeInlineCode)));
96
- pastTenseMessage.appendMarkdown(( localize(14409, "Sent {0} to terminal", safeInlineCode)));
98
+ invocationMessage.appendMarkdown(( localize(14538, "Sending {0} to terminal", safeInlineCode)));
99
+ pastTenseMessage.appendMarkdown(( localize(14539, "Sent {0} to terminal", safeInlineCode)));
97
100
  }
98
101
  if (questionText) {
99
- const replyPrefix = ` (${( localize(14410, "replying to: "))}`;
102
+ const replyPrefix = ` (${( localize(14540, "replying to: "))}`;
100
103
  invocationMessage.appendMarkdown(replyPrefix);
101
104
  invocationMessage.appendText(questionText);
102
105
  invocationMessage.appendMarkdown(")");
@@ -111,15 +114,15 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
111
114
  }
112
115
  }));
113
116
  const safeTerminalLabel = appendEscapedMarkdownInlineCode(terminalLabel);
114
- const baseMessage = isEmptyInput ? ( localize(14411, "Press `Enter` in terminal {0}", safeTerminalLabel)) : ( localize(
115
- 14412,
117
+ const baseMessage = isEmptyInput ? ( localize(14541, "Press `Enter` in terminal {0}", safeTerminalLabel)) : ( localize(
118
+ 14542,
116
119
  "Run {0} in terminal {1}",
117
120
  appendEscapedMarkdownInlineCode(buildCommandDisplayText(args.command)),
118
121
  safeTerminalLabel
119
122
  ));
120
123
  if (instanceId !== undefined) {
121
124
  const focusUri = createCommandUri(FocusTerminalByIdCommandId, instanceId);
122
- confirmationMessage.appendMarkdown(`${baseMessage} — [${( localize(14413, "Focus Terminal"))}](${focusUri})`);
125
+ confirmationMessage.appendMarkdown(`${baseMessage} — [${( localize(14543, "Focus Terminal"))}](${focusUri})`);
123
126
  } else {
124
127
  confirmationMessage.appendMarkdown(baseMessage);
125
128
  }
@@ -133,7 +136,7 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
133
136
  const isAnsweringQuestion = questionText !== undefined;
134
137
  const shouldShowConfirmation = (!isSessionAutoApproved && !isAnsweringQuestion) || context.forceConfirmationReason !== undefined;
135
138
  const confirmationMessages = shouldShowConfirmation ? {
136
- title: ( localize(14414, "Send to Terminal")),
139
+ title: ( localize(14544, "Send to Terminal")),
137
140
  message: confirmationMessage,
138
141
  allowAutoConfirm: undefined
139
142
  } : undefined;
@@ -288,10 +291,11 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
288
291
  lastNLines: 20
289
292
  });
290
293
  }
294
+ const steering = isCancelSignal(args.command) ? `\n\nNote: The input you sent was a cancel signal (Ctrl-C / Ctrl-D / Ctrl-\\). The previously running command was interrupted, not completed. This is not a signal to end the turn — if you intend to run a recovery or follow-up command, issue it now in this same turn. Call ${TerminalToolId.GetTerminalOutput} first if you need to verify the shell is back at a prompt.` : "";
291
295
  return {
292
296
  content: [{
293
297
  kind: "text",
294
- value: `Successfully sent command to terminal ${args.id}.${recentOutput ? `\n\nTerminal output:\n${recentOutput}` : ""}`
298
+ value: `Successfully sent command to terminal ${args.id}.${recentOutput ? `\n\nTerminal output:\n${recentOutput}` : ""}${steering}`
295
299
  }]
296
300
  };
297
301
  }