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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js +15 -5
  3. package/package.json +5 -5
  4. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +170 -24
  5. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +372 -66
  6. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +18 -1
  7. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +160 -31
  8. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.d.ts +8 -0
  9. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +19 -0
  10. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +134 -0
  11. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +257 -0
  12. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +84 -3
  13. package/vscode/src/vs/platform/agentHost/common/agentService.js +9 -1
  14. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +61 -1
  15. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +61 -1
  16. package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.js +3 -1
  17. package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +1 -1
  18. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +1 -1
  19. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +1 -1
  20. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +4 -4
  21. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +1 -1
  22. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +2 -7
  23. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +8 -29
  24. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  25. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +60 -60
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +10 -6
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +10 -1
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +180 -174
  36. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  37. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  38. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  39. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +12 -12
  40. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +12 -12
  42. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  43. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +11 -11
  44. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  45. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
  46. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +20 -20
  47. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +64 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +330 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.d.ts +24 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +77 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +6 -6
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +51 -0
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +267 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +4 -3
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +53 -53
  61. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
  62. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
  63. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  65. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  66. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
  67. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +5 -4
  68. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +30 -28
  69. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  70. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  71. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +26 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +14 -14
  73. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +7 -6
  74. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +150 -119
  75. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +45 -44
  76. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +0 -1
  77. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +58 -76
  78. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
  79. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +25 -25
  80. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +2 -2
  81. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +2 -2
  82. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +3 -3
  83. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +2 -6
  84. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +88 -70
  85. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +82 -56
  86. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +10 -8
  87. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +2 -6
  88. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +89 -71
  89. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.d.ts +1 -1
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +2 -2843
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.d.ts +1 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +2934 -0
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +99 -99
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +4 -4
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +53 -20
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +4 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +131 -61
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +22 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +23 -3
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +91 -15
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +23 -21
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -28
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +14 -14
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +15 -4
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +203 -163
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +1 -3
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +31 -54
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.d.ts +1 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +88 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
  146. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +17 -4
  147. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.d.ts +8 -0
  148. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +91 -0
  149. package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.d.ts +52 -0
  150. package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.js +82 -0
  151. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +21 -1
  152. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +55 -18
  153. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
  154. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  155. package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.d.ts +51 -0
  156. package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.js +106 -0
  157. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +4 -2
  158. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
  159. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
  160. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +38 -0
  161. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +59 -0
  162. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
  163. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +25 -25
  164. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
  165. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
  166. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  167. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
  168. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
  169. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  170. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +4 -6
  171. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  172. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  173. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  174. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  175. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  176. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
  177. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
  178. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +1 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +38 -28
  180. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -7
  181. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.d.ts +5 -1
  182. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.js +106 -7
  183. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -8
  184. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.d.ts +28 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +75 -0
  186. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  187. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/{toolInvocationParts/chatToolOutputStateCache.d.ts → chatOutputPartStateCache.d.ts} +5 -6
  188. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/{toolInvocationParts/chatToolOutputStateCache.js → chatOutputPartStateCache.js} +19 -11
  189. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
  190. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +58 -26
  191. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +9 -9
  192. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
  193. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  194. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  195. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
  196. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +18 -9
  197. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  198. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +13 -5
  199. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +6 -2
  200. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
  201. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +19 -18
  202. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
  203. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +1 -2
  204. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
  205. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +6 -7
  206. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +14 -15
  207. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +155 -156
  208. package/vscode/src/vs/workbench/contrib/chat/common/tools/copilotToolIds.d.ts +6 -0
  209. package/vscode/src/vs/workbench/contrib/chat/common/tools/copilotToolIds.js +12 -0
  210. package/vscode/src/vs/workbench/contrib/chat/common/tools/toolResultCompressor.d.ts +88 -0
  211. package/vscode/src/vs/workbench/contrib/chat/common/tools/toolResultCompressor.js +25 -0
  212. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  213. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.d.ts +1 -0
  214. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +237 -0
  215. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.d.ts +66 -0
  216. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +600 -0
  217. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.d.ts +18 -0
  218. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +47 -0
  219. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselTypes.d.ts +22 -0
  220. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselTypes.js +7 -0
  221. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/media/imageCarousel.css +298 -0
  222. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
  223. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  224. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
  225. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  226. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  227. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  228. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  229. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  230. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +12 -1
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +78 -7
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +15 -11
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -9
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -16
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandParser.d.ts +60 -0
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandParser.js +286 -0
  248. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.d.ts +24 -0
  249. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.js +285 -0
  250. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.d.ts +19 -12
  251. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +415 -47
  252. package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.d.ts +2 -7
  253. package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +1 -1
  254. package/vscode/src/vs/base/common/defaultAccount.d.ts +0 -69
  255. package/vscode/src/vs/base/common/defaultAccount.js +0 -12
  256. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.d.ts +0 -15
  257. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +0 -85
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type IEditorOverrideServices } from "@codingame/monaco-vscode-api/vscode/vs/editor/standalone/browser/standaloneServices";
2
- import type { IDefaultAccount } from "./vscode/src/vs/base/common/defaultAccount.js";
2
+ import type { IDefaultAccount } from "@codingame/monaco-vscode-api/vscode/vs/base/common/defaultAccount";
3
3
  export interface ChatServiceOverrideOptions {
4
4
  defaultAccount?: IDefaultAccount;
5
5
  }
