@codingame/monaco-vscode-chat-service-override 38.1.2 → 39.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 (662) hide show
  1. package/common.js +46 -10
  2. package/index.js +5 -1
  3. package/package.json +6 -5
  4. package/session.js +9 -2
  5. package/vscode/src/vs/editor/common/diff/documentDiffProvider.d.ts +6 -0
  6. package/vscode/src/vs/platform/agentHost/browser/agentHostClientProxy.d.ts +37 -0
  7. package/vscode/src/vs/platform/agentHost/browser/agentHostClientProxy.js +120 -0
  8. package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.d.ts +7 -0
  9. package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.js +52 -22
  10. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +1 -1
  11. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +2 -1
  12. package/vscode/src/vs/platform/agentHost/browser/nullWslRemoteAgentHostService.d.ts +1 -0
  13. package/vscode/src/vs/platform/agentHost/browser/nullWslRemoteAgentHostService.js +3 -0
  14. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +6 -6
  15. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +78 -41
  16. package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +2 -1
  17. package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +5 -1
  18. package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.d.ts +1 -8
  19. package/vscode/src/vs/platform/agentHost/common/agentHostCustomizationConfig.js +11 -19
  20. package/vscode/src/vs/platform/agentHost/common/agentHostMcpOAuthMetadataService.d.ts +16 -0
  21. package/vscode/src/vs/platform/agentHost/common/agentHostMcpOAuthMetadataService.js +85 -0
  22. package/vscode/src/vs/platform/agentHost/common/agentHostOperatingSystem.js +9 -0
  23. package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +169 -106
  24. package/vscode/src/vs/platform/agentHost/common/agentModelCatalogStatus.d.ts +4 -0
  25. package/vscode/src/vs/platform/agentHost/common/agentModelCatalogStatus.js +15 -0
  26. package/vscode/src/vs/platform/agentHost/common/agentSessionMessage.d.ts +22 -0
  27. package/vscode/src/vs/platform/agentHost/common/agentSessionMessage.js +17 -0
  28. package/vscode/src/vs/platform/agentHost/common/artifactToolsConfiguration.d.ts +23 -0
  29. package/vscode/src/vs/platform/agentHost/common/artifactToolsConfiguration.js +33 -2
  30. package/vscode/src/vs/platform/agentHost/common/chatMoveConfiguration.d.ts +14 -0
  31. package/vscode/src/vs/platform/agentHost/common/chatMoveConfiguration.js +23 -0
  32. package/vscode/src/vs/platform/agentHost/common/codexAccountPlan.js +1 -0
  33. package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.d.ts +3 -3
  34. package/vscode/src/vs/platform/agentHost/common/copilotConfigSlashCommands.js +8 -8
  35. package/vscode/src/vs/platform/agentHost/common/dynamicAutoTiersConfiguration.d.ts +12 -0
  36. package/vscode/src/vs/platform/agentHost/common/dynamicAutoTiersConfiguration.js +22 -0
  37. package/vscode/src/vs/platform/agentHost/common/imageGenerationConfiguration.d.ts +52 -0
  38. package/vscode/src/vs/platform/agentHost/common/imageGenerationConfiguration.js +67 -0
  39. package/vscode/src/vs/platform/agentHost/common/logRedaction.d.ts +45 -0
  40. package/vscode/src/vs/platform/agentHost/common/logRedaction.js +82 -0
  41. package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.d.ts +2 -0
  42. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentCompletionAttachmentMeta.d.ts +121 -0
  43. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentCompletionAttachmentMeta.js +88 -0
  44. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentPermissionResponseMeta.d.ts +1 -0
  45. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentPermissionResponseMeta.js +8 -2
  46. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentSandboxDiagnostics.d.ts +5 -0
  47. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentSandboxDiagnostics.js +5 -1
  48. package/vscode/src/vs/platform/agentHost/common/meta/vscode/customizationDiscoveryMeta.d.ts +12 -0
  49. package/vscode/src/vs/platform/agentHost/common/meta/vscode/customizationDiscoveryMeta.js +24 -0
  50. package/vscode/src/vs/platform/agentHost/common/permissionRules.d.ts +58 -0
  51. package/vscode/src/vs/platform/agentHost/common/permissionRules.js +109 -0
  52. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +4 -1
  53. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +41 -26
  54. package/vscode/src/vs/platform/agentHost/common/sessionDataService.d.ts +114 -8
  55. package/vscode/src/vs/platform/agentHost/common/sessionDataService.service.d.ts +7 -0
  56. package/vscode/src/vs/platform/agentHost/common/terminalPermissionRules.d.ts +21 -0
  57. package/vscode/src/vs/platform/agentHost/common/terminalPermissionRules.js +57 -0
  58. package/vscode/src/vs/platform/agentHost/common/titleGenerationConfiguration.js +3 -3
  59. package/vscode/src/vs/platform/agentHost/common/vscodeSandboxPaths.d.ts +2 -1
  60. package/vscode/src/vs/platform/agentHost/common/vscodeSandboxPaths.js +1 -1
  61. package/vscode/src/vs/platform/agentHost/common/workspacelessScratchDir.d.ts +8 -0
  62. package/vscode/src/vs/platform/agentHost/common/workspacelessScratchDir.js +11 -0
  63. package/vscode/src/vs/platform/agentHost/common/wslRemoteAgentHost.d.ts +1 -1
  64. package/vscode/src/vs/platform/agentHost/common/wslRemoteAgentHost.js +1 -1
  65. package/vscode/src/vs/platform/artifactIntegrations/common/artifactIntegrationRegistry.d.ts +28 -0
  66. package/vscode/src/vs/platform/artifactIntegrations/common/artifactIntegrationRegistry.js +170 -0
  67. package/vscode/src/vs/platform/github/common/content/content.d.ts +136 -0
  68. package/vscode/src/vs/platform/github/common/content/content.js +12 -0
  69. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +1 -1
  70. package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveEntryToRegex.d.ts +4 -0
  71. package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveEntryToRegex.js +41 -0
  72. package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveRuleKeyForm.d.ts +10 -0
  73. package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveRuleKeyForm.js +16 -0
  74. package/vscode/src/vs/platform/terminal/common/autoApprove/suggestAutoApproveRules.d.ts +5 -0
  75. package/vscode/src/vs/platform/terminal/common/autoApprove/suggestAutoApproveRules.js +64 -0
  76. package/vscode/src/vs/platform/url/common/urlApprovalPatterns.d.ts +36 -0
  77. package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileDiffView.js +7 -7
  78. package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileMultiDiffView.js +8 -8
  79. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +19 -7
  80. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +83 -46
  81. package/vscode/src/vs/sessions/contrib/chat/browser/branchChatSessionAction.js +2 -2
  82. package/vscode/src/vs/sessions/contrib/chat/browser/chat.contribution.js +312 -127
  83. package/vscode/src/vs/sessions/contrib/chat/browser/chatBackgroundTint.js +2 -2
  84. package/vscode/src/vs/sessions/contrib/chat/browser/getThemeColorsTool.d.ts +21 -0
  85. package/vscode/src/vs/sessions/contrib/chat/browser/getThemeColorsTool.js +138 -0
  86. package/vscode/src/vs/sessions/contrib/chat/browser/modelPicker.d.ts +68 -0
  87. package/vscode/src/vs/sessions/contrib/chat/browser/modelPicker.js +302 -0
  88. package/vscode/src/vs/sessions/contrib/chat/browser/newSessionAction.d.ts +3 -6
  89. package/vscode/src/vs/sessions/contrib/chat/browser/newSessionAction.js +42 -9
  90. package/vscode/src/vs/sessions/contrib/chat/browser/newSessionFolderQuickPickAction.js +4 -4
  91. package/vscode/src/vs/sessions/contrib/chat/browser/newSessionPickerTryout.js +1 -1
  92. package/vscode/src/vs/sessions/contrib/chat/browser/openSessionLinkOpener.contribution.d.ts +3 -2
  93. package/vscode/src/vs/sessions/contrib/chat/browser/openSessionLinkOpener.contribution.js +29 -18
  94. package/vscode/src/vs/sessions/contrib/chat/browser/promptsService.d.ts +2 -0
  95. package/vscode/src/vs/sessions/contrib/chat/browser/promptsService.js +11 -1
  96. package/vscode/src/vs/sessions/contrib/chat/browser/runScriptAction.js +91 -98
  97. package/vscode/src/vs/sessions/contrib/chat/browser/runScriptCustomTaskWidget.js +21 -21
  98. package/vscode/src/vs/sessions/contrib/chat/browser/sessionTurnChanges.js +5 -5
  99. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.d.ts +2 -0
  100. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.js +511 -211
  101. package/vscode/src/vs/sessions/contrib/chat/browser/sharedChatInputComposer.contribution.d.ts +9 -0
  102. package/vscode/src/vs/sessions/contrib/chat/browser/sharedChatInputComposer.contribution.js +146 -0
  103. package/vscode/src/vs/sessions/contrib/chat/browser/sideChatOrchestration.d.ts +13 -0
  104. package/vscode/src/vs/sessions/contrib/chat/browser/sideChatOrchestration.js +14 -0
  105. package/vscode/src/vs/sessions/contrib/chat/browser/sideChatProvider.contribution.d.ts +3 -8
  106. package/vscode/src/vs/sessions/contrib/chat/browser/sideChatProvider.contribution.js +10 -8
  107. package/vscode/src/vs/sessions/contrib/extensions/browser/agentsWindowExtensionAutoEnablementTelemetry.d.ts +30 -0
  108. package/vscode/src/vs/sessions/contrib/extensions/browser/agentsWindowExtensionAutoEnablementTelemetry.js +178 -0
  109. package/vscode/src/vs/sessions/contrib/extensions/browser/agentsWindowExtensionsAccessibilityHelp.d.ts +10 -0
  110. package/vscode/src/vs/sessions/contrib/extensions/browser/agentsWindowExtensionsAccessibilityHelp.js +61 -0
  111. package/vscode/src/vs/sessions/contrib/extensions/browser/agentsWindowExtensionsWidget.d.ts +100 -0
  112. package/vscode/src/vs/sessions/contrib/extensions/browser/agentsWindowExtensionsWidget.js +687 -0
  113. package/vscode/src/vs/sessions/contrib/extensions/browser/extensions.contribution.d.ts +1 -0
  114. package/vscode/src/vs/sessions/contrib/extensions/browser/extensions.contribution.js +88 -0
  115. package/vscode/src/vs/sessions/contrib/extensions/browser/media/agentsWindowExtensions.css +182 -0
  116. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostAgentPicker.d.ts +57 -6
  117. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostAgentPicker.js +94 -108
  118. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostPolicyContinuationPresenter.d.ts +12 -0
  119. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostPolicyContinuationPresenter.js +48 -0
  120. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettings.contribution.js +4 -4
  121. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettingsFileSystemProvider.js +4 -4
  122. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentHostSettingsShared.js +3 -1
  123. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettings.contribution.js +2 -2
  124. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettingsFileSystemProvider.js +7 -7
  125. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/localAgentHostSessionsProvider.d.ts +107 -0
  126. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/localAgentHostSessionsProvider.js +447 -0
  127. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/mobile/mobileChatPhoneInputPresenter.js +15 -10
  128. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openAgentHostStateFileAction.js +1 -1
  129. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openSubagentChat.d.ts +2 -1
  130. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/openSubagentChat.js +92 -34
  131. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/modePicker.js +12 -5
  132. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/entryDrivenProviderContribution.d.ts +1 -0
  133. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/entryDrivenProviderContribution.js +1 -0
  134. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilter.contribution.js +1 -1
  135. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/hostFilterActionViewItem.js +15 -15
  136. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/manageRemoteAgentHosts.js +9 -9
  137. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/managedReconnectAgentHostContribution.js +5 -0
  138. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.d.ts +1 -0
  139. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.js +39 -25
  140. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/mobileHostFilterActionViewItem.js +13 -13
  141. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHost.contribution.js +13 -13
  142. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.js +110 -145
  143. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/tunnelAgentHost.contribution.js +2 -4
  144. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/wslAgentHost.contribution.js +6 -2
  145. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/media/sessionWorktreeCleanupEditor.css +118 -90
  146. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupAccessibilityHelp.d.ts +1 -1
  147. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupAccessibilityHelp.js +48 -13
  148. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditor.d.ts +89 -10
  149. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditor.js +1375 -182
  150. package/vscode/src/vs/sessions/contrib/sessionInputBanners/browser/sessionWorktreeCleanupEditorInput.js +1 -1
  151. package/vscode/src/vs/sessions/contrib/sessions/browser/mobile/mobileOverlayContribution.js +3 -3
  152. package/vscode/src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.d.ts +3 -1
  153. package/vscode/src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.js +30 -3
  154. package/vscode/src/vs/sessions/skills/all_/SKILL.md.js +4 -3
  155. package/vscode/src/vs/sessions/skills/generate-chat-background/SKILL.md +34 -0
  156. package/vscode/src/vs/sessions/skills/troubleshoot/SKILL.md +1 -1
  157. package/vscode/src/vs/workbench/api/browser/mainThreadChatArtifactIntegrations.d.ts +30 -0
  158. package/vscode/src/vs/workbench/api/browser/mainThreadChatArtifactIntegrations.js +484 -0
  159. package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.d.ts +1 -0
  160. package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +7 -5
  161. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +1 -19
  162. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +4 -80
  163. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +6 -6
  164. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatPetJumpGameAccessibleView.d.ts +11 -0
  165. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatPetJumpGameAccessibleView.js +31 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +4 -4
  167. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +30 -23
  168. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +2 -1
  169. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +23 -12
  170. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +6 -1
  171. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +513 -171
  172. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  173. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
  174. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +133 -124
  175. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +9 -9
  176. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +6 -0
  177. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +83 -14
  178. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.d.ts +18 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +110 -9
  180. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +3 -3
  181. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.js +7 -7
  182. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  183. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  184. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  185. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +13 -13
  186. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +12 -12
  187. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  188. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +15 -15
  189. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  190. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
  191. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +32 -32
  192. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.js +6 -6
  193. package/vscode/src/vs/workbench/contrib/chat/browser/agentHostCompletionAction.d.ts +26 -0
  194. package/vscode/src/vs/workbench/contrib/chat/browser/agentHostCompletionAction.js +73 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginCommands.js +7 -7
  196. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +3 -1
  197. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +11 -5
  198. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  199. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +12 -12
  200. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +7 -2
  201. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +49 -36
  202. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.js +8 -0
  203. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.d.ts +10 -4
  204. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.js +235 -76
  205. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHost.contribution.js +4 -3
  206. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.d.ts +4 -0
  207. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.js +71 -26
  208. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputState.js +8 -8
  209. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatMoveEditors.d.ts +20 -0
  210. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatMoveEditors.js +46 -0
  211. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.d.ts +9 -8
  212. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.js +125 -53
  213. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationMarketplaceInstallProvider.d.ts +26 -10
  214. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationMarketplaceInstallProvider.js +493 -162
  215. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostEditReview.d.ts +187 -0
  216. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostEditReview.js +1000 -0
  217. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostImportConversationStore.d.ts +3 -7
  218. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalModelSupport.d.ts +97 -0
  219. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalModelSupport.js +407 -0
  220. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpAppToolsService.d.ts +52 -0
  221. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpAppToolsService.js +361 -0
  222. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerMigrationProvider.d.ts +3 -1
  223. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerMigrationProvider.js +72 -21
  224. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +1 -2
  225. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionMirror.d.ts +3 -0
  226. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionMirror.js +51 -0
  227. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
  228. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyContinuation.d.ts +45 -0
  229. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyContinuation.js +377 -0
  230. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyContinuationEditor.d.ts +10 -0
  231. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyContinuationEditor.js +34 -0
  232. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyUnavailableSession.d.ts +19 -0
  233. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyUnavailableSession.js +109 -0
  234. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.js +4 -4
  235. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRemoteByokNotification.js +3 -3
  236. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.d.ts +24 -2
  237. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.js +87 -51
  238. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostRootConfigForwarder.d.ts +3 -1
  239. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotification.d.ts +48 -1
  240. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotification.js +434 -36
  241. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotifications.js +18 -11
  242. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxPathGrant.d.ts +4 -0
  243. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxPathGrant.js +19 -0
  244. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.d.ts +134 -49
  245. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.js +1627 -491
  246. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.d.ts +60 -4
  247. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.js +572 -133
  248. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.d.ts +5 -1
  249. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.js +65 -15
  250. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.d.ts +15 -2
  251. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.js +114 -50
  252. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.d.ts +27 -10
  253. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.js +105 -49
  254. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.d.ts +8 -1
  255. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.js +3 -0
  256. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.js +6 -4
  257. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettings.contribution.js +2 -2
  258. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettingsFileSystemProvider.js +4 -4
  259. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutCompatibilityContribution.d.ts +9 -0
  260. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutCompatibilityContribution.js +54 -0
  261. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.d.ts +2 -5
  262. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.js +6 -17
  263. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSteeringMessageHandoff.d.ts +14 -0
  264. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSteeringMessageHandoff.js +138 -0
  265. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSubagentProgress.d.ts +1 -1
  266. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSubagentProgress.js +4 -2
  267. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostTerminalContribution.js +1 -1
  268. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +7 -2
  269. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +70 -26
  270. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.js +2 -2
  271. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.d.ts +13 -4
  272. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.js +96 -8
  273. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSubmitConfig.js +2 -2
  274. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuation.contribution.js +1 -1
  275. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/codexContinuationGuide.js +9 -9
  276. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModel.contribution.d.ts +1 -0
  277. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModel.contribution.js +60 -0
  278. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModelActions.d.ts +61 -0
  279. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModelActions.js +476 -0
  280. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModelReadyNotification.d.ts +70 -0
  281. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModelReadyNotification.js +422 -0
  282. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModelSetupProgress.d.ts +108 -0
  283. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/localModelSetupProgress.js +744 -0
  284. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.d.ts +5 -1
  285. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.js +36 -9
  286. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +21 -4
  287. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +9 -0
  288. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +112 -61
  289. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +1 -1
  290. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  291. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  292. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  293. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.d.ts +31 -1
  294. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +15 -4
  295. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +28 -26
  296. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  297. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  298. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.js +40 -24
  299. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +115 -61
  300. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +2 -2
  301. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +7 -2
  302. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotExtensionsService.d.ts +15 -0
  303. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotExtensionsService.js +63 -0
  304. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +10 -1
  305. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +39 -4
  306. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplace.contribution.js +28 -26
  307. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceInstallService.d.ts +4 -2
  308. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceInstallService.js +159 -86
  309. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.js +23 -11
  310. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.d.ts +20 -3
  311. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.js +281 -34
  312. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationsTelemetryService.js +6 -3
  313. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.d.ts +9 -9
  314. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.js +390 -112
  315. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerEnvironmentVariables.d.ts +56 -0
  316. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerEnvironmentVariables.js +298 -0
  317. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  318. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.d.ts +6 -3
  319. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.js +2 -2
  320. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatReferenceAttachmentWidget.contribution.js +2 -1
  321. package/vscode/src/vs/workbench/contrib/chat/browser/btwSlashCommand.d.ts +11 -0
  322. package/vscode/src/vs/workbench/contrib/chat/browser/btwSlashCommand.js +84 -0
  323. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +1 -0
  324. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +648 -652
  325. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +14 -7
  326. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +74 -57
  327. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
  328. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +124 -124
  329. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +72 -72
  330. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  331. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +3 -1
  332. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +8 -2
  333. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  334. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.d.ts +3 -6
  335. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.js +6 -5
  336. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
  337. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  338. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  339. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  340. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
  341. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +12 -12
  342. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  343. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
  344. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  345. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  346. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +35 -35
  347. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  348. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.d.ts +3 -3
  349. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +60 -50
  350. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +2 -0
  351. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +88 -41
  352. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +2 -1
  353. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +43 -32
  354. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +13 -21
  355. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.d.ts +3 -1
  356. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +18 -28
  357. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
  358. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +6 -0
  359. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +9 -3
  360. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +2 -2
  361. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +2 -1
  362. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  363. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +20 -7
  364. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +2 -2
  365. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +4 -3
  366. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +8 -0
  367. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +4 -0
  368. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  369. package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.d.ts +3 -1
  370. package/vscode/src/vs/workbench/contrib/chat/browser/chatGoalSummaryService.js +21 -31
  371. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +15 -6
  372. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +35 -21
  373. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -8
  374. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
  375. package/vscode/src/vs/workbench/contrib/chat/browser/chatNetworkConfiguration.js +6 -4
  376. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
  377. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +31 -31
  378. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.js +15 -15
  379. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.js +54 -24
  380. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.js +1 -1
  381. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.js +34 -34
  382. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetColorsWidget.js +13 -13
  383. package/vscode/src/vs/workbench/contrib/chat/browser/chatProgressConfiguration.d.ts +69 -2
  384. package/vscode/src/vs/workbench/contrib/chat/browser/chatProgressConfiguration.js +164 -22
  385. package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.js +1 -1
  386. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +25 -25
  387. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  388. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionCommit.d.ts +9 -0
  389. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionCommit.js +85 -0
  390. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +2 -2
  391. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +20 -20
  392. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +11 -11
  393. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  394. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +0 -6
  395. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +25 -58
  396. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +17 -17
  397. package/vscode/src/vs/workbench/contrib/chat/browser/chatSideChatProvider.d.ts +27 -0
  398. package/vscode/src/vs/workbench/contrib/chat/browser/chatSideChatProvider.js +114 -0
  399. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +78 -24
  400. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +10 -10
  401. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusPromo.d.ts +1 -0
  402. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusPromo.js +13 -5
  403. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/codexStatusEntry.js +4 -4
  404. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +20 -20
  405. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +22 -5
  406. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +52 -2
  407. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +7 -7
  408. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  409. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +5 -5
  410. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
  411. package/vscode/src/vs/workbench/contrib/chat/browser/editorChatUsage.contribution.js +1 -1
  412. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  413. package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatHarnessSwitchFeedbackSurveyService.js +10 -10
  414. package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.d.ts +5 -55
  415. package/vscode/src/vs/workbench/contrib/chat/browser/githubRepoFetcher.js +40 -220
  416. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
  417. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatPetAchievements.css +81 -9
  418. package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/chatInputSpotlightTour.d.ts +38 -0
  419. package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/chatInputSpotlightTour.js +248 -0
  420. package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/chatOnboardingEligibility.d.ts +20 -0
  421. package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/chatOnboardingEligibility.js +54 -0
  422. package/vscode/src/vs/workbench/contrib/chat/browser/onboarding/modelPickerTryout.contribution.js +7 -7
  423. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.js +6 -6
  424. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +6 -23
  425. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +128 -118
  426. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitHubAuthentication.d.ts +3 -0
  427. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitHubAuthentication.js +4 -4
  428. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +1 -1
  429. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +39 -43
  430. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +20 -17
  431. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +26 -42
  432. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +216 -165
  433. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.d.ts +2 -1
  434. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +7 -4
  435. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  436. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.d.ts +2 -1
  437. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +12 -9
  438. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +16 -2
  439. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +2 -2
  440. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  441. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  442. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +2 -1
  443. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +14 -11
  444. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  445. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +2 -1
  446. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +7 -4
  447. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimeline.contribution.js +5 -5
  448. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.js +4 -4
  449. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.js +8 -5
  450. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.d.ts +4 -1
  451. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.js +36 -30
  452. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.js +5 -2
  453. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.js +3 -3
  454. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +20 -20
  455. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxRepositoryPicker.d.ts +16 -0
  456. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxRepositoryPicker.js +106 -0
  457. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.d.ts +19 -2
  458. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.js +165 -31
  459. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.d.ts +57 -6
  460. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.js +511 -36
  461. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentActions.js +16 -13
  462. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHost.contribution.js +137 -12
  463. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostAuthenticationResolver.d.ts +24 -0
  464. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostAuthenticationResolver.js +136 -0
  465. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostChatContribution.d.ts +8 -1
  466. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostChatContribution.js +155 -39
  467. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostCustomizationHarness.d.ts +4 -1
  468. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostCustomizationHarness.js +16 -5
  469. package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +32 -13
  470. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
  471. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +1 -0
  472. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +78 -48
  473. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +9 -9
  474. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +2 -2
  475. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  476. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.js +15 -15
  477. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPetWidgetService.d.ts +4 -0
  478. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPetWidgetService.js +11 -0
  479. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +3 -1
  480. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +9 -2
  481. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -3
  482. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +11 -11
  483. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +4 -4
  484. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.d.ts +47 -1
  485. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.js +139 -24
  486. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +14 -0
  487. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +89 -28
  488. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +18 -11
  489. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +11 -4
  490. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputPlaceholderDecoration.d.ts +11 -0
  491. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputPlaceholderDecoration.js +29 -0
  492. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputSessionLinkProvider.d.ts +12 -0
  493. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputSessionLinkProvider.js +82 -0
  494. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +2 -1
  495. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +17 -1
  496. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +134 -16
  497. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/media/chatEditor.css +26 -0
  498. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +13 -2
  499. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +172 -131
  500. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  501. package/vscode/src/vs/workbench/contrib/chat/common/chatOpenDiagnosticsService.d.ts +23 -0
  502. package/vscode/src/vs/workbench/contrib/chat/common/chatOpenDiagnosticsService.js +103 -0
  503. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +59 -1
  504. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +481 -271
  505. package/vscode/src/vs/workbench/contrib/chat/common/chatService/remoteChatSessionRestorer.d.ts +148 -0
  506. package/vscode/src/vs/workbench/contrib/chat/common/chatService/remoteChatSessionRestorer.js +575 -0
  507. package/vscode/src/vs/workbench/contrib/chat/common/chatSideChatService.d.ts +13 -17
  508. package/vscode/src/vs/workbench/contrib/chat/common/chatSideChatService.js +2 -2
  509. package/vscode/src/vs/workbench/contrib/chat/common/chatThinkingTitleService.d.ts +34 -0
  510. package/vscode/src/vs/workbench/contrib/chat/common/chatThinkingTitleService.js +176 -0
  511. package/vscode/src/vs/workbench/contrib/chat/common/chatUtilityModelService.d.ts +38 -0
  512. package/vscode/src/vs/workbench/contrib/chat/common/chatUtilityModelService.js +190 -0
  513. package/vscode/src/vs/workbench/contrib/chat/common/customizationMarketplaceInstallService.d.ts +2 -0
  514. package/vscode/src/vs/workbench/contrib/chat/common/customizationMarketplaceInstallService.js +5 -1
  515. package/vscode/src/vs/workbench/contrib/chat/common/editing/chatSessionReviewPreferences.d.ts +12 -0
  516. package/vscode/src/vs/workbench/contrib/chat/common/editing/chatSessionReviewPreferences.js +25 -0
  517. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +2 -0
  518. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +7 -1
  519. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +17 -18
  520. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +27 -6
  521. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +21 -2
  522. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +2 -1
  523. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +26 -13
  524. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.d.ts +2 -2
  525. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +80 -52
  526. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +13 -13
  527. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.d.ts +6 -1
  528. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +57 -4
  529. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +3 -1
  530. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +27 -15
  531. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.d.ts +5 -1
  532. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +27 -11
  533. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +10 -1
  534. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +383 -51
  535. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +10 -1
  536. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +211 -32
  537. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptModelResolver.d.ts +19 -0
  538. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptModelResolver.js +77 -0
  539. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptSkillResolver.d.ts +22 -0
  540. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptSkillResolver.js +87 -0
  541. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptToolResolver.d.ts +18 -0
  542. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptToolResolver.js +53 -0
  543. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +26 -6
  544. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +816 -195
  545. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationTelemetryService.d.ts +10 -11
  546. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationTelemetryService.js +135 -95
  547. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +1 -0
  548. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +10 -10
  549. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +7 -7
  550. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +1 -10
  551. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +13 -98
  552. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +3 -3
  553. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +4 -4
  554. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +8 -0
  555. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +70 -73
  556. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  557. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
  558. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.d.ts +15 -19
  559. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +122 -202
  560. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +1 -1
  561. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselTypes.d.ts +1 -0
  562. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/media/imageCarousel.css +19 -50
  563. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
  564. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  565. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.d.ts +1 -1
  566. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.js +3 -2
  567. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
  568. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  569. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  570. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  571. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  572. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  573. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  574. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +10 -10
  575. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  576. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  577. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +1 -12
  578. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +2 -43
  579. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
  580. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +6 -0
  581. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +14 -14
  582. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +2 -2
  583. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +10 -0
  584. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +15 -1
  585. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +0 -2
  586. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +42 -96
  587. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +1 -0
  588. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +2 -1
  589. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +5 -4
  590. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  591. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +22 -13
  592. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  593. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  594. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  595. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  596. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  597. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +3 -3
  598. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +4 -4
  599. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +76 -75
  600. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +10 -10
  601. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  602. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  603. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  604. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  605. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +4 -4
  606. package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.js +3 -3
  607. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +20 -3
  608. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +56 -14
  609. package/vscode/src/vs/workbench/services/agentHost/browser/localModelService.d.ts +52 -0
  610. package/vscode/src/vs/workbench/services/agentHost/browser/localModelService.js +294 -0
  611. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentCustomizationMeta.d.ts +0 -27
  612. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentCustomizationMeta.js +0 -14
  613. package/vscode/src/vs/platform/agentHost/common/meta/vscode/clientPluginCustomizationMeta.d.ts +0 -17
  614. package/vscode/src/vs/platform/agentHost/common/meta/vscode/clientPluginCustomizationMeta.js +0 -22
  615. package/vscode/src/vs/platform/agentHost/common/semanticSearchConstants.d.ts +0 -8
  616. package/vscode/src/vs/platform/agentHost/common/semanticSearchConstants.js +0 -8
  617. package/vscode/src/vs/platform/browserView/common/browserChatToolReferenceNames.d.ts +0 -23
  618. package/vscode/src/vs/platform/browserView/common/browserChatToolReferenceNames.js +0 -17
  619. package/vscode/src/vs/platform/customizationMarketplace/common/mcpGalleryMarketplaceProvider.d.ts +0 -22
  620. package/vscode/src/vs/platform/customizationMarketplace/common/mcpGalleryMarketplaceProvider.js +0 -158
  621. package/vscode/src/vs/sessions/contrib/chat/browser/btwSlashCommand.contribution.d.ts +0 -15
  622. package/vscode/src/vs/sessions/contrib/chat/browser/btwSlashCommand.contribution.js +0 -106
  623. package/vscode/src/vs/sessions/contrib/chat/browser/unifiedWorkspacePickerConfiguration.d.ts +0 -3
  624. package/vscode/src/vs/sessions/contrib/chat/browser/unifiedWorkspacePickerConfiguration.js +0 -17
  625. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.d.ts +0 -24
  626. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.js +0 -55
  627. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +0 -65
  628. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +0 -441
  629. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAllowSignedOutWhenUsableContribution.d.ts +0 -23
  630. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAllowSignedOutWhenUsableContribution.js +0 -46
  631. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +0 -97
  632. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +0 -241
  633. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.d.ts +0 -141
  634. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.js +0 -731
  635. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.d.ts +0 -46
  636. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.js +0 -313
  637. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.d.ts +0 -6
  638. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js +0 -16
  639. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.d.ts +0 -36
  640. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.js +0 -58
  641. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +0 -140
  642. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +0 -358
  643. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotConnectorsService.d.ts +0 -139
  644. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotConnectorsService.js +0 -944
  645. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceWorkbenchService.d.ts +0 -50
  646. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMarketplaceWorkbenchService.js +0 -213
  647. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/githubMcpRegistryIcons.d.ts +0 -4
  648. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/githubMcpRegistryIcons.js +0 -605
  649. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.d.ts +0 -4
  650. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.js +0 -15
  651. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostConnectionCustomization.d.ts +0 -43
  652. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostConnectionCustomization.js +0 -26
  653. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +0 -32
  654. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +0 -261
  655. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +0 -59
  656. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +0 -72
  657. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +0 -5
  658. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +0 -12
  659. package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.d.ts +0 -35
  660. package/vscode/src/vs/workbench/contrib/chat/common/workingDirectory.js +0 -36
  661. package/vscode/src/vs/workbench/services/agentHost/common/editorRemoteAgentHostTransport.d.ts +0 -47
  662. package/vscode/src/vs/workbench/services/agentHost/common/editorRemoteAgentHostTransport.js +0 -362
