@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
@@ -1,34 +1,200 @@
1
1
 
2
2
  import { decodeBase64, VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
3
+ import { disposableTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
3
4
  import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
4
- import { Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
- import { dirname, basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
6
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/charCode';
7
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
8
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
9
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
10
- import { FileSystemProviderCapabilities, FilePermission, FileType, createFileSystemProviderError, FileSystemProviderErrorCode } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
11
- import { fromAgentHostUri } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
12
- import { ContentEncoding } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands';
13
- import { AhpErrorCodes } from './state/protocol/errors.js';
5
+ import { Disposable, MutableDisposable, toDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
+ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
7
+ import { FileChangeType, FileSystemProviderCapabilities, FilePermission, FileType, FileSystemProviderErrorCode, createFileSystemProviderError } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
8
+ import { fromAgentHostUri, toAgentHostUri } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
9
+ import { ContentEncoding } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/commands';
10
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-session/commands';
11
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/commands';
12
+ import { AhpErrorCodes } from './state/protocol/common/errors.js';
14
13
  import { ProtocolError } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionProtocol';
14
+ import { ROOT_STATE_URI } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
15
15
 
16
+ async function createRemoteWatchHandle(primitives, params) {
17
+ const {
18
+ channel
19
+ } = await primitives.createResourceWatch(params);
20
+ const channelUri = ( URI.parse(channel));
21
+ await primitives.subscribe(channelUri);
22
+ const onDidChangeEmitter = ( new Emitter());
23
+ const listener = primitives.onDidAction(envelope => {
24
+ if (envelope.channel !== channel || envelope.action.type !== "resourceWatch/changed") {
25
+ return;
26
+ }
27
+ const items = envelope.action.changes?.items ?? [];
28
+ if (items.length === 0) {
29
+ return;
30
+ }
31
+ onDidChangeEmitter.fire(( items.map(item => ({
32
+ resource: ( URI.parse(item.uri)),
33
+ type: item.type === "added" ? FileChangeType.ADDED : item.type === "deleted" ? FileChangeType.DELETED : FileChangeType.UPDATED
34
+ }))));
35
+ });
36
+ let disposed = false;
37
+ return {
38
+ onDidChange: onDidChangeEmitter.event,
39
+ dispose: () => {
40
+ if (disposed) {
41
+ return;
42
+ }
43
+ disposed = true;
44
+ listener.dispose();
45
+ onDidChangeEmitter.dispose();
46
+ try {
47
+ primitives.unsubscribe(channelUri);
48
+ } catch {}
49
+ }
50
+ };
51
+ }
16
52
  class AHPFileSystemProvider extends Disposable {
17
- constructor() {
18
- super(...arguments);
19
- this.capabilities = FileSystemProviderCapabilities.PathCaseSensitive | FileSystemProviderCapabilities.FileReadWrite;
53
+ static {
54
+ this._DEFAULT_CONNECTION_GRACE_MS = 5000;
55
+ }
56
+ constructor(_connectionGraceMs = AHPFileSystemProvider._DEFAULT_CONNECTION_GRACE_MS) {
57
+ super();
58
+ this._connectionGraceMs = _connectionGraceMs;
59
+ this.capabilities = FileSystemProviderCapabilities.PathCaseSensitive | FileSystemProviderCapabilities.FileReadWrite | FileSystemProviderCapabilities.FileFolderCopy;
20
60
  this._onDidChangeCapabilities = this._register(( new Emitter()));
21
61
  this.onDidChangeCapabilities = this._onDidChangeCapabilities.event;
22
62
  this._onDidChangeFile = this._register(( new Emitter()));
23
63
  this.onDidChangeFile = this._onDidChangeFile.event;
24
- this._authorityToConnection = ( new Map());
64
+ this._onDidWatchError = this._register(( new Emitter()));
65
+ this.onDidWatchError = this._onDidWatchError.event;
66
+ this._authorities = ( new Map());
67
+ this._onDidChangeConnection = this._register(( new Emitter()));
25
68
  }
26
69
  registerAuthority(authority, connection) {
27
- this._authorityToConnection.set(authority, connection);
28
- return toDisposable(() => this._authorityToConnection.delete(authority));
70
+ let entry = this._authorities.get(authority);
71
+ if (!entry) {
72
+ entry = {
73
+ connections: [connection],
74
+ expiry: ( new MutableDisposable())
75
+ };
76
+ this._authorities.set(authority, entry);
77
+ } else {
78
+ entry.expiry.clear();
79
+ entry.connections.push(connection);
80
+ }
81
+ const adopted = entry;
82
+ this._onDidChangeConnection.fire(authority);
83
+ return toDisposable(() => {
84
+ const idx = adopted.connections.indexOf(connection);
85
+ if (idx === -1) {
86
+ return;
87
+ }
88
+ const wasActive = idx === adopted.connections.length - 1;
89
+ adopted.connections.splice(idx, 1);
90
+ if (adopted.connections.length === 0) {
91
+ adopted.expiry.value = disposableTimeout(
92
+ () => this._expireAuthority(authority, adopted),
93
+ this._connectionGraceMs,
94
+ this._store
95
+ );
96
+ }
97
+ if (wasActive) {
98
+ this._onDidChangeConnection.fire(authority);
99
+ }
100
+ });
29
101
  }
30
- watch() {
31
- return Disposable.None;
102
+ _expireAuthority(authority, entry) {
103
+ if (this._authorities.get(authority) !== entry || entry.connections.length > 0) {
104
+ return;
105
+ }
106
+ this._authorities.delete(authority);
107
+ entry.expiry.dispose();
108
+ this._onDidChangeConnection.fire(authority);
109
+ }
110
+ dispose() {
111
+ for (const entry of ( this._authorities.values())) {
112
+ entry.expiry.dispose();
113
+ entry.connections.length = 0;
114
+ }
115
+ this._authorities.clear();
116
+ super.dispose();
117
+ }
118
+ watch(resource, opts) {
119
+ const store = ( new DisposableStore());
120
+ const handleHolder = store.add(( new MutableDisposable()));
121
+ const authority = resource.authority;
122
+ const params = {
123
+ channel: ROOT_STATE_URI,
124
+ uri: ( this._decodeUri(resource).toString()),
125
+ recursive: opts.recursive,
126
+ ...(opts.excludes.length > 0 ? {
127
+ excludes: {
128
+ items: [...opts.excludes]
129
+ }
130
+ } : {}),
131
+ ...(opts.includes && opts.includes.length > 0 ? {
132
+ includes: {
133
+ items: ( opts.includes.map(p => typeof p === "string" ? p : p.pattern))
134
+ }
135
+ } : {})
136
+ };
137
+ let attached;
138
+ let attaching = false;
139
+ let pendingReattach = false;
140
+ const reattach = async () => {
141
+ if (store.isDisposed) {
142
+ return;
143
+ }
144
+ if (attaching) {
145
+ pendingReattach = true;
146
+ return;
147
+ }
148
+ const entry = this._authorities.get(authority);
149
+ const next = entry?.connections.at(-1);
150
+ if (next === attached) {
151
+ return;
152
+ }
153
+ handleHolder.clear();
154
+ attached = undefined;
155
+ const watchResource = next?.watchResource;
156
+ if (!next || !watchResource) {
157
+ return;
158
+ }
159
+ attaching = true;
160
+ const target = next;
161
+ try {
162
+ const handle = await watchResource.call(target, params);
163
+ if (store.isDisposed) {
164
+ handle.dispose();
165
+ return;
166
+ }
167
+ const current = this._authorities.get(authority);
168
+ if (!current || current.connections.at(-1) !== target) {
169
+ handle.dispose();
170
+ return;
171
+ }
172
+ const sub = handle.onDidChange(changes => this._onDidChangeFile.fire(( changes.map(c => ({
173
+ resource: this._encodeUri(c.resource, resource.authority),
174
+ type: c.type
175
+ })))));
176
+ handleHolder.value = toDisposable(() => {
177
+ sub.dispose();
178
+ handle.dispose();
179
+ });
180
+ attached = target;
181
+ } catch (err) {
182
+ this._onDidWatchError.fire(err instanceof Error ? err.message : String(err));
183
+ } finally {
184
+ attaching = false;
185
+ if (pendingReattach) {
186
+ pendingReattach = false;
187
+ void reattach();
188
+ }
189
+ }
190
+ };
191
+ store.add(this._onDidChangeConnection.event(a => {
192
+ if (a === authority) {
193
+ void reattach();
194
+ }
195
+ }));
196
+ void reattach();
197
+ return store;
32
198
  }
33
199
  async stat(resource) {
34
200
  const path = resource.path;
@@ -60,27 +226,29 @@ class AHPFileSystemProvider extends Disposable {
60
226
  permissions: FilePermission.Readonly
61
227
  };
62
228
  }
63
- const parentUri = dirname(resource);
64
- const name = basename(resource);
65
- const entries = await this._listDirectory(resource.authority, parentUri);
66
- const entry = entries.find(e => e.name === name);
67
- if (!entry) {
68
- throw createFileSystemProviderError(`File not found: ${path}`, FileSystemProviderErrorCode.FileNotFound);
69
- }
70
- return {
71
- type: entry.type === "directory" ? FileType.Directory : FileType.File,
72
- mtime: 0,
73
- ctime: 0,
74
- size: 0,
75
- permissions: FilePermission.Readonly
76
- };
229
+ const connection = await this._getConnection(resource.authority);
230
+ try {
231
+ const resolved = await connection.resourceResolve({
232
+ channel: ROOT_STATE_URI,
233
+ uri: ( decoded.toString())
234
+ });
235
+ return {
236
+ type: resolved.type === "directory" ? FileType.Directory : resolved.type === "symlink" ? FileType.SymbolicLink : FileType.File,
237
+ mtime: resolved.mtime ? Date.parse(resolved.mtime) : 0,
238
+ ctime: resolved.ctime ? Date.parse(resolved.ctime) : 0,
239
+ size: resolved.size ?? 0,
240
+ permissions: FilePermission.Readonly
241
+ };
242
+ } catch (err) {
243
+ throw this._mapError(err, FileSystemProviderErrorCode.FileNotFound);
244
+ }
77
245
  }
78
246
  async readdir(resource) {
79
247
  const entries = await this._listDirectory(resource.authority, resource);
80
248
  return ( entries.map(e => [e.name, e.type === "directory" ? FileType.Directory : FileType.File]));
81
249
  }
82
250
  async readFile(resource) {
83
- const connection = this._getConnection(resource.authority);
251
+ const connection = await this._getConnection(resource.authority);
84
252
  try {
85
253
  const originalUri = this._decodeUri(resource);
86
254
  const result = await connection.resourceRead(originalUri);
@@ -93,10 +261,11 @@ class AHPFileSystemProvider extends Disposable {
93
261
  }
94
262
  }
95
263
  async writeFile(resource, content, _opts) {
96
- const connection = this._getConnection(resource.authority);
264
+ const connection = await this._getConnection(resource.authority);
97
265
  try {
98
266
  const originalUri = this._decodeUri(resource);
99
267
  await connection.resourceWrite({
268
+ channel: ROOT_STATE_URI,
100
269
  uri: ( originalUri.toString()),
101
270
  data: ( VSBuffer.wrap(content).toString()),
102
271
  encoding: ContentEncoding.Utf8
@@ -105,17 +274,24 @@ class AHPFileSystemProvider extends Disposable {
105
274
  throw this._mapError(err, FileSystemProviderErrorCode.NoPermissions);
106
275
  }
107
276
  }
108
- async mkdir() {
109
- throw createFileSystemProviderError(
110
- "mkdir not supported on remote filesystem",
111
- FileSystemProviderErrorCode.NoPermissions
112
- );
277
+ async mkdir(resource) {
278
+ const connection = await this._getConnection(resource.authority);
279
+ try {
280
+ const originalUri = this._decodeUri(resource);
281
+ await connection.resourceMkdir({
282
+ channel: ROOT_STATE_URI,
283
+ uri: ( originalUri.toString())
284
+ });
285
+ } catch (err) {
286
+ throw this._mapError(err, FileSystemProviderErrorCode.NoPermissions);
287
+ }
113
288
  }
114
289
  async delete(resource, opts) {
115
- const connection = this._getConnection(resource.authority);
290
+ const connection = await this._getConnection(resource.authority);
116
291
  try {
117
292
  const originalUri = this._decodeUri(resource);
118
293
  await connection.resourceDelete({
294
+ channel: ROOT_STATE_URI,
119
295
  uri: ( originalUri.toString()),
120
296
  recursive: opts.recursive
121
297
  });
@@ -124,11 +300,27 @@ class AHPFileSystemProvider extends Disposable {
124
300
  }
125
301
  }
126
302
  async rename(from, to, opts) {
127
- const connection = this._getConnection(from.authority);
303
+ const connection = await this._getConnection(from.authority);
128
304
  try {
129
305
  const originalFrom = this._decodeUri(from);
130
306
  const originalTo = this._decodeUri(to);
131
307
  await connection.resourceMove({
308
+ channel: ROOT_STATE_URI,
309
+ source: ( originalFrom.toString()),
310
+ destination: ( originalTo.toString()),
311
+ failIfExists: !opts.overwrite
312
+ });
313
+ } catch (err) {
314
+ throw this._mapError(err, FileSystemProviderErrorCode.NoPermissions);
315
+ }
316
+ }
317
+ async copy(from, to, opts) {
318
+ const connection = await this._getConnection(from.authority);
319
+ try {
320
+ const originalFrom = this._decodeUri(from);
321
+ const originalTo = this._decodeUri(to);
322
+ await connection.resourceCopy({
323
+ channel: ROOT_STATE_URI,
132
324
  source: ( originalFrom.toString()),
133
325
  destination: ( originalTo.toString()),
134
326
  failIfExists: !opts.overwrite
@@ -138,7 +330,7 @@ class AHPFileSystemProvider extends Disposable {
138
330
  }
139
331
  }
140
332
  async requestResourceAccess(resource, opts) {
141
- const connection = this._getConnection(resource.authority);
333
+ const connection = await this._getConnection(resource.authority);
142
334
  if (!connection.resourceRequest) {
143
335
  throw createFileSystemProviderError(
144
336
  `Connection for ${resource.authority} does not support resourceRequest`,
@@ -148,6 +340,7 @@ class AHPFileSystemProvider extends Disposable {
148
340
  const originalUri = this._decodeUri(resource);
149
341
  try {
150
342
  await connection.resourceRequest({
343
+ channel: ROOT_STATE_URI,
151
344
  uri: ( originalUri.toString()),
152
345
  read: opts.read,
153
346
  write: opts.write
@@ -157,14 +350,41 @@ class AHPFileSystemProvider extends Disposable {
157
350
  }
158
351
  }
159
352
  _getConnection(authority) {
160
- const connection = this._authorityToConnection.get(authority);
161
- if (!connection) {
162
- throw createFileSystemProviderError(
353
+ const entry = this._authorities.get(authority);
354
+ if (!entry) {
355
+ return Promise.reject(createFileSystemProviderError(
163
356
  `No connection for authority: ${authority}`,
164
357
  FileSystemProviderErrorCode.Unavailable
165
- );
358
+ ));
359
+ }
360
+ const active = entry.connections.at(-1);
361
+ if (active) {
362
+ return Promise.resolve(active);
166
363
  }
167
- return connection;
364
+ return ( new Promise((resolve, reject) => {
365
+ const settle = () => {
366
+ const current = this._authorities.get(authority);
367
+ if (!current) {
368
+ sub.dispose();
369
+ reject(createFileSystemProviderError(
370
+ `No connection for authority: ${authority}`,
371
+ FileSystemProviderErrorCode.Unavailable
372
+ ));
373
+ return;
374
+ }
375
+ const c = current.connections.at(-1);
376
+ if (c) {
377
+ sub.dispose();
378
+ resolve(c);
379
+ }
380
+ };
381
+ const sub = this._onDidChangeConnection.event(a => {
382
+ if (a === authority) {
383
+ settle();
384
+ }
385
+ });
386
+ settle();
387
+ }));
168
388
  }
169
389
  _mapError(err, defaultCode) {
170
390
  if (err instanceof ProtocolError && err.code === AhpErrorCodes.PermissionDenied) {
@@ -173,7 +393,7 @@ class AHPFileSystemProvider extends Disposable {
173
393
  return createFileSystemProviderError(err instanceof Error ? err.message : String(err), defaultCode);
174
394
  }
175
395
  async _listDirectory(authority, resource) {
176
- const connection = this._getConnection(authority);
396
+ const connection = await this._getConnection(authority);
177
397
  try {
178
398
  const originalUri = this._decodeUri(resource);
179
399
  const result = await connection.resourceList(originalUri);
@@ -187,6 +407,9 @@ class AgentHostFileSystemProvider extends AHPFileSystemProvider {
187
407
  _decodeUri(resource) {
188
408
  return fromAgentHostUri(resource);
189
409
  }
410
+ _encodeUri(resource, authority) {
411
+ return toAgentHostUri(resource, authority);
412
+ }
190
413
  }
191
414
 
192
- export { AHPFileSystemProvider, AgentHostFileSystemProvider };
415
+ export { AHPFileSystemProvider, AgentHostFileSystemProvider, createRemoteWatchHandle };
@@ -7,12 +7,12 @@ import '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
7
7
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
8
8
  import '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
9
9
  import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
10
+ import './agentHostFileSystemProvider.js';
11
+ import '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
10
12
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/charCode';
11
13
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
12
14
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
13
15
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
14
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
15
- import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands';
16
16
 
17
17
  const SYNCED_CUSTOMIZATION_SCHEME = "vscode-synced-customization";
18
18
 
@@ -1,4 +1,12 @@
1
+ import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
1
2
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
3
+ import { DirectoryEntry, ResourceRequestParams } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands";
4
+ /**
5
+ * Stable sentinel address used for the in-process local agent host. Keyed
6
+ * persisted grants in user settings live under this name so that "Always
7
+ * allow" survives window reloads.
8
+ */
9
+ export declare const LOCAL_AGENT_HOST_ADDRESS = "local";
2
10
  /** Configuration key for persisted per-host filesystem grants. */
3
11
  export declare const AgentHostLocalFilePermissionsSettingId = "chat.agentHost.localFilePermissions";
4
12
  /** Persisted access mode for a granted URI. */
@@ -35,3 +43,21 @@ export interface IPendingResourceRequest {
35
43
  /** Reject this request. */
36
44
  deny(): void;
37
45
  }
46
+ /**
47
+ * Thrown by gated FS operations on {@link IAgentHostResourceService} when
48
+ * the calling address lacks the required permission. Carries the
49
+ * {@link ResourceRequestParams} that, if approved, would unlock the
50
+ * operation, so wire adapters can echo it back to the agent host inside a
51
+ * `PermissionDenied` frame and let the host run the standard
52
+ * `resourceRequest` → retry loop.
53
+ */
54
+ export declare class AgentHostResourcePermissionError extends Error {
55
+ readonly request: ResourceRequestParams | undefined;
56
+ constructor(request: ResourceRequestParams | undefined);
57
+ }
58
+ export interface IResourceReadResult {
59
+ readonly bytes: VSBuffer;
60
+ }
61
+ export interface IResourceListResult {
62
+ readonly entries: readonly DirectoryEntry[];
63
+ }
@@ -1,5 +1,6 @@
1
1
 
2
2
 
3
+ const LOCAL_AGENT_HOST_ADDRESS = 'local';
3
4
  const AgentHostLocalFilePermissionsSettingId = 'chat.agentHost.localFilePermissions';
4
5
  var AgentHostAccessMode;
5
6
  (function (AgentHostAccessMode) {
@@ -11,5 +12,14 @@ var AgentHostPermissionMode;
11
12
  AgentHostPermissionMode["Read"] = "read";
12
13
  AgentHostPermissionMode["Write"] = "write";
13
14
  })(AgentHostPermissionMode || (AgentHostPermissionMode = {}));
15
+ class AgentHostResourcePermissionError extends Error {
16
+ constructor(request) {
17
+ super(request
18
+ ? `Access to ${request.uri} is not granted.`
19
+ : 'Access to the requested resource is not granted.');
20
+ this.request = request;
21
+ this.name = 'AgentHostResourcePermissionError';
22
+ }
23
+ }
14
24
 
15
- export { AgentHostAccessMode, AgentHostLocalFilePermissionsSettingId, AgentHostPermissionMode };
25
+ export { AgentHostAccessMode, AgentHostLocalFilePermissionsSettingId, AgentHostPermissionMode, AgentHostResourcePermissionError, LOCAL_AGENT_HOST_ADDRESS };
@@ -126,9 +126,22 @@ export declare const platformSessionSchema: ISchema<{
126
126
  * rules.
127
127
  */
128
128
  export declare const AgentHostTelemetryLevelConfigKey = "telemetryLevel";
129
+ /**
130
+ * Root config key forwarded from the renderer when VS Code's
131
+ * `chat.sessionSync.enabled` setting changes. Controls the `remote` flag
132
+ * passed to the copilot-sdk `CopilotClientOptions`.
133
+ */
134
+ export declare const AgentHostSessionSyncEnabledConfigKey = "sessionSyncEnabled";
135
+ /**
136
+ * The VS Code setting ID for session sync. Defined here so the platform
137
+ * layer (renderer-side forwarding) can reference it without importing from
138
+ * `workbench/contrib/chat`.
139
+ */
140
+ export declare const SESSION_SYNC_ENABLED_SETTING_ID = "chat.sessionSync.enabled";
129
141
  export declare function telemetryLevelToAgentHostConfigValue(telemetryLevel: TelemetryLevel): TelemetryConfiguration;
130
142
  export declare function agentHostConfigValueToTelemetryLevel(value: unknown): TelemetryLevel | undefined;
131
143
  export declare const platformRootSchema: ISchema<{
132
144
  permissions: ISchemaProperty<IPermissionsValue>;
133
145
  telemetryLevel: ISchemaProperty<TelemetryConfiguration>;
146
+ sessionSyncEnabled: ISchemaProperty<boolean>;
134
147
  }>;
@@ -3,7 +3,7 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
3
3
  import { TelemetryLevel, TelemetryConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry';
4
4
  import { SessionConfigKey } from '@codingame/monaco-vscode-katex-common/vscode/vs/platform/agentHost/common/sessionConfigKeys';
5
5
  import { ProtocolError } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionProtocol';
6
- import { JsonRpcErrorCodes } from './state/protocol/errors.js';
6
+ import { JsonRpcErrorCodes } from './state/protocol/common/errors.js';
7
7
 
8
8
  function schemaProperty(protocol) {
9
9
  const assertFn = buildAssert(protocol);
@@ -173,26 +173,26 @@ function safeStringify(value) {
173
173
  }
174
174
  const permissionsProperty = schemaProperty({
175
175
  type: "object",
176
- title: ( localize(1820, "Permissions")),
176
+ title: ( localize(1824, "Permissions")),
177
177
  description: ( localize(
178
- 1821,
178
+ 1825,
179
179
  "Per-tool session permissions. Updated automatically when approving a tool \"in this Session\"."
180
180
  )),
181
181
  properties: {
182
182
  allow: {
183
183
  type: "array",
184
- title: ( localize(1822, "Allowed tools")),
184
+ title: ( localize(1826, "Allowed tools")),
185
185
  items: {
186
186
  type: "string",
187
- title: ( localize(1823, "Tool name"))
187
+ title: ( localize(1827, "Tool name"))
188
188
  }
189
189
  },
190
190
  deny: {
191
191
  type: "array",
192
- title: ( localize(1824, "Denied tools")),
192
+ title: ( localize(1828, "Denied tools")),
193
193
  items: {
194
194
  type: "string",
195
- title: ( localize(1823, "Tool name"))
195
+ title: ( localize(1827, "Tool name"))
196
196
  }
197
197
  }
198
198
  },
@@ -205,27 +205,29 @@ const permissionsProperty = schemaProperty({
205
205
  createSchema({
206
206
  [SessionConfigKey.AutoApprove]: schemaProperty({
207
207
  type: "string",
208
- title: ( localize(1825, "Approvals")),
209
- description: ( localize(1826, "Tool approval behavior for this session")),
208
+ title: ( localize(1829, "Approvals")),
209
+ description: ( localize(1830, "Tool approval behavior for this session")),
210
210
  enum: ["default", "autoApprove", "autopilot"],
211
- enumLabels: [( localize(1827, "Default Approvals")), ( localize(1828, "Bypass Approvals")), ( localize(1829, "Autopilot (Preview)"))],
212
- enumDescriptions: [( localize(1830, "Copilot uses your configured settings")), ( localize(1831, "All tool calls are auto-approved")), ( localize(1832, "Autonomously iterates from start to finish"))],
211
+ enumLabels: [( localize(1831, "Default Approvals")), ( localize(1832, "Bypass Approvals")), ( localize(1833, "Autopilot (Preview)"))],
212
+ enumDescriptions: [( localize(1834, "Copilot uses your configured settings")), ( localize(1835, "All tool calls are auto-approved")), ( localize(1836, "Autonomously iterates from start to finish"))],
213
213
  default: "default",
214
214
  sessionMutable: true
215
215
  }),
216
216
  [SessionConfigKey.Permissions]: permissionsProperty,
217
217
  [SessionConfigKey.Mode]: schemaProperty({
218
218
  type: "string",
219
- title: ( localize(1833, "Agent Mode")),
220
- description: ( localize(1834, "How the agent should approach this turn")),
219
+ title: ( localize(1837, "Agent Mode")),
220
+ description: ( localize(1838, "How the agent should approach this turn")),
221
221
  enum: ["interactive", "plan"],
222
- enumLabels: [( localize(1835, "Interactive")), ( localize(1836, "Plan"))],
223
- enumDescriptions: [( localize(1837, "Ask for input and approval for each action")), ( localize(1838, "Generate a plan first, then choose how to execute it"))],
222
+ enumLabels: [( localize(1839, "Interactive")), ( localize(1840, "Plan"))],
223
+ enumDescriptions: [( localize(1841, "Ask for input and approval for each action")), ( localize(1842, "Generate a plan first, then choose how to execute it"))],
224
224
  default: "interactive",
225
225
  sessionMutable: true
226
226
  })
227
227
  });
228
228
  const AgentHostTelemetryLevelConfigKey = "telemetryLevel";
229
+ const AgentHostSessionSyncEnabledConfigKey = "sessionSyncEnabled";
230
+ const SESSION_SYNC_ENABLED_SETTING_ID = "chat.sessionSync.enabled";
229
231
  function telemetryLevelToAgentHostConfigValue(telemetryLevel) {
230
232
  switch (telemetryLevel) {
231
233
  case TelemetryLevel.NONE:
@@ -242,8 +244,8 @@ createSchema({
242
244
  [SessionConfigKey.Permissions]: permissionsProperty,
243
245
  [AgentHostTelemetryLevelConfigKey]: schemaProperty({
244
246
  type: "string",
245
- title: ( localize(1839, "Telemetry Level")),
246
- description: ( localize(1840, "Most restrictive telemetry level requested by connected clients.")),
247
+ title: ( localize(1843, "Telemetry Level")),
248
+ description: ( localize(1844, "Most restrictive telemetry level requested by connected clients.")),
247
249
  enum: [
248
250
  TelemetryConfiguration.ON,
249
251
  TelemetryConfiguration.ERROR,
@@ -251,7 +253,13 @@ createSchema({
251
253
  TelemetryConfiguration.OFF
252
254
  ],
253
255
  default: TelemetryConfiguration.ON
256
+ }),
257
+ [AgentHostSessionSyncEnabledConfigKey]: schemaProperty({
258
+ type: "boolean",
259
+ title: ( localize(1845, "Session Sync")),
260
+ description: ( localize(1846, "Whether remote session sync is enabled for the copilot-sdk CLI.")),
261
+ default: false
254
262
  })
255
263
  });
256
264
 
257
- export { AgentHostTelemetryLevelConfigKey, createSchema, schemaProperty, telemetryLevelToAgentHostConfigValue };
265
+ export { AgentHostSessionSyncEnabledConfigKey, AgentHostTelemetryLevelConfigKey, SESSION_SYNC_ENABLED_SETTING_ID, createSchema, schemaProperty, telemetryLevelToAgentHostConfigValue };