@codingame/monaco-vscode-chat-service-override 33.0.9 → 34.0.1

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 (403) hide show
  1. package/index.js +19 -5
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +32 -0
  4. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +77 -0
  5. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +84 -17
  6. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +235 -190
  7. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +3 -2
  8. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +23 -4
  9. package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.d.ts +1 -0
  10. package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.js +22 -0
  11. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +107 -8
  12. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +272 -49
  13. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +2 -2
  14. package/vscode/src/vs/platform/agentHost/common/{agentHostPermissionService.d.ts → agentHostResourceService.d.ts} +26 -0
  15. package/vscode/src/vs/platform/agentHost/common/{agentHostPermissionService.js → agentHostResourceService.js} +11 -1
  16. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +13 -0
  17. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +26 -18
  18. package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.d.ts +1 -0
  19. package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +119 -0
  20. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +135 -19
  21. package/vscode/src/vs/platform/agentHost/common/agentService.js +8 -2
  22. package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.d.ts +5 -1
  23. package/vscode/src/vs/platform/agentHost/common/ahpJsonlLogger.js +85 -22
  24. package/vscode/src/vs/platform/agentHost/common/customAgents.d.ts +36 -0
  25. package/vscode/src/vs/platform/agentHost/common/customAgents.js +12 -0
  26. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +81 -0
  27. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +103 -0
  28. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +86 -10
  29. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +129 -37
  30. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.d.ts +12 -0
  31. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +72 -0
  32. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-root/reducer.d.ts +6 -0
  33. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-root/reducer.js +30 -0
  34. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.d.ts +6 -0
  35. package/vscode/src/vs/platform/agentHost/common/state/protocol/{reducers.js → channels-session/reducer.js} +99 -168
  36. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.d.ts +6 -0
  37. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.js +110 -0
  38. package/vscode/src/vs/platform/agentHost/common/state/protocol/{errors.d.ts → common/errors.d.ts} +13 -2
  39. package/vscode/src/vs/platform/agentHost/common/state/protocol/{errors.js → common/errors.js} +1 -2
  40. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +17 -0
  41. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.js +9 -0
  42. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +33 -8
  43. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +2 -3
  44. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +36 -5
  45. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +6 -3
  46. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +50 -0
  47. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +138 -0
  48. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +3 -3
  49. package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +12 -0
  50. package/vscode/src/vs/platform/networkFilter/common/settings.js +14 -0
  51. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.d.ts +4 -1
  52. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +9 -0
  53. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +21 -0
  54. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +28 -0
  55. package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.d.ts +31 -0
  56. package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.js +49 -0
  57. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +182 -0
  58. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +784 -0
  59. package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.d.ts +18 -0
  60. package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.js +305 -0
  61. package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +7 -0
  62. package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.js +120 -0
  63. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +100 -0
  64. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +10 -0
  65. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  66. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
  67. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  68. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +60 -60
  69. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  70. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
  71. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
  72. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
  73. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +106 -8
  74. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  75. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +22 -36
  76. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  77. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  78. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  79. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +21 -13
  80. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
  81. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +38 -18
  82. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  83. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +11 -11
  84. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  85. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
  86. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +20 -20
  87. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +3 -2
  88. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +9 -9
  89. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +5 -5
  90. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +10 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +40 -11
  92. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +15 -9
  93. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  94. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +0 -1
  95. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +23 -17
  96. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
  97. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.d.ts +24 -0
  98. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.js +55 -0
  99. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +30 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +119 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +13 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +32 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +55 -0
  104. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +104 -0
  105. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.d.ts +1 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +177 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.d.ts +3 -3
  108. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +11 -11
  109. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.d.ts +6 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js +14 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +3 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +44 -5
  113. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +60 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +103 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +4 -3
  116. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +70 -62
  117. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +9 -7
  118. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
  119. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  120. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  121. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  122. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +6 -5
  123. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +38 -28
  124. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  125. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  126. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +4 -4
  127. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +22 -31
  128. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +2 -2
  129. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -16
  130. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +3 -3
  131. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +8 -2
  132. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +112 -113
  133. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +62 -68
  134. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +3 -2
  135. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +149 -145
  136. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +3 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -1
  138. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +25 -25
  139. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +2 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +2 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +5 -3
  142. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +8 -1
  143. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +13 -12
  144. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +8 -1
  145. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +15 -13
  146. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +1 -0
  147. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +78 -55
  148. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +140 -67
  149. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +11 -21
  150. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +3 -1
  151. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +59 -57
  152. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  153. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +2 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +440 -357
  155. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
  156. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +99 -99
  157. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  158. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  159. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
  160. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  161. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  162. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  163. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
  164. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
  165. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  166. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
  167. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  168. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  169. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
  170. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  171. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  172. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +1 -1
  173. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  174. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
  175. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  176. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
  177. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  178. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  179. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  180. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
  181. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
  182. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  183. package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.d.ts +21 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.js +115 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +5 -2
  186. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
  187. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
  188. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +6 -0
  189. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +28 -1
  190. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +3 -1
  191. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +187 -106
  192. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +41 -0
  193. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
  194. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  195. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.d.ts +66 -0
  196. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +346 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +3 -2
  198. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +0 -2
  199. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +72 -29
  200. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  201. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  202. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +26 -26
  203. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +12 -12
  204. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +5 -1
  205. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +144 -67
  206. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
  207. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +126 -80
  208. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +1 -0
  209. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +32 -31
  210. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +4 -0
  211. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +11 -0
  212. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +40 -33
  213. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +5 -1
  214. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +25 -24
  215. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
  216. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  217. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +5 -5
  218. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
  219. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
  220. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  221. package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +1 -19
  222. package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.d.ts +12 -22
  223. package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.js +14 -6
  224. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +6 -3
  225. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +56 -18
  226. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
  227. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
  228. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +3 -3
  229. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +5 -6
  230. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
  231. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +33 -36
  232. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +3 -0
  233. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +31 -16
  234. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +4 -4
  235. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +16 -13
  236. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  237. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
  238. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +1 -1
  239. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
  240. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  241. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  242. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  243. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  244. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  245. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  246. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
  247. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
  248. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +24 -23
  249. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -5
  250. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +18 -0
  251. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +23 -1
  252. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -6
  253. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +5 -2
  254. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  255. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
  256. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +22 -13
  257. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +2 -2
  258. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  259. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  260. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
  261. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +14 -3
  262. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +55 -24
  263. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  264. package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +38 -0
  265. package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +47 -0
  266. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +54 -12
  267. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +1 -0
  268. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
  269. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +39 -0
  270. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +40 -4
  271. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +30 -8
  272. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +205 -46
  273. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +4 -3
  274. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +8 -3
  275. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +57 -0
  276. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +153 -38
  277. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +12 -7
  278. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +70 -37
  279. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +6 -28
  280. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
  281. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
  282. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  283. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
  284. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +150 -150
  285. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  286. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
  287. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
  288. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
  289. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  290. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
  291. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  292. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  293. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  294. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  295. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  296. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  297. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +17 -17
  298. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
  299. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +21 -21
  300. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
  301. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +4 -0
  302. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +21 -1
  303. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
  304. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +55 -0
  305. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +122 -0
  306. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +2 -0
  307. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +41 -0
  308. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +24 -0
  309. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +26 -0
  310. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +142 -0
  311. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +52 -0
  312. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +232 -0
  313. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +65 -0
  314. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +225 -0
  315. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +27 -0
  316. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +143 -0
  317. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +37 -0
  318. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +205 -0
  319. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +40 -0
  320. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +174 -0
  321. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +7 -0
  322. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +43 -0
  323. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +52 -0
  324. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +260 -0
  325. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +44 -0
  326. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +98 -0
  327. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
  328. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -3
  329. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +14 -7
  330. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +42 -0
  331. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +226 -0
  332. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +31 -0
  333. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +392 -0
  334. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +45 -0
  335. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +243 -0
  336. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +54 -0
  337. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +10 -0
  338. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +20 -0
  339. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +310 -0
  340. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +27 -0
  341. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +177 -0
  342. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +11 -0
  343. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +33 -0
  344. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +41 -0
  345. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +19 -0
  346. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +37 -0
  347. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +19 -0
  348. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +37 -0
  349. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +19 -0
  350. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +44 -0
  351. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +13 -0
  352. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +22 -0
  353. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +42 -0
  354. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +102 -0
  355. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +5 -0
  356. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +27 -0
  357. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +14 -0
  358. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +29 -0
  359. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +8 -0
  360. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +33 -0
  361. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +28 -0
  362. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +15 -0
  363. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +55 -0
  364. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  365. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +3 -0
  366. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +31 -9
  367. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  368. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +4 -4
  369. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +177 -0
  370. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +518 -0
  371. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +42 -0
  372. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +23 -0
  373. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +9 -0
  374. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -1
  375. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +3 -3
  376. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +297 -0
  377. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +2961 -0
  378. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +29 -0
  379. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +63 -0
  380. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +14 -14
  381. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  382. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  383. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  384. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
  385. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +2 -2
  386. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +17 -0
  387. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +118 -0
  388. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.d.ts +22 -0
  389. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.js +44 -0
  390. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +58 -0
  391. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +223 -0
  392. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +20 -0
  393. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +81 -0
  394. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +63 -0
  395. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +349 -0
  396. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +75 -0
  397. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +192 -0
  398. package/vscode/src/vs/workbench/services/agentHost/common/agentHostResourceService.d.ts +89 -0
  399. package/vscode/src/vs/workbench/services/agentHost/common/{agentHostPermissionService.js → agentHostResourceService.js} +226 -9
  400. package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +0 -30
  401. package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +0 -119
  402. package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +0 -552
  403. package/vscode/src/vs/workbench/services/agentHost/common/agentHostPermissionService.d.ts +0 -83
