@codingame/monaco-vscode-chat-service-override 36.2.7 → 37.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 (725) hide show
  1. package/index.d.ts +1 -0
  2. package/index.js +92 -10
  3. package/package.json +5 -5
  4. package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.d.ts +10 -3
  5. package/vscode/src/vs/platform/agentHost/browser/agentHostConnectionsService.js +54 -17
  6. package/vscode/src/vs/platform/agentHost/browser/agentHostEnablementService.d.ts +14 -0
  7. package/vscode/src/vs/platform/agentHost/browser/agentHostEnablementService.js +46 -0
  8. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.d.ts +7 -2
  9. package/vscode/src/vs/platform/agentHost/browser/agentHostIpcChannelTransport.js +34 -2
  10. package/vscode/src/vs/platform/agentHost/browser/{remoteAgentHostProtocolClient.d.ts → agentHostProtocolClient.d.ts} +240 -60
  11. package/vscode/src/vs/platform/agentHost/browser/agentHostProtocolClient.js +1911 -0
  12. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +30 -33
  13. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +381 -315
  14. package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +3 -1
  15. package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +2 -0
  16. package/vscode/src/vs/platform/agentHost/common/agentHostClientInfo.d.ts +9 -0
  17. package/vscode/src/vs/platform/agentHost/common/agentHostClientInfo.js +20 -0
  18. package/vscode/src/vs/platform/agentHost/common/agentHostExtensionProtocol.d.ts +144 -0
  19. package/vscode/src/vs/platform/agentHost/common/agentHostExtensionProtocol.js +20 -0
  20. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +14 -6
  21. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +14 -10
  22. package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemService.js +1 -1
  23. package/vscode/src/vs/platform/agentHost/common/agentHostManagedRules.d.ts +47 -0
  24. package/vscode/src/vs/platform/agentHost/common/agentHostManagedRules.js +75 -0
  25. package/vscode/src/vs/platform/agentHost/common/agentHostManagedSettings.d.ts +68 -0
  26. package/vscode/src/vs/platform/agentHost/common/agentHostManagedSettings.js +161 -0
  27. package/vscode/src/vs/platform/agentHost/common/agentHostStarter.config.contribution.js +288 -45
  28. package/vscode/src/vs/platform/agentHost/common/agentMerge.d.ts +261 -0
  29. package/vscode/src/vs/platform/agentHost/common/agentMerge.js +67 -0
  30. package/vscode/src/vs/platform/agentHost/common/agentSdkSetup.d.ts +53 -0
  31. package/vscode/src/vs/platform/agentHost/common/agentSdkSetup.js +45 -0
  32. package/vscode/src/vs/platform/agentHost/common/changesetUri.d.ts +130 -0
  33. package/vscode/src/vs/platform/agentHost/common/changesetUri.js +27 -0
  34. package/vscode/src/vs/platform/agentHost/common/customAgents.d.ts +8 -2
  35. package/vscode/src/vs/platform/agentHost/common/customAgents.js +7 -0
  36. package/vscode/src/vs/platform/agentHost/common/meta/agentChatSurfaceMeta.d.ts +39 -0
  37. package/vscode/src/vs/platform/agentHost/common/meta/agentChatSurfaceMeta.js +25 -0
  38. package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.d.ts +110 -0
  39. package/vscode/src/vs/platform/agentHost/common/meta/agentCompletionAttachmentMeta.js +38 -0
  40. package/vscode/src/vs/platform/agentHost/common/meta/agentHostArtifactRemovalMeta.d.ts +4 -0
  41. package/vscode/src/vs/platform/agentHost/common/meta/clientPluginCustomizationMeta.d.ts +7 -0
  42. package/vscode/src/vs/platform/agentHost/common/meta/clientPluginCustomizationMeta.js +14 -0
  43. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.d.ts +3 -3
  44. package/vscode/src/vs/platform/agentHost/common/sandboxConfigSchema.js +16 -24
  45. package/vscode/src/vs/platform/agentHost/common/semanticSearchConstants.d.ts +8 -0
  46. package/vscode/src/vs/platform/agentHost/common/semanticSearchConstants.js +8 -0
  47. package/vscode/src/vs/platform/agentHost/common/sessionArtifacts.d.ts +75 -0
  48. package/vscode/src/vs/platform/agentHost/common/sessionArtifacts.js +84 -0
  49. package/vscode/src/vs/platform/agentHost/common/shellInitScript.d.ts +24 -0
  50. package/vscode/src/vs/platform/agentHost/common/shellInitScript.js +63 -0
  51. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +71 -20
  52. package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +187 -26
  53. package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.d.ts +30 -0
  54. package/vscode/src/vs/platform/agentHost/common/state/legacyProtocolCompatibility.js +87 -0
  55. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-annotations/reducer.js +2 -2
  56. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation/reducer.d.ts +4 -0
  57. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation/reducer.js +37 -0
  58. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation-run/reducer.d.ts +4 -0
  59. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-automation-run/reducer.js +45 -0
  60. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.d.ts +5 -4
  61. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-changeset/reducer.js +100 -35
  62. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.js +193 -49
  63. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.js +161 -40
  64. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.d.ts +1 -1
  65. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-terminal/reducer.js +5 -1
  66. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/reducer-helpers.d.ts +2 -2
  67. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/timestamps.d.ts +1 -0
  68. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/timestamps.js +7 -0
  69. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.d.ts +1 -1
  70. package/vscode/src/vs/platform/agentHost/common/state/protocol/version/registry.js +114 -3
  71. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +28 -5
  72. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +4 -2
  73. package/vscode/src/vs/platform/agentHost/common/state/sessionWorkingDirectories.d.ts +34 -0
  74. package/vscode/src/vs/platform/agentHost/common/state/sessionWorkingDirectories.js +28 -0
  75. package/vscode/src/vs/platform/agentHost/common/worktreePaths.d.ts +24 -0
  76. package/vscode/src/vs/platform/agentHost/common/worktreePaths.js +15 -0
  77. package/vscode/src/vs/platform/browserView/common/browserChatToolReferenceNames.d.ts +1 -1
  78. package/vscode/src/vs/platform/chat/common/aiAgentEnv.d.ts +18 -0
  79. package/vscode/src/vs/platform/chat/common/aiAgentEnv.js +6 -0
  80. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +5 -1
  81. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +77 -5
  82. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +1 -1
  83. package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +9 -5
  84. package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +1 -5
  85. package/vscode/src/vs/platform/networkFilter/common/settings.js +0 -4
  86. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.d.ts +19 -7
  87. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +49 -37
  88. package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.d.ts +2 -1
  89. package/vscode/src/vs/platform/sandbox/common/terminalSandboxReadAllowList.js +12 -0
  90. package/vscode/src/vs/platform/sandbox/common/terminalSandboxRuntimeConfigurationPerOperation.js +1 -2
  91. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +1 -0
  92. package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveParseSafety.d.ts +5 -0
  93. package/vscode/src/vs/platform/terminal/common/autoApprove/autoApproveParseSafety.js +7 -0
  94. package/vscode/src/vs/platform/terminal/common/autoApprove/cmdDelayedExpansion.d.ts +5 -0
  95. package/vscode/src/vs/platform/terminal/common/autoApprove/cmdDelayedExpansion.js +8 -0
  96. package/vscode/src/vs/{workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers → platform/terminal/common/autoApprove}/sedFileWriteParser.d.ts +1 -2
  97. package/vscode/src/vs/workbench/browser/chatChangesPill.d.ts +29 -0
  98. package/vscode/src/vs/workbench/browser/chatChangesPill.js +84 -0
  99. package/vscode/src/vs/workbench/common/chatPullRequest.d.ts +19 -0
  100. package/vscode/src/vs/workbench/common/chatPullRequest.js +53 -0
  101. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +342 -155
  102. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +2 -2
  103. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.d.ts +25 -2
  104. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +150 -67
  105. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +5 -3
  106. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.d.ts +5 -1
  107. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.js +39 -9
  108. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.d.ts +1 -1
  109. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +3 -3
  110. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +6 -6
  111. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.d.ts +4 -2
  112. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +54 -17
  113. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +11 -11
  114. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.d.ts +1 -1
  115. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +9 -9
  116. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.d.ts +1 -1
  117. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +5 -5
  118. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.d.ts +6 -0
  119. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.js +5 -1
  120. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.d.ts +1 -1
  121. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.d.ts +1 -1
  122. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +2 -2
  123. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/media/voiceModeOnboarding.css +252 -0
  124. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +13 -13
  125. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +7 -7
  126. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.d.ts +146 -0
  127. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +889 -0
  128. package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +2 -2
  129. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +2 -7
  130. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +3 -54
  131. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +32 -3
  132. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +214 -161
  133. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +10 -9
  134. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +2 -1
  135. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +256 -72
  136. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.d.ts +2 -1
  138. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +11 -12
  139. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +19 -15
  140. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +30 -14
  141. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +19 -10
  142. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +9 -9
  143. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  144. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.d.ts +6 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFindActions.js +237 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +7 -6
  147. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  148. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +10 -10
  149. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.d.ts +6 -0
  150. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +68 -61
  151. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +17 -21
  152. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +17 -21
  153. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  154. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +5 -0
  155. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +68 -14
  156. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
  157. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +21 -19
  158. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.d.ts +7 -2
  159. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +222 -72
  160. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.d.ts +64 -17
  161. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +530 -305
  162. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.d.ts +25 -0
  163. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openAgentHostStateFileAction.js +63 -0
  164. package/vscode/src/vs/workbench/contrib/chat/browser/agentHostCompletionAction.d.ts +30 -0
  165. package/vscode/src/vs/workbench/contrib/chat/browser/agentHostCompletionAction.js +37 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginCommands.d.ts +6 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginCommands.js +95 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +10 -6
  169. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  170. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +2 -1
  171. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +18 -1
  172. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +86 -47
  173. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +61 -47
  174. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +43 -24
  175. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.js +326 -76
  176. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.d.ts +112 -5
  177. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.js +33 -7
  178. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostImportConversationStore.d.ts +20 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostImportConversationStore.js +26 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +28 -10
  181. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.js +110 -126
  182. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.d.ts +131 -0
  183. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupport.js +638 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.d.ts +41 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpServerSupportScope.js +202 -0
  186. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.d.ts +24 -1
  187. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModeSynchronizer.js +26 -5
  188. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +10 -7
  189. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostProtectedResourcesService.d.ts +20 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostProtectedResourcesService.js +55 -0
  191. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.d.ts +62 -0
  192. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.js +40 -0
  193. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.d.ts +59 -0
  194. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionInputPills.js +624 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.d.ts +90 -0
  196. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectorySynchronizer.js +207 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostShellInitSynchronizer.d.ts +31 -0
  198. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostShellInitSynchronizer.js +140 -0
  199. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.d.ts +4 -0
  200. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolSetEnablementService.js +5 -1
  201. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostToolUtils.js +5 -4
  202. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.d.ts +74 -5
  203. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.js +511 -171
  204. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.d.ts +32 -0
  205. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/applyAgentHostSessionConfig.js +48 -0
  206. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.d.ts +55 -6
  207. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/syncedCustomizationBundler.js +210 -20
  208. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +43 -24
  209. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +46 -10
  210. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +216 -110
  211. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +9 -4
  212. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +26 -17
  213. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  214. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  215. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  216. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
  217. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +30 -26
  218. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +5 -2
  219. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/unifiedQuickAccess.css +6 -6
  220. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  221. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  222. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/externalSessionsFilterMenu.d.ts +3 -0
  223. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/externalSessionsFilterMenu.js +62 -0
  224. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/sessionSummaryHover.css +104 -0
  225. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHover.d.ts +115 -0
  226. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHover.js +168 -0
  227. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHoverService.d.ts +24 -0
  228. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHoverService.js +32 -0
  229. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.js +56 -0
  230. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +0 -4
  231. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +16 -17
  232. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +7 -3
  233. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +1 -0
  234. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.d.ts +2 -0
  235. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +10 -1
  236. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +48 -1
  237. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +913 -220
  238. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -1
  239. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +148 -84
  240. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +161 -17
  241. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +2367 -247
  242. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +5 -2
  243. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +21 -13
  244. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementSectionRegistry.d.ts +26 -0
  245. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementSectionRegistry.js +34 -0
  246. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.d.ts +2 -0
  247. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.js +23 -0
  248. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.d.ts +15 -0
  249. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.js +3 -0
  250. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +10 -2
  251. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +143 -68
  252. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
  253. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +10 -5
  254. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCardList.d.ts +40 -0
  255. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCardList.js +302 -0
  256. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +1 -2
  257. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +49 -8
  258. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +3 -3
  259. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigration.d.ts +38 -0
  260. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigration.js +240 -0
  261. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.d.ts +1 -0
  262. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationAccessibility.js +53 -0
  263. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.d.ts +82 -0
  264. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.js +762 -0
  265. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationDashboard.d.ts +80 -0
  266. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationDashboard.js +279 -0
  267. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.d.ts +44 -0
  268. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationServiceImpl.js +437 -0
  269. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +85 -6
  270. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +697 -15
  271. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedExtensionToolsDetail.js +7 -7
  272. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.d.ts +40 -10
  273. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +164 -42
  274. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/galleryItemRenderer.js +6 -9
  275. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +260 -31
  276. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +2097 -589
  277. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.d.ts +32 -0
  278. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.js +860 -0
  279. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +2229 -1338
  280. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +79 -26
  281. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/customizationMigrationDashboard.css +354 -0
  282. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +85 -9
  283. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +1550 -357
  284. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +2 -4
  285. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +13 -27
  286. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.d.ts +38 -26
  287. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/toolsListWidget.js +637 -319
  288. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +28 -10
  289. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatPasteTargetService.d.ts +10 -0
  290. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatPasteTargetService.js +22 -0
  291. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatReferenceAttachmentWidget.contribution.d.ts +15 -0
  292. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatReferenceAttachmentWidget.contribution.js +38 -0
  293. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/transcriptContextAttachmentWidget.contribution.d.ts +8 -0
  294. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/transcriptContextAttachmentWidget.contribution.js +38 -0
  295. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +4 -1
  296. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +1675 -633
  297. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +93 -6
  298. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +823 -52
  299. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.d.ts +132 -0
  300. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostLogSources.js +446 -0
  301. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostUsageSidecar.d.ts +183 -0
  302. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostUsageSidecar.js +218 -0
  303. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +45 -42
  304. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +11 -0
  305. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +163 -136
  306. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheInsights.js +72 -72
  307. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +7 -7
  308. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +22 -2
  309. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +105 -14
  310. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  311. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.d.ts +32 -0
  312. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.js +49 -0
  313. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
  314. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  315. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  316. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  317. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +27 -22
  318. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +6 -0
  319. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +22 -23
  320. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  321. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +25 -25
  322. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  323. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  324. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +7 -2
  325. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +76 -43
  326. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  327. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +3 -2
  328. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +1 -0
  329. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.d.ts +145 -0
  330. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +839 -0
  331. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +277 -3
  332. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  333. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +6 -6
  334. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  335. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +8 -8
  336. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  337. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +16 -16
  338. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -4
  339. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  340. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +8 -4
  341. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  342. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +6 -3
  343. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +35 -19
  344. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +16 -9
  345. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +4 -3
  346. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +4 -4
  347. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +4 -0
  348. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +7 -2
  349. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  350. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.d.ts +5 -5
  351. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +3 -3
  352. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPills.d.ts +86 -0
  353. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPills.js +282 -0
  354. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +14 -10
  355. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
  356. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +5 -0
  357. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +37 -25
  358. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +7 -5
  359. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +135 -82
  360. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +22 -3
  361. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutlineCreator.d.ts +17 -0
  362. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutlineCreator.js +28 -0
  363. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +5 -5
  364. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
  365. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementPreview.d.ts +7 -0
  366. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementPreview.js +114 -0
  367. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.d.ts +45 -0
  368. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievements.contribution.js +326 -0
  369. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.d.ts +33 -0
  370. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditor.js +99 -0
  371. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.d.ts +17 -0
  372. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsEditorInput.js +46 -0
  373. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.d.ts +27 -0
  374. package/vscode/src/vs/workbench/contrib/chat/browser/chatPetAchievementsWidget.js +301 -0
  375. package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.d.ts +22 -0
  376. package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.js +103 -0
  377. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.d.ts +9 -36
  378. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +103 -196
  379. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  380. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +36 -30
  381. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +2 -0
  382. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +51 -12
  383. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  384. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +31 -27
  385. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +65 -20
  386. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +291 -138
  387. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/chatSetup.css +9 -0
  388. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/microsoft-dark.svg +1 -0
  389. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/microsoft-light.svg +1 -0
  390. package/vscode/src/vs/workbench/contrib/chat/browser/chatSideChat.d.ts +9 -0
  391. package/vscode/src/vs/workbench/contrib/chat/browser/chatSideChat.js +24 -0
  392. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -1
  393. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +59 -35
  394. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +7 -2
  395. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +221 -145
  396. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +15 -29
  397. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +21 -3
  398. package/vscode/src/vs/workbench/contrib/chat/browser/chatSubmitRequestHandlerService.d.ts +22 -0
  399. package/vscode/src/vs/workbench/contrib/chat/browser/chatSubmitRequestHandlerService.js +27 -0
  400. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +9 -0
  401. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +23 -21
  402. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +6 -1
  403. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +62 -6
  404. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +15 -1
  405. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +97 -8
  406. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  407. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContext.contribution.js +6 -6
  408. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.d.ts +11 -2
  409. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +24 -16
  410. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +5 -5
  411. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  412. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.d.ts +44 -0
  413. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.js +232 -0
  414. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationContribution.d.ts +36 -0
  415. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationContribution.js +127 -0
  416. package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +1 -1
  417. package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatModelFeedbackSurveyPromptContribution.d.ts +18 -0
  418. package/vscode/src/vs/workbench/contrib/chat/browser/feedbackSurvey/chatModelFeedbackSurveyPromptContribution.js +55 -0
  419. package/vscode/src/vs/workbench/contrib/chat/browser/hasByokModelsContribution.js +4 -3
  420. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
  421. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatPetAchievements.css +236 -0
  422. package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +1 -1
  423. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.d.ts +9 -0
  424. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorOverlay.js +260 -0
  425. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.d.ts +39 -5
  426. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.js +155 -56
  427. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.d.ts +10 -14
  428. package/vscode/src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.js +29 -14
  429. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +2 -0
  430. package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +76 -24
  431. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +1 -1
  432. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +53 -32
  433. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +1 -1
  434. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +17 -17
  435. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +8 -7
  436. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.d.ts +1 -1
  437. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +29 -71
  438. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +3 -0
  439. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +36 -40
  440. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +3 -0
  441. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +5 -5
  442. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  443. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolSetsCodeLensProvider.js +2 -2
  444. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  445. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  446. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +9 -16
  447. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  448. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +5 -13
  449. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/media/promptTimeline.css +820 -0
  450. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptBucketing.d.ts +38 -0
  451. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptBucketing.js +100 -0
  452. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimeline.contribution.d.ts +1 -0
  453. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimeline.contribution.js +51 -0
  454. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.d.ts +30 -0
  455. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineCard.js +113 -0
  456. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.d.ts +146 -0
  457. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.js +440 -0
  458. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineLayout.d.ts +16 -0
  459. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineLayout.js +5 -0
  460. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.d.ts +194 -0
  461. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineModel.js +525 -0
  462. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRail.d.ts +33 -0
  463. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.d.ts +128 -0
  464. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.js +460 -0
  465. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.d.ts +38 -0
  466. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineStickyHeader.js +120 -0
  467. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineWidgetContrib.d.ts +53 -0
  468. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineWidgetContrib.js +160 -0
  469. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +25 -22
  470. package/vscode/src/vs/workbench/contrib/chat/browser/sessionChatPillOptions.d.ts +13 -0
  471. package/vscode/src/vs/workbench/contrib/chat/browser/sessionChatPillOptions.js +52 -0
  472. package/vscode/src/vs/workbench/contrib/chat/browser/sessionPullRequestPill.d.ts +22 -0
  473. package/vscode/src/vs/workbench/contrib/chat/browser/sessionPullRequestPill.js +58 -0
  474. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/voiceCodeTranscriptionClient.d.ts +63 -0
  475. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/voiceCodeTranscriptionClient.js +361 -0
  476. package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatEditorTopologyTelemetry.d.ts +35 -0
  477. package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatEditorTopologyTelemetry.js +90 -0
  478. package/vscode/src/vs/workbench/contrib/chat/browser/tools/clientToolSetsContribution.js +25 -18
  479. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -1
  480. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +77 -41
  481. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +60 -43
  482. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +4 -1
  483. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +60 -16
  484. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +10 -8
  485. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +13 -4
  486. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +3 -1
  487. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +44 -24
  488. package/vscode/src/vs/workbench/contrib/chat/browser/utilityModelContribution.js +4 -4
  489. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  490. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.d.ts +52 -6
  491. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.js +446 -79
  492. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceInputUtils.d.ts +11 -0
  493. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceInputUtils.js +13 -0
  494. package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.d.ts +66 -0
  495. package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.js +297 -0
  496. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.d.ts +137 -0
  497. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.js +714 -0
  498. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentOpenChat.css +379 -0
  499. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.d.ts +10 -0
  500. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatFind/chatFindAccessibilityHelp.js +78 -0
  501. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPetWidgetService.d.ts +36 -0
  502. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPetWidgetService.js +172 -0
  503. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +5 -1
  504. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +8 -1
  505. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNoticeHub.d.ts +15 -0
  506. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNoticeHub.js +30 -0
  507. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +11 -1
  508. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +41 -13
  509. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.d.ts +5 -2
  510. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +133 -3
  511. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.d.ts +3 -2
  512. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletionsBase.js +11 -2
  513. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatEditorInputContentProvider.js +4 -4
  514. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.d.ts +1 -0
  515. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.js +96 -0
  516. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +12 -0
  517. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +36 -1
  518. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +67 -17
  519. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +23 -37
  520. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.d.ts +18 -0
  521. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +72 -3
  522. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputPlaceholderDecoration.d.ts +11 -0
  523. package/vscode/src/vs/workbench/contrib/{agentsVoice/common/agentsVoiceColors.js → chat/browser/widget/input/editor/chatInputPlaceholderDecoration.js} +17 -15
  524. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.d.ts +3 -0
  525. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.js +16 -0
  526. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +2 -2
  527. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +6 -4
  528. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +21 -13
  529. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +48 -8
  530. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +457 -142
  531. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.d.ts +1 -1
  532. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +22 -14
  533. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +6 -22
  534. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationBlueprint.d.ts +22 -0
  535. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationBlueprint.js +163 -0
  536. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +27 -5
  537. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +79 -32
  538. package/vscode/src/vs/workbench/contrib/chat/common/chatNotification.d.ts +6 -0
  539. package/vscode/src/vs/workbench/contrib/chat/common/chatNotification.js +12 -0
  540. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +44 -11
  541. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +404 -51
  542. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +64 -4
  543. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +33 -2
  544. package/vscode/src/vs/workbench/contrib/chat/common/chatSideChatService.d.ts +68 -0
  545. package/vscode/src/vs/workbench/contrib/chat/common/chatSideChatService.js +70 -0
  546. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -2
  547. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +18 -5
  548. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +43 -14
  549. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +4 -0
  550. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +4 -9
  551. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +164 -71
  552. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +1 -1
  553. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +1 -1
  554. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
  555. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +12 -12
  556. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  557. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
  558. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.d.ts +3 -1
  559. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +19 -10
  560. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +3 -1
  561. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +172 -159
  562. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationService.d.ts +115 -0
  563. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/customizationMigrationService.js +69 -0
  564. package/vscode/src/vs/workbench/contrib/chat/common/sessionChatPills.d.ts +60 -0
  565. package/vscode/src/vs/workbench/contrib/chat/common/sessionChatPills.js +139 -0
  566. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  567. package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.d.ts +5 -0
  568. package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.js +21 -1
  569. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +25 -2
  570. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +55 -18
  571. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.js +10 -10
  572. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.js +10 -10
  573. package/vscode/src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.js +1 -1
  574. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +1 -0
  575. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
  576. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  577. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.d.ts +59 -0
  578. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditReviewSession.js +323 -0
  579. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionResolver.d.ts +30 -0
  580. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionResolver.js +79 -0
  581. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +6 -2
  582. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +118 -13
  583. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  584. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  585. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  586. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  587. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  588. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +8 -8
  589. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js +1 -0
  590. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.d.ts +81 -0
  591. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +85 -0
  592. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +17 -17
  593. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
  594. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +23 -23
  595. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
  596. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +17 -3
  597. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +81 -7
  598. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatSessionResolver.d.ts +30 -0
  599. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatSessionResolver.js +86 -0
  600. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +10 -2
  601. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +97 -18
  602. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.d.ts +2 -22
  603. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.js +10 -8
  604. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/largeOutputFileWriter.js +2 -1
  605. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +2 -0
  606. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +42 -36
  607. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +8 -0
  608. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +10 -0
  609. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +4 -4
  610. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +2 -1
  611. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  612. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +25 -16
  613. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +4 -3
  614. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/consoleCompactor/consoleCompactor.d.ts +70 -0
  615. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/consoleCompactor/consoleCompactor.js +4316 -0
  616. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  617. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  618. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  619. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  620. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +4 -4
  621. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +3 -3
  622. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +4 -4
  623. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +6 -1
  624. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +188 -148
  625. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +10 -10
  626. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  627. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  628. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  629. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  630. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +7 -0
  631. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +82 -3
  632. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.d.ts +5 -6
  633. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.js +5 -42
  634. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalOutput.d.ts +2 -0
  635. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalOutput.js +8 -0
  636. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +1 -0
  637. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +27 -8
  638. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.d.ts +205 -0
  639. package/vscode/src/vs/workbench/services/accounts/browser/defaultAccount.js +1580 -0
  640. package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.d.ts +30 -0
  641. package/vscode/src/vs/workbench/services/agentEditorComments/browser/agentEditorCommentsOverlayWidget.js +175 -0
  642. package/vscode/src/vs/workbench/services/agentEditorComments/browser/media/agentEditorCommentsOverlayWidget.css +65 -0
  643. package/vscode/src/vs/workbench/services/agentHost/browser/agentSdkSetupService.d.ts +47 -0
  644. package/vscode/src/vs/workbench/services/agentHost/browser/agentSdkSetupService.js +129 -0
  645. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.d.ts +26 -8
  646. package/vscode/src/vs/workbench/services/agentHost/browser/editorRemoteAgentHostServiceClient.js +89 -27
  647. package/vscode/src/vs/workbench/services/agentHost/browser/webAgentHostEnablementService.d.ts +8 -0
  648. package/vscode/src/vs/workbench/services/agentHost/browser/webAgentHostEnablementService.js +28 -0
  649. package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +5 -1
  650. package/vscode/src/vs/workbench/services/agentHost/common/agentHostResourceService.d.ts +18 -18
  651. package/vscode/src/vs/workbench/services/agentHost/common/agentHostResourceService.js +159 -60
  652. package/vscode/src/vs/workbench/services/agentHost/common/editorRemoteAgentHostTransport.d.ts +47 -0
  653. package/vscode/src/vs/workbench/services/agentHost/common/editorRemoteAgentHostTransport.js +362 -0
  654. package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.d.ts +0 -1
  655. package/vscode/src/vs/platform/agentHost/browser/agentHost.config.contribution.js +0 -40
  656. package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +0 -1110
  657. package/vscode/src/vs/platform/agentHost/common/agentHost.config.contribution.js +0 -76
  658. package/vscode/src/vs/platform/agentHost/common/agentHostResourceService.d.ts +0 -63
  659. package/vscode/src/vs/platform/agentHost/common/agentHostResourceService.js +0 -25
  660. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.d.ts +0 -254
  661. package/vscode/src/vs/platform/agentHost/common/agentHostSchema.js +0 -451
  662. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +0 -1294
  663. package/vscode/src/vs/platform/agentHost/common/agentService.js +0 -92
  664. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/errors.d.ts +0 -186
  665. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/errors.js +0 -10
  666. package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.d.ts +0 -42
  667. package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.js +0 -7
  668. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.d.ts +0 -15
  669. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoice.js +0 -15
  670. package/vscode/src/vs/workbench/contrib/agentsVoice/common/agentsVoiceColors.d.ts +0 -2
  671. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +0 -19
  672. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +0 -243
  673. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.d.ts +0 -24
  674. package/vscode/src/vs/workbench/contrib/chat/browser/actions/openCopilotCliStateFileAction.js +0 -77
  675. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +0 -92
  676. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +0 -224
  677. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.d.ts +0 -23
  678. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostNewSessionFolderService.js +0 -52
  679. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +0 -16
  680. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +0 -96
  681. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.d.ts +0 -27
  682. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentDisabledInputTipContribution.js +0 -152
  683. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.d.ts +0 -87
  684. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.js +0 -772
  685. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.d.ts +0 -30
  686. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseFileChangesService.js +0 -29
  687. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.d.ts +0 -20
  688. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +0 -40
  689. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/media/planReviewFeedback.css +0 -160
  690. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.d.ts +0 -9
  691. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +0 -123
  692. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.d.ts +0 -37
  693. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +0 -572
  694. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.d.ts +0 -125
  695. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.js +0 -399
  696. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.d.ts +0 -321
  697. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.js +0 -2117
  698. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.d.ts +0 -57
  699. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService.js +0 -367
  700. package/vscode/src/vs/workbench/contrib/chat/common/automations/automation.d.ts +0 -78
  701. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.d.ts +0 -13
  702. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.d.ts +0 -11
  703. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationDialogService.service.js +0 -6
  704. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.d.ts +0 -16
  705. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationRunner.service.js +0 -6
  706. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.d.ts +0 -46
  707. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.d.ts +0 -36
  708. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationService.service.js +0 -6
  709. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.d.ts +0 -12
  710. package/vscode/src/vs/workbench/contrib/chat/common/automations/automationsEnabled.js +0 -6
  711. package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.d.ts +0 -9
  712. package/vscode/src/vs/workbench/contrib/chat/common/automations/schedule.js +0 -6
  713. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +0 -15
  714. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +0 -177
  715. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +0 -67
  716. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +0 -195
  717. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +0 -65
  718. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +0 -264
  719. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +0 -190
  720. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +0 -865
  721. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +0 -31
  722. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +0 -122
  723. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +0 -24
  724. /package/vscode/src/vs/{workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers → platform/terminal/common/autoApprove}/sedFileWriteParser.js +0 -0
  725. /package/vscode/src/vs/{platform/agentHost/common/agentHost.config.contribution.d.ts → workbench/contrib/chat/browser/agentSessionsConfiguration.d.ts} +0 -0