package/index.js CHANGED
@@ -52,7 +52,7 @@ import { ChatTodoListService } from './vscode/src/vs/workbench/contrib/chat/comm
52
52
  import { IChatLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/widget/chatLayoutService.service';
53
53
  import { ChatLayoutService } from './vscode/src/vs/workbench/contrib/chat/browser/widget/chatLayoutService.js';
54
54
  import { IAiEditTelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service';
55
- import { AiEditTelemetryServiceImpl } from './vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js';
55
+ import { AiEditTelemetryServiceImpl } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl';
56
56
  import { IChatModeService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes.service';
57
57
  import { ChatModeService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
58
58
  import { ILanguageModelToolsConfirmationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsConfirmationService.service';
@@ -73,13 +73,13 @@ import { IAgentTitleBarStatusService } from '@codingame/monaco-vscode-api/vscode
73
73
  import { ILanguageModelsConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelsConfiguration.service';
74
74
  import { IChatTipService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatTipService.service';
75
75
  import { IChatEditingExplanationModelManager } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.service';
76
- import { IChatToolOutputStateCache } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.service';
76
+ import { IChatOutputPartStateCache } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatOutputPartStateCache.service';
77
77
  import { AgentSessionProjectionService } from './vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js';
78
78
  import { AgentTitleBarStatusService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusService';
79
79
  import { LanguageModelsConfigurationService } from './vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js';
80
80
  import { ChatTipService } from './vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js';
81
81
  import { ChatEditingExplanationModelManager } from './vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js';
82
- import { ChatToolOutputStateCache } from './vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.js';
82
+ import { ChatOutputPartStateCache } from './vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatOutputPartStateCache.js';
83
83
  import { TerminalSandboxService } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService';
84
84
  import { IAICustomizationWorkspaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service';
85
85
  import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
@@ -133,17 +133,25 @@ import { AgentHostPermissionService } from './vscode/src/vs/workbench/services/a
133
133
  import { ToolResultCompressorService } from './vscode/src/vs/workbench/contrib/chat/browser/tools/toolResultCompressorService.js';
134
134
  import { ChatInputNotificationService } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService';
135
135
  import { ChatPhoneInputPresenterService } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter';
136
+ import { IAgentHostUntitledProvisionalSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.service';
137
+ import { IAgentHostDebugLogsExportService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.service';
138
+ import { AgentHostUntitledProvisionalSessionService } from './vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js';
139
+ import { BrowserAgentHostDebugLogsExportService } from './vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js';
136
140
  import './vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js';
141
+ import './vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js';
137
142
  import './vscode/src/vs/workbench/contrib/chat/browser/chat.view.contribution.js';
138
143
  import './vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js';
139
144
  import './vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js';
140
145
  import './vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js';
141
146
  import './vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js';
147
+ import './vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js';
148
+ import './vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js';
142
149
  import { ITerminalSandboxService } from '@codingame/monaco-vscode-api/vscode/vs/platform/sandbox/common/terminalSandboxService.service';
143
150
 
144
151
  class DefaultAccountService {
145
152
  constructor(defaultAccount) {
146
153
  this.defaultAccount = defaultAccount;
154
+ this.resolveGitHubUrl = (path) => path;
147
155
  this.currentDefaultAccount = null;
148
156
  this.onDidChangePolicyData = Event.None;
149
157
  this.policyData = null;
@@ -201,7 +209,7 @@ function getServiceOverride({ defaultAccount } = {}) {
201
209
  [ILanguageModelsConfigurationService.toString()]: new SyncDescriptor(LanguageModelsConfigurationService, [], true),
202
210
  [IChatTipService.toString()]: new SyncDescriptor(ChatTipService, [], true),
203
211
  [IChatEditingExplanationModelManager.toString()]: new SyncDescriptor(ChatEditingExplanationModelManager, [], true),
204
- [IChatToolOutputStateCache.toString()]: new SyncDescriptor(ChatToolOutputStateCache, [], true),
212
+ [IChatOutputPartStateCache.toString()]: new SyncDescriptor(ChatOutputPartStateCache, [], true),
205
213
  [ITerminalSandboxService.toString()]: new SyncDescriptor(TerminalSandboxService, [], true),
206
214
  [ISandboxHelperService.toString()]: new SyncDescriptor(NullSandboxHelperService, [], true),
207
215
  [IAICustomizationWorkspaceService.toString()]: new SyncDescriptor(AICustomizationWorkspaceService, [], true),
@@ -228,7 +236,9 @@ function getServiceOverride({ defaultAccount } = {}) {
228
236
  [IPlanReviewFeedbackService.toString()]: new SyncDescriptor(PlanReviewFeedbackService, [], true),
229
237
  [IChatInputNotificationService.toString()]: new SyncDescriptor(ChatInputNotificationService, [], true),
230
238
  [IChatPhoneInputPresenter.toString()]: new SyncDescriptor(ChatPhoneInputPresenterService, [], true),
231
- [IAgentHostPermissionService.toString()]: new SyncDescriptor(AgentHostPermissionService, [], true)
239
+ [IAgentHostPermissionService.toString()]: new SyncDescriptor(AgentHostPermissionService, [], true),
240
+ [IAgentHostUntitledProvisionalSessionService.toString()]: new SyncDescriptor(AgentHostUntitledProvisionalSessionService, [], true),
241
+ [IAgentHostDebugLogsExportService.toString()]: new SyncDescriptor(BrowserAgentHostDebugLogsExportService, [], true)
232
242
  };
233
243
  }
234
244
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-chat-service-override",
3
- "version": "32.0.2",
3
+ "version": "33.0.5",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - chat service-override",
6
6
  "keywords": [],
@@ -15,10 +15,10 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "32.0.2",
19
- "@codingame/monaco-vscode-katex-common": "32.0.2",
20
- "@codingame/monaco-vscode-xterm-addons-common": "32.0.2",
21
- "@codingame/monaco-vscode-xterm-common": "32.0.2"
18
+ "@codingame/monaco-vscode-api": "33.0.5",
19
+ "@codingame/monaco-vscode-katex-common": "33.0.5",
20
+ "@codingame/monaco-vscode-xterm-addons-common": "33.0.5",
21
+ "@codingame/monaco-vscode-xterm-common": "33.0.5"
22
22
  },
23
23
  "main": "index.js",
24
24
  "module": "index.js",
@@ -2,15 +2,33 @@ import { Disposable, IReference } from "@codingame/monaco-vscode-api/vscode/vs/b
2
2
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
3
3
  import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
4
4
  import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
5
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
5
6
  import { IAgentConnection, IAgentCreateSessionConfig, IAgentResolveSessionConfigParams, IAgentSessionConfigCompletionsParams, IAgentSessionMetadata, AuthenticateParams, AuthenticateResult } from "../common/agentService.js";
6
7
  import { type IAgentSubscription } from "../common/state/agentSubscription.js";
7
8
  import { IAgentHostPermissionService } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostPermissionService.service";
8
9
  import type { CommandMap } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/messages";
9
10
  import { type ActionEnvelope, type IRootConfigChangedAction, type SessionAction, type TerminalAction } from "../common/state/sessionActions.js";
10
- import { StateComponents, type RootState } from "@codingame/monaco-vscode-xterm-common/vscode/vs/platform/agentHost/common/state/sessionState";
11
+ import { StateComponents, type RootState } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState";
11
12
  import { type IStateSnapshot } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionProtocol";
13
+ import { type IVscodeUpgradeResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocolUpgrade";
12
14
  import { type IProtocolTransport } from "../common/state/sessionTransport.js";
13
15
  import { type CompletionsParams, type CompletionsResult, type CreateTerminalParams, type ResolveSessionConfigResult, type SessionConfigCompletionsResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/commands";
16
+ import { ILoadEstimator } from "@codingame/monaco-vscode-api/vscode/vs/base/parts/ipc/common/ipc.net";
17
+ /**
18
+ * High-level connection state of a {@link RemoteAgentHostProtocolClient}.
19
+ * Exposed via {@link RemoteAgentHostProtocolClient.onDidChangeConnectionState}
20
+ * so consumers can surface transient reconnect activity in the UI.
21
+ */
22
+ export declare enum AgentHostClientState {
23
+ /** Initial handshake in progress. */
24
+ Connecting = "connecting",
25
+ /** Transport is open and handshake/reconnect has completed. */
26
+ Connected = "connected",
27
+ /** Transport closed unexpectedly; an automatic reconnect is in flight or scheduled. */
28
+ Reconnecting = "reconnecting",
29
+ /** Client has been disposed or has given up reconnecting. Terminal state. */
30
+ Closed = "closed"
31
+ }
14
32
  /**
15
33
  * A protocol-level client for a single remote agent host connection.
16
34
  * Manages the WebSocket transport, handshake, subscriptions, action dispatch,
@@ -23,10 +41,14 @@ export declare class RemoteAgentHostProtocolClient extends Disposable implements
23
41
  private readonly _logService;
24
42
  private readonly _fileService;
25
43
  private readonly _permissionService;
44
+ private readonly _configurationService;
26
45
  readonly _serviceBrand: undefined;
27
46
  private readonly _clientId;
28
47
  private readonly _address;
29
- private readonly _transport;
48
+ private readonly _transportFactory;
49
+ private _transport;
50
+ /** Disposable holding the listeners attached to the current transport. */
51
+ private readonly _transportListeners;
30
52
  private readonly _connectionAuthority;
31
53
  private _serverSeq;
32
54
  private _nextClientSeq;
@@ -39,25 +61,47 @@ export declare class RemoteAgentHostProtocolClient extends Disposable implements
39
61
  readonly onDidNotification: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<import("@codingame/monaco-vscode-xterm-common/vscode/vs/platform/agentHost/common/state/protocol/notifications").ProtocolNotification>;
40
62
  private readonly _onDidClose;
41
63
  readonly onDidClose: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
64
+ private readonly _onDidChangeConnectionState;
65
+ readonly onDidChangeConnectionState: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<AgentHostClientState>;
66
+ /**
67
+ * Discriminated state union. Read via narrowing (`_state.kind === ...`);
68
+ * reconnect-only fields like the gate/outbox/attempt counter are only
69
+ * accessible while {@link _state.kind} is {@link AgentHostClientState.Reconnecting},
70
+ * and the close error is only accessible while it's {@link AgentHostClientState.Closed}.
71
+ */
72
+ private _state;
42
73
  /** Pending JSON-RPC requests keyed by request id. */
43
74
  private readonly _pendingRequests;
44
75
  private _nextRequestId;
45
- private _isClosed;
46
- private _closeError;
47
76
  /**
48
77
  * Timestamp of the most recent message of any kind received from the
49
- * server. Updated in {@link _handleMessage}. Used by the watchdog to
50
- * decide if the transport has gone silent.
78
+ * server. Used only for diagnostic logging when the close timer fires.
51
79
  */
52
80
  private _lastReadTime;
53
81
  /**
54
- * Periodic check that fires {@link _handleClose} when there are
55
- * outstanding requests *and* nothing has been received for
56
- * {@link WATCHDOG_TIMEOUT_MS}ms. Detects silently-dead transports
57
- * (e.g. SSH/tunnel after laptop sleep + network change) that don't
58
- * produce a socket close event of their own. See {@link _watchdogTick}.
82
+ * Liveness watchdog see {@link _resetLivenessTimers}.
83
+ *
84
+ * {@link _pingTimer} fires after {@link PING_INTERVAL_MS} of inbound
85
+ * silence and sends an application-level `ping` so we have something
86
+ * to time out on. {@link _closeTimer} fires after another
87
+ * {@link LIVENESS_TIMEOUT_MS} of continued silence and force-closes
88
+ * the transport so the renderer's reconnect logic kicks in. Both are
89
+ * reset on every received message, so busy connections generate no
90
+ * ping traffic at all.
91
+ *
92
+ * Detects silently-dead transports (e.g. SSH/tunnel after laptop
93
+ * sleep + network change) that don't produce a socket close event of
94
+ * their own.
95
+ */
96
+ private readonly _pingTimer;
97
+ private readonly _closeTimer;
98
+ /**
99
+ * Used to suppress watchdog-triggered closes when our own JS event loop
100
+ * has been pegged — in that case the silence is on our side, not the
101
+ * remote's, and tearing down the transport would just generate a useless
102
+ * reconnect cycle that aborts in-flight requests.
59
103
  */
60
- private readonly _watchdog;
104
+ private readonly _loadEstimator;
61
105
  /**
62
106
  * Comparison keys of customization URIs we have already granted implicit
63
107
  * read access for on this connection. Dedupes repeat sends so we don't
@@ -67,12 +111,61 @@ export declare class RemoteAgentHostProtocolClient extends Disposable implements
67
111
  get clientId(): string;
68
112
  get address(): string;
69
113
  get defaultDirectory(): string | undefined;
70
- constructor(address: string, transport: IProtocolTransport, _logService: ILogService, _fileService: IFileService, _permissionService: IAgentHostPermissionService);
114
+ get connectionState(): AgentHostClientState;
115
+ constructor(address: string, transportOrFactory: IProtocolTransport | (() => IProtocolTransport), loadEstimator: ILoadEstimator | undefined, _logService: ILogService, _fileService: IFileService, _permissionService: IAgentHostPermissionService, _configurationService: IConfigurationService);
116
+ /**
117
+ * Install a transport and wire listeners. Used both for the initial
118
+ * transport and for replacements created by the factory during a
119
+ * transport-level reconnect.
120
+ */
121
+ private _installTransport;
122
+ /**
123
+ * Transition to a new {@link ClientState}. Fires {@link onDidChangeConnectionState}
124
+ * only when the variant kind actually changes; in-place mutation of
125
+ * reconnect-state fields (e.g. swapping the gate on a failed retry) does
126
+ * NOT count as a transition and produces no event.
127
+ */
128
+ private _transitionTo;
129
+ private _newReconnectGate;
130
+ private _newReconnectState;
71
131
  dispose(): void;
72
132
  /**
73
133
  * Connect to the remote agent host and perform the protocol handshake.
74
134
  */
75
135
  connect(): Promise<void>;
136
+ /**
137
+ * Called from the transport's `onClose` event. When a {@link _transportFactory}
138
+ * is configured we attempt to soft-reconnect rather than fire `onDidClose` —
139
+ * the protocol-level `reconnect` request lets the server replay missed
140
+ * actions and preserves the `clientId` so pending tool calls etc. are not
141
+ * cancelled by the host-side disconnect timeout. Without a factory
142
+ * (passive-transport SSH/relay path) we fall back to "close means closed"
143
+ * and let the service decide whether to spin up a fresh client.
144
+ */
145
+ private _handleTransportClose;
146
+ private _scheduleReconnect;
147
+ private _attemptReconnect;
148
+ /**
149
+ * Apply a `reconnect` RPC result to the subscription manager. On `replay`
150
+ * we feed each missed envelope through the normal action path; on
151
+ * `snapshot` we reseat each named subscription with the fresh state and
152
+ * advance the server seq cursor accordingly.
153
+ */
154
+ private _applyReconnectResult;
155
+ /**
156
+ * Drain queued outgoing wire traffic after a successful soft reconnect:
157
+ *
158
+ * 1. Resend pending optimistic session actions that the server did NOT
159
+ * echo back in the replay buffer (i.e. anything still on
160
+ * {@link AgentSubscriptionManager.getPendingSessionActions}).
161
+ * 2. Flush every message that {@link _sendNotification} queued onto the
162
+ * outbox while the gate was engaged.
163
+ *
164
+ * Replays are deduped against the outbox by `clientSeq` so a session
165
+ * action that was both optimistic-tracked AND queued during the
166
+ * reconnect window only goes out once.
167
+ */
168
+ private _drainAfterReconnect;
76
169
  get rootState(): IAgentSubscription<RootState>;
77
170
  getSubscription<T>(kind: StateComponents, resource: URI): IReference<IAgentSubscription<T>>;
78
171
  getSubscriptionUnmanaged<T>(_kind: StateComponents, resource: URI): IAgentSubscription<T> | undefined;
@@ -88,7 +181,7 @@ export declare class RemoteAgentHostProtocolClient extends Disposable implements
88
181
  /**
89
182
  * Dispatch a client action to the server. Returns the clientSeq used.
90
183
  */
91
- dispatchAction(action: SessionAction | TerminalAction | IRootConfigChangedAction, _clientId: string, clientSeq: number): void;
184
+ private dispatchAction;
92
185
  /**
93
186
  * Create a new session on the remote agent host.
94
187
  */
@@ -96,6 +189,15 @@ export declare class RemoteAgentHostProtocolClient extends Disposable implements
96
189
  resolveSessionConfig(params: IAgentResolveSessionConfigParams): Promise<ResolveSessionConfigResult>;
97
190
  sessionConfigCompletions(params: IAgentSessionConfigCompletionsParams): Promise<SessionConfigCompletionsResult>;
98
191
  completions(params: CompletionsParams): Promise<CompletionsResult>;
192
+ /**
193
+ * Send an application-level ping and wait for the server's response.
194
+ * Used by {@link _watchdogTick} to keep idle connections under
195
+ * watchdog supervision; safe to call from external code as well.
196
+ *
197
+ * The returned promise rejects with a {@link ProtocolError} if the
198
+ * connection closes before a response arrives.
199
+ */
200
+ ping(): Promise<void>;
99
201
  /**
100
202
  * Returns the trigger characters captured from the `initialize` handshake.
101
203
  * Empty when the remote host did not announce any.
@@ -152,6 +254,19 @@ export declare class RemoteAgentHostProtocolClient extends Disposable implements
152
254
  resourceCopy(params: CommandMap["resourceCopy"]["params"]): Promise<CommandMap["resourceCopy"]["result"]>;
153
255
  resourceDelete(params: CommandMap["resourceDelete"]["params"]): Promise<CommandMap["resourceDelete"]["result"]>;
154
256
  resourceMove(params: CommandMap["resourceMove"]["params"]): Promise<CommandMap["resourceMove"]["result"]>;
257
+ /**
258
+ * Trigger the CLI-managed upgrade flow for this agent host using the
259
+ * method name advertised by the server (typically
260
+ * {@link VSCODE_UPGRADE_METHOD}). Callable before {@link connect} has
261
+ * completed — typically used when the host has just rejected our
262
+ * `initialize` with an `UnsupportedProtocolVersion` error. The
263
+ * transport stays open after the rejection, so the extension request
264
+ * rides over it without a special out-of-band path.
265
+ *
266
+ * The result mirrors the CLI's HTTP response: ok flag, whether the
267
+ * upgrade is needed / started, running/latest commits.
268
+ */
269
+ triggerVscodeUpgrade(method: string): Promise<IVscodeUpgradeResult>;
155
270
  private _handleMessage;
156
271
  private _handleClose;
157
272
  private _raceClose;
@@ -172,21 +287,52 @@ export declare class RemoteAgentHostProtocolClient extends Disposable implements
172
287
  private _sendRequest;
173
288
  /** Send a JSON-RPC request for a VS Code extension method (not in the protocol spec). */
174
289
  private _sendExtensionRequest;
290
+ private _updateTelemetryLevel;
291
+ /**
292
+ * Common path for outgoing JSON-RPC requests: gate on any in-flight
293
+ * reconnect (unless explicitly bypassed for the `reconnect` RPC itself),
294
+ * assign an id, register the pending deferred, and write to the wire.
295
+ *
296
+ * The bypass option is the single special case that exists: the
297
+ * `reconnect` request is sent from inside `_attemptReconnect` while the
298
+ * gate is engaged, so it can't wait on its own resolution.
299
+ */
300
+ private _dispatchRequest;
175
301
  private _toProtocolError;
176
302
  private _rejectPendingRequests;
177
303
  /**
178
- * Fired on a {@link WATCHDOG_CHECK_INTERVAL_MS} interval. If the
179
- * transport has at least one outstanding request that's been waiting
180
- * for more than {@link WATCHDOG_TIMEOUT_MS} and no inbound message has
181
- * arrived in the same window, declare the transport dead and trigger
182
- * the renderer's reconnect path.
304
+ * Reset the liveness timers. Called once at construction (after the
305
+ * initial transport is installed), once on every received message
306
+ * (which is itself proof the remote is alive), and once after a
307
+ * successful soft reconnect.
308
+ *
309
+ * Two timers cooperate:
310
+ *
311
+ * 1. {@link _pingTimer} fires after {@link PING_INTERVAL_MS} of silence
312
+ * and sends an application-level `ping` so the close timer has
313
+ * something to time out on. Tolerates servers that don't implement
314
+ * `ping` — the error response still resets both timers.
315
+ *
316
+ * 2. {@link _closeTimer} fires after {@link PING_INTERVAL_MS}+
317
+ * {@link LIVENESS_TIMEOUT_MS} of continued silence and force-closes
318
+ * the transport so the renderer's reconnect logic kicks in. Catches
319
+ * silently-dead transports (e.g. SSH/tunnel after laptop sleep +
320
+ * network change) that don't emit a socket close event of their own.
321
+ *
322
+ * After laptop sleep + wake the JS event loop is paused, so a timer
323
+ * armed before sleep fires immediately after wake. That's fine —
324
+ * any inbound message processed during the wake catch-up resets it
325
+ * before the close handler runs.
183
326
  *
184
- * After laptop sleep + wake the JS event loop is paused, so the
185
- * interval fires only once after wake. The lookback comparison still
186
- * works we're comparing wall-clock {@link Date.now()} values, not
187
- * counting ticks.
327
+ * No-op while {@link _state.kind} is {@link AgentHostClientState.Reconnecting}
328
+ * or {@link AgentHostClientState.Closed}: the reconnect machinery
329
+ * owns scheduling in those states, and we don't want a stray inbound
330
+ * message during reconnect to re-arm the timers behind its back.
188
331
  */
189
- private _watchdogTick;
332
+ private _resetLivenessTimers;
333
+ private _cancelLivenessTimers;
334
+ private _onPingTimer;
335
+ private _onCloseTimer;
190
336
  /**
191
337
  * Get the next client sequence number for optimistic dispatch.
192
338
  */