@@ -1,28 +1,32 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { raceTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
3
+ import { disposableTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
4
+ import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
4
5
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
5
- import { CancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
6
+ import { CancellationError, getErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
6
7
  import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
7
8
  import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
8
9
  import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
9
10
  import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
11
+ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
10
12
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
11
13
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
12
14
  import { AMBIENT_AGENT_HOST_AUTHORITY } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostConnectionsService';
13
15
  import { IAgentHostConnectionsService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostConnectionsService.service';
14
16
  import { IAgentHostService } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentService.service';
15
- import { CustomizationMarketplaceRecoveryGroup, CustomizationMarketplaceMediaType } from '@codingame/monaco-vscode-api/vscode/vs/platform/customizationMarketplace/common/customizationMarketplaceService';
17
+ import { CustomizationMarketplaceMediaType, CustomizationMarketplaceRecoveryGroup } from '@codingame/monaco-vscode-api/vscode/vs/platform/customizationMarketplace/common/customizationMarketplaceService';
16
18
  import { CustomizationMarketplaceSources } from '@codingame/monaco-vscode-api/vscode/vs/platform/customizationMarketplace/common/customizationMarketplaceSources';
17
19
  import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
18
20
  import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
19
- import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
20
21
  import { IAgentHostCustomizationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.service';
21
- import { getGitHubMcpRegistryIcon } from '../../aiCustomization/githubMcpRegistryIcons.js';
22
+ import { getGitHubMcpRegistryIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/githubMcpRegistryIcons';
23
+ import { ContributionEnablementState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/enablement';
24
+ import { setAgentPluginEnablement } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService';
25
+ import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
26
+ import { waitForState } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/utilsCancellation';
22
27
 
23
28
  const maxCachedReceiptSessions = 50;
24
29
  const maxCatalogAssociations = 1000;
25
- const pluginInventoryUpdateTimeoutMs = 30_000;
26
30
  const githubLoginPattern = /^[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}$/;
27
31
  let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizationMarketplaceInstallProvider extends Disposable {
28
32
  constructor(
@@ -31,9 +35,9 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
31
35
  agentHostService,
32
36
  agentHostConnectionsService,
33
37
  agentHostCustomizationService,
34
- agentPluginService,
35
38
  dialogService,
36
- logService
39
+ logService,
40
+ agentPluginService
37
41
  ) {
38
42
  super();
39
43
  this.providerId = providerId;
@@ -41,23 +45,33 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
41
45
  this.agentHostService = agentHostService;
42
46
  this.agentHostConnectionsService = agentHostConnectionsService;
43
47
  this.agentHostCustomizationService = agentHostCustomizationService;
44
- this.agentPluginService = agentPluginService;
45
48
  this.dialogService = dialogService;
46
49
  this.logService = logService;
50
+ this.agentPluginService = agentPluginService;
47
51
  this._onDidChange = this._register(( new Emitter()));
52
+ this._onDidChangeMarketplaces = this._register(( new Emitter()));
48
53
  this.receiptInstallations = ( new ResourceMap());
49
54
  this.unavailableCatalogItems = ( new Map());
50
55
  this.catalogAssociations = ( new Map());
51
- this.knownInstallationIds = ( new Set());
52
- this.catalogAuthenticationRequired = false;
56
+ this.pendingCatalogAssociations = [];
57
+ this.catalogAuthenticationRequired = ( new Set());
53
58
  this.onDidChange = Event.any(
54
59
  this._onDidChange.event,
55
60
  this.agentHostCustomizationService.onDidChangeCustomizations,
56
- Event.fromObservableLight(this.agentPluginService.plugins),
61
+ this.agentHostService.onAgentHostStart,
62
+ Event.map(this.agentHostService.onAgentHostExit, () => undefined),
63
+ Event.fromObservableLight(this.agentPluginService.plugins)
64
+ );
65
+ this.onDidChangeMarketplaces = Event.any(
66
+ this._onDidChangeMarketplaces.event,
57
67
  this.agentHostService.onAgentHostStart,
58
68
  Event.map(this.agentHostService.onAgentHostExit, () => undefined)
59
69
  );
60
70
  }
71
+ fireMarketplacesChanged() {
72
+ this._onDidChangeMarketplaces.fire();
73
+ this._onDidChange.fire();
74
+ }
61
75
  getInstallUnavailableMessage(resource) {
62
76
  const installation = resource.installation;
63
77
  if (installation?.kind === "providerCatalog") {
@@ -65,30 +79,153 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
65
79
  }
66
80
  if (installation?.kind === "plugin") {
67
81
  return localize(
68
- 9643,
82
+ 11213,
69
83
  "The SDK cannot yet install a catalog plugin at its exact pinned revision."
70
84
  );
71
85
  }
72
86
  if (installation?.kind === "providerPlugin" && !installation.marketplaceSource) {
73
- return localize(9644, "The SDK plugin marketplace source is unavailable.");
87
+ return localize(11214, "The SDK plugin marketplace source is unavailable.");
74
88
  }
75
89
  if (installation?.kind === "configuredPlugin" && (!installation.name || !installation.marketplace || !installation.marketplaceId || !installation.marketplaceSource)) {
76
- return localize(9645, "The SDK plugin installation identity is unavailable.");
90
+ return localize(11215, "The SDK plugin installation identity is unavailable.");
91
+ }
92
+ if (installation?.kind === "mcpGallery" && !installation.cardUrl) {
93
+ return localize(
94
+ 11216,
95
+ "This MCP Gallery entry does not provide the server card URL required for Copilot installation."
96
+ );
77
97
  }
78
98
  if ((installation?.kind === "skill" || installation?.kind === "mcp") && !resource.externalUrl && !resource.url) {
79
99
  return localize(
80
- 9646,
100
+ 11217,
81
101
  "This customization does not provide the SDK catalog identity required for installation."
82
102
  );
83
103
  }
84
104
  return undefined;
85
105
  }
106
+ async installFromSource(sessionResource, source) {
107
+ if (!this.agentHostService.installPlugin) {
108
+ throw ( new Error(( localize(
109
+ 11218,
110
+ "The selected agent does not support installing plugins from source."
111
+ ))));
112
+ }
113
+ await this.agentHostService.installPlugin(this.providerId, {
114
+ source
115
+ }, this.getBackendSession(sessionResource), this.agentHostCustomizationService.getBackendChatResource?.(sessionResource));
116
+ this._onDidChange.fire();
117
+ }
118
+ async addGlobal(name, config) {
119
+ if (!this.agentHostService.addMcpServerConfiguration) {
120
+ throw ( new Error(( localize(11219, "The selected agent does not support global MCP configuration."))));
121
+ }
122
+ await this.agentHostService.addMcpServerConfiguration(this.providerId, name, config);
123
+ }
124
+ async list(sessionResource) {
125
+ if (!this.agentHostService.listPluginMarketplaces) {
126
+ throw ( new Error(( localize(11220, "The selected agent does not support marketplace management."))));
127
+ }
128
+ return this.agentHostService.listPluginMarketplaces(
129
+ this.providerId,
130
+ this.getBackendSession(sessionResource),
131
+ this.agentHostCustomizationService.getBackendChatResource?.(sessionResource)
132
+ );
133
+ }
134
+ async add(sessionResource, source) {
135
+ if (!this.agentHostService.addPluginMarketplace) {
136
+ throw ( new Error(( localize(11221, "The selected agent does not support adding marketplaces."))));
137
+ }
138
+ const result = await this.agentHostService.addPluginMarketplace(
139
+ this.providerId,
140
+ this.getBackendSession(sessionResource),
141
+ source,
142
+ this.agentHostCustomizationService.getBackendChatResource?.(sessionResource)
143
+ );
144
+ this.fireMarketplacesChanged();
145
+ return result;
146
+ }
147
+ async queryMarketplace(sessionResource, marketplace, options, token) {
148
+ this.throwIfCancelled(token);
149
+ if (options.mediaType && options.mediaType !== CustomizationMarketplaceMediaType.CopilotPlugin) {
150
+ return {
151
+ items: [],
152
+ total: 0
153
+ };
154
+ }
155
+ if (!this.agentHostService.browsePluginMarketplace) {
156
+ throw ( new Error(( localize(11222, "The selected agent does not support browsing marketplaces."))));
157
+ }
158
+ const plugins = await this.agentHostService.browsePluginMarketplace(
159
+ this.providerId,
160
+ this.getBackendSession(sessionResource),
161
+ marketplace.name,
162
+ this.agentHostCustomizationService.getBackendChatResource?.(sessionResource)
163
+ );
164
+ this.throwIfCancelled(token);
165
+ const query = options.query?.trim().toLowerCase();
166
+ const matching = query ? plugins.filter(
167
+ plugin => plugin.name.toLowerCase().includes(query) || plugin.description?.toLowerCase().includes(query)
168
+ ) : plugins;
169
+ const offset = Number(options.cursor ?? 0);
170
+ const start = Number.isSafeInteger(offset) && offset >= 0 ? offset : 0;
171
+ const pageSize = options.pageSize ?? matching.length;
172
+ const end = Math.min(start + pageSize, matching.length);
173
+ return {
174
+ items: matching.slice(start, end).map(plugin => ({
175
+ identifier: JSON.stringify([marketplace.source, marketplace.name, plugin.name]),
176
+ displayName: plugin.name,
177
+ description: plugin.description ?? "",
178
+ mediaType: CustomizationMarketplaceMediaType.CopilotPlugin,
179
+ tags: [],
180
+ capabilities: [],
181
+ representativeQueries: [],
182
+ installation: {
183
+ kind: "providerPlugin",
184
+ name: plugin.name,
185
+ marketplace: marketplace.name,
186
+ marketplaceSource: marketplace.source,
187
+ providerManaged: true
188
+ }
189
+ })),
190
+ total: matching.length,
191
+ nextCursor: end < matching.length ? String(end) : undefined
192
+ };
193
+ }
194
+ async remove(sessionResource, name, force) {
195
+ if (!this.agentHostService.removePluginMarketplace) {
196
+ throw ( new Error(( localize(11223, "The selected agent does not support removing marketplaces."))));
197
+ }
198
+ const result = await this.agentHostService.removePluginMarketplace(
199
+ this.providerId,
200
+ this.getBackendSession(sessionResource),
201
+ name,
202
+ force,
203
+ this.agentHostCustomizationService.getBackendChatResource?.(sessionResource)
204
+ );
205
+ if (result.removed) {
206
+ this.fireMarketplacesChanged();
207
+ }
208
+ return result;
209
+ }
210
+ async refresh(sessionResource, name) {
211
+ if (!this.agentHostService.refreshPluginMarketplaces) {
212
+ throw ( new Error(( localize(11224, "The selected agent does not support refreshing marketplaces."))));
213
+ }
214
+ const result = await this.agentHostService.refreshPluginMarketplaces(
215
+ this.providerId,
216
+ this.getBackendSession(sessionResource),
217
+ name,
218
+ this.agentHostCustomizationService.getBackendChatResource?.(sessionResource)
219
+ );
220
+ this.fireMarketplacesChanged();
221
+ return result;
222
+ }
86
223
  getRecoveryAction() {
87
- if (!this.catalogAuthenticationRequired) {
224
+ if (this.catalogAuthenticationRequired.size === 0) {
88
225
  return undefined;
89
226
  }
90
227
  return {
91
- label: ( localize(9647, "Sign In")),
228
+ label: ( localize(11225, "Sign In")),
92
229
  kind: "signIn",
93
230
  groupId: CustomizationMarketplaceRecoveryGroup.GitHubDefaultAccount,
94
231
  run: async token => {
@@ -96,11 +233,21 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
96
233
  throw ( new CancellationError());
97
234
  }
98
235
  this.throwIfCancelled(token);
99
- this.catalogAuthenticationRequired = false;
236
+ this.catalogAuthenticationRequired.clear();
100
237
  }
101
238
  };
102
239
  }
103
240
  async query(sessionResource, options, token) {
241
+ return this.queryCatalog(sessionResource, options, token);
242
+ }
243
+ async getFeed(sessionResource, feedId, token) {
244
+ const page = await this.queryCatalog(sessionResource, {}, token, feedId);
245
+ if (!page) {
246
+ throw ( new Error(( localize(11226, "The selected agent cannot retrieve curated customizations."))));
247
+ }
248
+ return page;
249
+ }
250
+ async queryCatalog(sessionResource, options, token, feedId) {
104
251
  this.throwIfCancelled(token);
105
252
  const query = options.query?.trim() ?? "";
106
253
  if (!this.agentHostService.searchCustomizationMarketplace) {
@@ -116,25 +263,33 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
116
263
  query,
117
264
  mediaType: options.mediaType,
118
265
  limit: options.pageSize ?? 30,
119
- cursor: options.cursor
266
+ cursor: options.cursor,
267
+ ...(feedId !== undefined ? {
268
+ feedId
269
+ } : {})
120
270
  });
121
271
  const result = await search();
122
272
  this.throwIfCancelled(token);
273
+ const authenticationKey = feedId ?? "";
123
274
  if (result.kind === "unavailable") {
124
- this.catalogAuthenticationRequired = result.reason === "authentication";
275
+ if (result.reason === "authentication") {
276
+ this.catalogAuthenticationRequired.add(authenticationKey);
277
+ } else {
278
+ this.catalogAuthenticationRequired.delete(authenticationKey);
279
+ }
125
280
  switch (result.reason) {
126
281
  case "authentication":
127
- throw ( new Error(( localize(9648, "Sign in to Copilot to search the GitHub Feed."))));
282
+ throw ( new Error(( localize(11227, "Sign in to Copilot to search the GitHub Feed."))));
128
283
  case "session":
129
284
  throw ( new Error(( localize(
130
- 9649,
285
+ 11228,
131
286
  "The selected Copilot session is unavailable for GitHub Feed search."
132
287
  ))));
133
288
  case "unsupported":
134
- throw ( new Error(( localize(9650, "The active Copilot runtime does not support GitHub Feed search."))));
289
+ throw ( new Error(( localize(11229, "The active Copilot runtime does not support GitHub Feed search."))));
135
290
  }
136
291
  }
137
- this.catalogAuthenticationRequired = false;
292
+ this.catalogAuthenticationRequired.delete(authenticationKey);
138
293
  return {
139
294
  items: result.items.map(item => {
140
295
  if (item.unavailableMessage) {
@@ -154,17 +309,24 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
154
309
  marketplaceSource: item.marketplaceSource
155
310
  } : undefined;
156
311
  return {
157
- identifier: providerPlugin ? JSON.stringify([
312
+ identifier: item.identifier ?? (providerPlugin ? JSON.stringify([
158
313
  providerPlugin.marketplaceSource,
159
314
  providerPlugin.marketplace,
160
315
  providerPlugin.name
161
- ]) : item.itemUrl ?? item.selectionId,
316
+ ]) : item.itemUrl ?? item.selectionId),
162
317
  displayName: item.displayName,
163
318
  description: item.description ?? "",
164
319
  mediaType: getCatalogMediaType(item.kind),
165
- tags: [],
320
+ tags: item.categories ?? [],
321
+ ...(item.compatibilityTags?.length ? {
322
+ compatibilityTags: item.compatibilityTags
323
+ } : {}),
166
324
  capabilities: [],
167
325
  representativeQueries: [],
326
+ connectorIds: item.connectorIds,
327
+ ...(item.installCount !== undefined ? {
328
+ installCount: item.installCount
329
+ } : {}),
168
330
  version: item.version,
169
331
  repository: item.repository ? ( URI.from({
170
332
  scheme: Schemas.https,
@@ -173,12 +335,22 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
173
335
  })) : undefined,
174
336
  publisher: item.publisher,
175
337
  publisherUrl: publisher?.profile,
176
- icon: publisher?.avatar ?? registryIcon,
338
+ icon: item.iconUrl ? ( URI.parse(item.iconUrl)) : publisher?.avatar ?? registryIcon,
177
339
  installation: providerPlugin ?? {
178
340
  kind: "providerCatalog",
179
341
  resourceKind: item.kind,
180
342
  selectionId: item.selectionId,
181
- itemUrl: item.itemUrl
343
+ ...(item.catalogIdentity ? {
344
+ catalogIdentity: item.catalogIdentity
345
+ } : {}),
346
+ itemUrl: item.itemUrl,
347
+ installable: item.installable,
348
+ ...(item.repository ? {
349
+ repository: item.repository
350
+ } : {}),
351
+ ...(item.path ? {
352
+ path: item.path
353
+ } : {})
182
354
  }
183
355
  };
184
356
  }),
@@ -187,7 +359,7 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
187
359
  }
188
360
  async getInstallations(sessionResource, token) {
189
361
  this.throwIfCancelled(token);
190
- const pluginInstallations = this.getPluginInstallations();
362
+ const pluginInstallations = await this.getPluginInstallations(sessionResource, token);
191
363
  if (!this.agentHostService.listCustomizationInstallations) {
192
364
  return pluginInstallations;
193
365
  }
@@ -211,33 +383,21 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
211
383
  "[AgentHostCustomizationMarketplace] Unable to load session-bound SDK installation receipts",
212
384
  error
213
385
  );
214
- return [
215
- ...(this.receiptInstallations.get(backendSession) ?? []),
216
- ...pluginInstallations
217
- ];
386
+ const receiptInstallations = this.receiptInstallations.get(backendSession) ?? [];
387
+ return [...receiptInstallations, ...pluginInstallations];
218
388
  }
219
389
  this.throwIfCancelled(token);
220
- const rawReceiptInstallations = installations.map(installation => this.toRecordedInstallation(sessionResource, installation));
221
- this.captureCatalogAssociation(rawReceiptInstallations);
222
390
  const receiptInstallations = installations.map(installation => this.toRecordedInstallation(sessionResource, installation));
223
391
  this.receiptInstallations.set(backendSession, receiptInstallations);
224
392
  while (this.receiptInstallations.size > maxCachedReceiptSessions) {
225
393
  this.receiptInstallations.delete(( this.receiptInstallations.keys()).next().value);
226
394
  }
227
- const result = [...receiptInstallations, ...pluginInstallations];
228
- this.knownInstallationIds = ( new Set(result.map(installation => installation.installationId).filter(id => !!id)));
229
- return result;
395
+ return [...receiptInstallations, ...pluginInstallations];
230
396
  }
231
397
  async install(sessionResource, resource, token) {
232
398
  this.throwIfCancelled(token);
233
399
  const installation = resource.installation;
234
400
  if (installation?.kind === "providerCatalog") {
235
- if (installation.resourceKind === "plugin") {
236
- throw ( new Error(this.getInstallUnavailableMessage(resource) ?? ( localize(
237
- 9643,
238
- "The SDK cannot yet install a catalog plugin at its exact pinned revision."
239
- ))));
240
- }
241
401
  if (!(await this.resolveAuthentication())) {
242
402
  throw ( new CancellationError());
243
403
  }
@@ -250,46 +410,37 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
250
410
  version: resource.version,
251
411
  itemUrl: installation.itemUrl,
252
412
  selectionId: installation.selectionId,
413
+ ...(installation.catalogIdentity ? {
414
+ catalogIdentity: installation.catalogIdentity
415
+ } : {}),
253
416
  installation: {
254
417
  kind: installation.resourceKind
255
418
  }
256
419
  }, token);
257
- await this.confirmAndApply(review, token);
258
- this.pendingCatalogInstall = {
259
- resource,
260
- previousIds: ( new Set(this.knownInstallationIds))
261
- };
420
+ await this.confirmAndApplyCatalogResource(review, resource, token);
262
421
  return;
263
422
  }
264
423
  if (installation?.kind === "configuredPlugin") {
265
424
  if (!installation.name || !installation.marketplace || !installation.marketplaceId || !installation.marketplaceSource) {
266
- throw ( new Error(( localize(9645, "The SDK plugin installation identity is unavailable."))));
425
+ throw ( new Error(( localize(11215, "The SDK plugin installation identity is unavailable."))));
267
426
  }
268
427
  if (!this.agentHostService.installPlugin) {
269
- throw ( new Error(( localize(9651, "The selected agent does not support SDK plugin installation."))));
428
+ throw ( new Error(( localize(11230, "The selected agent does not support SDK plugin installation."))));
270
429
  }
271
430
  await this.agentHostService.installPlugin(this.providerId, {
272
431
  source: `${installation.name}@${installation.marketplace}`
273
- });
274
- await this.waitForPluginInventory({
275
- name: installation.name,
276
- marketplace: installation.marketplace
277
- }, true, token);
432
+ }, this.getBackendSession(sessionResource), this.agentHostCustomizationService.getBackendChatResource?.(sessionResource));
278
433
  this.throwIfCancelled(token);
279
434
  this._onDidChange.fire();
280
435
  return;
281
436
  }
282
437
  if (installation?.kind === "providerPlugin") {
283
438
  if (!this.agentHostService.installPlugin) {
284
- throw ( new Error(( localize(9651, "The selected agent does not support SDK plugin installation."))));
439
+ throw ( new Error(( localize(11230, "The selected agent does not support SDK plugin installation."))));
285
440
  }
286
441
  await this.agentHostService.installPlugin(this.providerId, {
287
442
  source: `${installation.name}@${installation.marketplace}`
288
- });
289
- await this.waitForPluginInventory({
290
- name: installation.name,
291
- marketplace: installation.marketplace
292
- }, true, token);
443
+ }, this.getBackendSession(sessionResource), this.agentHostCustomizationService.getBackendChatResource?.(sessionResource));
293
444
  this.throwIfCancelled(token);
294
445
  this._onDidChange.fire();
295
446
  return;
@@ -297,9 +448,36 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
297
448
  if (installation?.kind === "plugin") {
298
449
  throw ( new Error(this.getInstallUnavailableMessage(resource)));
299
450
  }
451
+ if (installation?.kind === "mcpGallery") {
452
+ if (!installation.cardUrl) {
453
+ throw ( new Error(this.getInstallUnavailableMessage(resource)));
454
+ }
455
+ if (!(await this.resolveAuthentication())) {
456
+ throw ( new CancellationError());
457
+ }
458
+ this.throwIfCancelled(token);
459
+ const review = await this.prepare(sessionResource, {
460
+ mediaType: resource.mediaType,
461
+ identifier: resource.identifier,
462
+ displayName: resource.displayName,
463
+ description: resource.description,
464
+ version: resource.version,
465
+ itemUrl: installation.cardUrl,
466
+ installation: {
467
+ kind: "mcp",
468
+ source: {
469
+ kind: "url",
470
+ mediaType: CustomizationMarketplaceMediaType.McpServer,
471
+ url: installation.cardUrl
472
+ }
473
+ }
474
+ }, token);
475
+ await this.confirmAndApplyCatalogResource(review, resource, token);
476
+ return;
477
+ }
300
478
  if (installation?.kind !== "skill" && installation?.kind !== "mcp") {
301
479
  throw ( new Error(( localize(
302
- 9652,
480
+ 11231,
303
481
  "The selected agent does not support installing this customization through its SDK."
304
482
  ))));
305
483
  }
@@ -323,37 +501,47 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
323
501
  async repair(sessionResource, installation, token) {
324
502
  this.throwIfCancelled(token);
325
503
  if (!installation.installationId || !this.agentHostService.recoverCustomizationInstallations) {
326
- throw ( new Error(( localize(9653, "The selected agent cannot repair this SDK installation."))));
504
+ throw ( new Error(( localize(11232, "The selected agent cannot repair this SDK installation."))));
327
505
  }
328
506
  const recovered = await this.agentHostService.recoverCustomizationInstallations(this.providerId, this.getBackendSession(sessionResource));
329
507
  this.throwIfCancelled(token);
330
508
  const current = recovered.find(candidate => candidate.installationId === installation.installationId);
331
509
  if (!current || current.state !== "installed") {
332
- throw ( new Error(current?.errorMessage ?? ( localize(9654, "The SDK could not repair this customization installation."))));
510
+ throw ( new Error(current?.errorMessage ?? ( localize(11233, "The SDK could not repair this customization installation."))));
333
511
  }
334
512
  this._onDidChange.fire();
335
513
  }
336
514
  async uninstall(sessionResource, installation, token) {
337
515
  this.throwIfCancelled(token);
516
+ if (installation.state.kind === "installed" && installation.state.uninstallUnavailableMessage) {
517
+ throw ( new Error(installation.state.uninstallUnavailableMessage));
518
+ }
338
519
  if (installation.state.target.kind === "plugin") {
339
- const target = installation.state.target;
340
- const plugin = target.uri ? this.agentPluginService.plugins.get().find(candidate => ( candidate.uri.toString()) === target.uri?.toString()) : undefined;
341
- const identity = plugin?.copilotCliInstallation;
342
- if (!identity || !this.agentHostService.uninstallPlugin) {
343
- throw ( new Error(( localize(9655, "The SDK plugin installation identity is unavailable."))));
520
+ const plugins = await this.listPluginInstallations(sessionResource, token);
521
+ const matches = plugins.filter(
522
+ candidate => getPluginInstallationId(candidate) === installation.installationId
523
+ );
524
+ const identity = matches.length === 1 ? matches[0] : undefined;
525
+ if (!identity || !identity.marketplace && !identity.directSourceId || !this.agentHostService.uninstallPlugin) {
526
+ this._onDidChange.fire();
527
+ throw ( new Error(( localize(11234, "The SDK plugin installation identity is unavailable."))));
344
528
  }
345
529
  await this.agentHostService.uninstallPlugin(this.providerId, {
346
530
  name: identity.name,
347
531
  marketplace: identity.marketplace,
348
532
  directSourceId: identity.directSourceId
349
- });
350
- await this.waitForPluginInventory(identity, false, token);
533
+ }, this.getBackendSession(sessionResource), this.agentHostCustomizationService.getBackendChatResource?.(sessionResource));
534
+ const plugin = this.findDiscoveredPlugin(identity);
535
+ if (plugin) {
536
+ this.agentPluginService.enablementModel.remove(( plugin.uri.toString()));
537
+ }
351
538
  this.throwIfCancelled(token);
539
+ this.catalogAssociations.delete(getPluginInstallationId(identity));
352
540
  this._onDidChange.fire();
353
541
  return;
354
542
  }
355
543
  if (!installation.installationId) {
356
- throw ( new Error(( localize(9656, "The SDK installation identity is unavailable."))));
544
+ throw ( new Error(( localize(11235, "The SDK installation identity is unavailable."))));
357
545
  }
358
546
  const review = await this.prepare(sessionResource, {
359
547
  installationId: installation.installationId
@@ -362,18 +550,19 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
362
550
  }
363
551
  async prepare(sessionResource, request, token) {
364
552
  if (!this.agentHostService.prepareCustomizationInstallation) {
365
- throw ( new Error(( localize(9657, "The selected agent does not support SDK installation review."))));
553
+ throw ( new Error(( localize(11236, "The selected agent does not support SDK installation review."))));
366
554
  }
367
555
  const review = await this.agentHostService.prepareCustomizationInstallation(this.providerId, this.getBackendSession(sessionResource), request);
368
556
  this.throwIfCancelled(token);
369
557
  return review;
370
558
  }
371
- async confirmAndApply(review, token) {
559
+ async confirmAndApply(review, token, beforeChange) {
560
+ const activatePlugin = review.action === "install" && review.kind === "plugin";
372
561
  const confirmation = await this.dialogService.confirm({
373
562
  type: "question",
374
- message: review.action === "install" ? ( localize(9658, "Install '{0}'?", review.displayName)) : ( localize(9659, "Uninstall '{0}'?", review.displayName)),
563
+ message: activatePlugin ? ( localize(11237, "Install and enable '{0}'?", review.displayName)) : review.action === "install" ? ( localize(11238, "Install '{0}'?", review.displayName)) : ( localize(11239, "Uninstall '{0}'?", review.displayName)),
375
564
  detail: this.getReviewDetail(review),
376
- primaryButton: review.action === "install" ? ( localize(9660, "Install")) : ( localize(9661, "Uninstall")),
565
+ primaryButton: activatePlugin ? ( localize(11240, "Install and Enable")) : review.action === "install" ? ( localize(11241, "Install")) : ( localize(11242, "Uninstall")),
377
566
  custom: {
378
567
  icon: Codicon.shield
379
568
  }
@@ -383,27 +572,101 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
383
572
  throw ( new CancellationError());
384
573
  }
385
574
  if (!this.agentHostService.applyCustomizationInstallation) {
386
- throw ( new Error(( localize(9662, "The selected agent cannot apply this SDK installation."))));
575
+ throw ( new Error(( localize(11243, "The selected agent cannot apply this SDK installation."))));
576
+ }
577
+ const result = await this.agentHostService.applyCustomizationInstallation(this.providerId, review.operationId);
578
+ await beforeChange?.(result);
579
+ if (activatePlugin) {
580
+ try {
581
+ if (result?.kind !== "plugin") {
582
+ throw ( new Error(( localize(11244, "The runtime did not return the installed plugin identity."))));
583
+ }
584
+ await this.activateInstalledPlugin(result, token);
585
+ } catch (error) {
586
+ this._onDidChange.fire();
587
+ this.throwIfCancelled(token);
588
+ throw ( new Error(( localize(
589
+ 11245,
590
+ "Plugin '{0}' was installed, but activation failed: {1}. Enable it from Plugins to retry.",
591
+ review.displayName,
592
+ getErrorMessage(error)
593
+ ))));
594
+ }
387
595
  }
388
- await this.agentHostService.applyCustomizationInstallation(this.providerId, review.operationId);
389
596
  this.throwIfCancelled(token);
390
597
  this._onDidChange.fire();
391
598
  }
599
+ async activateInstalledPlugin(identity, token) {
600
+ this.throwIfCancelled(token);
601
+ const disposables = ( new DisposableStore());
602
+ const cancellation = disposables.add(( new CancellationTokenSource(token)));
603
+ try {
604
+ disposables.add(disposableTimeout(() => cancellation.cancel(), 10_000));
605
+ const matches = this.agentPluginService.plugins.map(
606
+ plugins => plugins.filter(plugin => matchesAppliedPlugin(plugin, identity))
607
+ );
608
+ const plugins = await waitForState(matches, plugins => plugins.length > 0, undefined, cancellation.token).catch(error => {
609
+ this.throwIfCancelled(token);
610
+ if (cancellation.token.isCancellationRequested) {
611
+ throw ( new Error(( localize(11246, "The installed plugin was not discovered in time."))));
612
+ }
613
+ throw error;
614
+ });
615
+ if (plugins.length !== 1) {
616
+ throw ( new Error(( localize(11247, "Multiple installations match the verified plugin source."))));
617
+ }
618
+ const plugin = plugins[0];
619
+ this.associatePluginCatalogResource(plugin);
620
+ if (!plugin.setEnabled) {
621
+ throw ( new Error(( localize(11248, "Runtime plugin enablement is unavailable."))));
622
+ }
623
+ this.throwIfCancelled(token);
624
+ await setAgentPluginEnablement(
625
+ plugin,
626
+ this.agentPluginService.enablementModel,
627
+ ContributionEnablementState.EnabledProfile
628
+ );
629
+ } finally {
630
+ cancellation.cancel();
631
+ disposables.dispose();
632
+ }
633
+ }
634
+ async confirmAndApplyCatalogResource(review, resource, token) {
635
+ await this.confirmAndApply(review, token, result => {
636
+ const installation = resource.installation;
637
+ if (installation?.kind !== "providerCatalog" && installation?.kind !== "mcpGallery") {
638
+ return;
639
+ }
640
+ if (result?.kind === "receipt") {
641
+ this.rememberCatalogAssociation(result.installationId, resource);
642
+ return;
643
+ }
644
+ if (result?.kind === "plugin") {
645
+ this.pendingCatalogAssociations.push({
646
+ identity: result,
647
+ resource
648
+ });
649
+ while (this.pendingCatalogAssociations.length > maxCatalogAssociations) {
650
+ this.pendingCatalogAssociations.shift();
651
+ }
652
+ }
653
+ });
654
+ }
392
655
  getReviewDetail(review) {
393
656
  if (review.kind === "skill") {
394
657
  const modifiedDetail = review.filesModified ? ( localize(
395
- 9663,
658
+ 11249,
396
659
  "\n\nThe installed files have been modified. The SDK will refuse removal if they changed after this review."
397
660
  )) : "";
398
661
  return review.action === "install" ? ( localize(
399
- 9664,
662
+ 11250,
400
663
  "Skills can supply instructions and scripts that an agent may run. Only install resources from sources you trust.\n\nSource: {0}\nDestination: {1}\nFiles: {2}\nSize: {3} bytes",
401
664
  review.source,
402
665
  review.target,
403
666
  review.fileCount,
404
667
  review.totalBytes
405
668
  )) : ( localize(
406
- 9665,
669
+ 11251,
407
670
  "The SDK will remove {0} owned files ({1} bytes) from {2}.{3}",
408
671
  review.fileCount,
409
672
  review.totalBytes,
@@ -411,29 +674,58 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
411
674
  modifiedDetail
412
675
  ));
413
676
  }
677
+ if (review.kind === "plugin") {
678
+ const status = ( localize(
679
+ 11252,
680
+ "The plugin will be enabled for your profile after installation, and running chats will reload its contributions."
681
+ ));
682
+ const mcpServers = review.mcpServerCount ? ( localize(11253, "\nDeclared MCP servers: {0}", review.mcpServerCount)) : "";
683
+ return localize(
684
+ 11254,
685
+ "Plugins can supply agents, skills, hooks, and MCP servers. Only install resources from sources you trust.\n\nSource: {0}\nDestination: {1}\nFiles: {2}\nSize: {3} bytes\n\n{4}{5}",
686
+ review.source,
687
+ review.target,
688
+ review.fileCount,
689
+ review.totalBytes,
690
+ status,
691
+ mcpServers
692
+ );
693
+ }
414
694
  if (review.action === "install") {
695
+ if (review.command !== undefined) {
696
+ return localize(
697
+ 11255,
698
+ "MCP servers can run tools and access local files. Only install resources from sources you trust.\n\nServer: {0}\nDestination: {1}\nCommand: {2}\nArguments: {3}\nEnvironment: {4}\nConfiguration fields: {5}",
699
+ review.serverName,
700
+ review.target,
701
+ review.command,
702
+ JSON.stringify(review.args ?? []),
703
+ JSON.stringify(review.env ?? {}),
704
+ review.configurationFields.join(", ") || ( localize(11256, "None"))
705
+ );
706
+ }
415
707
  return localize(
416
- 9666,
708
+ 11257,
417
709
  "MCP servers can run tools and access external services. Only install resources from sources you trust.\n\nServer: {0}\nDestination: {1}\nEndpoint: {2}\nConfiguration fields: {3}",
418
710
  review.serverName,
419
711
  review.target,
420
- review.endpoint ?? ( localize(9667, "Not applicable")),
421
- review.configurationFields.join(", ") || ( localize(9668, "None"))
712
+ review.endpoint ?? ( localize(11258, "Not applicable")),
713
+ review.configurationFields.join(", ") || ( localize(11256, "None"))
422
714
  );
423
715
  }
424
716
  return localize(
425
- 9669,
717
+ 11259,
426
718
  "Server: {0}\nRestores previous configuration: {1}\nShared authentication is preserved: {2}",
427
719
  review.serverName,
428
- review.restoresPreviousConfiguration ? ( localize(9670, "Yes")) : ( localize(9671, "No")),
429
- review.preservesSharedAuthentication ? ( localize(9670, "Yes")) : ( localize(9671, "No"))
720
+ review.restoresPreviousConfiguration ? ( localize(11260, "Yes")) : ( localize(11261, "No")),
721
+ review.preservesSharedAuthentication ? ( localize(11260, "Yes")) : ( localize(11261, "No"))
430
722
  );
431
723
  }
432
724
  toRecordedInstallation(sessionResource, installation) {
433
725
  const resource = this.catalogAssociations.get(installation.installationId) ?? this.toMarketplaceResource(installation);
434
726
  const state = installation.state === "error" ? {
435
727
  kind: "error",
436
- message: installation.errorMessage ?? ( localize(9672, "The SDK could not verify this installation.")),
728
+ message: installation.errorMessage ?? ( localize(11262, "The SDK could not verify this installation.")),
437
729
  target: this.getTarget(sessionResource, installation)
438
730
  } : {
439
731
  kind: installation.state,
@@ -451,7 +743,7 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
451
743
  const registryIcon = installation.kind === "mcp" ? getGitHubMcpRegistryIcon(catalogue?.itemUrl, catalogue?.resourceId) : undefined;
452
744
  return {
453
745
  sourceId: this.getSourceId(catalogue?.source),
454
- identifier: catalogue?.resourceId ?? catalogue?.itemUrl ?? installation.installationId,
746
+ identifier: catalogue?.resourceId ?? catalogue?.itemUrl ?? (installation.kind === "mcp" ? installation.serverName : installation.installationId),
455
747
  displayName: catalogue?.displayName ?? (installation.kind === "skill" ? installation.name : installation.serverName),
456
748
  description: catalogue?.description ?? "",
457
749
  mediaType: installation.mediaType,
@@ -466,21 +758,10 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
466
758
  icon: publisher?.avatar ?? registryIcon
467
759
  };
468
760
  }
469
- captureCatalogAssociation(installations) {
470
- const pending = this.pendingCatalogInstall;
471
- const pendingInstallation = pending?.resource.installation;
472
- if (!pending || pendingInstallation?.kind !== "providerCatalog") {
473
- return;
474
- }
475
- const candidates = installations.filter(installation => !!installation.installationId && !( pending.previousIds.has(installation.installationId)) && installation.state.target.kind === pendingInstallation.resourceKind);
476
- if (candidates.length === 1 && candidates[0].installationId) {
477
- this.catalogAssociations.set(candidates[0].installationId, pending.resource);
478
- while (this.catalogAssociations.size > maxCatalogAssociations) {
479
- this.catalogAssociations.delete(( this.catalogAssociations.keys()).next().value);
480
- }
481
- this.pendingCatalogInstall = undefined;
482
- } else if (candidates.length > 1) {
483
- this.pendingCatalogInstall = undefined;
761
+ rememberCatalogAssociation(installationId, resource) {
762
+ this.catalogAssociations.set(installationId, resource);
763
+ while (this.catalogAssociations.size > maxCatalogAssociations) {
764
+ this.catalogAssociations.delete(( this.catalogAssociations.keys()).next().value);
484
765
  }
485
766
  }
486
767
  getTarget(sessionResource, installation) {
@@ -498,29 +779,80 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
498
779
  name: installation.name
499
780
  };
500
781
  }
501
- getPluginInstallations() {
782
+ async listPluginInstallations(sessionResource, token) {
783
+ const backendSession = this.getBackendSession(sessionResource);
784
+ if (!this.agentHostService.listPluginInstallations) {
785
+ return [];
786
+ }
787
+ const installations = await this.agentHostService.listPluginInstallations(
788
+ this.providerId,
789
+ backendSession,
790
+ this.agentHostCustomizationService.getBackendChatResource?.(sessionResource)
791
+ );
792
+ this.throwIfCancelled(token);
793
+ return installations;
794
+ }
795
+ async getPluginInstallations(sessionResource, token) {
796
+ const installations = await this.listPluginInstallations(sessionResource, token);
797
+ const matchCounts = ( new Map());
798
+ for (const installation of installations) {
799
+ const key = getPluginInstallationId(installation);
800
+ matchCounts.set(key, (matchCounts.get(key) ?? 0) + 1);
801
+ }
502
802
  const result = [];
503
- for (const plugin of this.agentPluginService.plugins.get()) {
504
- const installation = plugin.copilotCliInstallation;
505
- if (!installation) {
506
- continue;
803
+ for (const installation of installations) {
804
+ const installationId = getPluginInstallationId(installation);
805
+ const plugin = this.findDiscoveredPlugin(installation);
806
+ if (plugin) {
807
+ this.associatePluginCatalogResource(plugin);
507
808
  }
508
- const resource = toPluginMarketplaceResource(plugin);
809
+ const resource = this.catalogAssociations.get(installationId);
810
+ const uninstallUnavailableMessage = (!installation.marketplace && !installation.directSourceId || matchCounts.get(installationId) !== 1) ? ( localize(
811
+ 11263,
812
+ "Uninstall is unavailable because the runtime has not reported a unique plugin installation identity. Refresh the plugin inventory and try again."
813
+ )) : undefined;
509
814
  result.push({
510
- installationId: getPluginInstallationId(installation),
511
- resource,
815
+ installationId,
816
+ resource: resource ?? toPluginMarketplaceResource(installation, this.logService, plugin),
512
817
  state: {
513
818
  kind: "installed",
514
819
  target: {
515
820
  kind: "plugin",
516
- uri: plugin.uri,
517
- name: installation.name
518
- }
821
+ name: plugin?.copilotCliInstallation?.name ?? installation.name,
822
+ ...(plugin ? {
823
+ uri: plugin.uri
824
+ } : {})
825
+ },
826
+ ...(uninstallUnavailableMessage ? {
827
+ uninstallUnavailableMessage
828
+ } : {})
519
829
  }
520
830
  });
521
831
  }
522
832
  return result;
523
833
  }
834
+ findDiscoveredPlugin(installation) {
835
+ if (!installation.marketplace && !installation.directSourceId) {
836
+ return undefined;
837
+ }
838
+ const matches = this.agentPluginService.plugins.get().filter(
839
+ plugin => plugin.copilotCliInstallation && getPluginInstallationId(plugin.copilotCliInstallation) === getPluginInstallationId(installation)
840
+ );
841
+ return matches.length === 1 ? matches[0] : undefined;
842
+ }
843
+ associatePluginCatalogResource(plugin) {
844
+ const installation = plugin.copilotCliInstallation;
845
+ if (!installation) {
846
+ return;
847
+ }
848
+ const pendingIndex = this.pendingCatalogAssociations.findIndex(candidate => matchesAppliedPlugin(plugin, candidate.identity));
849
+ if (pendingIndex !== -1) {
850
+ const {
851
+ resource
852
+ } = this.pendingCatalogAssociations.splice(pendingIndex, 1)[0];
853
+ this.rememberCatalogAssociation(getPluginInstallationId(installation), resource);
854
+ }
855
+ }
524
856
  getSourceId(source) {
525
857
  if (!source) {
526
858
  return CustomizationMarketplaceSources.AgentFinderPublicFeed.id;
@@ -546,69 +878,68 @@ let AgentHostCustomizationMarketplaceInstallProvider = class AgentHostCustomizat
546
878
  return sessionResource;
547
879
  }
548
880
  if (identity.connectionAuthority !== AMBIENT_AGENT_HOST_AUTHORITY) {
549
- throw ( new Error(( localize(9673, "The selected local Agent Host session is unavailable."))));
881
+ throw ( new Error(( localize(11264, "The selected local Agent Host session is unavailable."))));
550
882
  }
551
883
  return identity.backendSession;
552
884
  }
553
- async waitForPluginInventory(identity, present, token) {
554
- const operation = ( new DisposableStore());
555
- try {
556
- const inventoryUpdated = ( new Promise((resolve, reject) => {
557
- const checkInventory = () => {
558
- if (( this.agentPluginService.plugins.get().some(plugin => isPluginInstallation(plugin.copilotCliInstallation, identity))) === present) {
559
- resolve(true);
560
- }
561
- };
562
- operation.add(Event.fromObservableLight(this.agentPluginService.plugins)(checkInventory));
563
- operation.add(token.onCancellationRequested(() => reject(( new CancellationError()))));
564
- checkInventory();
565
- }));
566
- if ((await raceTimeout(inventoryUpdated, pluginInventoryUpdateTimeoutMs)) !== true) {
567
- throw ( new Error(( localize(
568
- 9674,
569
- "The SDK completed the plugin operation, but its installation inventory did not update."
570
- ))));
571
- }
572
- this.throwIfCancelled(token);
573
- } finally {
574
- operation.dispose();
575
- }
576
- }
577
885
  };
578
- AgentHostCustomizationMarketplaceInstallProvider = ( __decorate([( __param(2, IAgentHostService)), ( __param(3, IAgentHostConnectionsService)), ( __param(4, IAgentHostCustomizationService)), ( __param(5, IAgentPluginService)), ( __param(6, IDialogService)), ( __param(7, ILogService))], AgentHostCustomizationMarketplaceInstallProvider));
579
- function isPluginInstallation(candidate, expected) {
580
- return candidate?.name === expected.name && candidate.marketplace === expected.marketplace && candidate.directSourceId === expected.directSourceId;
581
- }
582
- function toPluginMarketplaceResource(plugin) {
886
+ AgentHostCustomizationMarketplaceInstallProvider = ( __decorate([( __param(2, IAgentHostService)), ( __param(3, IAgentHostConnectionsService)), ( __param(4, IAgentHostCustomizationService)), ( __param(5, IDialogService)), ( __param(6, ILogService)), ( __param(7, IAgentPluginService))], AgentHostCustomizationMarketplaceInstallProvider));
887
+ function matchesAppliedPlugin(plugin, identity) {
583
888
  const installation = plugin.copilotCliInstallation;
584
- const version = plugin.version?.get();
585
- const source = installation.source;
889
+ const source = installation?.source;
890
+ return !!installation?.directSourceId && !installation.marketplace && installation.name === identity.name && source?.kind === "github" && source.repository.toLowerCase() === identity.repository.toLowerCase() && (source.sha ?? source.ref) === identity.ref && (source.path ?? "") === identity.path;
891
+ }
892
+ function toPluginMarketplaceResource(installation, logService, plugin) {
893
+ const source = installation.verifiedSource;
894
+ const installedSource = plugin?.copilotCliInstallation?.source;
895
+ const revision = installedSource?.kind === "github" ? installedSource.sha ?? installedSource.ref : undefined;
896
+ const directSource = !installation.marketplace && installedSource?.kind === "github" && revision ? {
897
+ kind: "plugin",
898
+ repository: installedSource.repository,
899
+ ref: revision,
900
+ path: installedSource.path ?? ""
901
+ } : undefined;
586
902
  const configured = installation.marketplace ? {
587
903
  kind: "configuredPlugin",
588
904
  name: installation.name,
589
905
  marketplace: installation.marketplace
590
906
  } : undefined;
591
- const direct = source?.kind === "github" ? {
592
- kind: "plugin",
593
- repository: source.repository,
594
- ref: source.sha ?? source.ref ?? "HEAD",
595
- path: source.path ?? ""
596
- } : undefined;
597
907
  return {
598
908
  sourceId: configured ? CustomizationMarketplaceSources.PluginMarketplaces.id : CustomizationMarketplaceSources.AgentFinderPublicFeed.id,
599
- identifier: configured ? JSON.stringify([installation.marketplace, installation.name]) : installation.directSourceId ?? ( plugin.uri.toString()),
600
- displayName: plugin.label,
601
- description: "",
909
+ identifier: configured ? JSON.stringify([installation.marketplace, installation.name]) : installation.directSourceId ?? installation.name,
910
+ displayName: plugin?.label ?? installation.name,
911
+ description: installation.description ?? "",
602
912
  mediaType: CustomizationMarketplaceMediaType.CopilotPlugin,
603
913
  tags: [],
604
914
  capabilities: [],
605
915
  representativeQueries: [],
606
- version,
607
- installation: configured ?? direct
916
+ version: installation.version ?? plugin?.version?.get(),
917
+ icon: getPluginIcon(installation.iconUrl, logService),
918
+ repository: source ? ( URI.from({
919
+ scheme: Schemas.https,
920
+ authority: "github.com",
921
+ path: `/${source.repository}`
922
+ })) : undefined,
923
+ installation: configured ?? directSource
608
924
  };
609
925
  }
926
+ function getPluginIcon(value, logService) {
927
+ if (value === undefined) {
928
+ return undefined;
929
+ }
930
+ if (URL.canParse(value)) {
931
+ const url = ( new URL(value));
932
+ if (url.protocol === `${Schemas.https}:` && url.hostname && !url.username && !url.password) {
933
+ return ( URI.parse(url.href));
934
+ }
935
+ }
936
+ logService.warn(
937
+ "[AgentHostCustomizationMarketplace] Ignoring an invalid SDK plugin icon URL"
938
+ );
939
+ return undefined;
940
+ }
610
941
  function getPluginInstallationId(installation) {
611
- return installation.marketplace ? `plugin:${installation.marketplace}:${installation.name}` : `plugin:direct:${installation.directSourceId ?? installation.name}`;
942
+ return installation.marketplace ? JSON.stringify(["plugin", installation.marketplace, installation.name]) : installation.directSourceId ? JSON.stringify(["plugin", "direct", installation.directSourceId]) : JSON.stringify(["plugin", "unresolved", installation.name]);
612
943
  }
613
944
  function getCatalogMediaType(kind) {
614
945
  switch (kind) {