@@ -0,0 +1,29 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
+ import { ITerminalSandboxService } from "../../common/terminalSandboxService.js";
4
+ import type { IOutputAnalyzer, IOutputAnalyzerOptions } from "./outputAnalyzer.js";
5
+ export declare class SandboxOutputAnalyzer extends Disposable implements IOutputAnalyzer {
6
+ private readonly _sandboxService;
7
+ private readonly _configurationService;
8
+ constructor(_sandboxService: ITerminalSandboxService, _configurationService: IConfigurationService);
9
+ analyze(options: IOutputAnalyzerOptions): Promise<string | undefined>;
10
+ /**
11
+ * Checks whether the command output contains strings that typically indicate
12
+ * the sandbox blocked the operation. Used when exit code is unavailable.
13
+ *
14
+ * The output may contain newlines inserted by terminal wrapping, so we
15
+ * strip them before testing.
16
+ */
17
+ private _outputLooksSandboxBlocked;
18
+ }
19
+ /**
20
+ * Checks whether the command output contains strings that typically indicate
21
+ * the sandbox blocked the operation. The output may contain newlines inserted
22
+ * by terminal wrapping, so we strip them before testing.
23
+ */
24
+ export declare function outputLooksSandboxBlocked(output: string): boolean;
25
+ /**
26
+ * Checks whether output clearly suggests a network failure. This is used only
27
+ * to prevent automatic unsandboxing; retry selection is left to the model.
28
+ */
29
+ export declare function outputLooksSandboxNetworkBlocked(output: string): boolean;
@@ -0,0 +1,63 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
+ import { OperatingSystem } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
5
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
6
+ import '../../common/terminalSandboxService.js';
7
+ import { TerminalChatAgentToolsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration';
8
+ import { AgentNetworkDomainSettingId } from '../../../../../../platform/networkFilter/common/settings.js';
9
+ import { AgentSandboxSettingId } from '@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/settings';
10
+ import { ITerminalSandboxService } from '@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/terminalSandboxService.service';
11
+
12
+ let SandboxOutputAnalyzer = class SandboxOutputAnalyzer extends Disposable {
13
+ constructor(_sandboxService, _configurationService) {
14
+ super();
15
+ this._sandboxService = _sandboxService;
16
+ this._configurationService = _configurationService;
17
+ }
18
+ async analyze(options) {
19
+ if (!options.isSandboxWrapped) {
20
+ return undefined;
21
+ }
22
+ const knownFailure = options.exitCode !== undefined && options.exitCode !== 0;
23
+ const suspectedFailure = !knownFailure && options.exitCode === undefined && this._outputLooksSandboxBlocked(options.exitResult);
24
+ if (!knownFailure && !suspectedFailure) {
25
+ return undefined;
26
+ }
27
+ const os = await this._sandboxService.getOS();
28
+ let fileSystemSetting;
29
+ switch (os) {
30
+ case OperatingSystem.Linux:
31
+ fileSystemSetting = TerminalChatAgentToolsSettingId.AgentSandboxLinuxFileSystem;
32
+ break;
33
+ case OperatingSystem.Windows:
34
+ fileSystemSetting = TerminalChatAgentToolsSettingId.AgentSandboxWindowsFileSystem;
35
+ break;
36
+ default:
37
+ fileSystemSetting = TerminalChatAgentToolsSettingId.AgentSandboxMacFileSystem;
38
+ break;
39
+ }
40
+ const prefix = knownFailure ? "Command failed while running in sandboxed mode. If the command failed due to sandboxing:" : "Command ran in sandboxed mode and may have been blocked by the sandbox. If the command failed due to sandboxing:";
41
+ const retryWithAllowNetworkRequests = this._configurationService.getValue(AgentSandboxSettingId.AgentSandboxRetryWithAllowNetworkRequests) === true;
42
+ const networkRecovery = retryWithAllowNetworkRequests ? "- If you determine from the output that the failure was caused by blocked network access, immediately retry the command with requestAllowNetwork=true and provide requestAllowNetworkReason. This keeps the command sandboxed with unrestricted network access and automatically shows a confirmation prompt to the user.\n- If it is not a network restriction, or the command still fails after retrying with requestAllowNetwork=true, immediately retry the command with requestUnsandboxedExecution=true and provide requestUnsandboxedExecutionReason. Do NOT ask the user - setting this flag automatically shows a confirmation prompt to the user." : "- Sandboxed execution with unrestricted network access is disabled by chat.agent.sandbox.retryWithAllowNetworkRequests. Do not set requestAllowNetwork=true.\n- If the command cannot be made to work by updating sandbox rules, immediately retry it with requestUnsandboxedExecution=true and provide requestUnsandboxedExecutionReason. Do NOT ask the user - setting this flag automatically shows a confirmation prompt to the user.";
43
+ return `${prefix}
44
+ - If it would be reasonable to extend the sandbox rules, work with the user to update allowWrite for file system access problems in ${fileSystemSetting}, or to add required domains to ${AgentNetworkDomainSettingId.AllowedNetworkDomains}.
45
+ ${networkRecovery}
46
+
47
+ Here is the output of the command:\n`;
48
+ }
49
+ _outputLooksSandboxBlocked(output) {
50
+ return outputLooksSandboxBlocked(output);
51
+ }
52
+ };
53
+ SandboxOutputAnalyzer = ( __decorate([( __param(0, ITerminalSandboxService)), ( __param(1, IConfigurationService))], SandboxOutputAnalyzer));
54
+ function outputLooksSandboxBlocked(output) {
55
+ const normalized = output.replace(/\n/g, " ");
56
+ return /Operation not permitted|Permission denied|Read-only file system|sandbox-exec|bwrap|sandbox_violation/i.test(normalized);
57
+ }
58
+ function outputLooksSandboxNetworkBlocked(output) {
59
+ const normalized = output.replace(/\n/g, " ");
60
+ return /Could not resolve host|Temporary failure in name resolution|Name or service not known|EAI_AGAIN|ENETUNREACH|Network is unreachable|network (?:access )?(?:blocked|disabled)|(?:connect|socket).*(?:Operation not permitted|Permission denied)|(?:Operation not permitted|Permission denied).*(?:connect|socket)/i.test(normalized);
61
+ }
62
+
63
+ export { SandboxOutputAnalyzer, outputLooksSandboxBlocked, outputLooksSandboxNetworkBlocked };
@@ -13,16 +13,16 @@ import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workb
13
13
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
14
14
  import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
15
15
  import { ITerminalService, ITerminalChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
16
- import { getOutput } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers';
17
- import { buildCommandDisplayText, isMultilineCommand, normalizeCommandForExecution } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers';
18
- import { RunInTerminalTool } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool';
19
- import { isSessionAutoApproveLevel } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove';
16
+ import { getOutput } from '../outputHelpers.js';
17
+ import { buildCommandDisplayText, isMultilineCommand, normalizeCommandForExecution } from '../runInTerminalHelpers.js';
18
+ import { RunInTerminalTool } from './runInTerminalTool.js';
19
+ import { isSessionAutoApproveLevel } from './terminalToolAutoApprove.js';
20
20
  import { TerminalToolId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/terminalToolIds';
21
21
 
22
22
  const SendToTerminalToolData = {
23
23
  id: TerminalToolId.SendToTerminal,
24
24
  toolReferenceName: "sendToTerminal",
25
- displayName: ( localize(14535, "Send to Terminal")),
25
+ displayName: ( localize(14734, "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,
@@ -90,16 +90,16 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
90
90
  const pastTenseMessage = ( new MarkdownString());
91
91
  const questionText = this._getQuestionContextForTerminal(context.chatSessionResource, args);
92
92
  if (isEmptyInput) {
93
- invocationMessage.appendMarkdown(( localize(14536, "Pressing `Enter` in terminal")));
94
- pastTenseMessage.appendMarkdown(( localize(14537, "Pressed `Enter` in terminal")));
93
+ invocationMessage.appendMarkdown(( localize(14735, "Pressing `Enter` in terminal")));
94
+ pastTenseMessage.appendMarkdown(( localize(14736, "Pressed `Enter` in terminal")));
95
95
  } else {
96
96
  const displayCommand = buildCommandDisplayText(args.command);
97
97
  const safeInlineCode = appendEscapedMarkdownInlineCode(displayCommand);
98
- invocationMessage.appendMarkdown(( localize(14538, "Sending {0} to terminal", safeInlineCode)));
99
- pastTenseMessage.appendMarkdown(( localize(14539, "Sent {0} to terminal", safeInlineCode)));
98
+ invocationMessage.appendMarkdown(( localize(14737, "Sending {0} to terminal", safeInlineCode)));
99
+ pastTenseMessage.appendMarkdown(( localize(14738, "Sent {0} to terminal", safeInlineCode)));
100
100
  }
101
101
  if (questionText) {
102
- const replyPrefix = ` (${( localize(14540, "replying to: "))}`;
102
+ const replyPrefix = ` (${( localize(14739, "replying to: "))}`;
103
103
  invocationMessage.appendMarkdown(replyPrefix);
104
104
  invocationMessage.appendText(questionText);
105
105
  invocationMessage.appendMarkdown(")");
@@ -114,15 +114,15 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
114
114
  }
115
115
  }));
116
116
  const safeTerminalLabel = appendEscapedMarkdownInlineCode(terminalLabel);
117
- const baseMessage = isEmptyInput ? ( localize(14541, "Press `Enter` in terminal {0}", safeTerminalLabel)) : ( localize(
118
- 14542,
117
+ const baseMessage = isEmptyInput ? ( localize(14740, "Press `Enter` in terminal {0}", safeTerminalLabel)) : ( localize(
118
+ 14741,
119
119
  "Run {0} in terminal {1}",
120
120
  appendEscapedMarkdownInlineCode(buildCommandDisplayText(args.command)),
121
121
  safeTerminalLabel
122
122
  ));
123
123
  if (instanceId !== undefined) {
124
124
  const focusUri = createCommandUri(FocusTerminalByIdCommandId, instanceId);
125
- confirmationMessage.appendMarkdown(`${baseMessage} — [${( localize(14543, "Focus Terminal"))}](${focusUri})`);
125
+ confirmationMessage.appendMarkdown(`${baseMessage} — [${( localize(14742, "Focus Terminal"))}](${focusUri})`);
126
126
  } else {
127
127
  confirmationMessage.appendMarkdown(baseMessage);
128
128
  }
@@ -136,7 +136,7 @@ let SendToTerminalTool = class SendToTerminalTool extends Disposable {
136
136
  const isAnsweringQuestion = questionText !== undefined;
137
137
  const shouldShowConfirmation = (!isSessionAutoApproved && !isAnsweringQuestion) || context.forceConfirmationReason !== undefined;
138
138
  const confirmationMessages = shouldShowConfirmation ? {
139
- title: ( localize(14544, "Send to Terminal")),
139
+ title: ( localize(14743, "Send to Terminal")),
140
140
  message: confirmationMessage,
141
141
  allowAutoConfirm: undefined
142
142
  } : undefined;
@@ -79,7 +79,7 @@ let CreateAndRunTaskTool = class CreateAndRunTaskTool {
79
79
  });
80
80
  }
81
81
  _progress.report({
82
- message: ( new MarkdownString(( localize(14545, "Resolving the task"))))
82
+ message: ( new MarkdownString(( localize(14744, "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(14546, "Task not found: `{0}`", args.task.label))))
99
+ toolResultMessage: ( new MarkdownString(( localize(14745, "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(14547, "Running task `{0}`", args.task.label))))
116
+ message: ( new MarkdownString(( localize(14746, "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
- 14548,
134
+ 14747,
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(14549, "Task `{0}` already exists.", task.label)))),
205
- pastTenseMessage: ( new MarkdownString(( localize(14550, "Task `{0}` already exists.", task.label)))),
204
+ invocationMessage: ( new MarkdownString(( localize(14748, "Task `{0}` already exists.", task.label)))),
205
+ pastTenseMessage: ( new MarkdownString(( localize(14749, "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(14551, "Task `{0}` is already running.", task.label)))),
213
- pastTenseMessage: ( new MarkdownString(( localize(14551, "Task `{0}` is already running.", task.label)))),
212
+ invocationMessage: ( new MarkdownString(( localize(14750, "Task `{0}` is already running.", task.label)))),
213
+ pastTenseMessage: ( new MarkdownString(( localize(14750, "Task `{0}` is already running.", task.label)))),
214
214
  confirmationMessages: undefined
215
215
  };
216
216
  }
217
217
  return {
218
- invocationMessage: ( new MarkdownString(( localize(14552, "Created task `{0}`", task.label)))),
219
- pastTenseMessage: ( new MarkdownString(( localize(14553, "Created task `{0}`", task.label)))),
218
+ invocationMessage: ( new MarkdownString(( localize(14751, "Created task `{0}`", task.label)))),
219
+ pastTenseMessage: ( new MarkdownString(( localize(14752, "Created task `{0}`", task.label)))),
220
220
  confirmationMessages: {
221
- title: ( localize(14554, "Allow task creation and execution?")),
221
+ title: ( localize(14753, "Allow task creation and execution?")),
222
222
  message: ( new MarkdownString(( localize(
223
- 14555,
223
+ 14754,
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(14556, "Create and run Task")),
238
+ displayName: ( localize(14755, "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(14557, "Create and run a task in the workspace")),
240
+ userDescription: ( localize(14756, "Create and run a task in the workspace")),
241
241
  source: ToolDataSource.Internal,
242
242
  inputSchema: {
243
243
  "type": "object",
@@ -17,7 +17,7 @@ const GetTaskOutputToolData = {
17
17
  id: TerminalToolId.GetTaskOutput,
18
18
  toolReferenceName: "getTaskOutput",
19
19
  legacyToolReferenceFullNames: ["runTasks/getTaskOutput"],
20
- displayName: ( localize(14558, "Get Task Output")),
20
+ displayName: ( localize(14757, "Get Task Output")),
21
21
  modelDescription: "Get the output of a task",
22
22
  source: ToolDataSource.Internal,
23
23
  inputSchema: {
@@ -63,19 +63,19 @@ let GetTaskOutputTool = class GetTaskOutputTool extends Disposable {
63
63
  );
64
64
  if (!task) {
65
65
  return {
66
- invocationMessage: ( new MarkdownString(( localize(14559, "Task not found: `{0}`", args.id))))
66
+ invocationMessage: ( new MarkdownString(( localize(14758, "Task not found: `{0}`", args.id))))
67
67
  };
68
68
  }
69
69
  const taskLabel = task._label;
70
70
  const activeTasks = await this._tasksService.getActiveTasks();
71
71
  if (activeTasks.includes(task)) {
72
72
  return {
73
- invocationMessage: ( new MarkdownString(( localize(14560, "The task `{0}` is already running.", taskLabel))))
73
+ invocationMessage: ( new MarkdownString(( localize(14759, "The task `{0}` is already running.", taskLabel))))
74
74
  };
75
75
  }
76
76
  return {
77
- invocationMessage: ( new MarkdownString(( localize(14561, "Checking output for task `{0}`", taskLabel)))),
78
- pastTenseMessage: ( new MarkdownString(( localize(14562, "Checked output for task `{0}`", taskLabel))))
77
+ invocationMessage: ( new MarkdownString(( localize(14760, "Checking output for task `{0}`", taskLabel)))),
78
+ pastTenseMessage: ( new MarkdownString(( localize(14761, "Checked output for task `{0}`", taskLabel))))
79
79
  };
80
80
  }
81
81
  async invoke(invocation, _countTokens, _progress, token) {
@@ -95,7 +95,7 @@ let GetTaskOutputTool = class GetTaskOutputTool extends Disposable {
95
95
  kind: "text",
96
96
  value: `Task not found: ${args.id}`
97
97
  }],
98
- toolResultMessage: ( new MarkdownString(( localize(14559, "Task not found: `{0}`", args.id))))
98
+ toolResultMessage: ( new MarkdownString(( localize(14758, "Task not found: `{0}`", args.id))))
99
99
  };
100
100
  }
101
101
  const dependencyTasks = await resolveDependencyTasks(task, args.workspaceFolder, this._configurationService, this._tasksService);
@@ -110,7 +110,7 @@ let GetTaskOutputTool = class GetTaskOutputTool extends Disposable {
110
110
  kind: "text",
111
111
  value: `Terminal not found for task ${taskLabel}`
112
112
  }],
113
- toolResultMessage: ( new MarkdownString(( localize(14563, "Terminal not found for task `{0}`", taskLabel))))
113
+ toolResultMessage: ( new MarkdownString(( localize(14762, "Terminal not found for task `{0}`", taskLabel))))
114
114
  };
115
115
  }
116
116
  const startMarkersByTerminalInstanceId = task.configurationProperties.isBackground ? ( new Map()) : undefined;
@@ -56,7 +56,7 @@ let RunTaskTool = class RunTaskTool {
56
56
  kind: "text",
57
57
  value: `Task not found: ${args.id}`
58
58
  }],
59
- toolResultMessage: ( new MarkdownString(( localize(14564, "Task not found: `{0}`", args.id))))
59
+ toolResultMessage: ( new MarkdownString(( localize(14763, "Task not found: `{0}`", args.id))))
60
60
  };
61
61
  }
62
62
  const taskLabel = task._label;
@@ -67,7 +67,7 @@ let RunTaskTool = class RunTaskTool {
67
67
  kind: "text",
68
68
  value: `The task ${taskLabel} is already running.`
69
69
  }],
70
- toolResultMessage: ( new MarkdownString(( localize(14565, "The task `{0}` is already running.", taskLabel))))
70
+ toolResultMessage: ( new MarkdownString(( localize(14764, "The task `{0}` is already running.", taskLabel))))
71
71
  };
72
72
  }
73
73
  const dependencyTasks = await resolveDependencyTasks(task, args.workspaceFolder, this._configurationService, this._tasksService);
@@ -93,7 +93,7 @@ let RunTaskTool = class RunTaskTool {
93
93
  kind: "text",
94
94
  value: `Task started but no terminal was found for: ${taskLabel}`
95
95
  }],
96
- toolResultMessage: ( new MarkdownString(( localize(14566, "Task started but no terminal was found for: `{0}`", taskLabel))))
96
+ toolResultMessage: ( new MarkdownString(( localize(14765, "Task started but no terminal was found for: `{0}`", taskLabel))))
97
97
  };
98
98
  }
99
99
  const terminals = this._terminalService.instances.filter(t => ( resources.some(r => r.path === t.resource.path && r.scheme === t.resource.scheme)));
@@ -103,7 +103,7 @@ let RunTaskTool = class RunTaskTool {
103
103
  kind: "text",
104
104
  value: `Task started but no terminal was found for: ${taskLabel}`
105
105
  }],
106
- toolResultMessage: ( new MarkdownString(( localize(14566, "Task started but no terminal was found for: `{0}`", taskLabel))))
106
+ toolResultMessage: ( new MarkdownString(( localize(14765, "Task started but no terminal was found for: `{0}`", taskLabel))))
107
107
  };
108
108
  }
109
109
  const store = ( new DisposableStore());
@@ -178,29 +178,29 @@ let RunTaskTool = class RunTaskTool {
178
178
  );
179
179
  if (!task) {
180
180
  return {
181
- invocationMessage: ( new MarkdownString(( localize(14564, "Task not found: `{0}`", args.id))))
181
+ invocationMessage: ( new MarkdownString(( localize(14763, "Task not found: `{0}`", args.id))))
182
182
  };
183
183
  }
184
184
  const taskLabel = task._label;
185
185
  const activeTasks = await this._tasksService.getActiveTasks();
186
186
  if (task && activeTasks.includes(task)) {
187
187
  return {
188
- invocationMessage: ( new MarkdownString(( localize(14567, "The task is already running."))))
188
+ invocationMessage: ( new MarkdownString(( localize(14766, "The task is already running."))))
189
189
  };
190
190
  }
191
191
  if (await this._isTaskActive(task)) {
192
192
  return {
193
- invocationMessage: ( new MarkdownString(( localize(14568, "`{0}` is already running.", taskLabel)))),
194
- pastTenseMessage: ( new MarkdownString(( localize(14569, "`{0}` was already running.", taskLabel)))),
193
+ invocationMessage: ( new MarkdownString(( localize(14767, "`{0}` is already running.", taskLabel)))),
194
+ pastTenseMessage: ( new MarkdownString(( localize(14768, "`{0}` was already running.", taskLabel)))),
195
195
  confirmationMessages: undefined
196
196
  };
197
197
  }
198
198
  return {
199
- invocationMessage: ( new MarkdownString(( localize(14570, "Running `{0}`", taskLabel)))),
200
- pastTenseMessage: ( new MarkdownString(task?.configurationProperties.isBackground ? ( localize(14571, "Started `{0}`", taskLabel)) : ( localize(14572, "Ran `{0}`", taskLabel)))),
199
+ invocationMessage: ( new MarkdownString(( localize(14769, "Running `{0}`", taskLabel)))),
200
+ pastTenseMessage: ( new MarkdownString(task?.configurationProperties.isBackground ? ( localize(14770, "Started `{0}`", taskLabel)) : ( localize(14771, "Ran `{0}`", taskLabel)))),
201
201
  confirmationMessages: task ? {
202
- title: ( localize(14573, "Allow task run?")),
203
- message: ( localize(14574, "Allow to run the task `{0}`?", taskLabel))
202
+ title: ( localize(14772, "Allow task run?")),
203
+ message: ( localize(14773, "Allow to run the task `{0}`?", taskLabel))
204
204
  } : undefined
205
205
  };
206
206
  }
@@ -210,9 +210,9 @@ const RunTaskToolData = {
210
210
  id: TerminalToolId.RunTask,
211
211
  toolReferenceName: "runTask",
212
212
  legacyToolReferenceFullNames: ["runTasks/runTask"],
213
- displayName: ( localize(14575, "Run Task")),
213
+ displayName: ( localize(14774, "Run Task")),
214
214
  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.`,
215
- userDescription: ( localize(14576, "Run tasks in the workspace")),
215
+ userDescription: ( localize(14775, "Run tasks in the workspace")),
216
216
  icon: Codicon.tools,
217
217
  source: ToolDataSource.Internal,
218
218
  inputSchema: {
@@ -2,7 +2,7 @@ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
2
  import { Location } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
3
3
  import { Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
4
4
  import { ITaskSummary } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/tasks/common/taskService";
5
- import { OutputMonitorState } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types";
5
+ import { OutputMonitorState } from "../monitoring/types.js";
6
6
  import { MarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
7
7
  export declare function toolResultDetailsFromResponse(terminalResults: {
8
8
  output: string;
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
3
- import { OutputMonitorState } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types';
3
+ import { OutputMonitorState } from '../monitoring/types.js';
4
4
  import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
5
5
 
6
6
  function toolResultDetailsFromResponse(terminalResults) {
@@ -26,7 +26,7 @@ function toolResultMessageFromResponse(
26
26
  ) {
27
27
  let resultSummary = "";
28
28
  if (result?.exitCode) {
29
- resultSummary = ( localize(14577, "Task `{0}` failed with exit code {1}.", taskLabel, result.exitCode));
29
+ resultSummary = ( localize(14776, "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,17 @@
1
+ import { IChatTerminalToolInvocationData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
2
+ import { ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
3
+ import { ITerminalLogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal.service";
4
+ export declare class TerminalCommandArtifactCollector {
5
+ private readonly _logService;
6
+ constructor(_logService: ITerminalLogService);
7
+ capture(toolSpecificData: IChatTerminalToolInvocationData, instance: ITerminalInstance, commandId: string | undefined): Promise<void>;
8
+ private _captureCommandOutput;
9
+ /**
10
+ * Captures output from a partial/current command that hasn't finished yet.
11
+ * This is used when the command is cancelled mid-execution.
12
+ */
13
+ private _capturePartialCommandOutput;
14
+ private _applyTheme;
15
+ private _createTerminalCommandUri;
16
+ private _tryGetCommand;
17
+ }
@@ -0,0 +1,118 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { getCommandOutputSnapshot } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror';
4
+ import { TerminalCapability } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities';
5
+ import { ITerminalLogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal.service';
6
+
7
+ let TerminalCommandArtifactCollector = class TerminalCommandArtifactCollector {
8
+ constructor(_logService) {
9
+ this._logService = _logService;
10
+ }
11
+ async capture(toolSpecificData, instance, commandId) {
12
+ if (commandId) {
13
+ try {
14
+ toolSpecificData.terminalCommandUri = this._createTerminalCommandUri(instance, commandId);
15
+ } catch (error) {
16
+ this._logService.warn(
17
+ `RunInTerminalTool: Failed to create terminal command URI for ${commandId}`,
18
+ error
19
+ );
20
+ }
21
+ const command = await this._tryGetCommand(instance, commandId);
22
+ if (command) {
23
+ toolSpecificData.terminalCommandState = {
24
+ exitCode: command.exitCode,
25
+ timestamp: command.timestamp,
26
+ duration: command.duration
27
+ };
28
+ const snapshot = await this._captureCommandOutput(instance, command);
29
+ if (snapshot) {
30
+ toolSpecificData.terminalCommandOutput = snapshot;
31
+ }
32
+ this._applyTheme(toolSpecificData, instance);
33
+ return;
34
+ }
35
+ const partialSnapshot = await this._capturePartialCommandOutput(instance, commandId);
36
+ if (partialSnapshot) {
37
+ toolSpecificData.terminalCommandOutput = partialSnapshot;
38
+ this._logService.debug(`RunInTerminalTool: Captured partial command output for ${commandId}`);
39
+ }
40
+ }
41
+ this._applyTheme(toolSpecificData, instance);
42
+ }
43
+ async _captureCommandOutput(instance, command) {
44
+ try {
45
+ await instance.xtermReadyPromise;
46
+ } catch {
47
+ return undefined;
48
+ }
49
+ const xterm = instance.xterm;
50
+ if (!xterm) {
51
+ return undefined;
52
+ }
53
+ return getCommandOutputSnapshot(xterm, command, (reason, error) => {
54
+ const suffix = reason === "fallback" ? " (fallback)" : "";
55
+ this._logService.debug(`RunInTerminalTool: Failed to snapshot command output${suffix}`, error);
56
+ });
57
+ }
58
+ async _capturePartialCommandOutput(instance, commandId) {
59
+ try {
60
+ await instance.xtermReadyPromise;
61
+ } catch {
62
+ return undefined;
63
+ }
64
+ const xterm = instance.xterm;
65
+ if (!xterm) {
66
+ return undefined;
67
+ }
68
+ const commandDetection = instance.capabilities.get(TerminalCapability.CommandDetection);
69
+ const currentCommand = commandDetection?.currentCommand;
70
+ if (currentCommand && currentCommand.id === commandId) {
71
+ const executedMarker = currentCommand.commandExecutedMarker;
72
+ if (executedMarker && !executedMarker.isDisposed) {
73
+ try {
74
+ const raw = xterm.raw;
75
+ const buffer = raw.buffer.active;
76
+ const endLine = buffer.baseY + buffer.cursorY;
77
+ const startLine = executedMarker.line;
78
+ const lineCount = Math.max(endLine - startLine, 0);
79
+ if (lineCount > 0) {
80
+ const text = await xterm.getRangeAsVT(executedMarker, undefined, true);
81
+ if (text) {
82
+ return {
83
+ text,
84
+ lineCount
85
+ };
86
+ }
87
+ }
88
+ } catch (error) {
89
+ this._logService.debug(`RunInTerminalTool: Failed to capture partial command output`, error);
90
+ }
91
+ }
92
+ }
93
+ return undefined;
94
+ }
95
+ _applyTheme(toolSpecificData, instance) {
96
+ const theme = instance.xterm?.getXtermTheme();
97
+ if (theme) {
98
+ toolSpecificData.terminalTheme = {
99
+ background: theme.background,
100
+ foreground: theme.foreground
101
+ };
102
+ }
103
+ }
104
+ _createTerminalCommandUri(instance, commandId) {
105
+ const params = ( new URLSearchParams(instance.resource.query));
106
+ params.set("command", commandId);
107
+ return instance.resource.with({
108
+ query: ( params.toString())
109
+ });
110
+ }
111
+ async _tryGetCommand(instance, commandId) {
112
+ const commandDetection = instance.capabilities.get(TerminalCapability.CommandDetection);
113
+ return commandDetection?.commands.find(c => c.id === commandId);
114
+ }
115
+ };
116
+ TerminalCommandArtifactCollector = ( __decorate([( __param(0, ITerminalLogService))], TerminalCommandArtifactCollector));
117
+
118
+ export { TerminalCommandArtifactCollector };
@@ -0,0 +1,22 @@
1
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
+ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
4
+ import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
5
+ import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
6
+ /**
7
+ * Returns true if the chat session's permission level (Autopilot/Bypass Approvals)
8
+ * auto-approves all tool calls, unless enterprise policy restricts it.
9
+ * Checks both the request-stamped level and the live picker level.
10
+ */
11
+ export declare function isSessionAutoApproveLevel(chatSessionResource: URI, configurationService: IConfigurationService, chatWidgetService: IChatWidgetService, chatService: IChatService): boolean;
12
+ /**
13
+ * Checks whether a terminal tool is eligible for auto-approval based on user configuration.
14
+ * @param toolReferenceName The tool's reference name (e.g. 'runInTerminal', 'sendToTerminal').
15
+ * @param legacyToolReferenceFullNames Legacy names to check for backward compatibility.
16
+ */
17
+ export declare function isToolEligibleForTerminalAutoApproval(toolReferenceName: string, configurationService: IConfigurationService, legacyToolReferenceFullNames?: string[]): boolean;
18
+ /**
19
+ * Determines whether terminal auto-approve rules are allowed to take effect.
20
+ * This checks the setting enablement, the opt-in warning acceptance, and the per-tool eligibility.
21
+ */
22
+ export declare function isTerminalAutoApproveAllowed(toolReferenceName: string, configurationService: IConfigurationService, storageService: IStorageService, legacyToolReferenceFullNames?: string[]): boolean;
@@ -0,0 +1,44 @@
1
+
2
+ import { StorageScope } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
3
+ import { TerminalToolConfirmationStorageKeys } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart';
4
+ import { ChatConfiguration, isAutoApproveLevel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
5
+ import { TerminalChatAgentToolsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration';
6
+
7
+ function isSessionAutoApproveLevel(chatSessionResource, configurationService, chatWidgetService, chatService) {
8
+ const inspected = configurationService.inspect(ChatConfiguration.GlobalAutoApprove);
9
+ if (inspected.policyValue === false) {
10
+ return false;
11
+ }
12
+ const widget = chatWidgetService.getWidgetBySessionResource(chatSessionResource)
13
+ ?? chatWidgetService.lastFocusedWidget;
14
+ if (widget && isAutoApproveLevel(widget.input.currentModeInfo.permissionLevel)) {
15
+ return true;
16
+ }
17
+ const model = chatService.getSession(chatSessionResource);
18
+ const request = model?.getRequests().at(-1);
19
+ return isAutoApproveLevel(request?.modeInfo?.permissionLevel);
20
+ }
21
+ function isToolEligibleForTerminalAutoApproval(toolReferenceName, configurationService, legacyToolReferenceFullNames) {
22
+ const config = configurationService.getValue(ChatConfiguration.EligibleForAutoApproval);
23
+ if (config && typeof config === 'object') {
24
+ if (Object.prototype.hasOwnProperty.call(config, toolReferenceName)) {
25
+ return config[toolReferenceName];
26
+ }
27
+ if (legacyToolReferenceFullNames) {
28
+ for (const legacyName of legacyToolReferenceFullNames) {
29
+ if (Object.prototype.hasOwnProperty.call(config, legacyName)) {
30
+ return config[legacyName];
31
+ }
32
+ }
33
+ }
34
+ }
35
+ return true;
36
+ }
37
+ function isTerminalAutoApproveAllowed(toolReferenceName, configurationService, storageService, legacyToolReferenceFullNames) {
38
+ const isEligible = isToolEligibleForTerminalAutoApproval(toolReferenceName, configurationService, legacyToolReferenceFullNames);
39
+ const isAutoApproveEnabled = configurationService.getValue(TerminalChatAgentToolsSettingId.EnableAutoApprove) === true;
40
+ const isAutoApproveWarningAccepted = storageService.getBoolean(TerminalToolConfirmationStorageKeys.TerminalAutoApproveWarningAccepted, StorageScope.APPLICATION, false);
41
+ return isEligible && isAutoApproveEnabled && isAutoApproveWarningAccepted;
42
+ }
43
+
44
+ export { isSessionAutoApproveLevel, isTerminalAutoApproveAllowed, isToolEligibleForTerminalAutoApproval };