@codingame/monaco-vscode-chat-service-override 34.1.3 → 35.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/index.js +38 -0
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.d.ts +1 -0
  4. package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.js +40 -0
  5. package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.d.ts +27 -0
  6. package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.js +91 -0
  7. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +20 -4
  8. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +148 -15
  9. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +1 -0
  10. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +9 -1
  11. package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.js +57 -3
  12. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +10 -14
  13. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +29 -8
  14. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +109 -2
  15. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +207 -21
  16. package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +362 -37
  17. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +698 -91
  18. package/vscode/src/vs/platform/agentHost/common/agentService.js +46 -3
  19. package/vscode/src/vs/platform/agentHost/common/customAgents.js +1 -0
  20. package/vscode/src/vs/platform/agentHost/common/resourceReadLogging.d.ts +1 -0
  21. package/vscode/src/vs/platform/agentHost/common/resourceReadLogging.js +26 -0
  22. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +5 -5
  23. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +17 -17
  24. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +96 -12
  25. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +226 -19
  26. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.d.ts +18 -0
  27. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.js +89 -0
  28. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +10 -0
  29. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.d.ts +6 -0
  30. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.js +400 -0
  31. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.js +129 -446
  32. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +2 -2
  33. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +1 -1
  34. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +1 -1
  35. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +35 -25
  36. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +7 -1
  37. package/vscode/src/vs/{workbench/contrib → platform}/browserView/common/browserChatToolReferenceNames.d.ts +4 -0
  38. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +1 -1
  39. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +1 -0
  40. package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.d.ts +0 -6
  41. package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.js +5 -18
  42. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +52 -3
  43. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +212 -34
  44. package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.js +3 -4
  45. package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.js +11 -10
  46. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +13 -6
  47. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +6 -1
  48. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.d.ts +2 -0
  49. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +399 -0
  50. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.d.ts +20 -0
  51. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +85 -0
  52. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.d.ts +177 -0
  53. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +898 -0
  54. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.d.ts +24 -0
  55. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +204 -0
  56. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.d.ts +61 -0
  57. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.js +338 -0
  58. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.d.ts +10 -0
  59. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +57 -0
  60. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.d.ts +33 -0
  61. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +98 -0
  62. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.d.ts +30 -0
  63. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +149 -0
  64. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.d.ts +12 -0
  65. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +116 -0
  66. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.d.ts +32 -0
  67. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +226 -0
  68. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.d.ts +18 -0
  69. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +138 -0
  70. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.d.ts +26 -0
  71. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.js +25 -0
  72. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.d.ts +13 -0
  73. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.js +108 -0
  74. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.d.ts +13 -0
  75. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +63 -0
  76. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.d.ts +1 -0
  77. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +178 -0
  78. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.d.ts +47 -0
  79. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +322 -0
  80. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.d.ts +15 -0
  81. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.js +15 -0
  82. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoiceColors.d.ts +2 -0
  83. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoiceColors.js +26 -0
  84. package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.d.ts +132 -0
  85. package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +237 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  87. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
  88. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +32 -16
  89. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  90. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +1 -1
  91. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +71 -60
  92. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  93. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +6 -1
  94. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +15 -15
  95. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
  96. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +7 -7
  97. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +19 -24
  98. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  99. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +9 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +14 -5
  101. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  102. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  103. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  104. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +14 -14
  105. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +13 -13
  106. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +66 -52
  107. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  108. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +15 -36
  109. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  110. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
  111. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +20 -20
  112. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +1 -1
  113. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +128 -13
  114. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +6 -6
  115. package/vscode/src/vs/workbench/contrib/chat/browser/actions/reviewEdits.js +1 -1
  116. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +10 -10
  117. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
  118. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  119. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +1 -0
  120. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +58 -9
  121. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
  122. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +15 -3
  123. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +64 -17
  124. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +45 -1
  125. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +15 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +25 -5
  127. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +143 -20
  128. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +7 -31
  129. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.d.ts +23 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.js +52 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
  132. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.d.ts +47 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.js +163 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +26 -3
  135. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +106 -8
  136. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +16 -3
  137. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +44 -14
  138. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
  139. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +70 -59
  140. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
  141. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
  142. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  143. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  144. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  145. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
  146. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +22 -22
  147. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  148. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  149. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.d.ts +27 -0
  150. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.js +152 -0
  151. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +11 -5
  152. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +1 -1
  153. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +9 -36
  154. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +8 -0
  155. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +17 -15
  156. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +143 -0
  157. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +30 -0
  158. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +6 -3
  159. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +3 -1
  160. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +1 -3
  161. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +107 -126
  162. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +46 -46
  163. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +19 -22
  164. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +244 -190
  165. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +13 -1
  167. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.d.ts +3 -1
  168. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.js +7 -2
  169. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +5 -1
  170. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +47 -28
  171. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +2 -5
  172. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +4 -8
  173. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.d.ts +87 -0
  174. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.js +772 -0
  175. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +24 -8
  176. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +3 -8
  177. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +1 -7
  178. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +2 -2
  179. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.d.ts +42 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.js +130 -0
  181. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +3 -3
  182. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.d.ts +46 -0
  183. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.js +94 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +9 -1
  185. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +421 -201
  186. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +1426 -97
  187. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +1 -1
  188. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -0
  189. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +107 -127
  190. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +29 -0
  191. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +331 -0
  192. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.d.ts +120 -0
  193. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.js +898 -0
  194. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  195. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +581 -336
  196. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +123 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +567 -0
  198. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
  199. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.js +168 -84
  200. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +183 -2
  201. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +897 -251
  202. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.d.ts +213 -0
  203. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +720 -0
  204. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  205. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  206. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
  207. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  208. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  209. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  210. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
  211. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
  212. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  213. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
  214. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  215. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  216. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
  217. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  218. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +354 -1
  219. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +9 -2
  220. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  221. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +1 -1
  222. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  223. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
  224. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  225. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
  226. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +11 -4
  227. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  228. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  229. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +4 -4
  230. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
  231. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +1 -1
  232. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  233. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +9 -3
  234. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +55 -8
  235. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
  236. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
  237. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +18 -1
  238. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +192 -87
  239. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +37 -3
  240. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
  241. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  242. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.d.ts +40 -1
  243. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +230 -41
  244. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  245. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.d.ts +30 -0
  246. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.js +29 -0
  247. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +23 -25
  248. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  249. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  250. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +35 -32
  251. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +26 -2
  252. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +56 -32
  253. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
  254. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +0 -1
  255. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +109 -68
  256. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.d.ts +38 -5
  257. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +175 -50
  258. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +4 -0
  259. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
  260. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
  261. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
  262. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  263. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +5 -5
  264. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
  265. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
  266. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  267. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
  268. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
  269. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
  270. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +4 -5
  271. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +1 -1
  272. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
  273. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +32 -3
  274. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +183 -84
  275. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
  276. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +3 -1
  277. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +20 -9
  278. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  279. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
  280. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
  281. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  282. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.d.ts +1 -0
  283. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +109 -0
  284. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  285. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  286. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  287. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  288. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  289. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
  290. package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.d.ts +17 -0
  291. package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +117 -0
  292. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
  293. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +40 -4
  294. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +169 -34
  295. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +7 -7
  296. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +5 -1
  297. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +2 -2
  298. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +8 -8
  299. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +2 -2
  300. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  301. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.d.ts +125 -0
  302. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.js +399 -0
  303. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.d.ts +34 -0
  304. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.js +198 -0
  305. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.d.ts +85 -0
  306. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.js +504 -0
  307. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.d.ts +321 -0
  308. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.js +2117 -0
  309. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.d.ts +57 -0
  310. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.js +367 -0
  311. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +16 -12
  312. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +2 -0
  313. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +68 -18
  314. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +11 -10
  315. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +2 -2
  316. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  317. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  318. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +7 -0
  319. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +13 -2
  320. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +23 -5
  321. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +320 -40
  322. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  323. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +80 -4
  324. package/vscode/src/vs/workbench/contrib/chat/common/automations/automation.d.ts +78 -0
  325. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.d.ts +13 -0
  326. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.d.ts +11 -0
  327. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.js +6 -0
  328. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.d.ts +16 -0
  329. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.js +6 -0
  330. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.d.ts +46 -0
  331. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.d.ts +36 -0
  332. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.js +6 -0
  333. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.d.ts +12 -0
  334. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.js +6 -0
  335. package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.d.ts +9 -0
  336. package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.js +6 -0
  337. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +2 -0
  338. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +7 -1
  339. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +28 -0
  340. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +226 -88
  341. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +6 -0
  342. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +8 -3
  343. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +13 -2
  344. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +12 -8
  345. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +5 -0
  346. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +5 -2
  347. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +15 -0
  348. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +177 -0
  349. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +2 -18
  350. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +78 -136
  351. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +1 -16
  352. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +1 -17
  353. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +2 -0
  354. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +16 -5
  355. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +31 -0
  356. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +122 -0
  357. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +24 -18
  358. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +3 -0
  359. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +113 -10
  360. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  361. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
  362. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +10 -0
  363. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +227 -152
  364. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  365. package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.d.ts +26 -0
  366. package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.js +98 -0
  367. package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.d.ts +5 -0
  368. package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.js +7 -6
  369. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +11 -12
  370. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
  371. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.d.ts +2 -0
  372. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +7 -0
  373. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
  374. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  375. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
  376. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  377. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  378. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  379. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  380. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  381. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  382. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  383. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +32 -20
  384. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
  385. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +23 -5
  386. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +37 -30
  387. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +7 -0
  388. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +7 -0
  389. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +7 -0
  390. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/largeOutputFileWriter.d.ts +33 -0
  391. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/largeOutputFileWriter.js +71 -0
  392. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +19 -0
  393. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +29 -9
  394. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +7 -20
  395. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +4 -4
  396. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +2 -1
  397. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  398. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  399. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +10 -8
  400. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  401. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -4
  402. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  403. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  404. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +3 -3
  405. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +26 -2
  406. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -3
  407. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +416 -252
  408. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +1 -1
  409. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +3 -2
  410. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +10 -10
  411. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  412. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  413. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  414. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  415. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +2 -3
  416. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +5 -5
  417. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +6 -2
  418. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +25 -8
  419. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +8 -3
  420. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +15 -0
  421. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +0 -20
  422. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +0 -77
  423. package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.d.ts +0 -52
  424. package/vscode/src/vs/workbench/contrib/chat/browser/copilotCliEventsUri.js +0 -82
  425. package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +0 -38
  426. package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +0 -47
  427. /package/vscode/src/vs/{workbench/contrib → platform}/browserView/common/browserChatToolReferenceNames.js +0 -0