@@ -2,7 +2,7 @@
2
2
  import { registerCss } from '@codingame/monaco-vscode-api/css';
3
3
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
4
  import * as aiCustomizationManagement from './media/aiCustomizationManagement.css';
5
- import { $ as $$1, append, createTextNode, addDisposableListener, getWindow, DisposableResizeObserver, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
5
+ import { $ as $$1, append, clearNode, addDisposableGenericMouseDownListener, EventHelper, DisposableResizeObserver, getWindow, createTextNode, addDisposableListener, EventType, scheduleAtNextAnimationFrame } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
6
6
  import { DisposableStore, Disposable, MutableDisposable, isDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
7
7
  import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
8
8
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
@@ -11,11 +11,11 @@ import { WorkbenchList } from '@codingame/monaco-vscode-api/vscode/vs/platform/l
11
11
  import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
12
12
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
13
13
  import { Button, ButtonWithDropdown } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
14
- import { defaultCheckboxStyles, defaultInputBoxStyles, defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
14
+ import { defaultCheckboxStyles, defaultButtonStyles, getButtonStyles, defaultInputBoxStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
15
15
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
16
16
  import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
17
17
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
18
- import { InputBox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/inputbox/inputBox';
18
+ import { InputBox, MessageType } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/inputbox/inputBox';
19
19
  import { IContextViewService, IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
20
20
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
21
21
  import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
@@ -25,36 +25,91 @@ import { isEqual, basename, dirname } from '@codingame/monaco-vscode-api/vscode/
25
25
  import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
26
26
  import { isWeb } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
27
27
  import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
28
- import { isContributionEnabled } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/enablement';
29
- import { getInstalledPluginContextMenuActions } from '../agentPluginActions.js';
28
+ import { isContributionEnabled, ContributionEnablementState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/enablement';
29
+ import { isPluginPolicyBlocked, getInstalledPluginContextMenuActions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentPluginActions';
30
30
  import { IPluginMarketplaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service';
31
31
  import { IPluginInstallService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service';
32
32
  import { AgentPluginItemKind } from '../agentPluginEditor/agentPluginItems.js';
33
- import { pluginIcon } from './aiCustomizationIcons.js';
34
33
  import { formatDisplayName } from './aiCustomizationListWidget.js';
35
34
  import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
36
35
  import { CUSTOMIZATION_GROUP_HEADER_HEIGHT, CUSTOMIZATION_GROUP_HEADER_HEIGHT_WITH_SEPARATOR, CustomizationGroupHeaderRenderer } from './customizationGroupHeaderRenderer.js';
37
- import { isPluginCustomizationItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService';
36
+ import { getCustomizationDisabledLabel, isPluginCustomizationItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService';
38
37
  import { ICustomizationHarnessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService.service';
39
- import { Checkbox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/toggle/toggle';
40
38
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
41
39
  import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
42
40
  import { IAICustomizationItemsModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.service';
43
- import { GalleryItemInstallState, GalleryItemRenderer } from './galleryItemRenderer.js';
41
+ import { UpdateAgentPluginsCommandId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
42
+ import { Switch } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/toggle/switch';
43
+ import { Checkbox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/toggle/toggle';
44
+ import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
45
+ import { getErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
46
+ import { getPluginInclusionLabel } from './aiCustomizationPresentation.js';
47
+ import { status } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
48
+ import { setVirtualizedRowActionsTabbable, createCustomizationCardPrimaryAction, setupCollapsibleSection, CustomizationCardListController, layoutVirtualizedSections, getVirtualizedSectionMinimumHeight, layoutVirtualizedSectionList, renderVirtualizedSectionLoadingPlaceholder } from './customizationCardList.js';
49
+ import { DomScrollableElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/scrollbar/scrollableElement';
50
+ import { ScrollbarVisibility } from '@codingame/monaco-vscode-api/vscode/vs/base/common/scrollable';
44
51
  import { truncateToFirstLine } from './aiCustomizationListWidgetUtils.js';
45
52
  import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
46
- import { runOnChange } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/runOnChange';
53
+ import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
47
54
 
48
55
  registerCss(aiCustomizationManagement);
49
56
  const $ = $$1;
50
- const PLUGIN_ITEM_HEIGHT = 36;
57
+ const PLUGIN_ITEM_HEIGHT = 66;
58
+ const PLUGIN_MARKETPLACE_ITEM_HEIGHT = 68;
59
+ class PluginMarketplaceSnapshotModel {
60
+ constructor() {
61
+ this._state = "uninitialized";
62
+ this._items = [];
63
+ }
64
+ get state() {
65
+ return this._state;
66
+ }
67
+ get items() {
68
+ return this._items;
69
+ }
70
+ beginLoading() {
71
+ if (this._state !== "uninitialized") {
72
+ return false;
73
+ }
74
+ this._state = "loading";
75
+ return true;
76
+ }
77
+ complete(items) {
78
+ this._items = items;
79
+ this._state = "loaded";
80
+ }
81
+ fail() {
82
+ this._items = [];
83
+ this._state = "failed";
84
+ }
85
+ reset() {
86
+ this._items = [];
87
+ this._state = "uninitialized";
88
+ }
89
+ }
90
+ function shouldLoadPluginMarketplaceSnapshot(visible, state, marketplaceAvailable) {
91
+ return visible && state === "uninitialized" && marketplaceAvailable;
92
+ }
93
+ function isCurrentPluginMarketplaceRequest(
94
+ requestQuery,
95
+ currentQuery,
96
+ requestBrowseMode,
97
+ currentBrowseMode,
98
+ isActiveRequest,
99
+ isCancellationRequested
100
+ ) {
101
+ return isActiveRequest && !isCancellationRequested && requestQuery === currentQuery && requestBrowseMode === currentBrowseMode;
102
+ }
51
103
  class PluginItemDelegate {
52
104
  getHeight(element) {
53
105
  if (element.type === "group-header") {
54
106
  return element.isFirst ? CUSTOMIZATION_GROUP_HEADER_HEIGHT : CUSTOMIZATION_GROUP_HEADER_HEIGHT_WITH_SEPARATOR;
55
107
  }
108
+ if (element.type === "search-header") {
109
+ return 32;
110
+ }
56
111
  if (element.type === "marketplace-item") {
57
- return 62;
112
+ return PLUGIN_MARKETPLACE_ITEM_HEIGHT;
58
113
  }
59
114
  return PLUGIN_ITEM_HEIGHT;
60
115
  }
@@ -62,6 +117,9 @@ class PluginItemDelegate {
62
117
  if (element.type === "group-header") {
63
118
  return "pluginGroupHeader";
64
119
  }
120
+ if (element.type === "search-header") {
121
+ return "pluginSearchHeader";
122
+ }
65
123
  if (element.type === "marketplace-item") {
66
124
  return PLUGIN_MARKETPLACE_ITEM_TEMPLATE_ID;
67
125
  }
@@ -71,47 +129,82 @@ class PluginItemDelegate {
71
129
  return "pluginInstalledItem";
72
130
  }
73
131
  }
132
+ class PluginSearchHeaderRenderer {
133
+ constructor() {
134
+ this.templateId = "pluginSearchHeader";
135
+ }
136
+ renderTemplate(container) {
137
+ container.classList.add("plugin-search-header");
138
+ const label = append(container, $(".plugin-search-header-label"));
139
+ return {
140
+ container,
141
+ label
142
+ };
143
+ }
144
+ renderElement(element, _index, templateData) {
145
+ templateData.label.textContent = element.label;
146
+ templateData.container.classList.toggle("available-to-install", element.id === "plugin-search-available");
147
+ }
148
+ disposeTemplate() {}
149
+ }
74
150
  class PluginInstalledItemRenderer {
75
- constructor(_harnessService) {
151
+ constructor(_harnessService, _renderActions, _showSyncCheckbox = true) {
76
152
  this._harnessService = _harnessService;
153
+ this._renderActions = _renderActions;
154
+ this._showSyncCheckbox = _showSyncCheckbox;
77
155
  this.templateId = "pluginInstalledItem";
156
+ this._templates = ( new Set());
157
+ this._focusedIndex = -1;
78
158
  }
79
159
  renderTemplate(container) {
80
- container.classList.add("mcp-server-item");
160
+ container.classList.add("plugin-list-item", "plugin-installed-item");
81
161
  const syncCheckboxContainer = append(container, $(".item-sync-checkbox"));
82
- const typeIcon = append(container, $(".mcp-server-icon"));
83
- typeIcon.classList.add(...ThemeIcon.asClassNameArray(pluginIcon));
84
- const details = append(container, $(".mcp-server-details"));
85
- const name = append(details, $(".mcp-server-name"));
86
- const description = append(details, $(".mcp-server-description"));
87
- return {
162
+ const details = append(container, $(".plugin-list-item-details"));
163
+ const nameRow = append(details, $(".plugin-list-item-name-row"));
164
+ const name = append(nameRow, $(".plugin-list-item-name"));
165
+ const source = append(nameRow, $(".inline-badge.plugin-source-badge"));
166
+ const description = append(details, $(".plugin-list-item-description"));
167
+ const metadata = append(details, $(".plugin-list-item-metadata"));
168
+ const actions = append(container, $(".plugin-list-item-action"));
169
+ const template = {
88
170
  container,
89
171
  syncCheckboxContainer,
90
- typeIcon,
91
172
  name,
173
+ source,
92
174
  description,
93
- disposables: ( new DisposableStore())
175
+ metadata,
176
+ actions,
177
+ disposables: ( new DisposableStore()),
178
+ currentIndex: -1
94
179
  };
180
+ this._templates.add(template);
181
+ return template;
95
182
  }
96
- renderElement(element, _index, templateData) {
183
+ renderElement(element, index, templateData) {
97
184
  templateData.disposables.clear();
185
+ templateData.currentIndex = index;
98
186
  templateData.name.textContent = formatDisplayName(element.item.name);
187
+ templateData.source.textContent = element.item.marketplace ? "" : ( localize(6930, "Local"));
188
+ templateData.source.title = element.item.marketplace ? "" : ( localize(6931, "Installed from a local source"));
189
+ templateData.source.style.display = element.item.marketplace ? "none" : "";
99
190
  if (element.item.description) {
100
191
  templateData.description.textContent = truncateToFirstLine(element.item.description);
101
192
  templateData.description.style.display = "";
102
193
  } else {
103
194
  templateData.description.style.display = "none";
104
195
  }
196
+ templateData.metadata.textContent = getInstalledPluginMetadata(element.item);
197
+ templateData.metadata.style.display = templateData.metadata.textContent ? "" : "none";
105
198
  templateData.disposables.add(autorun(reader => {
106
199
  const enabled = isContributionEnabled(element.item.plugin.enablement.read(reader));
107
200
  templateData.container.classList.toggle("disabled", !enabled);
108
201
  }));
109
- const syncProvider = this._harnessService.getActiveDescriptor().syncProvider;
202
+ const syncProvider = this._showSyncCheckbox ? this._harnessService.getActiveDescriptor().syncProvider : undefined;
110
203
  if (syncProvider) {
111
204
  templateData.syncCheckboxContainer.style.display = "";
112
205
  const pluginUri = element.item.plugin.uri;
113
206
  const disabled = syncProvider.isDisabled(pluginUri);
114
- const title = disabled ? ( localize(6076, "Enable {0} for sync", element.item.name)) : ( localize(6077, "Disable {0} from sync", element.item.name));
207
+ const title = disabled ? ( localize(6932, "Enable {0} for sync", element.item.name)) : ( localize(6933, "Disable {0} from sync", element.item.name));
115
208
  const checkbox = templateData.disposables.add(( new Checkbox(title, !disabled, defaultCheckboxStyles)));
116
209
  templateData.syncCheckboxContainer.replaceChildren(checkbox.domNode);
117
210
  templateData.disposables.add(checkbox.onChange(() => {
@@ -121,35 +214,60 @@ class PluginInstalledItemRenderer {
121
214
  templateData.syncCheckboxContainer.style.display = "none";
122
215
  templateData.syncCheckboxContainer.replaceChildren();
123
216
  }
217
+ clearNode(templateData.actions);
218
+ this._renderActions(
219
+ element.item,
220
+ templateData.container,
221
+ templateData.actions,
222
+ templateData.disposables
223
+ );
224
+ setVirtualizedRowActionsTabbable(templateData.actions, index === this._focusedIndex);
225
+ }
226
+ setFocusedIndex(index) {
227
+ this._focusedIndex = index;
228
+ for (const template of this._templates) {
229
+ setVirtualizedRowActionsTabbable(template.actions, template.currentIndex === index);
230
+ }
124
231
  }
125
232
  disposeTemplate(templateData) {
233
+ this._templates.delete(templateData);
126
234
  templateData.disposables.dispose();
127
235
  }
128
236
  }
129
237
  class PluginRemoteItemRenderer {
130
- constructor() {
238
+ constructor(_renderActions) {
239
+ this._renderActions = _renderActions;
131
240
  this.templateId = "pluginRemoteItem";
241
+ this._templates = ( new Set());
242
+ this._focusedIndex = -1;
132
243
  }
133
244
  renderTemplate(container) {
134
- container.classList.add("mcp-server-item");
135
- const typeIcon = append(container, $(".mcp-server-icon"));
136
- typeIcon.classList.add(...ThemeIcon.asClassNameArray(pluginIcon));
137
- const details = append(container, $(".mcp-server-details"));
138
- const nameRow = append(details, $(".mcp-server-name"));
245
+ container.classList.add("plugin-list-item", "plugin-remote-item");
246
+ const details = append(container, $(".plugin-list-item-details"));
247
+ const nameRow = append(details, $(".plugin-list-item-name-row"));
139
248
  const name = append(nameRow, $("span"));
140
249
  const badge = append(nameRow, $(".inline-badge.item-badge"));
141
- const description = append(details, $(".mcp-server-description"));
142
- const status = append(container, $(".mcp-server-status"));
143
- return {
250
+ const description = append(details, $(".plugin-list-item-description"));
251
+ const metadata = append(details, $(".plugin-list-item-metadata"));
252
+ const status = append(container, $(".plugin-list-item-status"));
253
+ const actions = append(container, $(".plugin-list-item-action"));
254
+ const template = {
144
255
  container,
145
- typeIcon,
146
256
  name,
147
257
  badge,
148
258
  description,
149
- status
259
+ metadata,
260
+ status,
261
+ actions,
262
+ disposables: ( new DisposableStore()),
263
+ currentIndex: -1
150
264
  };
265
+ this._templates.add(template);
266
+ return template;
151
267
  }
152
- renderElement(element, _index, templateData) {
268
+ renderElement(element, index, templateData) {
269
+ templateData.disposables.clear();
270
+ templateData.currentIndex = index;
153
271
  templateData.name.textContent = formatDisplayName(element.item.name);
154
272
  if (element.item.badge) {
155
273
  templateData.badge.textContent = element.item.badge;
@@ -168,76 +286,175 @@ class PluginRemoteItemRenderer {
168
286
  templateData.description.style.display = "none";
169
287
  }
170
288
  templateData.container.classList.toggle("disabled", element.item.enabled === false);
171
- templateData.status.className = "mcp-server-status";
289
+ templateData.metadata.textContent = ( localize(6934, "Remote agent host"));
290
+ templateData.status.className = "plugin-list-item-status";
172
291
  if (element.item.enabled === false) {
173
- templateData.status.textContent = ( localize(6078, "Disabled"));
292
+ templateData.status.textContent = getRemotePluginDisabledLabel(element.item);
174
293
  templateData.status.classList.add("disabled");
175
- return;
294
+ } else {
295
+ switch (element.item.status) {
296
+ case "loading":
297
+ templateData.status.textContent = getRemotePluginStatusLabel(element.item);
298
+ templateData.status.classList.add("running");
299
+ break;
300
+ case "loaded":
301
+ templateData.status.textContent = getRemotePluginStatusLabel(element.item);
302
+ templateData.status.classList.add("running");
303
+ break;
304
+ case "degraded":
305
+ templateData.status.textContent = getRemotePluginStatusLabel(element.item);
306
+ templateData.status.classList.add("disabled");
307
+ break;
308
+ case "error":
309
+ templateData.status.textContent = getRemotePluginStatusLabel(element.item);
310
+ templateData.status.classList.add("disabled");
311
+ break;
312
+ default:
313
+ templateData.status.textContent = "";
314
+ break;
315
+ }
176
316
  }
177
- switch (element.item.status) {
178
- case "loading":
179
- templateData.status.textContent = ( localize(6079, "Loading"));
180
- templateData.status.classList.add("running");
181
- break;
182
- case "loaded":
183
- templateData.status.textContent = ( localize(6080, "Loaded"));
184
- templateData.status.classList.add("running");
185
- break;
186
- case "degraded":
187
- templateData.status.textContent = ( localize(6081, "Warning"));
188
- templateData.status.classList.add("disabled");
189
- break;
190
- case "error":
191
- templateData.status.textContent = ( localize(6082, "Error"));
192
- templateData.status.classList.add("disabled");
193
- break;
194
- default:
195
- templateData.status.textContent = "";
196
- break;
317
+ clearNode(templateData.actions);
318
+ this._renderActions(element.item, templateData.actions, templateData.disposables);
319
+ setVirtualizedRowActionsTabbable(templateData.actions, index === this._focusedIndex);
320
+ }
321
+ setFocusedIndex(index) {
322
+ this._focusedIndex = index;
323
+ for (const template of this._templates) {
324
+ setVirtualizedRowActionsTabbable(template.actions, template.currentIndex === index);
197
325
  }
198
326
  }
199
- disposeTemplate(_templateData) {}
327
+ disposeTemplate(templateData) {
328
+ this._templates.delete(templateData);
329
+ templateData.disposables.dispose();
330
+ }
331
+ }
332
+ function getRemotePluginDisabledLabel(item) {
333
+ return getCustomizationDisabledLabel(item.disabledReason);
200
334
  }
201
335
  const PLUGIN_MARKETPLACE_ITEM_TEMPLATE_ID = "pluginMarketplaceItem";
202
- class PluginMarketplaceItemProvider {
203
- constructor(pluginInstallService, agentPluginService) {
336
+ class PluginMarketplaceItemRenderer {
337
+ constructor(
338
+ pluginInstallService,
339
+ agentPluginService,
340
+ pluginMarketplaceService,
341
+ notificationService,
342
+ showRecommendedBadge = true
343
+ ) {
204
344
  this.pluginInstallService = pluginInstallService;
205
345
  this.agentPluginService = agentPluginService;
346
+ this.pluginMarketplaceService = pluginMarketplaceService;
347
+ this.notificationService = notificationService;
348
+ this.showRecommendedBadge = showRecommendedBadge;
349
+ this.templateId = PLUGIN_MARKETPLACE_ITEM_TEMPLATE_ID;
350
+ this._templates = ( new Set());
351
+ this._focusedIndex = -1;
206
352
  }
207
- getLabel(element) {
208
- return element.item.name;
209
- }
210
- getPublisherDisplayName(element) {
211
- return element.item.marketplace;
353
+ renderTemplate(container) {
354
+ container.classList.add("plugin-list-item", "plugin-marketplace-item");
355
+ const details = append(container, $(".plugin-list-item-details"));
356
+ const nameRow = append(details, $(".plugin-list-item-name-row"));
357
+ const name = append(nameRow, $(".plugin-list-item-name"));
358
+ const recommendedBadge = append(nameRow, $(".inline-badge.plugin-recommended-badge"));
359
+ recommendedBadge.textContent = ( localize(6935, "Recommended"));
360
+ const description = append(details, $(".plugin-list-item-description"));
361
+ const publisher = append(details, $(".plugin-list-item-source"));
362
+ const metadata = append(details, $(".plugin-list-item-metadata"));
363
+ const actionContainer = append(container, $(".plugin-list-item-action"));
364
+ const installButton = ( new Button(actionContainer, defaultButtonStyles));
365
+ installButton.element.classList.add("plugin-list-item-install-button");
366
+ const templateDisposables = ( new DisposableStore());
367
+ templateDisposables.add(installButton);
368
+ templateDisposables.add(
369
+ addDisposableGenericMouseDownListener(installButton.element, event => EventHelper.stop(event, true))
370
+ );
371
+ const template = {
372
+ container,
373
+ name,
374
+ recommendedBadge,
375
+ publisher,
376
+ description,
377
+ metadata,
378
+ installButton,
379
+ elementDisposables: ( new DisposableStore()),
380
+ templateDisposables,
381
+ currentIndex: -1
382
+ };
383
+ this._templates.add(template);
384
+ return template;
212
385
  }
213
- getDescription(element) {
214
- return element.item.description;
386
+ renderElement(element, index, templateData) {
387
+ templateData.elementDisposables.clear();
388
+ templateData.currentIndex = index;
389
+ templateData.name.textContent = element.item.name;
390
+ templateData.recommendedBadge.style.display = this.showRecommendedBadge && this.isRecommended(element.item) ? "" : "none";
391
+ templateData.publisher.textContent = "";
392
+ templateData.publisher.style.display = "none";
393
+ templateData.description.textContent = element.item.description || "";
394
+ templateData.metadata.textContent = "";
395
+ templateData.metadata.style.display = "none";
396
+ const installUri = this.pluginInstallService.getPluginInstallUri({
397
+ name: element.item.name,
398
+ description: element.item.description,
399
+ version: element.item.version ?? "",
400
+ sourceDescriptor: element.item.sourceDescriptor,
401
+ source: element.item.source,
402
+ marketplace: element.item.marketplace,
403
+ marketplaceReference: element.item.marketplaceReference,
404
+ marketplaceType: element.item.marketplaceType
405
+ });
406
+ const isAlreadyInstalled = ( this.agentPluginService.plugins.get().some(p => isEqual(p.uri, installUri)));
407
+ if (isAlreadyInstalled) {
408
+ templateData.installButton.label = ( localize(6936, "Installed"));
409
+ templateData.installButton.enabled = false;
410
+ this.updateInstallButtonTabbability(templateData);
411
+ return;
412
+ }
413
+ templateData.installButton.label = ( localize(6937, "Install"));
414
+ templateData.installButton.enabled = true;
415
+ this.updateInstallButtonTabbability(templateData);
416
+ templateData.elementDisposables.add(templateData.installButton.onDidClick(async event => {
417
+ EventHelper.stop(event, true);
418
+ templateData.installButton.label = ( localize(6938, "Installing..."));
419
+ templateData.installButton.enabled = false;
420
+ try {
421
+ await this.pluginInstallService.installPlugin({
422
+ name: element.item.name,
423
+ description: element.item.description,
424
+ version: element.item.version ?? "",
425
+ sourceDescriptor: element.item.sourceDescriptor,
426
+ source: element.item.source,
427
+ marketplace: element.item.marketplace,
428
+ marketplaceReference: element.item.marketplaceReference,
429
+ marketplaceType: element.item.marketplaceType,
430
+ readmeUri: element.item.readmeUri
431
+ });
432
+ templateData.installButton.label = ( localize(6936, "Installed"));
433
+ this.updateInstallButtonTabbability(templateData);
434
+ } catch (error) {
435
+ templateData.installButton.label = ( localize(6937, "Install"));
436
+ templateData.installButton.enabled = true;
437
+ this.updateInstallButtonTabbability(templateData);
438
+ this.notificationService.error(( localize(6939, "Unable to install plugin: {0}", getErrorMessage(error))));
439
+ }
440
+ }));
215
441
  }
216
- getInstallState(element) {
217
- const installUri = this.pluginInstallService.getPluginInstallUri(this._toInstallable(element.item));
218
- const isInstalled = ( this.agentPluginService.plugins.get().some(p => isEqual(p.uri, installUri)));
219
- return isInstalled ? GalleryItemInstallState.Installed : GalleryItemInstallState.Uninstalled;
442
+ setFocusedIndex(index) {
443
+ this._focusedIndex = index;
444
+ for (const template of this._templates) {
445
+ this.updateInstallButtonTabbability(template);
446
+ }
220
447
  }
221
- async install(element) {
222
- await this.pluginInstallService.installPlugin({
223
- ...this._toInstallable(element.item),
224
- readmeUri: element.item.readmeUri
225
- });
448
+ updateInstallButtonTabbability(templateData) {
449
+ templateData.installButton.element.tabIndex = templateData.installButton.enabled && templateData.currentIndex === this._focusedIndex ? 0 : -1;
226
450
  }
227
- onDidChangeInstallState(_element, listener) {
228
- return runOnChange(this.agentPluginService.plugins, () => listener());
451
+ isRecommended(item) {
452
+ return ( this.pluginMarketplaceService.recommendedPlugins.get().has(getMarketplaceRecommendationKey(item)));
229
453
  }
230
- _toInstallable(item) {
231
- return {
232
- name: item.name,
233
- description: item.description,
234
- version: "",
235
- sourceDescriptor: item.sourceDescriptor,
236
- source: item.source,
237
- marketplace: item.marketplace,
238
- marketplaceReference: item.marketplaceReference,
239
- marketplaceType: item.marketplaceType
240
- };
454
+ disposeTemplate(templateData) {
455
+ this._templates.delete(templateData);
456
+ templateData.elementDisposables.dispose();
457
+ templateData.templateDisposables.dispose();
241
458
  }
242
459
  }
243
460
  function installedPluginToItem(plugin, labelService) {
@@ -259,6 +476,7 @@ function marketplacePluginToItem(plugin) {
259
476
  kind: AgentPluginItemKind.Marketplace,
260
477
  name: plugin.name,
261
478
  description: plugin.description,
479
+ version: plugin.version,
262
480
  source: plugin.source,
263
481
  sourceDescriptor: plugin.sourceDescriptor,
264
482
  marketplace: plugin.marketplace,
@@ -267,8 +485,105 @@ function marketplacePluginToItem(plugin) {
267
485
  readmeUri: plugin.readmeUri
268
486
  };
269
487
  }
488
+ function getMarketplaceRecommendationKey(plugin) {
489
+ return `${plugin.name}@${plugin.marketplace}`;
490
+ }
491
+ function compareInstalledPluginItems(a, b) {
492
+ return formatDisplayName(a.name).localeCompare(formatDisplayName(b.name));
493
+ }
494
+ function getInstalledPluginMetadata(item) {
495
+ const metadata = [];
496
+ const contributionSummary = getInstalledPluginContributionSummary(item);
497
+ if (contributionSummary) {
498
+ metadata.push(contributionSummary);
499
+ }
500
+ return metadata.join(" • ");
501
+ }
502
+ function getInstalledPluginContributionEntries(item) {
503
+ const plugin = item.plugin;
504
+ const entries = [];
505
+ appendContributionEntry(
506
+ entries,
507
+ formatContributionLabel(plugin.agents.get().length, ( localize(6940, "1 agent")), ( localize(6941, "{0} agents", plugin.agents.get().length))),
508
+ plugin.agents.get()
509
+ );
510
+ appendContributionEntry(
511
+ entries,
512
+ formatContributionLabel(plugin.skills.get().length, ( localize(6942, "1 skill")), ( localize(6943, "{0} skills", plugin.skills.get().length))),
513
+ plugin.skills.get()
514
+ );
515
+ appendContributionEntry(
516
+ entries,
517
+ formatContributionLabel(plugin.commands.get().length, ( localize(6944, "1 command")), ( localize(6945, "{0} commands", plugin.commands.get().length))),
518
+ plugin.commands.get()
519
+ );
520
+ appendContributionEntry(
521
+ entries,
522
+ formatContributionLabel(plugin.instructions.get().length, ( localize(6946, "1 instruction")), ( localize(6947, "{0} instructions", plugin.instructions.get().length))),
523
+ plugin.instructions.get()
524
+ );
525
+ appendContributionEntry(
526
+ entries,
527
+ formatContributionLabel(plugin.mcpServerDefinitions.get().length, ( localize(6948, "1 MCP server")), ( localize(6949, "{0} MCP servers", plugin.mcpServerDefinitions.get().length))),
528
+ ( plugin.mcpServerDefinitions.get().map(server => ({
529
+ name: server.name
530
+ })))
531
+ );
532
+ appendContributionEntry(entries, formatContributionLabel(plugin.hooks.get().length, ( localize(6950, "1 hook")), ( localize(6951, "{0} hooks", plugin.hooks.get().length))), ( plugin.hooks.get().map(hook => ({
533
+ name: hook.originalId,
534
+ description: ( localize(6952, "{0} commands", hook.hooks.length))
535
+ }))));
536
+ return entries;
537
+ }
538
+ function appendContributionEntry(entries, label, items) {
539
+ if (label && items.length > 0) {
540
+ entries.push({
541
+ label,
542
+ items
543
+ });
544
+ }
545
+ }
546
+ function formatContributionLabel(count, singular, plural) {
547
+ if (count === 0) {
548
+ return undefined;
549
+ }
550
+ return count === 1 ? singular : plural;
551
+ }
552
+ function getRemotePluginStatusLabel(item) {
553
+ if (item.enabled === false) {
554
+ return getRemotePluginDisabledLabel(item);
555
+ }
556
+ switch (item.status) {
557
+ case "loading":
558
+ return localize(6953, "Loading");
559
+ case "loaded":
560
+ return localize(6954, "Loaded");
561
+ case "degraded":
562
+ return localize(6955, "Warning");
563
+ case "error":
564
+ return localize(6956, "Error");
565
+ default:
566
+ return "";
567
+ }
568
+ }
569
+ function getInstalledPluginContributionSummary(item) {
570
+ return ( getInstalledPluginContributionEntries(item).map(entry => entry.label)).slice(0, 2).join(" • ");
571
+ }
572
+ function getToggledPluginEnablementState(state) {
573
+ switch (state) {
574
+ case ContributionEnablementState.EnabledWorkspace:
575
+ return ContributionEnablementState.DisabledWorkspace;
576
+ case ContributionEnablementState.DisabledWorkspace:
577
+ return ContributionEnablementState.EnabledWorkspace;
578
+ case ContributionEnablementState.EnabledProfile:
579
+ return ContributionEnablementState.DisabledProfile;
580
+ case ContributionEnablementState.DisabledProfile:
581
+ return ContributionEnablementState.EnabledProfile;
582
+ }
583
+ }
270
584
  let PluginListWidget = class PluginListWidget extends Disposable {
271
585
  constructor(
586
+ marketplaceBrowsingAvailable = !isWeb,
272
587
  instantiationService,
273
588
  agentPluginService,
274
589
  pluginMarketplaceService,
@@ -281,9 +596,11 @@ let PluginListWidget = class PluginListWidget extends Disposable {
281
596
  commandService,
282
597
  harnessService,
283
598
  itemsModel,
284
- configurationService
599
+ configurationService,
600
+ notificationService
285
601
  ) {
286
602
  super();
603
+ this.marketplaceBrowsingAvailable = marketplaceBrowsingAvailable;
287
604
  this.instantiationService = instantiationService;
288
605
  this.agentPluginService = agentPluginService;
289
606
  this.pluginMarketplaceService = pluginMarketplaceService;
@@ -297,27 +614,45 @@ let PluginListWidget = class PluginListWidget extends Disposable {
297
614
  this.harnessService = harnessService;
298
615
  this.itemsModel = itemsModel;
299
616
  this.configurationService = configurationService;
617
+ this.notificationService = notificationService;
300
618
  this._onDidSelectPlugin = this._register(( new Emitter()));
301
619
  this.onDidSelectPlugin = this._onDidSelectPlugin.event;
302
620
  this._onDidChangeItemCount = this._register(( new Emitter()));
303
621
  this.onDidChangeItemCount = this._onDidChangeItemCount.event;
304
622
  this.disabledLinkListener = this._register(( new MutableDisposable()));
305
623
  this.addDropdownActions = this._register(( new DisposableStore()));
624
+ this.cardDisposables = this._register(( new DisposableStore()));
625
+ this.pendingSectionLayout = this._register(( new MutableDisposable()));
626
+ this.cardListControllers = ( new WeakMap());
627
+ this.sectionLists = [];
628
+ this.collapsedSections = ( new Set());
306
629
  this.installedItems = [];
307
630
  this.remoteItems = [];
308
- this.displayEntries = [];
309
631
  this.marketplaceItems = [];
632
+ this.marketplaceSnapshot = ( new PluginMarketplaceSnapshotModel());
310
633
  this.searchQuery = "";
311
634
  this.browseMode = false;
635
+ this.visible = false;
636
+ this.narrowLayout = false;
637
+ this.wideLayout = false;
312
638
  this.lastHeight = 0;
313
639
  this.lastWidth = 0;
314
640
  this.lastHeaderHeight = 0;
315
641
  this._layoutDeferred = false;
642
+ this.revealLastItemScheduler = this._register(( new MutableDisposable()));
316
643
  this.collapsedGroups = ( new Set());
644
+ this.sectionScrollPositions = ( new Map());
317
645
  this.delayedFilter = ( new Delayer(200));
318
646
  this.delayedMarketplaceSearch = ( new Delayer(400));
319
- this.element = $(".mcp-list-widget");
647
+ this.filterGeneration = 0;
648
+ this.element = $(".mcp-list-widget.plugin-list-widget");
320
649
  this.create();
650
+ const resizeObserver = this._register(new DisposableResizeObserver(
651
+ "PluginListWidget",
652
+ () => this.updateResponsiveLayout(this.element.offsetWidth),
653
+ getWindow(this.element)
654
+ ));
655
+ this._register(resizeObserver.observe(this.element));
321
656
  this.updateAccessState();
322
657
  this._register(this.configurationService.onDidChangeConfiguration(e => {
323
658
  if (e.affectsConfiguration(ChatConfiguration.PluginsEnabled)) {
@@ -326,7 +661,12 @@ let PluginListWidget = class PluginListWidget extends Disposable {
326
661
  }));
327
662
  this._register({
328
663
  dispose: () => {
329
- this.marketplaceCts?.dispose();
664
+ this.delayedFilter.cancel();
665
+ this.delayedMarketplaceSearch.cancel();
666
+ this.marketplaceCts?.dispose(true);
667
+ this.marketplaceCts = undefined;
668
+ this.marketplaceSnapshotCts?.dispose(true);
669
+ this.marketplaceSnapshotCts = undefined;
330
670
  }
331
671
  });
332
672
  }
@@ -334,16 +674,16 @@ let PluginListWidget = class PluginListWidget extends Disposable {
334
674
  this.sectionTitleHeader = append(this.element, $(".section-title-header"));
335
675
  const titleRow = append(this.sectionTitleHeader, $(".section-title-row"));
336
676
  const sectionTitle = append(titleRow, $("h2.section-title"));
337
- sectionTitle.textContent = ( localize(6083, "Plugins"));
677
+ sectionTitle.textContent = ( localize(6957, "Plugins"));
338
678
  const sectionTitleDescription = append(this.sectionTitleHeader, $("p.section-title-description"));
339
679
  const sectionTitleDescriptionText = append(sectionTitleDescription, $("span.section-title-description-text"));
340
680
  sectionTitleDescriptionText.textContent = ( localize(
341
- 6084,
681
+ 6958,
342
682
  "Extend your AI agent with plugins that add commands, skills, agents, hooks, and MCP servers from reusable packages."
343
683
  ));
344
684
  sectionTitleDescription.appendChild(createTextNode(" "));
345
685
  this.sectionLink = append(sectionTitleDescription, $("a.section-title-link"));
346
- this.sectionLink.textContent = ( localize(6085, "Learn more about agent plugins"));
686
+ this.sectionLink.textContent = ( localize(6959, "Learn more about agent plugins"));
347
687
  this.sectionLink.href = "https://code.visualstudio.com/docs/agent-customization/agent-plugins?referrer=in-product";
348
688
  this._register(addDisposableListener(this.sectionLink, "click", e => {
349
689
  e.preventDefault();
@@ -366,36 +706,49 @@ let PluginListWidget = class PluginListWidget extends Disposable {
366
706
  }, targetWindow)
367
707
  );
368
708
  this._register(headerObserver.observe(this.sectionTitleHeader));
709
+ this.marketplaceBackContainer = append(this.element, $(".plugin-marketplace-back-container"));
710
+ this.marketplaceBackContainer.style.display = "none";
711
+ const backToInstalledLabel = ( localize(6960, "Back to Installed"));
712
+ this.backButtonContainer = append(this.marketplaceBackContainer, $(".list-add-button-container"));
713
+ this.backButton = this._register(( new Button(this.backButtonContainer, {
714
+ ...getButtonStyles({
715
+ buttonSecondaryBackground: undefined,
716
+ buttonSecondaryForeground: undefined,
717
+ buttonSecondaryHoverBackground: undefined,
718
+ buttonSecondaryBorder: undefined
719
+ }),
720
+ secondary: true,
721
+ supportIcons: true,
722
+ title: backToInstalledLabel,
723
+ ariaLabel: backToInstalledLabel
724
+ })));
725
+ this.backButton.element.classList.add("list-add-button", "plugin-card-ghost-button");
726
+ this.backButton.label = `$(${Codicon.arrowLeft.id}) ${backToInstalledLabel}`;
727
+ this._register(this.backButton.onDidClick(() => this.toggleBrowseMode(false)));
369
728
  this.searchAndButtonContainer = append(this.element, $(".list-search-and-button-container"));
370
729
  const searchContainer = append(this.searchAndButtonContainer, $(".list-search-container"));
371
730
  this.searchInput = this._register(( new InputBox(searchContainer, this.contextViewService, {
372
- placeholder: ( localize(6086, "Type to search...")),
731
+ placeholder: ( localize(6961, "Type to search...")),
373
732
  inputBoxStyles: defaultInputBoxStyles
374
733
  })));
375
734
  this._register(this.searchInput.onDidChange(() => {
376
735
  this.searchQuery = this.searchInput.value;
736
+ this.marketplaceCts?.dispose(true);
737
+ this.marketplaceCts = undefined;
377
738
  if (this.browseMode) {
378
739
  this.delayedMarketplaceSearch.trigger(() => this.queryMarketplace());
740
+ } else if (this.searchQuery.trim()) {
741
+ this.delayedMarketplaceSearch.trigger(() => this.queryPluginSearch());
379
742
  } else {
743
+ this.delayedMarketplaceSearch.cancel();
744
+ this.marketplaceItems = [];
745
+ this.searchInput.hideMessage();
380
746
  this.delayedFilter.trigger(() => this.filterPlugins());
381
747
  }
382
748
  }));
383
749
  this.buttonContainer = append(this.searchAndButtonContainer, $(".list-button-group"));
384
- const backButtonContainer = append(this.buttonContainer, $(".list-add-button-container"));
385
- const backToInstalledLabel = ( localize(6087, "Back to Installed Plugins"));
386
- this.backButton = this._register(( new Button(backButtonContainer, {
387
- ...defaultButtonStyles,
388
- secondary: true,
389
- supportIcons: true,
390
- title: backToInstalledLabel,
391
- ariaLabel: backToInstalledLabel
392
- })));
393
- this.backButton.label = `$(${Codicon.arrowLeft.id}) ${( localize(6088, "Back"))}`;
394
- this.backButton.element.classList.add("list-add-button");
395
- backButtonContainer.style.display = "none";
396
- this._register(this.backButton.onDidClick(() => this.toggleBrowseMode(false)));
397
750
  const browseButtonContainer = append(this.buttonContainer, $(".list-add-button-container"));
398
- const browseMarketplaceLabel = ( localize(6089, "Browse Marketplace"));
751
+ const browseMarketplaceLabel = ( localize(6962, "Browse Marketplace"));
399
752
  this.browseButton = this._register(( new Button(browseButtonContainer, {
400
753
  ...defaultButtonStyles,
401
754
  secondary: true,
@@ -404,13 +757,12 @@ let PluginListWidget = class PluginListWidget extends Disposable {
404
757
  ariaLabel: browseMarketplaceLabel
405
758
  })));
406
759
  this.browseButton.element.classList.add("list-add-button");
407
- this._register(this.browseButton.onDidClick(() => this.runPrimaryButtonAction()));
760
+ browseButtonContainer.style.display = "none";
408
761
  this.addButtonContainer = append(this.buttonContainer, $(".list-add-button-container"));
409
- const addPluginLabel = ( localize(6090, "Add Plugin"));
762
+ const addPluginLabel = ( localize(6963, "Add Plugin"));
410
763
  this.addButtonSimple = this._register(( new Button(this.addButtonContainer, {
411
764
  ...defaultButtonStyles,
412
765
  secondary: true,
413
- supportIcons: true,
414
766
  title: addPluginLabel,
415
767
  ariaLabel: addPluginLabel
416
768
  })));
@@ -419,7 +771,6 @@ let PluginListWidget = class PluginListWidget extends Disposable {
419
771
  this.addButton = this._register(( new ButtonWithDropdown(this.addButtonContainer, {
420
772
  ...defaultButtonStyles,
421
773
  secondary: true,
422
- supportIcons: true,
423
774
  contextMenuProvider: this.contextMenuService,
424
775
  addPrimaryActionToDropdown: false,
425
776
  actions: {
@@ -430,17 +781,17 @@ let PluginListWidget = class PluginListWidget extends Disposable {
430
781
  })));
431
782
  this.addButton.element.classList.add("list-add-button");
432
783
  this._register(this.addButton.onDidClick(() => this.runPrimaryAddAction()));
433
- const createPluginLabel = ( localize(6091, "Create Plugin"));
434
- this.createPluginButton = this._register(( new Button(this.buttonContainer, {
784
+ const updatePluginsLabel = ( localize(6964, "Update Plugins"));
785
+ this.updatePluginsButton = this._register(( new Button(this.buttonContainer, {
435
786
  ...defaultButtonStyles,
436
787
  secondary: true,
437
788
  supportIcons: true,
438
- title: createPluginLabel,
439
- ariaLabel: createPluginLabel
789
+ title: updatePluginsLabel,
790
+ ariaLabel: updatePluginsLabel
440
791
  })));
441
- this.createPluginButton.element.classList.add("list-icon-button");
442
- this.createPluginButton.label = `$(${Codicon.newFile.id})`;
443
- this._register(this.createPluginButton.onDidClick(() => this.runCreatePluginAction()));
792
+ this.updatePluginsButton.element.classList.add("list-icon-button");
793
+ this.updatePluginsButton.label = `$(${Codicon.refresh.id})`;
794
+ this._register(this.updatePluginsButton.onDidClick(() => this.runUpdatePluginsAction()));
444
795
  this.emptyContainer = append(this.element, $(".mcp-empty-state"));
445
796
  const emptyHeader = append(this.emptyContainer, $(".empty-state-header"));
446
797
  this.emptyText = append(emptyHeader, $(".empty-text"));
@@ -449,17 +800,50 @@ let PluginListWidget = class PluginListWidget extends Disposable {
449
800
  const disabledHeader = append(this.disabledContainer, $(".empty-state-header"));
450
801
  this.disabledIcon = append(disabledHeader, $(".empty-icon"));
451
802
  const disabledText = append(disabledHeader, $(".empty-text"));
452
- disabledText.textContent = ( localize(6092, "Plugins are disabled"));
803
+ disabledText.textContent = ( localize(6965, "Plugins are disabled"));
453
804
  this.disabledMessage = append(this.disabledContainer, $(".empty-subtext"));
805
+ this.cardContainer = $(".plugin-card-container");
806
+ this.cardScrollable = this._register(( new DomScrollableElement(this.cardContainer, {
807
+ horizontal: ScrollbarVisibility.Hidden,
808
+ vertical: ScrollbarVisibility.Auto,
809
+ useShadows: false
810
+ })));
811
+ this._register(
812
+ addDisposableListener(this.cardContainer, EventType.SCROLL, () => {
813
+ this.cardScrollable.setScrollPosition({
814
+ scrollTop: this.cardContainer.scrollTop
815
+ });
816
+ })
817
+ );
818
+ this.cardScrollableNode = this.cardScrollable.getDomNode();
819
+ this.cardScrollableNode.classList.add("plugin-card-scrollable");
820
+ this.cardScrollableNode.style.display = "none";
821
+ this.element.appendChild(this.cardScrollableNode);
822
+ const cardResizeObserver = this._register(
823
+ new DisposableResizeObserver("PluginListWidget.cardScrollable", () => this.cardScrollable.scanDomNode())
824
+ );
825
+ this._register(cardResizeObserver.observe(this.cardScrollableNode));
454
826
  this.listContainer = append(this.element, $(".mcp-list-container"));
455
827
  const delegate = ( new PluginItemDelegate());
456
828
  const groupHeaderRenderer = ( new CustomizationGroupHeaderRenderer("pluginGroupHeader", this.hoverService));
457
- const installedRenderer = ( new PluginInstalledItemRenderer(this.harnessService));
458
- const remoteRenderer = ( new PluginRemoteItemRenderer());
459
- const marketplaceRenderer = ( new GalleryItemRenderer(PLUGIN_MARKETPLACE_ITEM_TEMPLATE_ID, ( new PluginMarketplaceItemProvider(this.pluginInstallService, this.agentPluginService))));
829
+ const searchHeaderRenderer = ( new PluginSearchHeaderRenderer());
830
+ const installedRenderer = ( new PluginInstalledItemRenderer(
831
+ this.harnessService,
832
+ (item, container, actions, disposables) => this.renderInstalledListActions(item, container, actions, disposables)
833
+ ));
834
+ const remoteRenderer = ( new PluginRemoteItemRenderer(
835
+ (item, actions, disposables) => this.renderRemoteListActions(item, actions, disposables)
836
+ ));
837
+ const marketplaceRenderer = ( new PluginMarketplaceItemRenderer(
838
+ this.pluginInstallService,
839
+ this.agentPluginService,
840
+ this.pluginMarketplaceService,
841
+ this.notificationService
842
+ ));
460
843
  this.list = this._register(
461
844
  this.instantiationService.createInstance(WorkbenchList, "PluginManagementList", this.listContainer, delegate, [
462
845
  groupHeaderRenderer,
846
+ searchHeaderRenderer,
463
847
  installedRenderer,
464
848
  remoteRenderer,
465
849
  marketplaceRenderer
@@ -468,27 +852,41 @@ let PluginListWidget = class PluginListWidget extends Disposable {
468
852
  setRowLineHeight: false,
469
853
  horizontalScrolling: false,
470
854
  accessibilityProvider: {
471
- getAriaLabel(element) {
855
+ getAriaLabel: element => {
472
856
  if (element.type === "group-header") {
473
857
  return localize(
474
- 6093,
858
+ 6966,
475
859
  "{0}, {1} items, {2}",
476
860
  element.label,
477
861
  element.count,
478
- element.collapsed ? ( localize(6094, "collapsed")) : ( localize(6095, "expanded"))
862
+ element.collapsed ? ( localize(6967, "collapsed")) : ( localize(6968, "expanded"))
479
863
  );
480
864
  }
865
+ if (element.type === "search-header") {
866
+ return element.label;
867
+ }
481
868
  const name = formatDisplayName(element.item.name);
482
869
  const description = element.item.description ? truncateToFirstLine(element.item.description) : undefined;
483
- const nameAndDesc = description ? ( localize(6096, "{0}. {1}", name, description)) : name;
870
+ const nameAndDesc = description ? ( localize(6969, "{0}. {1}", name, description)) : name;
484
871
  if (element.type === "plugin-item") {
485
872
  const enabled = isContributionEnabled(element.item.plugin.enablement.get());
486
- return enabled ? ( localize(6097, "{0}. Enabled", nameAndDesc)) : ( localize(6098, "{0}. Disabled", nameAndDesc));
873
+ const metadata = getInstalledPluginMetadata(element.item);
874
+ const withMetadata = metadata ? ( localize(6970, "{0}. {1}", nameAndDesc, metadata)) : nameAndDesc;
875
+ return enabled ? ( localize(6971, "{0}. Enabled", withMetadata)) : ( localize(6972, "{0}. Disabled", withMetadata));
876
+ }
877
+ if (element.type === "remote-item") {
878
+ const status = getRemotePluginStatusLabel(element.item);
879
+ return status ? ( localize(6973, "{0}. Remote agent host. Status: {1}", nameAndDesc, status)) : ( localize(6974, "{0}. Remote agent host", nameAndDesc));
880
+ }
881
+ if (element.type === "marketplace-item") {
882
+ const recommended = ( this.pluginMarketplaceService.recommendedPlugins.get().has(getMarketplaceRecommendationKey(element.item)));
883
+ const label = ( localize(6975, "{0}. From {1}", nameAndDesc, element.item.marketplace));
884
+ return recommended ? ( localize(6976, "{0}. Recommended for this workspace", label)) : label;
487
885
  }
488
886
  return nameAndDesc;
489
887
  },
490
- getWidgetAriaLabel() {
491
- return localize(6099, "Plugins");
888
+ getWidgetAriaLabel: () => {
889
+ return localize(6977, "Plugins");
492
890
  }
493
891
  },
494
892
  openOnSingleClick: true,
@@ -497,6 +895,9 @@ let PluginListWidget = class PluginListWidget extends Disposable {
497
895
  if (element.type === "group-header") {
498
896
  return element.id;
499
897
  }
898
+ if (element.type === "search-header") {
899
+ return element.id;
900
+ }
500
901
  if (element.type === "marketplace-item") {
501
902
  return `marketplace-${element.item.marketplaceReference.canonicalId}/${element.item.source}`;
502
903
  }
@@ -512,7 +913,8 @@ let PluginListWidget = class PluginListWidget extends Disposable {
512
913
  if (e.element) {
513
914
  if (e.element.type === "group-header") {
514
915
  this.toggleGroup(e.element);
515
- } else if (e.element.type === "plugin-item") {
916
+ } else if (e.element.type === "search-header")
917
+ ; else if (e.element.type === "plugin-item") {
516
918
  this._onDidSelectPlugin.fire(e.element.item);
517
919
  } else if (e.element.type === "remote-item")
518
920
  ; else if (e.element.type === "marketplace-item") {
@@ -520,19 +922,29 @@ let PluginListWidget = class PluginListWidget extends Disposable {
520
922
  }
521
923
  }
522
924
  }));
925
+ this._register(this.list.onDidChangeFocus(event => {
926
+ const index = event.indexes[0] ?? -1;
927
+ installedRenderer.setFocusedIndex(index);
928
+ remoteRenderer.setFocusedIndex(index);
929
+ marketplaceRenderer.setFocusedIndex(index);
930
+ }));
523
931
  this._register(this.list.onContextMenu(e => this.onContextMenu(e)));
524
932
  this._register(autorun(reader => {
525
- const plugins = this.agentPluginService.plugins.read(reader);
526
- for (const plugin of plugins) {
527
- plugin.enablement.read(reader);
528
- }
529
- if (!this.browseMode) {
530
- void this.refresh();
531
- }
933
+ this.agentPluginService.plugins.read(reader);
934
+ void this.refresh();
532
935
  }));
533
936
  this._register(this.pluginMarketplaceService.onDidChangeMarketplaces(() => {
534
- if (!this.browseMode) {
535
- void this.refresh();
937
+ this.marketplaceItems = [];
938
+ this.marketplaceSnapshotCts?.dispose(true);
939
+ this.marketplaceSnapshot.reset();
940
+ void this.refresh();
941
+ }));
942
+ this._register(autorun(reader => {
943
+ this.pluginMarketplaceService.recommendedPlugins.read(reader);
944
+ if (this.browseMode) {
945
+ this.updateMarketplaceList();
946
+ } else if (!this.searchQuery.trim()) {
947
+ this.renderPluginHome();
536
948
  }
537
949
  }));
538
950
  this._register(autorun(reader => {
@@ -562,6 +974,8 @@ let PluginListWidget = class PluginListWidget extends Disposable {
562
974
  async refresh() {
563
975
  if (this.browseMode) {
564
976
  await this.queryMarketplace();
977
+ } else if (this.searchQuery.trim()) {
978
+ await this.queryPluginSearch();
565
979
  } else {
566
980
  this.filterPlugins();
567
981
  }
@@ -574,18 +988,20 @@ let PluginListWidget = class PluginListWidget extends Disposable {
574
988
  this.element.classList.toggle("access-disabled", disabled);
575
989
  if (disabled) {
576
990
  this.disabledIcon.className = "empty-icon";
577
- this.disabledIcon.classList.add(...ThemeIcon.asClassNameArray(policyLocked ? Codicon.shield : pluginIcon));
991
+ this.disabledIcon.classList.add(
992
+ ...ThemeIcon.asClassNameArray(policyLocked ? Codicon.shield : Codicon.plug)
993
+ );
578
994
  clearNode(this.disabledMessage);
579
995
  this.disabledLinkListener.clear();
580
996
  if (policyLocked) {
581
997
  this.disabledMessage.textContent = ( localize(
582
- 6100,
998
+ 6978,
583
999
  "Plugin integration in chat is disabled by your organization. Contact your organization administrator for more information."
584
1000
  ));
585
1001
  } else {
586
- this.disabledMessage.appendChild(createTextNode(( localize(6101, "Plugins are disabled in settings. "))));
1002
+ this.disabledMessage.appendChild(createTextNode(( localize(6979, "Plugins are disabled in settings. "))));
587
1003
  const link = append(this.disabledMessage, $("a.mcp-disabled-settings-link"));
588
- link.textContent = ( localize(6102, "Configure in settings."));
1004
+ link.textContent = ( localize(6980, "Configure in settings."));
589
1005
  link.href = "#";
590
1006
  link.setAttribute("role", "button");
591
1007
  this.disabledLinkListener.value = addDisposableListener(link, "click", e => {
@@ -609,52 +1025,47 @@ let PluginListWidget = class PluginListWidget extends Disposable {
609
1025
  if (!browseMarketplaceAvailable && this.browseMode) {
610
1026
  this.toggleBrowseMode(false);
611
1027
  }
612
- this.browseButton.element.parentElement.style.display = this.browseMode ? "none" : "";
613
- this.browseButton.label = `$(${Codicon.library.id}) ${( localize(6089, "Browse Marketplace"))}`;
1028
+ this.marketplaceBackContainer.style.display = this.browseMode ? "" : "none";
1029
+ this.browseButton.element.parentElement.style.display = "none";
1030
+ this.browseButton.label = `$(${Codicon.library.id}) ${( localize(6962, "Browse Marketplace"))}`;
614
1031
  this.browseButton.enabled = browseMarketplaceAvailable;
615
- const browseTitle = browseMarketplaceAvailable ? ( localize(6089, "Browse Marketplace")) : ( localize(6103, "Browse Marketplace is not available in VS Code for the Web."));
1032
+ const browseTitle = browseMarketplaceAvailable ? ( localize(6962, "Browse Marketplace")) : ( localize(6981, "Browse Marketplace is not available in VS Code for the Web."));
616
1033
  this.browseButton.setTitle(browseTitle);
617
1034
  this.browseButton.element.setAttribute("aria-label", browseTitle);
618
- this.updateAddButton();
619
- this.createPluginButton.enabled = true;
1035
+ this.addButton.element.style.display = "none";
1036
+ this.addButtonSimple.element.style.display = "none";
1037
+ this.updatePluginsButton.element.style.display = "none";
1038
+ this.updateInstalledCreateButtonLabel();
620
1039
  }
621
- isBrowseMarketplaceAvailable() {
622
- return !isWeb;
623
- }
624
- updateAddButton() {
625
- const actions = this.buildAddActions();
626
- const [primary, ...dropdown] = actions;
627
- const hasDropdown = dropdown.length > 0;
628
- this.addButton.element.style.display = hasDropdown ? "" : "none";
629
- this.addButtonSimple.element.style.display = hasDropdown ? "none" : "";
630
- if (!primary) {
631
- this.addButton.element.style.display = "none";
632
- this.addButtonSimple.element.style.display = "none";
633
- return;
1040
+ updateInstalledCreateButtonLabel() {
1041
+ if (this.installedCreateButton) {
1042
+ this.installedCreateButton.label = this.narrowLayout ? ( localize(6982, "Create")) : ( localize(6983, "Create Plugin"));
634
1043
  }
635
- if (hasDropdown) {
636
- this.addButton.label = this.formatActionLabel(primary);
637
- this.addButton.enabled = primary.enabled !== false;
638
- const addPrimaryTitle = primary.tooltip ?? primary.label;
639
- this.addButton.primaryButton.setTitle(addPrimaryTitle);
640
- this.addButton.primaryButton.element.setAttribute("aria-label", addPrimaryTitle);
641
- const moreLabel = ( localize(6104, "More Plugin Add Actions..."));
642
- this.addButton.dropdownButton.setTitle(moreLabel);
643
- this.addButton.dropdownButton.element.setAttribute("aria-label", moreLabel);
644
- } else {
645
- this.addButtonSimple.label = this.formatActionLabel(primary);
646
- this.addButtonSimple.enabled = primary.enabled !== false;
647
- const addSimpleTitle = primary.tooltip ?? primary.label;
648
- this.addButtonSimple.setTitle(addSimpleTitle);
649
- this.addButtonSimple.element.setAttribute("aria-label", addSimpleTitle);
1044
+ }
1045
+ updateResponsiveLayout(width) {
1046
+ const narrow = width < 500;
1047
+ const wide = width >= 600;
1048
+ if (this.narrowLayout === narrow) {
1049
+ if (this.wideLayout !== wide) {
1050
+ this.wideLayout = wide;
1051
+ this.element.classList.toggle("wide-layout", wide);
1052
+ }
1053
+ return;
650
1054
  }
1055
+ this.narrowLayout = narrow;
1056
+ this.wideLayout = wide;
1057
+ this.element.classList.toggle("narrow-layout", narrow);
1058
+ this.element.classList.toggle("wide-layout", wide);
1059
+ this.updateToolbarActions();
1060
+ }
1061
+ isBrowseMarketplaceAvailable() {
1062
+ return this.marketplaceBrowsingAvailable;
651
1063
  }
652
1064
  buildAddActions() {
653
1065
  return [...this.pluginActions, {
654
1066
  id: "plugin.installFromSource",
655
- label: ( localize(6105, "Install Plugin from Source")),
656
- tooltip: ( localize(6105, "Install Plugin from Source")),
657
- icon: Codicon.add,
1067
+ label: ( localize(6984, "Install from Source")),
1068
+ tooltip: ( localize(6985, "Install Plugin from Source")),
658
1069
  run: async () => {
659
1070
  const installed = await this.commandService.executeCommand("workbench.action.chat.installPluginFromSource", {
660
1071
  skipReveal: true
@@ -675,12 +1086,6 @@ let PluginListWidget = class PluginListWidget extends Disposable {
675
1086
  () => this.runPluginAction(action)
676
1087
  )))));
677
1088
  }
678
- async runPrimaryButtonAction() {
679
- if (!this.isBrowseMarketplaceAvailable()) {
680
- return;
681
- }
682
- this.toggleBrowseMode(!this.browseMode);
683
- }
684
1089
  async runPrimaryAddAction() {
685
1090
  const [primary] = this.buildAddActions();
686
1091
  if (primary) {
@@ -690,11 +1095,706 @@ let PluginListWidget = class PluginListWidget extends Disposable {
690
1095
  async runCreatePluginAction() {
691
1096
  await this.commandService.executeCommand("workbench.action.chat.createPlugin");
692
1097
  }
1098
+ async runInstallFromSourceAction() {
1099
+ await this.commandService.executeCommand("workbench.action.chat.installPluginFromSource");
1100
+ }
1101
+ async runUpdatePluginsAction(button = this.updatePluginsButton) {
1102
+ button.enabled = false;
1103
+ try {
1104
+ await this.commandService.executeCommand(UpdateAgentPluginsCommandId);
1105
+ } finally {
1106
+ button.enabled = true;
1107
+ }
1108
+ }
693
1109
  async runPluginAction(action) {
694
1110
  if (action.enabled !== false) {
695
1111
  await action.run();
696
1112
  }
697
1113
  }
1114
+ showCardSurface() {
1115
+ this.emptyContainer.style.display = "none";
1116
+ this.listContainer.style.display = "none";
1117
+ this.cardScrollableNode.style.display = "";
1118
+ }
1119
+ showEmptySurface() {
1120
+ this.cardScrollableNode.style.display = "none";
1121
+ this.listContainer.style.display = "none";
1122
+ this.emptyContainer.style.display = "flex";
1123
+ }
1124
+ createCardScrollContent(...classNames) {
1125
+ const content = append(this.cardContainer, $(".plugin-card-scroll.plugin-card-scroll-content"));
1126
+ content.classList.add(...classNames);
1127
+ this.sectionLayoutContainer = classNames.includes("distributed-section-layout") ? content : undefined;
1128
+ const resizeObserver = this.cardDisposables.add(new DisposableResizeObserver(
1129
+ "PluginListWidget.cardScrollContent",
1130
+ () => this.schedulePluginSectionLayout()
1131
+ ));
1132
+ this.cardDisposables.add(resizeObserver.observe(content));
1133
+ return content;
1134
+ }
1135
+ addSurfaceActivation(surface, label, callback, ...classNames) {
1136
+ const primaryAction = createCustomizationCardPrimaryAction(surface, label, ...classNames);
1137
+ this.rememberCardFocusElement(primaryAction);
1138
+ this.cardDisposables.add(addDisposableListener(primaryAction, "click", callback));
1139
+ return primaryAction;
1140
+ }
1141
+ renderCardSection(parent, title, description, className, count, renderActions) {
1142
+ const section = append(parent, $(".plugin-card-section"));
1143
+ if (className) {
1144
+ section.classList.add(className);
1145
+ }
1146
+ const header = append(section, $(".plugin-card-section-header"));
1147
+ const text = append(header, $(".plugin-card-section-text"));
1148
+ const headingRow = append(text, $(".plugin-card-section-heading-row"));
1149
+ const heading = append(headingRow, $("h3.plugin-card-section-title"));
1150
+ heading.textContent = title;
1151
+ if (count !== undefined) {
1152
+ const countEl = append(headingRow, $(".plugin-card-section-count"));
1153
+ countEl.textContent = String(count);
1154
+ }
1155
+ if (description) {
1156
+ const descriptionEl = append(text, $(".plugin-card-section-description"));
1157
+ descriptionEl.textContent = description;
1158
+ }
1159
+ renderActions?.(header);
1160
+ const list = append(section, $(".plugin-card-grid"));
1161
+ const sectionKey = className ?? title;
1162
+ list.dataset.virtualizedSectionKey = sectionKey;
1163
+ const collapsedSections = this.collapsedSections ??= ( new Set());
1164
+ setupCollapsibleSection(headingRow, list, title, this.cardDisposables, ( collapsedSections.has(sectionKey)), collapsed => {
1165
+ if (collapsed) {
1166
+ collapsedSections.add(sectionKey);
1167
+ } else {
1168
+ collapsedSections.delete(sectionKey);
1169
+ }
1170
+ this.schedulePluginSectionLayout();
1171
+ });
1172
+ this.cardListControllers.set(list, this.cardDisposables.add(( new CustomizationCardListController(list, title))));
1173
+ return list;
1174
+ }
1175
+ createPluginSectionList(container, label, entries, showRecommendedBadge = true) {
1176
+ const key = container.dataset.virtualizedSectionKey ?? label;
1177
+ const delegate = ( new PluginItemDelegate());
1178
+ container.style.height = `${entries.length > 0 ? delegate.getHeight(entries[0]) : PLUGIN_ITEM_HEIGHT}px`;
1179
+ container.classList.add("virtualized-section-list");
1180
+ this.cardListControllers.get(container)?.dispose();
1181
+ this.cardListControllers.delete(container);
1182
+ container.removeAttribute("role");
1183
+ container.removeAttribute("aria-label");
1184
+ const installedRenderer = ( new PluginInstalledItemRenderer(
1185
+ this.harnessService,
1186
+ (item, row, actions, disposables) => this.renderInstalledListActions(item, row, actions, disposables),
1187
+ false
1188
+ ));
1189
+ const remoteRenderer = ( new PluginRemoteItemRenderer(
1190
+ (item, actions, disposables) => this.renderRemoteListActions(item, actions, disposables)
1191
+ ));
1192
+ const marketplaceRenderer = ( new PluginMarketplaceItemRenderer(
1193
+ this.pluginInstallService,
1194
+ this.agentPluginService,
1195
+ this.pluginMarketplaceService,
1196
+ this.notificationService,
1197
+ showRecommendedBadge
1198
+ ));
1199
+ const list = this.cardDisposables.add(this.instantiationService.createInstance(
1200
+ WorkbenchList,
1201
+ `PluginManagementList.${label}`,
1202
+ container,
1203
+ delegate,
1204
+ [installedRenderer, remoteRenderer, marketplaceRenderer],
1205
+ {
1206
+ multipleSelectionSupport: false,
1207
+ setRowLineHeight: false,
1208
+ horizontalScrolling: false,
1209
+ accessibilityProvider: {
1210
+ getAriaLabel: element => this.getPluginEntryAriaLabel(element),
1211
+ getWidgetAriaLabel: () => label,
1212
+ getSetSize: (_element, _index, listLength) => listLength,
1213
+ getPosInSet: (_element, index) => index + 1
1214
+ },
1215
+ openOnSingleClick: true,
1216
+ identityProvider: {
1217
+ getId: element => this.getPluginEntryId(element)
1218
+ }
1219
+ }
1220
+ ));
1221
+ list.splice(0, 0, entries);
1222
+ list.scrollTop = this.sectionScrollPositions.get(key) ?? 0;
1223
+ this.cardDisposables.add(list.onDidOpen(event => {
1224
+ const entry = event.element;
1225
+ if (entry?.type === "plugin-item" || entry?.type === "marketplace-item") {
1226
+ this._onDidSelectPlugin.fire(entry.item);
1227
+ }
1228
+ }));
1229
+ this.cardDisposables.add(list.onContextMenu(event => this.onContextMenu(event)));
1230
+ this.cardDisposables.add(list.onDidChangeFocus(event => {
1231
+ const index = event.indexes[0] ?? -1;
1232
+ installedRenderer.setFocusedIndex(index);
1233
+ remoteRenderer.setFocusedIndex(index);
1234
+ marketplaceRenderer.setFocusedIndex(index);
1235
+ }));
1236
+ this.cardDisposables.add(list.onDidFocus(() => {
1237
+ if (list.getFocus().length === 0 && entries.length > 0) {
1238
+ list.setFocus([0]);
1239
+ }
1240
+ }));
1241
+ this.sectionLists.push({
1242
+ list,
1243
+ entries,
1244
+ container,
1245
+ key
1246
+ });
1247
+ }
1248
+ captureSectionScrollPositions() {
1249
+ for (const section of this.sectionLists) {
1250
+ this.sectionScrollPositions.set(section.key, section.list.scrollTop);
1251
+ }
1252
+ }
1253
+ getPluginEntryAriaLabel(element) {
1254
+ if (element.type === "group-header" || element.type === "search-header") {
1255
+ return element.label;
1256
+ }
1257
+ const name = formatDisplayName(element.item.name);
1258
+ const description = element.item.description ? truncateToFirstLine(element.item.description) : undefined;
1259
+ const nameAndDescription = description ? ( localize(6969, "{0}. {1}", name, description)) : name;
1260
+ if (element.type === "plugin-item") {
1261
+ const metadata = getInstalledPluginMetadata(element.item);
1262
+ const withMetadata = metadata ? ( localize(6970, "{0}. {1}", nameAndDescription, metadata)) : nameAndDescription;
1263
+ return derived(
1264
+ this,
1265
+ reader => isContributionEnabled(element.item.plugin.enablement.read(reader)) ? ( localize(6971, "{0}. Enabled", withMetadata)) : ( localize(6972, "{0}. Disabled", withMetadata))
1266
+ );
1267
+ }
1268
+ if (element.type === "remote-item") {
1269
+ const statusLabel = getRemotePluginStatusLabel(element.item);
1270
+ return statusLabel ? ( localize(
1271
+ 6973,
1272
+ "{0}. Remote agent host. Status: {1}",
1273
+ nameAndDescription,
1274
+ statusLabel
1275
+ )) : ( localize(6974, "{0}. Remote agent host", nameAndDescription));
1276
+ }
1277
+ const marketplaceLabel = ( localize(6975, "{0}. From {1}", nameAndDescription, element.item.marketplace));
1278
+ return ( this.pluginMarketplaceService.recommendedPlugins.get().has(getMarketplaceRecommendationKey(element.item))) ? ( localize(6976, "{0}. Recommended for this workspace", marketplaceLabel)) : marketplaceLabel;
1279
+ }
1280
+ getPluginEntryId(element) {
1281
+ if (element.type === "group-header" || element.type === "search-header") {
1282
+ return element.id;
1283
+ }
1284
+ if (element.type === "marketplace-item") {
1285
+ return `marketplace-${element.item.marketplaceReference.canonicalId}/${element.item.source}`;
1286
+ }
1287
+ if (element.type === "remote-item") {
1288
+ return element.item.itemKey ?? `remote-${element.item.groupKey ?? "default"}-${( element.item.uri.toString())}`;
1289
+ }
1290
+ return ( element.item.plugin.uri.toString());
1291
+ }
1292
+ renderInstalledListActions(item, row, actions, disposables) {
1293
+ let renderedState = item.plugin.enablement.get();
1294
+ const toggle = disposables.add(( new Switch({
1295
+ ariaLabel: item.name,
1296
+ checked: isContributionEnabled(renderedState)
1297
+ })));
1298
+ append(actions, toggle.domNode);
1299
+ disposables.add(
1300
+ addDisposableGenericMouseDownListener(toggle.domNode, event => EventHelper.stop(event, true))
1301
+ );
1302
+ const update = (state, blocked) => {
1303
+ renderedState = state;
1304
+ const checked = isContributionEnabled(state);
1305
+ const workspaceScope = state === ContributionEnablementState.EnabledWorkspace || state === ContributionEnablementState.DisabledWorkspace;
1306
+ const toggleLabel = checked ? (workspaceScope ? ( localize(6986, "Exclude {0} from Workspace", item.name)) : ( localize(6987, "Exclude {0} from Profile", item.name))) : (workspaceScope ? ( localize(6988, "Include {0} in Workspace", item.name)) : ( localize(6989, "Include {0} for Profile", item.name)));
1307
+ toggle.disabled = blocked;
1308
+ toggle.checked = checked;
1309
+ toggle.setAriaLabel(blocked ? ( localize(6990, "{0} is managed by your organization", item.name)) : toggleLabel, blocked ? ( localize(6991, "This plugin is managed by your organization.")) : toggleLabel);
1310
+ row.classList.toggle("disabled", !checked || blocked);
1311
+ };
1312
+ disposables.add(autorun(reader => update(
1313
+ item.plugin.enablement.read(reader),
1314
+ item.plugin.policyBlocked?.read(reader) === true
1315
+ )));
1316
+ disposables.add(toggle.onChange(() => {
1317
+ const nextState = getToggledPluginEnablementState(renderedState);
1318
+ update(nextState, isPluginPolicyBlocked(item.plugin));
1319
+ this.agentPluginService.enablementModel.setEnabled(( item.plugin.uri.toString()), nextState);
1320
+ status(( localize(6992, "{0}. {1}.", item.name, getPluginInclusionLabel(item.plugin))));
1321
+ }));
1322
+ const more = disposables.add(( new Button(actions, {
1323
+ ...getButtonStyles({
1324
+ buttonSecondaryBackground: undefined,
1325
+ buttonSecondaryBorder: undefined
1326
+ }),
1327
+ secondary: true,
1328
+ supportIcons: true,
1329
+ ariaLabel: ( localize(6993, "More actions for {0}", item.name))
1330
+ })));
1331
+ more.element.classList.add("plugin-card-icon-button");
1332
+ more.label = `$(${Codicon.ellipsis.id})`;
1333
+ disposables.add(
1334
+ addDisposableGenericMouseDownListener(more.element, event => EventHelper.stop(event, true))
1335
+ );
1336
+ disposables.add(more.onDidClick(event => {
1337
+ EventHelper.stop(event, true);
1338
+ this.showInstalledPluginActions(item, more.element);
1339
+ }));
1340
+ }
1341
+ renderRemoteListActions(item, actions, disposables) {
1342
+ if (!item.actions?.length) {
1343
+ actions.style.display = "none";
1344
+ return;
1345
+ }
1346
+ actions.style.display = "";
1347
+ const more = disposables.add(( new Button(actions, {
1348
+ ...getButtonStyles({
1349
+ buttonSecondaryBackground: undefined,
1350
+ buttonSecondaryBorder: undefined
1351
+ }),
1352
+ secondary: true,
1353
+ supportIcons: true,
1354
+ ariaLabel: ( localize(6993, "More actions for {0}", item.name))
1355
+ })));
1356
+ more.element.classList.add("plugin-card-icon-button");
1357
+ more.label = `$(${Codicon.ellipsis.id})`;
1358
+ disposables.add(
1359
+ addDisposableGenericMouseDownListener(more.element, event => EventHelper.stop(event, true))
1360
+ );
1361
+ disposables.add(more.onDidClick(event => {
1362
+ EventHelper.stop(event, true);
1363
+ this.showRemotePluginActions(item, more.element);
1364
+ }));
1365
+ }
1366
+ layoutPluginSectionLists() {
1367
+ const delegate = ( new PluginItemDelegate());
1368
+ const content = this.sectionLayoutContainer;
1369
+ if (!content) {
1370
+ return;
1371
+ }
1372
+ const heights = layoutVirtualizedSections(content, ( this.sectionLists.map(section => ({
1373
+ container: section.container,
1374
+ contentHeight: section.entries.reduce((height, entry) => height + delegate.getHeight(entry), 0),
1375
+ minimumHeight: getVirtualizedSectionMinimumHeight(section.entries, entry => delegate.getHeight(entry))
1376
+ }))));
1377
+ for (let index = 0; index < this.sectionLists.length; index++) {
1378
+ const section = this.sectionLists[index];
1379
+ const height = heights[index];
1380
+ layoutVirtualizedSectionList(
1381
+ section.list,
1382
+ section.container,
1383
+ height,
1384
+ section.container.clientWidth || undefined
1385
+ );
1386
+ }
1387
+ }
1388
+ schedulePluginSectionLayout() {
1389
+ this.pendingSectionLayout.value = scheduleAtNextAnimationFrame(getWindow(this.element), () => {
1390
+ this.layoutPluginSectionLists();
1391
+ this.cardScrollable.scanDomNode();
1392
+ });
1393
+ }
1394
+ renderPluginHome() {
1395
+ if (this.browseMode || this.searchQuery.trim()) {
1396
+ return;
1397
+ }
1398
+ this.captureSectionScrollPositions();
1399
+ this.cardDisposables.clear();
1400
+ this.sectionLists = [];
1401
+ this.installedCreateButton = undefined;
1402
+ this.firstCardFocusElement = undefined;
1403
+ clearNode(this.cardContainer);
1404
+ this.showCardSurface();
1405
+ const content = this.createCardScrollContent("distributed-section-layout");
1406
+ const installedPlugins = this.installedItems;
1407
+ const hasMarketplaceInstalledPlugins = this.pluginMarketplaceService.installedPlugins.get().length > 0;
1408
+ if (shouldLoadPluginMarketplaceSnapshot(
1409
+ this.visible,
1410
+ this.marketplaceSnapshot.state,
1411
+ this.isBrowseMarketplaceAvailable()
1412
+ )) {
1413
+ void this.queryMarketplaceSnapshot();
1414
+ }
1415
+ const installedList = this.renderCardSection(content, ( localize(6994, "Installed")), undefined, "installed-plugins-section", installedPlugins.length, header => this.renderInstalledSectionActions(header, hasMarketplaceInstalledPlugins));
1416
+ installedList.classList.add("plugin-inventory-list");
1417
+ if (installedPlugins.length === 0) {
1418
+ const empty = append(installedList, $(".plugin-inventory-empty"));
1419
+ empty.textContent = ( localize(6995, "No plugins are installed."));
1420
+ } else {
1421
+ this.createPluginSectionList(installedList, ( localize(6994, "Installed")), ( installedPlugins.map(item => ({
1422
+ type: "plugin-item",
1423
+ item
1424
+ }))));
1425
+ }
1426
+ const installedNames = ( new Set(( this.installedItems.map(item => item.name.toLowerCase()))));
1427
+ const remoteItems = this.remoteItems.filter(
1428
+ item => item.groupKey !== "remote-client" && (!item.name || !( installedNames.has(item.name.toLowerCase())))
1429
+ );
1430
+ if (remoteItems.length > 0) {
1431
+ const remoteList = this.renderCardSection(content, ( localize(6996, "Remote session plugins")), ( localize(6997, "Plugins configured directly on the active remote agent host.")), "remote-plugins-section", remoteItems.length);
1432
+ remoteList.classList.add("plugin-inventory-list");
1433
+ this.createPluginSectionList(remoteList, ( localize(6996, "Remote session plugins")), ( remoteItems.map(item => ({
1434
+ type: "remote-item",
1435
+ item
1436
+ }))));
1437
+ }
1438
+ this.renderAvailablePlugins(
1439
+ content,
1440
+ this.getUninstalledMarketplaceItems(this.marketplaceSnapshot.items),
1441
+ true
1442
+ );
1443
+ this.schedulePluginSectionLayout();
1444
+ }
1445
+ renderInstalledSectionActions(header, hasInstalledPlugins) {
1446
+ const actions = append(header, $(".plugin-card-section-actions"));
1447
+ const createLabel = ( localize(6983, "Create Plugin"));
1448
+ const create = this.installedCreateButton = this.cardDisposables.add(( new Button(actions, {
1449
+ ...defaultButtonStyles,
1450
+ secondary: true,
1451
+ ariaLabel: createLabel
1452
+ })));
1453
+ create.element.classList.add("plugin-installed-action");
1454
+ this.updateInstalledCreateButtonLabel();
1455
+ this.rememberCardFocusElement(create.element);
1456
+ this.cardDisposables.add(create.onDidClick(() => this.runCreatePluginAction()));
1457
+ if (hasInstalledPlugins) {
1458
+ const updateLabel = ( localize(6998, "Check for and apply updates"));
1459
+ const update = this.cardDisposables.add(( new Button(actions, {
1460
+ ...defaultButtonStyles,
1461
+ secondary: true,
1462
+ supportIcons: true,
1463
+ title: updateLabel,
1464
+ ariaLabel: updateLabel
1465
+ })));
1466
+ update.element.classList.add("plugin-card-icon-button", "plugin-update-button");
1467
+ update.label = `$(${Codicon.refresh.id})`;
1468
+ this.cardDisposables.add(update.onDidClick(() => this.runUpdatePluginsAction(update)));
1469
+ }
1470
+ }
1471
+ renderAvailablePlugins(
1472
+ parent,
1473
+ items,
1474
+ showActions,
1475
+ title = ( localize(6999, "Available")),
1476
+ description = ( localize(7000, "Browse and install plugins from your marketplaces."))
1477
+ ) {
1478
+ const availableList = this.renderCardSection(
1479
+ parent,
1480
+ title,
1481
+ description,
1482
+ "available-plugins-section",
1483
+ items.length,
1484
+ showActions ? header => this.renderAvailableSectionActions(header) : undefined
1485
+ );
1486
+ availableList.classList.add("plugin-inventory-list");
1487
+ if (items.length === 0) {
1488
+ if (this.marketplaceSnapshot.state === "loading") {
1489
+ renderVirtualizedSectionLoadingPlaceholder(availableList, ( localize(7001, "Loading marketplace...")), PLUGIN_MARKETPLACE_ITEM_HEIGHT);
1490
+ } else {
1491
+ const empty = append(availableList, $(".plugin-inventory-empty"));
1492
+ empty.textContent = ( localize(7002, "No marketplace plugins are available."));
1493
+ }
1494
+ this.cardListControllers.get(availableList)?.finalize();
1495
+ return;
1496
+ }
1497
+ this.createPluginSectionList(availableList, title, ( items.map(item => ({
1498
+ type: "marketplace-item",
1499
+ item
1500
+ }))));
1501
+ }
1502
+ renderAvailableSectionActions(header) {
1503
+ const actions = append(header, $(".plugin-card-section-actions"));
1504
+ const installLabel = ( localize(6984, "Install from Source"));
1505
+ const installTooltip = ( localize(6985, "Install Plugin from Source"));
1506
+ if (this.pluginActions.length > 0) {
1507
+ const install = this.cardDisposables.add(( new ButtonWithDropdown(actions, {
1508
+ ...defaultButtonStyles,
1509
+ secondary: true,
1510
+ contextMenuProvider: this.contextMenuService,
1511
+ addPrimaryActionToDropdown: false,
1512
+ actions: {
1513
+ getActions: () => {
1514
+ this.addDropdownActions.clear();
1515
+ return ( this.pluginActions.map((action, index) => this.addDropdownActions.add(( new Action(
1516
+ `plugin_provider_add_${index}`,
1517
+ this.formatActionLabel(action),
1518
+ undefined,
1519
+ action.enabled !== false,
1520
+ () => this.runPluginAction(action)
1521
+ )))));
1522
+ }
1523
+ },
1524
+ title: installTooltip,
1525
+ ariaLabel: installTooltip
1526
+ })));
1527
+ install.element.classList.add("plugin-available-action");
1528
+ install.label = installLabel;
1529
+ this.cardDisposables.add(install.onDidClick(() => this.runInstallFromSourceAction()));
1530
+ } else {
1531
+ const install = this.cardDisposables.add(( new Button(actions, {
1532
+ ...defaultButtonStyles,
1533
+ secondary: true,
1534
+ title: installTooltip,
1535
+ ariaLabel: installTooltip
1536
+ })));
1537
+ install.element.classList.add("plugin-available-action");
1538
+ install.label = installLabel;
1539
+ this.cardDisposables.add(install.onDidClick(() => this.runInstallFromSourceAction()));
1540
+ }
1541
+ }
1542
+ appendInstalledPluginRow(parent, item) {
1543
+ const row = append(parent, $(".plugin-list-item.plugin-home-row.plugin-installed-item"));
1544
+ const primaryAction = this.addSurfaceActivation(row, ( localize(7003, "{0}. {1}", item.name, getPluginInclusionLabel(item.plugin))), () => this._onDidSelectPlugin.fire(item));
1545
+ const details = append(primaryAction, $(".plugin-list-item-details"));
1546
+ const nameRow = append(details, $(".plugin-list-item-name-row"));
1547
+ const name = append(nameRow, $(".plugin-list-item-name"));
1548
+ name.textContent = formatDisplayName(item.name);
1549
+ name.title = item.name;
1550
+ if (!item.marketplace) {
1551
+ const source = append(nameRow, $(".inline-badge.plugin-source-badge"));
1552
+ source.textContent = ( localize(6930, "Local"));
1553
+ source.title = ( localize(6931, "Installed from a local source"));
1554
+ }
1555
+ const description = append(details, $(".plugin-list-item-description"));
1556
+ description.textContent = truncateToFirstLine(item.description || ( localize(7004, "No description provided.")));
1557
+ const metadata = append(details, $(".plugin-list-item-metadata"));
1558
+ metadata.textContent = getInstalledPluginMetadata(item);
1559
+ metadata.style.display = metadata.textContent ? "" : "none";
1560
+ const actions = append(row, $(".plugin-list-item-action"));
1561
+ const toggle = this.appendInstalledPluginToggle(actions, row, primaryAction, item);
1562
+ const more = this.cardDisposables.add(( new Button(actions, {
1563
+ ...getButtonStyles({
1564
+ buttonSecondaryBackground: undefined,
1565
+ buttonSecondaryBorder: undefined
1566
+ }),
1567
+ secondary: true,
1568
+ supportIcons: true,
1569
+ ariaLabel: ( localize(6993, "More actions for {0}", item.name))
1570
+ })));
1571
+ more.element.classList.add("plugin-card-icon-button");
1572
+ more.label = `$(${Codicon.ellipsis.id})`;
1573
+ this.cardDisposables.add(more.onDidClick(() => this.showInstalledPluginActions(item, more.element)));
1574
+ this.cardListControllers.get(parent)?.addItem({
1575
+ row,
1576
+ primaryAction,
1577
+ label: item.name,
1578
+ actions: [toggle, more.element],
1579
+ contextMenuAction: more.element
1580
+ });
1581
+ }
1582
+ appendInstalledPluginToggle(parent, row, primaryAction, item) {
1583
+ let renderedState = item.plugin.enablement.get();
1584
+ const toggle = this.cardDisposables.add(( new Switch({
1585
+ ariaLabel: item.name
1586
+ })));
1587
+ const switchElement = toggle.domNode;
1588
+ append(parent, switchElement);
1589
+ const update = (state, blocked) => {
1590
+ renderedState = state;
1591
+ const checked = isContributionEnabled(state);
1592
+ const workspaceScope = state === ContributionEnablementState.EnabledWorkspace || state === ContributionEnablementState.DisabledWorkspace;
1593
+ const toggleLabel = checked ? (workspaceScope ? ( localize(6986, "Exclude {0} from Workspace", item.name)) : ( localize(6987, "Exclude {0} from Profile", item.name))) : (workspaceScope ? ( localize(6988, "Include {0} in Workspace", item.name)) : ( localize(6989, "Include {0} for Profile", item.name)));
1594
+ const accessibleLabel = blocked ? ( localize(6990, "{0} is managed by your organization", item.name)) : toggleLabel;
1595
+ toggle.disabled = blocked;
1596
+ toggle.checked = checked;
1597
+ toggle.setAriaLabel(accessibleLabel, blocked ? ( localize(6991, "This plugin is managed by your organization.")) : toggleLabel);
1598
+ row.classList.toggle("disabled", !checked || blocked);
1599
+ primaryAction.setAttribute("aria-label", ( localize(7003, "{0}. {1}", item.name, getPluginInclusionLabel(item.plugin))));
1600
+ };
1601
+ this.cardDisposables.add(autorun(reader => {
1602
+ const state = item.plugin.enablement.read(reader);
1603
+ const blocked = item.plugin.policyBlocked?.read(reader) === true;
1604
+ update(state, blocked);
1605
+ }));
1606
+ this.cardDisposables.add(toggle.onChange(() => {
1607
+ const nextState = getToggledPluginEnablementState(renderedState);
1608
+ update(nextState, isPluginPolicyBlocked(item.plugin));
1609
+ this.agentPluginService.enablementModel.setEnabled(( item.plugin.uri.toString()), nextState);
1610
+ status(( localize(6992, "{0}. {1}.", item.name, getPluginInclusionLabel(item.plugin))));
1611
+ }));
1612
+ return switchElement;
1613
+ }
1614
+ appendRemotePluginRow(parent, item) {
1615
+ const row = append(parent, $(".plugin-list-item.plugin-home-row.plugin-remote-item"));
1616
+ row.setAttribute("role", "listitem");
1617
+ row.setAttribute("aria-label", ( localize(7005, "{0}. Remote plugin", item.name)));
1618
+ row.classList.toggle("disabled", item.enabled === false);
1619
+ const details = append(row, $(".plugin-list-item-details"));
1620
+ const nameRow = append(details, $(".plugin-list-item-name-row"));
1621
+ const name = append(nameRow, $(".plugin-list-item-name"));
1622
+ name.textContent = formatDisplayName(item.name);
1623
+ const source = append(nameRow, $(".inline-badge.plugin-source-badge"));
1624
+ source.textContent = ( localize(7006, "Remote"));
1625
+ source.title = ( localize(6934, "Remote agent host"));
1626
+ const description = append(details, $(".plugin-list-item-description"));
1627
+ description.textContent = item.description || ( localize(7004, "No description provided."));
1628
+ const metadata = append(details, $(".plugin-list-item-metadata"));
1629
+ metadata.textContent = ( localize(7007, "Configured on the active remote agent host"));
1630
+ const status = append(row, $(".plugin-list-item-status"));
1631
+ const statusLabel = getRemotePluginStatusLabel(item);
1632
+ if (statusLabel) {
1633
+ status.textContent = statusLabel;
1634
+ status.classList.toggle(
1635
+ "disabled",
1636
+ item.enabled === false || item.status === "degraded" || item.status === "error"
1637
+ );
1638
+ } else {
1639
+ status.style.display = "none";
1640
+ }
1641
+ let more;
1642
+ if (item.actions?.length) {
1643
+ const actions = append(row, $(".plugin-list-item-action"));
1644
+ const moreButton = this.cardDisposables.add(( new Button(actions, {
1645
+ ...defaultButtonStyles,
1646
+ secondary: true,
1647
+ supportIcons: true,
1648
+ ariaLabel: ( localize(6993, "More actions for {0}", item.name))
1649
+ })));
1650
+ moreButton.element.classList.add("plugin-card-icon-button");
1651
+ moreButton.label = `$(${Codicon.ellipsis.id})`;
1652
+ this.rememberCardFocusElement(moreButton.element);
1653
+ this.cardDisposables.add(
1654
+ moreButton.onDidClick(() => this.showRemotePluginActions(item, moreButton.element))
1655
+ );
1656
+ more = moreButton;
1657
+ }
1658
+ this.cardListControllers.get(parent)?.addItem({
1659
+ row,
1660
+ primaryAction: row,
1661
+ label: item.name,
1662
+ actions: more ? [more.element] : [],
1663
+ contextMenuAction: more?.element
1664
+ });
1665
+ }
1666
+ appendMarketplacePluginRow(parent, item) {
1667
+ const row = append(parent, $(".plugin-list-item.plugin-home-row.plugin-marketplace-home-row"));
1668
+ const primaryAction = this.addSurfaceActivation(row, ( localize(7008, "{0}. Available to install from {1}.", item.name, item.marketplace)), () => this._onDidSelectPlugin.fire(item));
1669
+ const details = append(primaryAction, $(".plugin-list-item-details"));
1670
+ const nameRow = append(details, $(".plugin-list-item-name-row"));
1671
+ const name = append(nameRow, $(".plugin-list-item-name"));
1672
+ name.textContent = item.name;
1673
+ name.title = item.name;
1674
+ const description = append(details, $(".plugin-list-item-description"));
1675
+ description.textContent = truncateToFirstLine(item.description || ( localize(7004, "No description provided.")));
1676
+ const actions = append(row, $(".plugin-list-item-action"));
1677
+ const install = this.cardDisposables.add(( new Button(actions, {
1678
+ ...defaultButtonStyles,
1679
+ ariaLabel: ( localize(7009, "Install {0}", item.name))
1680
+ })));
1681
+ install.element.classList.add("plugin-list-item-install-button");
1682
+ install.label = ( localize(6937, "Install"));
1683
+ this.cardDisposables.add(install.onDidClick(() => this.installMarketplacePlugin(item, install)));
1684
+ this.cardListControllers.get(parent)?.addItem({
1685
+ row,
1686
+ primaryAction,
1687
+ label: item.name,
1688
+ actions: [install.element]
1689
+ });
1690
+ }
1691
+ rememberCardFocusElement(element) {
1692
+ this.firstCardFocusElement ??= element;
1693
+ }
1694
+ renderBrowseMarketplaceCards() {
1695
+ this.captureSectionScrollPositions();
1696
+ this.cardDisposables.clear();
1697
+ this.sectionLists = [];
1698
+ this.installedCreateButton = undefined;
1699
+ this.firstCardFocusElement = undefined;
1700
+ clearNode(this.cardContainer);
1701
+ const marketplaceItems = this.getUninstalledMarketplaceItems();
1702
+ if (marketplaceItems.length === 0) {
1703
+ this.showEmptySurface();
1704
+ this.emptyText.textContent = ( localize(7010, "No plugins available"));
1705
+ this.emptySubtext.textContent = "";
1706
+ return;
1707
+ }
1708
+ this.showCardSurface();
1709
+ const content = this.createCardScrollContent("distributed-section-layout");
1710
+ const recommendedKeys = this.pluginMarketplaceService.recommendedPlugins.get();
1711
+ const recommended = marketplaceItems.filter(item => ( recommendedKeys.has(getMarketplaceRecommendationKey(item))));
1712
+ const allPlugins = marketplaceItems.filter(item => !( recommendedKeys.has(getMarketplaceRecommendationKey(item))));
1713
+ if (recommended.length > 0) {
1714
+ const recommendedGrid = this.renderCardSection(content, ( localize(7011, "Recommended for this workspace")), ( localize(7012, "Plugins recommended by workspace configuration.")), "plugin-marketplace-recommended-section");
1715
+ recommendedGrid.classList.add("plugin-inventory-list");
1716
+ this.createPluginSectionList(recommendedGrid, ( localize(7011, "Recommended for this workspace")), ( recommended.map(item => ({
1717
+ type: "marketplace-item",
1718
+ item
1719
+ }))));
1720
+ }
1721
+ const allGrid = this.renderCardSection(content, ( localize(7013, "All plugins")), ( localize(7014, "Plugins available from configured marketplaces.")), "plugin-marketplace-all-section");
1722
+ allGrid.classList.add("plugin-inventory-list");
1723
+ this.createPluginSectionList(allGrid, ( localize(7013, "All plugins")), ( allPlugins.map(item => ({
1724
+ type: "marketplace-item",
1725
+ item
1726
+ }))));
1727
+ this.layoutPluginSectionLists();
1728
+ this.cardScrollable.scanDomNode();
1729
+ this.schedulePluginSectionLayout();
1730
+ }
1731
+ getUninstalledMarketplaceItems(items = this.marketplaceItems) {
1732
+ const installedUris = ( new Set(( this.agentPluginService.plugins.get().map(p => ( p.uri.toString())))));
1733
+ return items.filter(item => {
1734
+ const expectedUri = this.pluginInstallService.getPluginInstallUri({
1735
+ name: item.name,
1736
+ description: item.description,
1737
+ version: item.version ?? "",
1738
+ source: item.source,
1739
+ sourceDescriptor: item.sourceDescriptor,
1740
+ marketplace: item.marketplace,
1741
+ marketplaceReference: item.marketplaceReference,
1742
+ marketplaceType: item.marketplaceType
1743
+ });
1744
+ return !( installedUris.has(( expectedUri.toString())));
1745
+ });
1746
+ }
1747
+ async installMarketplacePlugin(item, button) {
1748
+ button.label = ( localize(6938, "Installing..."));
1749
+ button.enabled = false;
1750
+ try {
1751
+ await this.pluginInstallService.installPlugin({
1752
+ name: item.name,
1753
+ description: item.description,
1754
+ version: item.version ?? "",
1755
+ sourceDescriptor: item.sourceDescriptor,
1756
+ source: item.source,
1757
+ marketplace: item.marketplace,
1758
+ marketplaceReference: item.marketplaceReference,
1759
+ marketplaceType: item.marketplaceType,
1760
+ readmeUri: item.readmeUri
1761
+ });
1762
+ button.label = ( localize(6936, "Installed"));
1763
+ void this.refresh();
1764
+ } catch (error) {
1765
+ button.label = ( localize(6937, "Install"));
1766
+ button.enabled = true;
1767
+ this.notificationService.error(( localize(6939, "Unable to install plugin: {0}", getErrorMessage(error))));
1768
+ }
1769
+ }
1770
+ async queryMarketplaceSnapshot() {
1771
+ if (!this.marketplaceSnapshot.beginLoading()) {
1772
+ return;
1773
+ }
1774
+ this.marketplaceSnapshotCts?.dispose(true);
1775
+ const cts = this.marketplaceSnapshotCts = ( new CancellationTokenSource());
1776
+ try {
1777
+ const plugins = await this.pluginMarketplaceService.fetchMarketplacePlugins(cts.token);
1778
+ if (this.marketplaceSnapshotCts !== cts) {
1779
+ return;
1780
+ }
1781
+ if (cts.token.isCancellationRequested) {
1782
+ this.marketplaceSnapshot.reset();
1783
+ return;
1784
+ }
1785
+ this.marketplaceSnapshot.complete(( plugins.map(marketplacePluginToItem)));
1786
+ if (!this.browseMode && !this.searchQuery.trim()) {
1787
+ this.renderPluginHome();
1788
+ }
1789
+ } catch {
1790
+ if (this.marketplaceSnapshotCts === cts && !cts.token.isCancellationRequested) {
1791
+ this.marketplaceSnapshot.fail();
1792
+ if (!this.browseMode && !this.searchQuery.trim()) {
1793
+ this.renderPluginHome();
1794
+ }
1795
+ }
1796
+ }
1797
+ }
698
1798
  showBrowseMarketplace() {
699
1799
  if (!this.isBrowseMarketplaceAvailable()) {
700
1800
  return;
@@ -703,17 +1803,28 @@ let PluginListWidget = class PluginListWidget extends Disposable {
703
1803
  this.toggleBrowseMode(true);
704
1804
  }
705
1805
  }
1806
+ setVisible(visible) {
1807
+ if (this.visible === visible) {
1808
+ return;
1809
+ }
1810
+ this.visible = visible;
1811
+ if (visible) {
1812
+ void this.refresh();
1813
+ }
1814
+ }
706
1815
  toggleBrowseMode(browse) {
1816
+ this.delayedMarketplaceSearch.cancel();
1817
+ this.marketplaceCts?.dispose(true);
1818
+ this.marketplaceCts = undefined;
707
1819
  this.browseMode = browse;
1820
+ this.element.classList.toggle("browse-mode", browse);
708
1821
  this.searchInput.value = "";
709
1822
  this.searchQuery = "";
710
- this.browseButton.element.parentElement.style.display = browse ? "none" : "";
711
- this.backButton.element.parentElement.style.display = browse ? "" : "none";
712
- this.searchInput.setPlaceHolder(browse ? ( localize(6106, "Search plugin marketplace...")) : ( localize(6086, "Type to search...")));
1823
+ this.updateToolbarActions();
1824
+ this.searchInput.setPlaceHolder(browse ? ( localize(7015, "Search plugin marketplace...")) : ( localize(6961, "Type to search...")));
713
1825
  if (browse) {
714
1826
  void this.queryMarketplace();
715
1827
  } else {
716
- this.marketplaceCts?.dispose(true);
717
1828
  this.marketplaceItems = [];
718
1829
  void this.filterPlugins();
719
1830
  }
@@ -724,55 +1835,178 @@ let PluginListWidget = class PluginListWidget extends Disposable {
724
1835
  async queryMarketplace() {
725
1836
  this.marketplaceCts?.dispose(true);
726
1837
  const cts = this.marketplaceCts = ( new CancellationTokenSource());
727
- this.emptyContainer.style.display = "flex";
728
- this.listContainer.style.display = "none";
729
- this.emptyText.textContent = ( localize(6107, "Loading marketplace..."));
1838
+ const query = this.searchQuery.toLowerCase().trim();
1839
+ const browseMode = this.browseMode;
1840
+ this.showEmptySurface();
1841
+ this.emptyText.textContent = ( localize(7001, "Loading marketplace..."));
730
1842
  this.emptySubtext.textContent = "";
731
1843
  try {
732
1844
  const plugins = await this.pluginMarketplaceService.fetchMarketplacePlugins(cts.token);
733
- if (cts.token.isCancellationRequested) {
1845
+ if (!this.isCurrentMarketplaceRequest(cts, query, browseMode)) {
734
1846
  return;
735
1847
  }
736
- const query = this.searchQuery.toLowerCase().trim();
1848
+ if (query) {
1849
+ const allPlugins = this.agentPluginService.plugins.get();
1850
+ const installedItems = ( allPlugins.map(p => installedPluginToItem(p, this.labelService))).filter(
1851
+ item => item.name.toLowerCase().includes(query) || item.description.toLowerCase().includes(query)
1852
+ ).sort(compareInstalledPluginItems);
1853
+ const remoteItems = [...(await this.getRemotePluginItems(query))];
1854
+ if (!this.isCurrentMarketplaceRequest(cts, query, browseMode)) {
1855
+ return;
1856
+ }
1857
+ this.installedItems = installedItems;
1858
+ this.remoteItems = remoteItems;
1859
+ }
737
1860
  const filtered = query ? plugins.filter(
738
- p => p.name.toLowerCase().includes(query) || p.description.toLowerCase().includes(query)
1861
+ p => p.name.toLowerCase().includes(query) || p.description.toLowerCase().includes(query) || p.marketplace.toLowerCase().includes(query)
739
1862
  ) : plugins;
740
1863
  const installedUris = ( new Set(( this.agentPluginService.plugins.get().map(p => ( p.uri.toString())))));
741
1864
  this.marketplaceItems = ( filtered.filter(p => {
742
1865
  const expectedUri = this.pluginInstallService.getPluginInstallUri(p);
743
1866
  return !( installedUris.has(( expectedUri.toString())));
744
1867
  }).map(marketplacePluginToItem));
745
- this.updateMarketplaceList();
1868
+ if (query) {
1869
+ this.updateSearchResultsList();
1870
+ } else {
1871
+ this.updateMarketplaceList();
1872
+ }
746
1873
  } catch {
747
- if (!cts.token.isCancellationRequested) {
1874
+ if (this.isCurrentMarketplaceRequest(cts, query, browseMode)) {
748
1875
  this.marketplaceItems = [];
749
- this.emptyContainer.style.display = "flex";
750
- this.listContainer.style.display = "none";
751
- this.emptyText.textContent = ( localize(6108, "Unable to load marketplace"));
752
- this.emptySubtext.textContent = ( localize(6109, "Check your connection and try again"));
1876
+ this.showEmptySurface();
1877
+ this.emptyText.textContent = ( localize(7016, "Unable to load marketplace"));
1878
+ this.emptySubtext.textContent = ( localize(7017, "Check your connection and try again"));
753
1879
  }
754
1880
  }
755
1881
  }
1882
+ async queryPluginSearch() {
1883
+ if (!this.isBrowseMarketplaceAvailable()) {
1884
+ this.marketplaceItems = [];
1885
+ await this.filterPlugins();
1886
+ return;
1887
+ }
1888
+ const query = this.searchQuery.toLowerCase().trim();
1889
+ if (!query || this.browseMode) {
1890
+ return;
1891
+ }
1892
+ this.marketplaceCts?.dispose(true);
1893
+ const cts = this.marketplaceCts = ( new CancellationTokenSource());
1894
+ try {
1895
+ const plugins = await this.pluginMarketplaceService.fetchMarketplacePlugins(cts.token);
1896
+ if (!this.isCurrentMarketplaceRequest(cts, query, false)) {
1897
+ return;
1898
+ }
1899
+ const installedItems = ( this.agentPluginService.plugins.get().map(p => installedPluginToItem(p, this.labelService))).filter(
1900
+ item => item.name.toLowerCase().includes(query) || item.description.toLowerCase().includes(query)
1901
+ ).sort(compareInstalledPluginItems);
1902
+ const remoteItems = [...(await this.getRemotePluginItems(query))];
1903
+ if (!this.isCurrentMarketplaceRequest(cts, query, false)) {
1904
+ return;
1905
+ }
1906
+ const filtered = query ? plugins.filter(
1907
+ p => p.name.toLowerCase().includes(query) || p.description.toLowerCase().includes(query) || p.marketplace.toLowerCase().includes(query)
1908
+ ) : plugins;
1909
+ const installedUris = ( new Set(( this.agentPluginService.plugins.get().map(p => ( p.uri.toString())))));
1910
+ const marketplaceItems = ( filtered.filter(p => {
1911
+ const expectedUri = this.pluginInstallService.getPluginInstallUri(p);
1912
+ return !( installedUris.has(( expectedUri.toString())));
1913
+ }).map(marketplacePluginToItem));
1914
+ if (!this.isCurrentMarketplaceRequest(cts, query, false)) {
1915
+ return;
1916
+ }
1917
+ this.installedItems = installedItems;
1918
+ this.remoteItems = remoteItems;
1919
+ this.marketplaceItems = marketplaceItems;
1920
+ this.searchInput.hideMessage();
1921
+ } catch {
1922
+ if (!this.isCurrentMarketplaceRequest(cts, query, false)) {
1923
+ return;
1924
+ }
1925
+ this.marketplaceItems = [];
1926
+ this.searchInput.showMessage({
1927
+ content: ( localize(
1928
+ 7018,
1929
+ "Marketplace results are unavailable. Showing installed plugins only."
1930
+ )),
1931
+ type: MessageType.WARNING
1932
+ });
1933
+ await this.filterPlugins();
1934
+ return;
1935
+ }
1936
+ if (this.isCurrentMarketplaceRequest(cts, query, false)) {
1937
+ this.updateSearchResultsList();
1938
+ this._onDidChangeItemCount.fire(this.itemCount);
1939
+ }
1940
+ }
1941
+ isCurrentMarketplaceRequest(cts, query, browseMode) {
1942
+ return isCurrentPluginMarketplaceRequest(
1943
+ query,
1944
+ this.searchQuery.toLowerCase().trim(),
1945
+ browseMode,
1946
+ this.browseMode,
1947
+ this.marketplaceCts === cts,
1948
+ cts.token.isCancellationRequested
1949
+ );
1950
+ }
756
1951
  updateMarketplaceList() {
757
1952
  if (this.marketplaceItems.length === 0) {
758
- this.emptyContainer.style.display = "flex";
759
- this.listContainer.style.display = "none";
1953
+ this.showEmptySurface();
760
1954
  if (this.searchQuery.trim()) {
761
- this.emptyText.textContent = ( localize(6110, "No plugins match '{0}'", this.searchQuery));
762
- this.emptySubtext.textContent = ( localize(6111, "Try a different search term"));
1955
+ this.emptyText.textContent = ( localize(7019, "No plugins match '{0}'", this.searchQuery));
1956
+ this.emptySubtext.textContent = ( localize(7020, "Try a different search term"));
763
1957
  } else {
764
- this.emptyText.textContent = ( localize(6112, "No plugins available"));
1958
+ this.emptyText.textContent = ( localize(7010, "No plugins available"));
765
1959
  this.emptySubtext.textContent = "";
766
1960
  }
1961
+ this.list.splice(0, this.list.length, []);
1962
+ return;
1963
+ }
1964
+ const query = this.searchQuery.trim();
1965
+ if (!query) {
1966
+ this.renderBrowseMarketplaceCards();
1967
+ this.list.splice(0, this.list.length, []);
1968
+ return;
767
1969
  } else {
768
- this.emptyContainer.style.display = "none";
769
- this.listContainer.style.display = "";
1970
+ this.updateSearchResultsList();
770
1971
  }
771
- const entries = ( this.marketplaceItems.map(item => ({
772
- type: "marketplace-item",
773
- item
774
- })));
775
- this.list.splice(0, this.list.length, entries);
1972
+ }
1973
+ updateSearchResultsList() {
1974
+ const installedNames = ( new Set(( this.installedItems.map(item => item.name.toLowerCase()))));
1975
+ const remoteItems = this.remoteItems.filter(
1976
+ item => item.groupKey !== "remote-client" && (!item.name || !( installedNames.has(item.name.toLowerCase())))
1977
+ );
1978
+ const installedCount = this.installedItems.length + remoteItems.length;
1979
+ if (installedCount === 0 && this.marketplaceItems.length === 0) {
1980
+ this.showEmptySurface();
1981
+ this.emptyText.textContent = ( localize(7021, "No plugins match '{0}'", this.searchQuery));
1982
+ this.emptySubtext.textContent = ( localize(7020, "Try a different search term"));
1983
+ this.list.splice(0, this.list.length, []);
1984
+ return;
1985
+ }
1986
+ this.captureSectionScrollPositions();
1987
+ this.cardDisposables.clear();
1988
+ this.sectionLists = [];
1989
+ this.installedCreateButton = undefined;
1990
+ this.firstCardFocusElement = undefined;
1991
+ clearNode(this.cardContainer);
1992
+ this.showCardSurface();
1993
+ const content = this.createCardScrollContent("plugin-search-results", "distributed-section-layout");
1994
+ if (installedCount > 0) {
1995
+ const installedList = this.renderCardSection(content, ( localize(7022, "Installed")), undefined, "installed-plugins-section", installedCount);
1996
+ installedList.classList.add("plugin-inventory-list");
1997
+ this.createPluginSectionList(installedList, ( localize(7022, "Installed")), [...( this.installedItems.map(item => ({
1998
+ type: "plugin-item",
1999
+ item
2000
+ }))), ...( remoteItems.map(item => ({
2001
+ type: "remote-item",
2002
+ item
2003
+ })))]);
2004
+ }
2005
+ if (this.marketplaceItems.length > 0) {
2006
+ this.renderAvailablePlugins(content, this.marketplaceItems, false, ( localize(7023, "Available to install")), undefined);
2007
+ }
2008
+ this.schedulePluginSectionLayout();
2009
+ this.list.splice(0, this.list.length, []);
776
2010
  }
777
2011
  async getRemotePluginItems(query) {
778
2012
  if (!this.harnessService.getActiveDescriptor().itemProvider) {
@@ -787,116 +2021,25 @@ let PluginListWidget = class PluginListWidget extends Disposable {
787
2021
  return [];
788
2022
  }
789
2023
  }
790
- getRemoteGroupMetadata(groupKey) {
791
- return {
792
- group: groupKey ?? "remote-host",
793
- label: ( localize(6113, "Remote")),
794
- description: ( localize(
795
- 6114,
796
- "Plugins configured directly on the remote agent host and available without local sync."
797
- ))
798
- };
799
- }
800
- appendGroup(entries, header, items, isFirst) {
801
- if (items.length === 0) {
802
- return isFirst;
803
- }
804
- const collapsed = ( this.collapsedGroups.has(header.group));
805
- entries.push({
806
- type: "group-header",
807
- id: `plugin-group-${header.group}`,
808
- group: header.group,
809
- label: header.label,
810
- icon: pluginIcon,
811
- count: items.length,
812
- isFirst,
813
- description: header.description,
814
- collapsed
815
- });
816
- if (!collapsed) {
817
- entries.push(...items);
818
- }
819
- return false;
820
- }
821
2024
  async filterPlugins() {
2025
+ const generation = ++this.filterGeneration;
822
2026
  const query = this.searchQuery.toLowerCase().trim();
2027
+ const browseMode = this.browseMode;
823
2028
  const allPlugins = this.agentPluginService.plugins.get();
824
- this.remoteItems = [...(await this.getRemotePluginItems(query))];
2029
+ const remoteItems = [...(await this.getRemotePluginItems(query))];
2030
+ if (generation !== this.filterGeneration || this.searchQuery.toLowerCase().trim() !== query || this.browseMode !== browseMode) {
2031
+ return;
2032
+ }
2033
+ this.remoteItems = remoteItems;
825
2034
  this.installedItems = ( allPlugins.map(p => installedPluginToItem(p, this.labelService))).filter(
826
2035
  item => !query || item.name.toLowerCase().includes(query) || item.description.toLowerCase().includes(query)
827
- );
828
- if (this.remoteItems.length === 0 && this.installedItems.length === 0) {
829
- this.emptyContainer.style.display = "flex";
830
- this.listContainer.style.display = "none";
831
- if (this.searchQuery.trim()) {
832
- this.emptyText.textContent = ( localize(6115, "No plugins match '{0}'", this.searchQuery));
833
- this.emptySubtext.textContent = ( localize(6111, "Try a different search term"));
834
- } else if (this.harnessService.getActiveDescriptor().itemProvider) {
835
- this.emptyText.textContent = ( localize(6116, "No plugins configured"));
836
- this.emptySubtext.textContent = ( localize(
837
- 6117,
838
- "Use the toolbar to add remote plugins or install plugins from a source."
839
- ));
840
- } else {
841
- this.emptyText.textContent = ( localize(6118, "No plugins installed"));
842
- this.emptySubtext.textContent = ( localize(6119, "Browse the marketplace to discover and install plugins"));
843
- }
844
- } else {
845
- this.emptyContainer.style.display = "none";
846
- this.listContainer.style.display = "";
847
- }
848
- const enabledPlugins = this.installedItems.filter(item => isContributionEnabled(item.plugin.enablement.get()));
849
- const disabledPlugins = this.installedItems.filter(item => !isContributionEnabled(item.plugin.enablement.get()));
850
- const entries = [];
851
- let isFirst = true;
852
- const installedNames = ( new Set(( this.installedItems.map(item => item.name.toLowerCase()))));
853
- const remoteGroups = ( new Map());
854
- for (const item of this.remoteItems) {
855
- const key = item.groupKey ?? "remote-host";
856
- if (key === "remote-client") {
857
- continue;
858
- }
859
- if (item.name && ( installedNames.has(item.name.toLowerCase()))) {
860
- continue;
861
- }
862
- let group = remoteGroups.get(key);
863
- if (!group) {
864
- group = [];
865
- remoteGroups.set(key, group);
866
- }
867
- group.push({
868
- type: "remote-item",
869
- item
870
- });
871
- }
872
- for (const [groupKey, items] of remoteGroups) {
873
- isFirst = this.appendGroup(entries, this.getRemoteGroupMetadata(groupKey), items, isFirst);
874
- }
875
- if (enabledPlugins.length > 0) {
876
- isFirst = this.appendGroup(entries, {
877
- group: "enabled",
878
- label: ( localize(6120, "Enabled Locally")),
879
- description: ( localize(
880
- 6121,
881
- "Plugins installed in this client and available for syncing to the remote session."
882
- ))
883
- }, ( enabledPlugins.map(item => ({
884
- type: "plugin-item",
885
- item
886
- }))), isFirst);
887
- }
888
- if (disabledPlugins.length > 0) {
889
- this.appendGroup(entries, {
890
- group: "disabled",
891
- label: ( localize(6122, "Disabled Locally")),
892
- description: ( localize(6123, "Plugins installed in this client but currently disabled."))
893
- }, ( disabledPlugins.map(item => ({
894
- type: "plugin-item",
895
- item
896
- }))), isFirst);
2036
+ ).sort(compareInstalledPluginItems);
2037
+ if (!query) {
2038
+ this.renderPluginHome();
2039
+ this._onDidChangeItemCount.fire(this.itemCount);
2040
+ return;
897
2041
  }
898
- this.displayEntries = entries;
899
- this.list.splice(0, this.list.length, this.displayEntries);
2042
+ this.updateSearchResultsList();
900
2043
  this._onDidChangeItemCount.fire(this.itemCount);
901
2044
  }
902
2045
  get itemCount() {
@@ -934,7 +2077,11 @@ let PluginListWidget = class PluginListWidget extends Disposable {
934
2077
  layout(height, width) {
935
2078
  this.lastHeight = height;
936
2079
  this.lastWidth = width;
2080
+ if (!this.visible || this.element.parentElement?.style.display === "none") {
2081
+ return;
2082
+ }
937
2083
  this.element.style.height = `${height}px`;
2084
+ this.updateResponsiveLayout(width);
938
2085
  const searchBarHeight = this.searchAndButtonContainer.offsetHeight;
939
2086
  if (searchBarHeight === 0 && !this._layoutDeferred) {
940
2087
  this._layoutDeferred = true;
@@ -949,57 +2096,103 @@ let PluginListWidget = class PluginListWidget extends Disposable {
949
2096
  }
950
2097
  const headerHeight = this.sectionTitleHeader.offsetHeight;
951
2098
  this.lastHeaderHeight = headerHeight;
952
- const listHeight = Math.max(0, height - searchBarHeight - headerHeight);
2099
+ const backHeight = this.marketplaceBackContainer.offsetHeight;
2100
+ const listHeight = Math.max(0, height - searchBarHeight - headerHeight - backHeight);
2101
+ this.cardScrollableNode.style.height = `${listHeight}px`;
953
2102
  this.listContainer.style.height = `${listHeight}px`;
954
2103
  this.list.layout(listHeight, width);
2104
+ this.schedulePluginSectionLayout();
955
2105
  }
956
2106
  focusSearch() {
957
2107
  this.searchInput.focus();
958
2108
  }
959
2109
  revealLastItem() {
2110
+ if (this.cardScrollableNode.style.display !== "none") {
2111
+ const reveal = () => {
2112
+ const section = this.sectionLists.at(-1);
2113
+ if (section?.entries.length) {
2114
+ section.list.reveal(section.entries.length - 1);
2115
+ }
2116
+ this.cardScrollable.scanDomNode();
2117
+ this.cardScrollable.setScrollPosition({
2118
+ scrollTop: this.cardContainer.scrollHeight
2119
+ });
2120
+ };
2121
+ reveal();
2122
+ this.revealLastItemScheduler.value = scheduleAtNextAnimationFrame(getWindow(this.element), reveal);
2123
+ return;
2124
+ }
960
2125
  if (this.list.length > 0) {
961
2126
  this.list.reveal(this.list.length - 1);
962
2127
  }
963
2128
  }
964
2129
  focus() {
965
- this.list.domFocus();
966
- if (this.list.length > 0) {
2130
+ if (this.cardScrollableNode.style.display !== "none") {
2131
+ if (this.firstCardFocusElement) {
2132
+ this.firstCardFocusElement.focus();
2133
+ } else {
2134
+ const section = this.sectionLists[0];
2135
+ if (section?.entries.length) {
2136
+ section.list.setFocus([0]);
2137
+ section.list.domFocus();
2138
+ }
2139
+ }
2140
+ } else if (this.list.length > 0) {
2141
+ this.list.domFocus();
967
2142
  this.list.setFocus([0]);
968
2143
  }
969
2144
  }
2145
+ getInstalledPluginActions(item, disposables) {
2146
+ const actions = [];
2147
+ const groups = getInstalledPluginContextMenuActions(item.plugin, this.instantiationService);
2148
+ for (const menuActions of groups) {
2149
+ for (const menuAction of menuActions) {
2150
+ actions.push(menuAction);
2151
+ if (isDisposable(menuAction)) {
2152
+ disposables.add(menuAction);
2153
+ }
2154
+ }
2155
+ actions.push(( new Separator()));
2156
+ }
2157
+ if (actions.length > 0 && actions[actions.length - 1] instanceof Separator) {
2158
+ actions.pop();
2159
+ }
2160
+ return actions;
2161
+ }
2162
+ getRemotePluginActions(item) {
2163
+ const actions = [];
2164
+ for (const itemAction of item.actions ?? []) {
2165
+ actions.push(( new Action(
2166
+ itemAction.id,
2167
+ itemAction.label,
2168
+ itemAction.icon ? ThemeIcon.asClassName(itemAction.icon) : undefined,
2169
+ itemAction.enabled !== false,
2170
+ () => itemAction.run()
2171
+ )));
2172
+ }
2173
+ return actions;
2174
+ }
2175
+ showInstalledPluginActions(item, anchor) {
2176
+ const disposables = ( new DisposableStore());
2177
+ this.contextMenuService.showContextMenu({
2178
+ getAnchor: () => anchor,
2179
+ getActions: () => this.getInstalledPluginActions(item, disposables),
2180
+ onHide: () => disposables.dispose()
2181
+ });
2182
+ }
2183
+ showRemotePluginActions(item, anchor) {
2184
+ this.contextMenuService.showContextMenu({
2185
+ getAnchor: () => anchor,
2186
+ getActions: () => this.getRemotePluginActions(item)
2187
+ });
2188
+ }
970
2189
  onContextMenu(e) {
971
- if (!e.element || e.element.type === "group-header" || e.element.type === "marketplace-item") {
2190
+ if (!e.element || e.element.type === "group-header" || e.element.type === "search-header" || e.element.type === "marketplace-item") {
972
2191
  return;
973
2192
  }
974
2193
  const entry = e.element;
975
2194
  const disposables = ( new DisposableStore());
976
- const actions = [];
977
- if (entry.type === "plugin-item") {
978
- const groups = getInstalledPluginContextMenuActions(entry.item.plugin, this.instantiationService);
979
- for (const menuActions of groups) {
980
- for (const menuAction of menuActions) {
981
- actions.push(menuAction);
982
- if (isDisposable(menuAction)) {
983
- disposables.add(menuAction);
984
- }
985
- }
986
- actions.push(( new Separator()));
987
- }
988
- if (actions.length > 0 && actions[actions.length - 1] instanceof Separator) {
989
- actions.pop();
990
- }
991
- } else {
992
- const itemActions = entry.item.actions ?? [];
993
- for (const itemAction of itemActions) {
994
- actions.push(( new Action(
995
- itemAction.id,
996
- itemAction.label,
997
- itemAction.icon ? ThemeIcon.asClassName(itemAction.icon) : undefined,
998
- itemAction.enabled !== false,
999
- () => itemAction.run()
1000
- )));
1001
- }
1002
- }
2195
+ const actions = entry.type === "plugin-item" ? this.getInstalledPluginActions(entry.item, disposables) : this.getRemotePluginActions(entry.item);
1003
2196
  this.contextMenuService.showContextMenu({
1004
2197
  getAnchor: () => e.anchor,
1005
2198
  getActions: () => actions,
@@ -1007,6 +2200,6 @@ let PluginListWidget = class PluginListWidget extends Disposable {
1007
2200
  });
1008
2201
  }
1009
2202
  };
1010
- PluginListWidget = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IAgentPluginService)), ( __param(2, IPluginMarketplaceService)), ( __param(3, IPluginInstallService)), ( __param(4, IOpenerService)), ( __param(5, IContextViewService)), ( __param(6, IContextMenuService)), ( __param(7, IHoverService)), ( __param(8, ILabelService)), ( __param(9, ICommandService)), ( __param(10, ICustomizationHarnessService)), ( __param(11, IAICustomizationItemsModel)), ( __param(12, IConfigurationService))], PluginListWidget));
2203
+ PluginListWidget = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IAgentPluginService)), ( __param(3, IPluginMarketplaceService)), ( __param(4, IPluginInstallService)), ( __param(5, IOpenerService)), ( __param(6, IContextViewService)), ( __param(7, IContextMenuService)), ( __param(8, IHoverService)), ( __param(9, ILabelService)), ( __param(10, ICommandService)), ( __param(11, ICustomizationHarnessService)), ( __param(12, IAICustomizationItemsModel)), ( __param(13, IConfigurationService)), ( __param(14, INotificationService))], PluginListWidget));
1011
2204
 
1012
- export { PluginListWidget };
2205
+ export { PluginListWidget, PluginMarketplaceSnapshotModel, getInstalledPluginMetadata, getRemotePluginDisabledLabel, getToggledPluginEnablementState, isCurrentPluginMarketplaceRequest, shouldLoadPluginMarketplaceSnapshot };