@@ -8,6 +8,7 @@ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/even
8
8
  import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
9
9
  import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
10
10
  import { Disposable, DisposableResourceMap, DisposableStore, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
11
+ import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
11
12
  import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
12
13
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
13
14
  import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
@@ -35,7 +36,7 @@ import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbe
35
36
  import { chatEditingSessionIsReady } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
36
37
  import { logChangesToStateModel, normalizeSerializableChatData, ChatModel, ChatRequestRemovalReason, ChatRequestModel, updateRanges, toChatHistoryContent } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
37
38
  import { ChatModelStore } from '../model/chatModelStore.js';
38
- import { ChatRequestTextPart, ChatRequestSlashCommandPart, getPromptText, ChatRequestAgentPart, ChatRequestAgentSubcommandPart, chatSubcommandLeader, chatAgentLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
39
+ import { ChatRequestTextPart, ChatRequestAgentPart, ChatRequestAgentSubcommandPart, ChatRequestSlashCommandPart, getPromptText, chatSubcommandLeader, chatAgentLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
39
40
  import { ChatRequestParser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatRequestParser';
40
41
  import { ChatPendingRequestChangeEventName, ChatRequestQueueKind, ChatMcpServersStarting, ChatStopCancellationNoopEventName, ResponseModelState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
41
42
  import { ChatServiceTelemetry, ChatRequestTelemetry } from './chatServiceTelemetry.js';
@@ -46,9 +47,10 @@ import { IChatSlashCommandService } from '@codingame/monaco-vscode-api/vscode/vs
46
47
  import { IChatTransferService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatTransferService.service';
47
48
  import { LocalChatSessionUri, getChatSessionType, chatSessionResourceToId, isUntitledChatSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
48
49
  import { isExplicitFileOrImageVariableEntry, IChatRequestVariableEntry, ChatRequestVariableSet, isPromptTextVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
49
- import { ChatAgentLocation, ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
50
+ import { ChatAgentLocation, ChatModeKind, ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
50
51
  import { ChatMessageRole } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
51
52
  import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
53
+ import { ToolAndToolSetEnablementMap } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
52
54
  import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
53
55
  import { ChatSessionOperationLog } from '../model/chatSessionOperationLog.js';
54
56
  import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
@@ -111,7 +113,7 @@ let CancellableRequest = class CancellableRequest {
111
113
  };
112
114
  CancellableRequest = ( __decorate([( __param(4, ILanguageModelToolsService))], CancellableRequest));
113
115
  const EMPTY_REFERENCES = ( Object.freeze([]));
114
- const EMPTY_TOOL_ENABLEMENT_MAP = ( new Map());
116
+ const EMPTY_TOOL_ENABLEMENT_MAP = ToolAndToolSetEnablementMap.fromEntries([]);
115
117
  let ChatService = class ChatService extends Disposable {
116
118
  get transferredSessionResource() {
117
119
  return this._transferredSessionResource;
@@ -166,6 +168,7 @@ let ChatService = class ChatService extends Disposable {
166
168
  this.chatDebugService = chatDebugService;
167
169
  this._pendingRequests = this._register(( new DisposableResourceMap()));
168
170
  this._queuedRequestDeferreds = ( new Map());
171
+ this._inFlightUntitledMaterializations = ( new ResourceMap());
169
172
  this._saveModelsEnabled = true;
170
173
  this._onDidSubmitRequest = this._register(( new Emitter()));
171
174
  this.onDidSubmitRequest = this._onDidSubmitRequest.event;
@@ -215,6 +218,7 @@ let ChatService = class ChatService extends Disposable {
215
218
  this._register(this._sessionModels.onDidDisposeModel(model => {
216
219
  clearChatMarks(model.sessionResource);
217
220
  this.chatDebugService.endSession(model.sessionResource);
221
+ this.chatSessionService.clearMaterializedSessionResource(model.sessionResource);
218
222
  this._onDidDisposeSession.fire({
219
223
  sessionResources: [model.sessionResource],
220
224
  reason: "cleared"
@@ -562,6 +566,7 @@ let ChatService = class ChatService extends Disposable {
562
566
  const storedInputState = storedMetadata?.inputState;
563
567
  let initialData = undefined;
564
568
  let historySelectedModel = undefined;
569
+ let historyDerivedModel = undefined;
565
570
  if ((modelId || agentUri)) {
566
571
  const mode = agentUri ? {
567
572
  kind: ChatModeKind.Agent,
@@ -571,11 +576,15 @@ let ChatService = class ChatService extends Disposable {
571
576
  id: ChatMode.Agent.id
572
577
  };
573
578
  const modelMetadata = modelId ? this.languageModelsService.lookupLanguageModel(modelId) : undefined;
579
+ const storedModelConfiguration = storedInputState?.selectedModel?.modelConfiguration ?? storedInputState?.modelConfiguration;
580
+ const modelConfiguration = storedInputState?.selectedModel?.identifier === modelId ? storedModelConfiguration : undefined;
574
581
  const selectedModel = modelId && modelMetadata ? {
575
582
  identifier: modelId,
576
- metadata: modelMetadata
583
+ metadata: modelMetadata,
584
+ modelConfiguration
577
585
  } : undefined;
578
586
  historySelectedModel = selectedModel?.identifier;
587
+ historyDerivedModel = selectedModel;
579
588
  initialData = {
580
589
  serializer: ( new ChatSessionOperationLog()),
581
590
  value: {
@@ -600,13 +609,17 @@ let ChatService = class ChatService extends Disposable {
600
609
  }
601
610
  };
602
611
  }
612
+ const restoredDraft = storedInputState ? {
613
+ ...storedInputState,
614
+ selectedModel: historyDerivedModel
615
+ } : undefined;
603
616
  const modelRef = this._sessionModels.acquireOrCreate({
604
617
  initialData,
605
618
  location,
606
619
  sessionResource: sessionResource,
607
620
  canUseTools: false,
608
621
  transferEditingSession: providedSession.transferredState?.editingSession,
609
- inputState: providedSession.transferredState?.inputState
622
+ inputState: providedSession.transferredState?.inputState ?? restoredDraft
610
623
  }, debugOwner ?? "ChatService#loadRemoteSession");
611
624
  logChangesToStateModel(
612
625
  modelRef.object.inputModel,
@@ -674,7 +687,7 @@ let ChatService = class ChatService extends Disposable {
674
687
  kind: ChatModeKind.Agent,
675
688
  isBuiltin: message.modeInstructions.isBuiltin ?? false,
676
689
  modeInstructions: message.modeInstructions,
677
- modeId: "custom",
690
+ telemetryModeId: "custom",
678
691
  applyCodeBlockSuggestionId: undefined
679
692
  } : undefined;
680
693
  lastRequest = model.addRequest(parsedRequest, message.variableData ?? {
@@ -691,9 +704,14 @@ let ChatService = class ChatService extends Disposable {
691
704
  for (const part of message.parts) {
692
705
  model.acceptResponseProgress(lastRequest, part);
693
706
  }
694
- if (message.details && lastRequest.response) {
707
+ if (lastRequest.response && (message.details || message.errorDetails)) {
695
708
  lastRequest.response.setResult({
696
- details: message.details
709
+ ...(message.details ? {
710
+ details: message.details
711
+ } : {}),
712
+ ...(message.errorDetails ? {
713
+ errorDetails: message.errorDetails
714
+ } : {})
697
715
  });
698
716
  }
699
717
  }
@@ -871,94 +889,161 @@ let ChatService = class ChatService extends Disposable {
871
889
  reason: "Empty message"
872
890
  };
873
891
  }
892
+ let newSessionResource;
893
+ const materializedReal = this.chatSessionService.getMaterializedSessionResource(sessionResource);
894
+ if (materializedReal) {
895
+ sessionResource = materializedReal;
896
+ newSessionResource = materializedReal;
897
+ }
874
898
  let model = this._sessionModels.get(sessionResource);
875
899
  if (!model) {
876
900
  throw ( new Error(`Unknown session: ${sessionResource}`));
877
901
  }
878
- let tempRef;
879
- let newSessionResource;
880
- try {
881
- if (!model.hasRequests && isUntitledChatSession(sessionResource) && getChatSessionType(sessionResource) !== localChatSessionType) {
882
- const parsedRequest = this.parseChatRequest(
902
+ if (!model.hasRequests && isUntitledChatSession(sessionResource) && getChatSessionType(sessionResource) !== localChatSessionType) {
903
+ const materialized = await this._materializeUntitledSession(sessionResource, request, options, model);
904
+ if (materialized) {
905
+ model = materialized.model;
906
+ sessionResource = materialized.sessionResource;
907
+ newSessionResource = materialized.newSessionResource;
908
+ }
909
+ }
910
+ const hasPendingRequest = ( this._pendingRequests.has(sessionResource));
911
+ if (options?.queue) {
912
+ const queued = this.queuePendingRequest(model, sessionResource, request, options);
913
+ if (!options.pauseQueue) {
914
+ this.processPendingRequests(sessionResource);
915
+ }
916
+ return queued;
917
+ } else if (hasPendingRequest) {
918
+ this.trace("sendRequest", `Session ${sessionResource} already has a pending request`);
919
+ return {
920
+ kind: "rejected",
921
+ reason: "Request already in progress"
922
+ };
923
+ }
924
+ const requests = model.getRequests();
925
+ for (let i = requests.length - 1; i >= 0; i -= 1) {
926
+ const request = requests[i];
927
+ if (request.shouldBeRemovedOnSend) {
928
+ if (request.shouldBeRemovedOnSend.afterUndoStop) {
929
+ request.response?.finalizeUndoState();
930
+ } else {
931
+ await this.removeRequest(sessionResource, request.id);
932
+ }
933
+ }
934
+ }
935
+ const location = options?.location ?? model.initialLocation;
936
+ const attempt = options?.attempt ?? 0;
937
+ const defaultAgent = this.chatAgentService.getDefaultAgent(location, options?.modeInfo?.kind);
938
+ if (!defaultAgent) {
939
+ this.logService.warn("sendRequest", `No default agent for location ${location}`);
940
+ return {
941
+ kind: "rejected",
942
+ reason: "No default agent available"
943
+ };
944
+ }
945
+ const parsedRequest = this.parseChatRequest(sessionResource, request, location, options);
946
+ const silentAgent = options?.agentIdSilent ? this.chatAgentService.getAgent(options.agentIdSilent) : undefined;
947
+ const agent = silentAgent ?? parsedRequest.parts.find(r => r instanceof ChatRequestAgentPart)?.agent ?? defaultAgent;
948
+ const agentSlashCommandPart = parsedRequest.parts.find(r => r instanceof ChatRequestAgentSubcommandPart);
949
+ return {
950
+ kind: "sent",
951
+ newSessionResource,
952
+ data: {
953
+ ...this._sendRequestAsync(
954
+ model,
883
955
  sessionResource,
884
- request,
885
- options?.location ?? model.initialLocation,
956
+ parsedRequest,
957
+ attempt,
958
+ !options?.noCommandDetection,
959
+ silentAgent ?? defaultAgent,
960
+ location,
886
961
  options
962
+ ),
963
+ agent,
964
+ slashCommand: agentSlashCommandPart?.command
965
+ }
966
+ };
967
+ }
968
+ async _materializeUntitledSession(untitledResource, request, options, untitledModel) {
969
+ const inFlight = this._inFlightUntitledMaterializations.get(untitledResource);
970
+ if (inFlight) {
971
+ const realResource = await inFlight;
972
+ if (!realResource) {
973
+ this.trace(
974
+ "materializeUntitledSession",
975
+ `In-flight materialization of ${( untitledResource.toString())} produced no real session; keeping untitled`
887
976
  );
888
- const commandPart = parsedRequest.parts.find(r => r instanceof ChatRequestSlashCommandPart);
889
- const requestText = getPromptText(parsedRequest).message;
890
- const initialSessionOptions = this.chatSessionService.getSessionOptions(sessionResource);
891
- const newItem = await this.chatSessionService.createNewChatSessionItem(getChatSessionType(sessionResource), {
892
- prompt: requestText,
893
- command: commandPart?.text,
894
- initialSessionOptions,
895
- untitledResource: sessionResource
896
- }, CancellationToken.None);
897
- if (newItem) {
898
- this.chatSessionService.registerSessionResourceAlias(sessionResource, newItem.resource);
899
- tempRef = await this.loadRemoteSession(newItem.resource, model.initialLocation, CancellationToken.None);
900
- model = tempRef?.object;
901
- if (!model) {
902
- throw ( new Error(`Failed to load session for resource: ${newItem.resource}`));
903
- }
904
- if (initialSessionOptions) {
905
- this.chatSessionService.updateSessionOptions(model.sessionResource, initialSessionOptions);
906
- }
907
- sessionResource = newItem.resource;
908
- newSessionResource = newItem.resource;
909
- }
977
+ return undefined;
910
978
  }
911
- const hasPendingRequest = ( this._pendingRequests.has(sessionResource));
912
- if (options?.queue) {
913
- const queued = this.queuePendingRequest(model, sessionResource, request, options);
914
- if (!options.pauseQueue) {
915
- this.processPendingRequests(sessionResource);
916
- }
917
- return queued;
918
- } else if (hasPendingRequest) {
919
- this.trace("sendRequest", `Session ${sessionResource} already has a pending request`);
920
- return {
921
- kind: "rejected",
922
- reason: "Request already in progress"
923
- };
979
+ const realModel = this._sessionModels.get(realResource);
980
+ if (!realModel) {
981
+ this.info(
982
+ "materializeUntitledSession",
983
+ `Joined in-flight materialization of ${( untitledResource.toString())} but real model ${( realResource.toString())} is missing; keeping untitled`
984
+ );
985
+ return undefined;
924
986
  }
925
- const requests = model.getRequests();
926
- for (let i = requests.length - 1; i >= 0; i -= 1) {
927
- const request = requests[i];
928
- if (request.shouldBeRemovedOnSend) {
929
- if (request.shouldBeRemovedOnSend.afterUndoStop) {
930
- request.response?.finalizeUndoState();
931
- } else {
932
- await this.removeRequest(sessionResource, request.id);
933
- }
934
- }
987
+ this.trace(
988
+ "materializeUntitledSession",
989
+ `Concurrent send joined in-flight materialization ${( untitledResource.toString())} -> ${( realResource.toString())}`
990
+ );
991
+ return {
992
+ model: realModel,
993
+ sessionResource: realResource,
994
+ newSessionResource: realResource
995
+ };
996
+ }
997
+ const materialized = ( new DeferredPromise());
998
+ this._inFlightUntitledMaterializations.set(untitledResource, materialized.p);
999
+ try {
1000
+ const parsedRequest = this.parseChatRequest(
1001
+ untitledResource,
1002
+ request,
1003
+ options?.location ?? untitledModel.initialLocation,
1004
+ options
1005
+ );
1006
+ const commandPart = parsedRequest.parts.find(r => r instanceof ChatRequestSlashCommandPart);
1007
+ const requestText = getPromptText(parsedRequest).message;
1008
+ const initialSessionOptions = this.chatSessionService.getSessionOptions(untitledResource);
1009
+ const newItem = await this.chatSessionService.createNewChatSessionItem(getChatSessionType(untitledResource), {
1010
+ prompt: requestText,
1011
+ command: commandPart?.text,
1012
+ initialSessionOptions,
1013
+ untitledResource
1014
+ }, CancellationToken.None);
1015
+ if (!newItem) {
1016
+ materialized.complete(undefined);
1017
+ return undefined;
1018
+ }
1019
+ this.chatSessionService.registerSessionResourceAlias(untitledResource, newItem.resource);
1020
+ const tempRef = await this.loadRemoteSession(newItem.resource, untitledModel.initialLocation, CancellationToken.None);
1021
+ const realModel = tempRef?.object;
1022
+ if (!realModel) {
1023
+ throw ( new Error(`Failed to load session for resource: ${newItem.resource}`));
935
1024
  }
936
- const location = options?.location ?? model.initialLocation;
937
- const attempt = options?.attempt ?? 0;
938
- const defaultAgent = this.chatAgentService.getDefaultAgent(location, options?.modeInfo?.kind);
939
- const parsedRequest = this.parseChatRequest(sessionResource, request, location, options);
940
- const silentAgent = options?.agentIdSilent ? this.chatAgentService.getAgent(options.agentIdSilent) : undefined;
941
- const agent = silentAgent ?? parsedRequest.parts.find(r => r instanceof ChatRequestAgentPart)?.agent ?? defaultAgent;
942
- const agentSlashCommandPart = parsedRequest.parts.find(r => r instanceof ChatRequestAgentSubcommandPart);
1025
+ if (initialSessionOptions) {
1026
+ this.chatSessionService.updateSessionOptions(realModel.sessionResource, initialSessionOptions);
1027
+ }
1028
+ this.chatSessionService.setMaterializedSessionResource(untitledResource, newItem.resource);
1029
+ materialized.complete(newItem.resource);
1030
+ this.info(
1031
+ "materializeUntitledSession",
1032
+ `Materialized untitled session ${( untitledResource.toString())} into real session ${( newItem.resource.toString())}`
1033
+ );
943
1034
  return {
944
- kind: "sent",
945
- newSessionResource,
946
- data: {
947
- ...this._sendRequestAsync(
948
- model,
949
- sessionResource,
950
- parsedRequest,
951
- attempt,
952
- !options?.noCommandDetection,
953
- silentAgent ?? defaultAgent,
954
- location,
955
- options
956
- ),
957
- agent,
958
- slashCommand: agentSlashCommandPart?.command
959
- }
1035
+ model: realModel,
1036
+ sessionResource: newItem.resource,
1037
+ newSessionResource: newItem.resource
960
1038
  };
961
- } finally {}
1039
+ } catch (err) {
1040
+ materialized.complete(undefined);
1041
+ throw err;
1042
+ } finally {
1043
+ if (this._inFlightUntitledMaterializations.get(untitledResource) === materialized.p) {
1044
+ this._inFlightUntitledMaterializations.delete(untitledResource);
1045
+ }
1046
+ }
962
1047
  }
963
1048
  getAttachmentCapabilitiesForParser(chatSessionType, agent) {
964
1049
  return this.chatSessionService.getCapabilitiesForSessionType(chatSessionType) ?? agent?.capabilities;
@@ -1091,7 +1176,7 @@ let ChatService = class ChatService extends Disposable {
1091
1176
  model.acceptResponseProgress(request, {
1092
1177
  kind: "markdownContent",
1093
1178
  content: ( new MarkdownString(( localize(
1094
- 7939,
1179
+ 8538,
1095
1180
  "The `{0}` skill requires `{1}` to be enabled. After enabling, reload the window to apply. [Enable in Settings](command:workbench.action.openSettings?{2})",
1096
1181
  TROUBLESHOOT_COMMAND_NAME,
1097
1182
  AGENT_DEBUG_LOG_FILE_LOGGING_ENABLED_SETTING,
@@ -1143,6 +1228,9 @@ let ChatService = class ChatService extends Disposable {
1143
1228
  if (!ctx) {
1144
1229
  return [];
1145
1230
  }
1231
+ if (this.configurationService.getValue(ChatConfiguration.CollectInstructionsInExtension) === true) {
1232
+ return [];
1233
+ }
1146
1234
  markChat(sessionResource, ChatPerfMark.WillCollectInstructions);
1147
1235
  try {
1148
1236
  const variableSet = ( new ChatRequestVariableSet(options?.attachedContext));
@@ -1250,7 +1338,7 @@ let ChatService = class ChatService extends Disposable {
1250
1338
  rejectedConfirmationData: options?.rejectedConfirmationData,
1251
1339
  agentHostSessionConfig: options?.agentHostSessionConfig,
1252
1340
  userSelectedModelId: options?.userSelectedModelId,
1253
- modelConfiguration: options?.userSelectedModelId ? this.languageModelsService.getModelConfiguration(options.userSelectedModelId) : undefined,
1341
+ modelConfiguration: options?.userSelectedModelConfiguration ?? (options?.userSelectedModelId ? this.languageModelsService.getModelConfiguration(options.userSelectedModelId) : undefined),
1254
1342
  userSelectedTools: options?.userSelectedTools?.get(),
1255
1343
  modeInstructions: options?.modeInfo?.modeInstructions,
1256
1344
  permissionLevel: options?.modeInfo?.permissionLevel,
@@ -1393,7 +1481,7 @@ let ChatService = class ChatService extends Disposable {
1393
1481
  );
1394
1482
  rawResult = {
1395
1483
  errorDetails: {
1396
- message: ( localize(7940, "Provider returned null response"))
1484
+ message: ( localize(8539, "Provider returned null response"))
1397
1485
  }
1398
1486
  };
1399
1487
  }
@@ -1820,6 +1908,56 @@ let ChatService = class ChatService extends Disposable {
1820
1908
  model.setPendingRequests(requests);
1821
1909
  }
1822
1910
  }
1911
+ async sendPendingRequestImmediately(sessionResource, requestId) {
1912
+ const model = this._sessionModels.get(sessionResource);
1913
+ if (!model) {
1914
+ return;
1915
+ }
1916
+ const pendingRequests = model.getPendingRequests();
1917
+ const target = pendingRequests.find(r => r.request.id === requestId);
1918
+ if (!target) {
1919
+ return;
1920
+ }
1921
+ if (this._isServerManagedQueue(sessionResource)) {
1922
+ const message = target.request.message.text;
1923
+ const attachedContext = target.request.variableData.variables.slice();
1924
+ const sendOptions = {
1925
+ ...target.sendOptions,
1926
+ queue: undefined,
1927
+ attachedContext
1928
+ };
1929
+ this.removePendingRequest(sessionResource, requestId);
1930
+ await this.cancelCurrentRequestForSession(sessionResource, "queueRunNext");
1931
+ let result;
1932
+ try {
1933
+ result = await this.sendRequest(sessionResource, message, sendOptions);
1934
+ } catch (err) {
1935
+ this.logService.error("sendPendingRequestImmediately: re-send failed", err);
1936
+ }
1937
+ if (!result || result.kind === "rejected") {
1938
+ this.info(
1939
+ "sendPendingRequestImmediately",
1940
+ `Re-send was not accepted (${result?.kind ?? "error"}); restoring pending message to the queue`
1941
+ );
1942
+ await this.sendRequest(sessionResource, message, {
1943
+ ...sendOptions,
1944
+ attachedContext,
1945
+ queue: target.kind
1946
+ });
1947
+ }
1948
+ return;
1949
+ }
1950
+ const reordered = [{
1951
+ requestId: target.request.id,
1952
+ kind: target.kind
1953
+ }, ...( pendingRequests.filter(r => r.request.id !== requestId).map(r => ({
1954
+ requestId: r.request.id,
1955
+ kind: r.kind
1956
+ })))];
1957
+ this.setPendingRequests(sessionResource, reordered);
1958
+ await this.cancelCurrentRequestForSession(sessionResource, "queueRunNext");
1959
+ this.processPendingRequests(sessionResource);
1960
+ }
1823
1961
  hasSessions() {
1824
1962
  return this._chatSessionStore.hasSessions();
1825
1963
  }
@@ -1877,7 +2015,7 @@ let ChatService = class ChatService extends Disposable {
1877
2015
  };
1878
2016
  ChatService = ( __decorate([( __param(0, IStorageService)), ( __param(1, ILogService)), ( __param(2, ITelemetryService)), ( __param(3, IExtensionService)), ( __param(4, IInstantiationService)), ( __param(5, IWorkspaceContextService)), ( __param(6, IChatSlashCommandService)), ( __param(7, IChatAgentService)), ( __param(8, IConfigurationService)), ( __param(9, IChatTransferService)), ( __param(10, IChatSessionsService)), ( __param(11, IMcpService)), ( __param(12, IPromptsService)), ( __param(13, IChatEntitlementService)), ( __param(14, ILanguageModelsService)), ( __param(15, IChatDebugService))], ChatService));
1879
2017
  async function chatModelToChatDetail(model) {
1880
- const title = model.title || ( localize(7941, "New Chat"));
2018
+ const title = model.title || ( localize(8540, "New Chat"));
1881
2019
  return {
1882
2020
  sessionResource: model.sessionResource,
1883
2021
  title,
@@ -25,6 +25,7 @@ export type ChatProviderInvokedEvent = {
25
25
  permissionLevel: ChatPermissionLevel | undefined;
26
26
  chatMode: string | undefined;
27
27
  sessionType: string | undefined;
28
+ harness: string | undefined;
28
29
  };
29
30
  export type ChatProviderInvokedClassification = {
30
31
  timeToFirstProgress: {
@@ -117,6 +118,11 @@ export type ChatProviderInvokedClassification = {
117
118
  purpose: "FeatureInsight";
118
119
  comment: "The session type scheme (e.g. vscodeLocalChatSession for local, or remote session scheme).";
119
120
  };
121
+ harness: {
122
+ classification: "SystemMetaData";
123
+ purpose: "FeatureInsight";
124
+ comment: "For remote agent host sessions, the underlying harness/provider (e.g. copilotcli, claude, codex) so remote activity can be split by harness. Undefined for non-remote sessions.";
125
+ };
120
126
  owner: "roblourens";
121
127
  comment: "Provides insight into the performance of Chat agents.";
122
128
  };
@@ -9,6 +9,7 @@ import { isImageVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/wor
9
9
  import { ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
10
10
  import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
11
11
  import { chatSessionResourceToId, getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
12
+ import { isRemoteAgentHostSessionType, parseRemoteAgentHostHarness } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostSessionType';
12
13
 
13
14
  let ChatServiceTelemetry = class ChatServiceTelemetry {
14
15
  constructor(telemetryService) {
@@ -134,8 +135,9 @@ let ChatRequestTelemetry = class ChatRequestTelemetry {
134
135
  attachmentKinds: this.attachmentKindsForTelemetry(request.variableData),
135
136
  model: this.resolveModelId(this.opts.options?.userSelectedModelId),
136
137
  permissionLevel: this.opts.options?.modeInfo?.kind === ChatModeKind.Ask ? undefined : this.opts.options?.modeInfo?.permissionLevel,
137
- chatMode: this.opts.options?.modeInfo?.modeName ?? this.opts.options?.modeInfo?.modeId,
138
- sessionType: getChatSessionTypeForTelemetry(this.opts.sessionResource)
138
+ chatMode: this.opts.options?.modeInfo?.telemetryModeName ?? this.opts.options?.modeInfo?.telemetryModeId,
139
+ sessionType: getChatSessionTypeForTelemetry(this.opts.sessionResource),
140
+ harness: getHarnessForTelemetry(this.opts.sessionResource)
139
141
  });
140
142
  }
141
143
  attachmentKindsForTelemetry(variableData) {
@@ -180,7 +182,10 @@ let ChatRequestTelemetry = class ChatRequestTelemetry {
180
182
  ChatRequestTelemetry = ( __decorate([( __param(1, ITelemetryService)), ( __param(2, ILanguageModelsService))], ChatRequestTelemetry));
181
183
  function getChatSessionTypeForTelemetry(sessionResource) {
182
184
  const sessionType = getChatSessionType(sessionResource);
183
- return sessionType.startsWith("remote-") ? "remote-agent-host" : sessionType;
185
+ return isRemoteAgentHostSessionType(sessionType) ? "remote-agent-host" : sessionType;
186
+ }
187
+ function getHarnessForTelemetry(sessionResource) {
188
+ return parseRemoteAgentHostHarness(getChatSessionType(sessionResource));
184
189
  }
185
190
 
186
191
  export { ChatRequestTelemetry, ChatServiceTelemetry };
@@ -50,6 +50,7 @@ const responsePartSchema = v(
50
50
  case "markdownVuln":
51
51
  case "notebookEditGroup":
52
52
  case "progressMessage":
53
+ case "systemNotification":
53
54
  case "pullRequest":
54
55
  case "questionCarousel":
55
56
  case "planReview":
@@ -60,6 +61,7 @@ const responsePartSchema = v(
60
61
  case "workspaceEdit":
61
62
  case "externalEdit":
62
63
  case "disabledClaudeHooks":
64
+ case "autoModeResolution":
63
65
  return a.kind === b.kind;
64
66
  default:
65
67
  {
@@ -99,7 +101,9 @@ const requestSchema = object({
99
101
  variableData: t(m => m.variableData, chatVariableSchema),
100
102
  isHidden: v(() => undefined),
101
103
  isCanceled: v(() => undefined),
102
- response: t(m => m.response?.entireResponse.value, array(responsePartSchema)),
104
+ response: t(m => m.response?.entireResponse.value.filter(
105
+ p => p.kind !== "mcpAuthenticationRequired" && p.kind !== "mcpServersStartingSlow"
106
+ ), array(responsePartSchema)),
103
107
  responseId: v(m => m.response?.id),
104
108
  result: v(m => m.response?.result, equals),
105
109
  responseMarkdownInfo: v(m => m.response?.codeBlockInfos?.map(info => ({
@@ -114,6 +118,10 @@ const requestSchema = object({
114
118
  codeCitations: v(m => m.response?.codeCitations, equals),
115
119
  timeSpentWaiting: v(m => m.response?.timestamp),
116
120
  completionTokens: v(m => m.response?.completionTokenCount),
121
+ promptTokens: v(m => m.response?.usage?.promptTokens),
122
+ outputBuffer: v(m => m.response?.usage?.outputBuffer),
123
+ promptTokenDetails: v(m => m.response?.usage?.promptTokenDetails, equals),
124
+ copilotCredits: v(m => m.response?.usage?.copilotCredits),
117
125
  elapsedMs: v(
118
126
  m => m.response?.elapsedMs ?? (m.response?.completedAt ? Math.max(0, m.response.completedAt - m.response.confirmationAdjustedTimestamp.get()) : undefined)
119
127
  ),
@@ -127,7 +135,10 @@ const requestSchema = object({
127
135
  const inputStateSchema = object({
128
136
  attachments: v(i => ( i.attachments.map(IChatRequestVariableEntry.toExport)), equals),
129
137
  mode: v(i => i.mode, (a, b) => a.id === b.id),
130
- selectedModel: v(i => i.selectedModel, (a, b) => a?.identifier === b?.identifier),
138
+ selectedModel: v(
139
+ i => i.selectedModel,
140
+ (a, b) => a?.identifier === b?.identifier && equals(a?.modelConfiguration, b?.modelConfiguration)
141
+ ),
131
142
  inputText: v(i => i.inputText),
132
143
  selections: v(i => i.selections, equals),
133
144
  permissionLevel: v(i => i.permissionLevel),
@@ -30,6 +30,7 @@ import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/w
30
30
  import { ChatModel, normalizeSerializableChatData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
31
31
  import { ChatSessionOperationLog } from './chatSessionOperationLog.js';
32
32
  import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
33
+ import { stringifyEntryWithFallback } from './objectMutationLog.js';
33
34
 
34
35
  var ChatSessionStore_1;
35
36
  const maxPersistedSessions = 50;
@@ -98,7 +99,7 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
98
99
  }
99
100
  e.join(this.storeTask, {
100
101
  id: "join.chatSessionStore",
101
- label: ( localize(7976, "Saving chat history"))
102
+ label: ( localize(8582, "Saving chat history"))
102
103
  });
103
104
  }));
104
105
  }
@@ -243,7 +244,7 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
243
244
  }
244
245
  }
245
246
  try {
246
- const content = JSON.stringify(session, undefined, 2);
247
+ const content = stringifyEntryWithFallback(session);
247
248
  const storageLocation = this.getTransferredSessionStorageLocation(session.sessionResource);
248
249
  await this.fileService.writeFile(storageLocation, VSBuffer.fromString(content));
249
250
  } catch (e) {
@@ -356,14 +357,14 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
356
357
  this._didReportIssue = true;
357
358
  this.dialogService.prompt({
358
359
  custom: true,
359
- title: ( localize(7977, "Error saving chat session")),
360
+ title: ( localize(8583, "Error saving chat session")),
360
361
  message: ( localize(
361
- 7978,
362
+ 8584,
362
363
  "Error serializing chat session for storage. The session will be lost if the window is closed. Please report this issue to the VS Code team:\n\n{0}",
363
364
  e.stack || toErrorMessage(e)
364
365
  )),
365
366
  buttons: [{
366
- label: ( localize(7979, "Report Issue")),
367
+ label: ( localize(8585, "Report Issue")),
367
368
  run: () => this.openerService.open("https://github.com/microsoft/vscode/issues/new?template=bug_report.md")
368
369
  }]
369
370
  });
@@ -381,7 +382,10 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
381
382
  await this.fileService.writeFile(storageLocation.log, content);
382
383
  }
383
384
  } else {
384
- await this.fileService.writeFile(storageLocation.flat, VSBuffer.fromString(JSON.stringify(session)));
385
+ await this.fileService.writeFile(
386
+ storageLocation.flat,
387
+ VSBuffer.fromString(stringifyEntryWithFallback(session))
388
+ );
385
389
  }
386
390
  const newMetadata = await getSessionMetadata(session);
387
391
  index.entries[session.sessionId] = newMetadata;
@@ -724,7 +728,7 @@ function getSessionMetadataSync(session) {
724
728
  } : undefined;
725
729
  return {
726
730
  sessionId: session.sessionId,
727
- title: title || ( localize(7980, "New Chat")),
731
+ title: title || ( localize(8586, "New Chat")),
728
732
  lastMessageDate: session.lastMessageDate,
729
733
  timing: session.timing,
730
734
  initialLocation: session.initialLocation,
@@ -746,7 +750,7 @@ async function getSessionMetadata(session) {
746
750
  const lastMessageDate = session.requests.at(-1)?.timestamp ?? session.creationDate;
747
751
  return {
748
752
  sessionId: session.sessionId,
749
- title: session.customTitle || ( localize(7980, "New Chat")),
753
+ title: session.customTitle || ( localize(8586, "New Chat")),
750
754
  lastMessageDate,
751
755
  timing: {
752
756
  created: session.creationDate,
@@ -99,6 +99,11 @@ export declare const PERSIST_ENTRY_MAX_TOTAL_CHARS: number;
99
99
  * entire chat session.
100
100
  */
101
101
  export declare function stringifyEntryWithFallback(entry: unknown): string;
102
+ /**
103
+ * Deep-clones `value` through JSON with the same V8 max-string-length safety net
104
+ * as {@link stringifyEntryWithFallback}. Exported for testing only.
105
+ */
106
+ export declare function deepCloneWithFallback<T>(value: T): T;
102
107
  /**
103
108
  * Exported for testing only. Builds the stateful `JSON.stringify` replacer
104
109
  * used by {@link stringifyEntryWithFallback} on its retry path.