@codingame/monaco-vscode-chat-service-override 28.4.0 → 29.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 (339) hide show
  1. package/index.js +18 -12
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +300 -0
  4. package/vscode/src/vs/platform/agentHost/common/agentService.js +31 -0
  5. package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +84 -0
  6. package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +16 -0
  7. package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +488 -0
  8. package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +424 -0
  9. package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +50 -0
  10. package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +202 -0
  11. package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +114 -0
  12. package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +723 -0
  13. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +33 -0
  14. package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +40 -0
  15. package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +22 -0
  16. package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +13 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  18. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
  19. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +29 -15
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +76 -10
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +11 -11
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +1 -1
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +162 -4
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +167 -4
  36. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  37. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +1 -1
  38. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +52 -20
  39. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  40. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
  42. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +82 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +195 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +5 -1
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +97 -88
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +3 -3
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +4 -1
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +5 -3
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +78 -35
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +7 -1
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +174 -170
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +7 -4
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +12 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +118 -52
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +7 -7
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +5 -1
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +13 -2
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  61. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +0 -3
  62. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -10
  63. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +9 -10
  65. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +23 -25
  66. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +341 -196
  67. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +79 -7
  68. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  69. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  70. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +5 -4
  71. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +22 -10
  72. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +2 -2
  74. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +4 -0
  75. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -14
  76. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +85 -5
  77. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +668 -214
  78. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +10 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +18 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +306 -39
  81. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +84 -4
  82. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +651 -81
  83. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -2
  85. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +31 -1
  86. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +9 -20
  87. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +11 -1
  88. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -142
  89. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.d.ts +43 -0
  90. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +63 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +11 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +44 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +25 -1
  94. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +297 -123
  95. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +153 -31
  96. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +17 -1
  97. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +111 -171
  98. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +1 -3
  99. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +5 -30
  100. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +277 -186
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +4 -2
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +31 -23
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +3 -7
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +4 -16
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +18 -2
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +112 -17
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +3 -3
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +16 -27
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +41 -19
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +7 -1
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +35 -23
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +1 -8
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +8 -51
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +1 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +13 -8
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +29 -36
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +14 -7
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +5 -1
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +79 -26
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +19 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +125 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +11 -4
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +113 -82
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +18 -7
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +54 -15
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +8 -3
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +103 -28
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +48 -37
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +28 -2
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +62 -20
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +21 -37
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +2 -1
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +4 -3
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -1
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +1 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +17 -4
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +5 -5
  146. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +4 -1
  147. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +43 -5
  148. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  149. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +59 -0
  150. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +194 -0
  151. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -10
  152. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
  153. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +2 -1
  154. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +8 -4
  155. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
  156. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +11 -0
  157. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +81 -50
  158. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
  159. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
  160. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
  161. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  162. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
  163. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +23 -18
  164. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  165. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +2 -2
  166. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +9 -7
  167. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
  168. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +0 -2
  169. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +19 -27
  170. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -4
  171. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +105 -172
  172. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
  173. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +80 -65
  174. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
  175. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +56 -27
  176. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +1 -1
  177. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
  178. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.d.ts +16 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +70 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
  181. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.d.ts +20 -0
  182. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +40 -0
  183. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.d.ts +31 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +53 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +33 -2
  186. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +21 -2
  187. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +362 -18
  188. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +15 -4
  189. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +90 -43
  190. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +35 -0
  191. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +146 -0
  192. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  193. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
  194. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
  195. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  196. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
  197. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +10 -9
  198. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  199. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  200. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  201. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +1 -1
  202. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +33 -5
  203. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -0
  204. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +200 -55
  205. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +7 -0
  206. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +90 -45
  207. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +4 -2
  208. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +21 -10
  209. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +22 -16
  210. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +4 -2
  211. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +28 -13
  212. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  213. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
  214. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
  215. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +20 -16
  216. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +68 -5
  217. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  218. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  219. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
  220. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -0
  221. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +57 -20
  222. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  223. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +21 -5
  224. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +171 -57
  225. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +7 -5
  226. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +206 -35
  227. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +4 -3
  228. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -7
  229. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +7 -1
  230. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +11 -3
  231. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +44 -22
  232. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +450 -301
  233. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +23 -0
  234. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +165 -0
  235. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +34 -20
  236. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +209 -144
  237. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +20 -0
  238. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +205 -0
  239. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +17 -17
  240. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +33 -0
  241. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +47 -0
  242. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +30 -0
  243. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
  244. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  245. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
  246. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +1 -1
  247. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +191 -159
  248. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +6 -7
  249. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +210 -233
  250. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +19 -26
  251. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +183 -193
  252. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +24 -0
  253. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +75 -0
  254. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  255. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +8 -5
  256. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -0
  257. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +97 -35
  258. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  259. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +16 -0
  260. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +67 -0
  261. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +2 -2
  262. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +62 -23
  263. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  264. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  265. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  266. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
  267. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  268. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +8 -8
  269. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  270. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  271. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
  272. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +3 -1
  273. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +23 -9
  274. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +1 -1
  275. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +2 -2
  276. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +3 -1
  277. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +50 -9
  278. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +3 -1
  279. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +21 -7
  280. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +20 -1
  281. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +124 -1
  282. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +20 -5
  283. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +5 -0
  284. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +10 -7
  285. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +2 -1
  286. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +46 -31
  287. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +18 -1
  288. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +74 -37
  289. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
  290. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  291. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +1 -0
  292. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +24 -14
  293. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  294. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +1 -1
  295. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +3 -2
  296. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +1 -1
  297. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +2 -0
  298. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +5 -1
  299. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  300. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  301. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  302. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  303. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +1 -2
  304. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +66 -64
  305. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +1 -0
  306. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -0
  307. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +5 -2
  308. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -2
  309. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +390 -114
  310. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +14 -0
  311. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +21 -11
  312. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +70 -51
  313. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +61 -51
  314. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +94 -76
  315. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  316. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +19 -1
  317. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +112 -21
  318. package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +0 -53
  319. package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +0 -219
  320. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +0 -89
  321. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +0 -251
  322. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -123
  323. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +0 -278
  324. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +0 -76
  325. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +0 -299
  326. package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +0 -67
  327. package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +0 -263
  328. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +0 -85
  329. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +0 -397
  330. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +0 -56
  331. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +0 -26
  332. package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +0 -5
  333. package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +0 -30
  334. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +0 -40
  335. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +0 -28
  336. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -190
  337. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -11
  338. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -16
  339. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -20
@@ -19,6 +19,7 @@ import { generateTokensCSSForColorMap } from '@codingame/monaco-vscode-api/vscod
19
19
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
20
20
  import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
21
21
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
22
+ import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
22
23
  import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
23
24
  import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
24
25
  import { asText } from '@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request';
@@ -32,11 +33,17 @@ import { renderMarkdownDocument, DEFAULT_MARKDOWN_STYLES } from '@codingame/mona
32
33
  import { IWebviewService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview.service';
33
34
  import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
34
35
  import { IPluginInstallService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service';
36
+ import { hasSourceChanged } from '../../common/plugins/pluginMarketplaceService.js';
37
+ import { IPluginMarketplaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service';
35
38
  import { AgentPluginItemKind } from './agentPluginItems.js';
39
+ import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
40
+ import { EnablementStatusWidget, pluginEnablementLabels } from '../enablementStatusWidget.js';
41
+ import { EnablementDropDownAction, EnablementDropdownActionViewItem, InstallPluginAction, createEnablePluginDropDown, createDisablePluginDropDown, UninstallPluginAction } from '../agentPluginActions.js';
36
42
  import * as agentPluginEditor from './media/agentPluginEditor.css';
43
+ import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
37
44
  import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
38
45
 
39
- var AgentPluginEditor_1, InstallPluginEditorAction_1, EnablePluginEditorAction_1, DisablePluginEditorAction_1;
46
+ var AgentPluginEditor_1, UpdatePluginEditorAction_1;
40
47
  registerCss(agentPluginEditor);
41
48
  var WebviewIndex;
42
49
  (function(WebviewIndex) {
@@ -63,7 +70,9 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
63
70
  requestService,
64
71
  agentPluginService,
65
72
  pluginInstallService,
66
- labelService
73
+ pluginMarketplaceService,
74
+ labelService,
75
+ contextMenuService
67
76
  ) {
68
77
  super(
69
78
  AgentPluginEditor_1.ID,
@@ -81,7 +90,9 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
81
90
  this.requestService = requestService;
82
91
  this.agentPluginService = agentPluginService;
83
92
  this.pluginInstallService = pluginInstallService;
93
+ this.pluginMarketplaceService = pluginMarketplaceService;
84
94
  this.labelService = labelService;
95
+ this.contextMenuService = contextMenuService;
85
96
  this.pluginReadme = null;
86
97
  this.initialScrollProgress = ( new Map());
87
98
  this.currentIdentifier = "";
@@ -110,9 +121,24 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
110
121
  const marketplace = append(subtitle, $("span.subtitle-entry"));
111
122
  const actionsAndStatusContainer = append(details, $(".actions-status-container"));
112
123
  const actionBar = this._register(( new ActionBar(actionsAndStatusContainer, {
124
+ actionViewItemProvider: (action, options) => {
125
+ if (action instanceof EnablementDropDownAction) {
126
+ return ( new EnablementDropdownActionViewItem(action, {
127
+ ...options,
128
+ icon: true,
129
+ label: true,
130
+ menuActionsOrProvider: {
131
+ getActions: () => action.menuActions
132
+ },
133
+ menuActionClassNames: action.menuActionClassNames
134
+ }, this.contextMenuService));
135
+ }
136
+ return undefined;
137
+ },
113
138
  focusOnlyEnabledItems: true
114
139
  })));
115
140
  actionBar.setFocusable(true);
141
+ const statusContainer = append(actionsAndStatusContainer, $(".status"));
116
142
  const body = append(root, $(".body"));
117
143
  const content = append(body, $(".content"));
118
144
  content.id = generateUuid();
@@ -122,7 +148,8 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
122
148
  header,
123
149
  name,
124
150
  marketplace,
125
- actionBar
151
+ actionBar,
152
+ statusContainer
126
153
  };
127
154
  }
128
155
  async setInput(input, options, context, token) {
@@ -163,11 +190,8 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
163
190
  } else {
164
191
  reset(template.marketplace, marketplaceLabel);
165
192
  }
166
- const actionDisposables = this.transientDisposables.add(( new DisposableStore()));
167
- this.transientDisposables.add(autorun(reader => {
168
- actionDisposables.clear();
169
- template.actionBar.clear();
170
- const allPlugins = this.agentPluginService.allPlugins.read(reader);
193
+ const currentItem = derived(reader => {
194
+ const allPlugins = this.agentPluginService.plugins.read(reader);
171
195
  let currentItem = item;
172
196
  if (item.kind === AgentPluginItemKind.Marketplace) {
173
197
  const expectedUri = this.pluginInstallService.getPluginInstallUri({
@@ -204,11 +228,28 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
204
228
  return;
205
229
  }
206
230
  } else {
207
- stillInstalled.enabled.read(reader);
231
+ stillInstalled.enablement.read(reader);
208
232
  currentItem = this.installedPluginToItem(stillInstalled);
209
233
  }
210
234
  }
211
- const actions = this.getItemActions(currentItem);
235
+ return currentItem;
236
+ });
237
+ const storedPlugin = ( currentItem.map((item, r) => {
238
+ if (!item || item.kind === AgentPluginItemKind.Marketplace) {
239
+ return undefined;
240
+ }
241
+ return this.pluginMarketplaceService.installedPlugins.read(r).find(e => ( e.pluginUri.toString()) === ( item.plugin.uri.toString()))?.plugin ?? item.plugin.fromMarketplace;
242
+ }));
243
+ const actionDisposables = this.transientDisposables.add(( new DisposableStore()));
244
+ this.transientDisposables.add(autorun(reader => {
245
+ actionDisposables.clear();
246
+ template.actionBar.clear();
247
+ const current = currentItem.read(reader);
248
+ if (!current) {
249
+ return;
250
+ }
251
+ this.pluginMarketplaceService.lastFetchedPlugins.read(reader);
252
+ const actions = this.getItemActions(current, storedPlugin.read(reader));
212
253
  if (actions.length > 0) {
213
254
  template.actionBar.push(actions, {
214
255
  icon: true,
@@ -218,26 +259,40 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
218
259
  for (const action of actions) {
219
260
  actionDisposables.add(action);
220
261
  }
262
+ if (current.kind === AgentPluginItemKind.Installed) {
263
+ actionDisposables.add(this.instantiationService.createInstance(
264
+ EnablementStatusWidget,
265
+ template.statusContainer,
266
+ current.plugin.enablement,
267
+ pluginEnablementLabels
268
+ ));
269
+ }
221
270
  }));
222
271
  this.activeElement = await this.openDetails(item, template, token);
223
272
  }
224
- getItemActions(item) {
273
+ getItemActions(item, storedPlugin) {
225
274
  if (item.kind === AgentPluginItemKind.Marketplace) {
226
- return [this.instantiationService.createInstance(InstallPluginEditorAction, item)];
275
+ return [this.instantiationService.createInstance(InstallPluginAction, item)];
227
276
  }
277
+ const workspaceService = this.instantiationService.invokeFunction(a => a.get(IWorkspaceContextService));
228
278
  const actions = [];
229
- if (item.plugin.enabled.get()) {
230
- actions.push(
231
- this.instantiationService.createInstance(DisablePluginEditorAction, item.plugin)
232
- );
233
- } else {
234
- actions.push(
235
- this.instantiationService.createInstance(EnablePluginEditorAction, item.plugin)
236
- );
279
+ if (storedPlugin) {
280
+ const cachedMarketplace = this.pluginMarketplaceService.lastFetchedPlugins.get();
281
+ const key = `${storedPlugin.marketplaceReference.canonicalId}::${storedPlugin.name}`;
282
+ const livePlugin = cachedMarketplace.find(mp => `${mp.marketplaceReference.canonicalId}::${mp.name}` === key);
283
+ if (livePlugin && hasSourceChanged(storedPlugin.sourceDescriptor, livePlugin.sourceDescriptor)) {
284
+ actions.push(
285
+ this.instantiationService.createInstance(UpdatePluginEditorAction, item.plugin, livePlugin)
286
+ );
287
+ }
237
288
  }
238
289
  actions.push(
239
- this.instantiationService.createInstance(UninstallPluginEditorAction, item.plugin)
290
+ createEnablePluginDropDown(item.plugin, this.agentPluginService.enablementModel, workspaceService)
291
+ );
292
+ actions.push(
293
+ createDisablePluginDropDown(item.plugin, this.agentPluginService.enablementModel, workspaceService)
240
294
  );
295
+ actions.push(( new UninstallPluginAction(item.plugin)));
241
296
  return actions;
242
297
  }
243
298
  installedPluginToItem(plugin) {
@@ -283,7 +338,8 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
283
338
  try {
284
339
  const context = await this.requestService.request({
285
340
  type: "GET",
286
- url: rawUrl
341
+ url: rawUrl,
342
+ callSite: "agentPluginEditor.fetchReadme"
287
343
  }, token);
288
344
  const text = await asText(context);
289
345
  return text ?? "";
@@ -301,7 +357,7 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
301
357
  this.contentDisposables.add(toDisposable(insert(this.layoutParticipants, {
302
358
  layout
303
359
  })));
304
- return this.openMarkdown(this.pluginReadme.get(), ( localize(5011, "No README available.")), readmeContainer, WebviewIndex.Readme, ( localize(5012, "Readme")), token);
360
+ return this.openMarkdown(this.pluginReadme.get(), ( localize(5058, "No README available.")), readmeContainer, WebviewIndex.Readme, ( localize(5059, "Readme")), token);
305
361
  }
306
362
  async openMarkdown(cacheResult, noContentCopy, container, webviewIndex, title, token) {
307
363
  try {
@@ -459,79 +515,32 @@ let AgentPluginEditor = class AgentPluginEditor extends EditorPane {
459
515
  this.layoutParticipants.forEach(p => p.layout());
460
516
  }
461
517
  };
462
- AgentPluginEditor = AgentPluginEditor_1 = ( __decorate([( __param(1, ITelemetryService)), ( __param(2, IInstantiationService)), ( __param(3, IThemeService)), ( __param(4, IOpenerService)), ( __param(5, IStorageService)), ( __param(6, IExtensionService)), ( __param(7, IWebviewService)), ( __param(8, ILanguageService)), ( __param(9, IFileService)), ( __param(10, IRequestService)), ( __param(11, IAgentPluginService)), ( __param(12, IPluginInstallService)), ( __param(13, ILabelService))], AgentPluginEditor));
463
- let InstallPluginEditorAction = class InstallPluginEditorAction extends Action {
464
- static {
465
- InstallPluginEditorAction_1 = this;
466
- }
467
- static {
468
- this.ID = "agentPlugin.editor.install";
469
- }
470
- constructor(item, pluginInstallService) {
471
- super(InstallPluginEditorAction_1.ID, ( localize(5013, "Install")), "extension-action label prominent install");
472
- this.item = item;
473
- this.pluginInstallService = pluginInstallService;
474
- }
475
- async run() {
476
- await this.pluginInstallService.installPlugin({
477
- name: this.item.name,
478
- description: this.item.description,
479
- version: "",
480
- source: this.item.source,
481
- sourceDescriptor: this.item.sourceDescriptor,
482
- marketplace: this.item.marketplace,
483
- marketplaceReference: this.item.marketplaceReference,
484
- marketplaceType: this.item.marketplaceType,
485
- readmeUri: this.item.readmeUri
486
- });
487
- }
488
- };
489
- InstallPluginEditorAction = InstallPluginEditorAction_1 = ( __decorate([( __param(1, IPluginInstallService))], InstallPluginEditorAction));
490
- let EnablePluginEditorAction = class EnablePluginEditorAction extends Action {
491
- static {
492
- EnablePluginEditorAction_1 = this;
493
- }
494
- static {
495
- this.ID = "agentPlugin.editor.enable";
496
- }
497
- constructor(plugin, agentPluginService) {
498
- super(EnablePluginEditorAction_1.ID, ( localize(5014, "Enable")), "extension-action label prominent");
499
- this.plugin = plugin;
500
- this.agentPluginService = agentPluginService;
501
- }
502
- async run() {
503
- this.agentPluginService.setPluginEnabled(this.plugin.uri, true);
504
- }
505
- };
506
- EnablePluginEditorAction = EnablePluginEditorAction_1 = ( __decorate([( __param(1, IAgentPluginService))], EnablePluginEditorAction));
507
- let DisablePluginEditorAction = class DisablePluginEditorAction extends Action {
518
+ AgentPluginEditor = AgentPluginEditor_1 = ( __decorate([( __param(1, ITelemetryService)), ( __param(2, IInstantiationService)), ( __param(3, IThemeService)), ( __param(4, IOpenerService)), ( __param(5, IStorageService)), ( __param(6, IExtensionService)), ( __param(7, IWebviewService)), ( __param(8, ILanguageService)), ( __param(9, IFileService)), ( __param(10, IRequestService)), ( __param(11, IAgentPluginService)), ( __param(12, IPluginInstallService)), ( __param(13, IPluginMarketplaceService)), ( __param(14, ILabelService)), ( __param(15, IContextMenuService))], AgentPluginEditor));
519
+ let UpdatePluginEditorAction = class UpdatePluginEditorAction extends Action {
508
520
  static {
509
- DisablePluginEditorAction_1 = this;
521
+ UpdatePluginEditorAction_1 = this;
510
522
  }
511
523
  static {
512
- this.ID = "agentPlugin.editor.disable";
524
+ this.ID = "agentPlugin.editor.update";
513
525
  }
514
- constructor(plugin, agentPluginService) {
515
- super(DisablePluginEditorAction_1.ID, ( localize(5015, "Disable")), "extension-action label disable");
526
+ constructor(
527
+ plugin,
528
+ liveMarketplacePlugin,
529
+ pluginInstallService,
530
+ pluginMarketplaceService
531
+ ) {
532
+ super(UpdatePluginEditorAction_1.ID, ( localize(5060, "Update")), "extension-action label prominent install");
516
533
  this.plugin = plugin;
517
- this.agentPluginService = agentPluginService;
534
+ this.liveMarketplacePlugin = liveMarketplacePlugin;
535
+ this.pluginInstallService = pluginInstallService;
536
+ this.pluginMarketplaceService = pluginMarketplaceService;
518
537
  }
519
538
  async run() {
520
- this.agentPluginService.setPluginEnabled(this.plugin.uri, false);
539
+ if (await this.pluginInstallService.updatePlugin(this.liveMarketplacePlugin)) {
540
+ this.pluginMarketplaceService.addInstalledPlugin(this.plugin.uri, this.liveMarketplacePlugin);
541
+ }
521
542
  }
522
543
  };
523
- DisablePluginEditorAction = DisablePluginEditorAction_1 = ( __decorate([( __param(1, IAgentPluginService))], DisablePluginEditorAction));
524
- class UninstallPluginEditorAction extends Action {
525
- static {
526
- this.ID = "agentPlugin.editor.uninstall";
527
- }
528
- constructor(plugin) {
529
- super(UninstallPluginEditorAction.ID, ( localize(5016, "Uninstall")), "extension-action label uninstall");
530
- this.plugin = plugin;
531
- }
532
- async run() {
533
- this.plugin.remove();
534
- }
535
- }
544
+ UpdatePluginEditorAction = UpdatePluginEditorAction_1 = ( __decorate([( __param(2, IPluginInstallService)), ( __param(3, IPluginMarketplaceService))], UpdatePluginEditorAction));
536
545
 
537
546
  export { AgentPluginEditor };
@@ -8,7 +8,7 @@ import { EditorInputCapabilities } from '@codingame/monaco-vscode-api/vscode/vs/
8
8
  import { EditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput';
9
9
  import { AgentPluginItemKind } from './agentPluginItems.js';
10
10
 
11
- const AgentPluginEditorIcon = registerIcon("agent-plugin-editor-icon", Codicon.extensions, ( localize(5017, "Icon of the Agent Plugin editor.")));
11
+ const AgentPluginEditorIcon = registerIcon("agent-plugin-editor-icon", Codicon.extensions, ( localize(5061, "Icon of the Agent Plugin editor.")));
12
12
  function getPluginId(item) {
13
13
  if (item.kind === AgentPluginItemKind.Installed) {
14
14
  return ( item.plugin.uri.toString());
@@ -23,7 +23,7 @@ class AgentPluginEditorInput extends EditorInput {
23
23
  return AgentPluginEditorInput.ID;
24
24
  }
25
25
  get capabilities() {
26
- return EditorInputCapabilities.Readonly | EditorInputCapabilities.Singleton;
26
+ return super.capabilities | EditorInputCapabilities.Singleton | EditorInputCapabilities.RequiresModal;
27
27
  }
28
28
  get resource() {
29
29
  return ( URI.from({
@@ -39,7 +39,7 @@ class AgentPluginEditorInput extends EditorInput {
39
39
  return this._item;
40
40
  }
41
41
  getName() {
42
- return localize(5018, "Plugin: {0}", this._item.name);
42
+ return localize(5062, "Plugin: {0}", this._item.name);
43
43
  }
44
44
  getIcon() {
45
45
  return AgentPluginEditorIcon;
@@ -1,6 +1,7 @@
1
+ import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
1
2
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
3
  import type { IAgentPlugin } from "../../common/plugins/agentPluginService.js";
3
- import type { IMarketplaceReference, IPluginSourceDescriptor, MarketplaceType } from "../../common/plugins/pluginMarketplaceService.js";
4
+ import type { IMarketplacePlugin, IMarketplaceReference, IPluginSourceDescriptor, MarketplaceType } from "../../common/plugins/pluginMarketplaceService.js";
4
5
  export declare enum AgentPluginItemKind {
5
6
  Installed = "installed",
6
7
  Marketplace = "marketplace"
@@ -11,6 +12,8 @@ export interface IInstalledPluginItem {
11
12
  readonly description: string;
12
13
  readonly marketplace?: string;
13
14
  readonly plugin: IAgentPlugin;
15
+ /** When set, indicates the plugin has a newer version in the marketplace. */
16
+ readonly outdated?: IObservable<IMarketplacePlugin | undefined>;
14
17
  }
15
18
  export interface IMarketplacePluginItem {
16
19
  readonly kind: AgentPluginItemKind.Marketplace;
@@ -22,12 +22,13 @@ export declare class AgentPluginRepositoryService implements IAgentPluginReposit
22
22
  private readonly _cacheRoot;
23
23
  private readonly _marketplaceIndex;
24
24
  private readonly _pluginSources;
25
+ private readonly _cloneSequencer;
25
26
  constructor(_commandService: ICommandService, environmentService: IEnvironmentService, _fileService: IFileService, instantiationService: IInstantiationService, _logService: ILogService, _notificationService: INotificationService, _progressService: IProgressService, _storageService: IStorageService);
26
27
  getPluginSource(kind: PluginSourceKind): IPluginSource;
27
28
  getRepositoryUri(marketplace: IMarketplaceReference, marketplaceType?: MarketplaceType): URI;
28
29
  getPluginInstallUri(plugin: IMarketplacePlugin): URI;
29
30
  ensureRepository(marketplace: IMarketplaceReference, options?: IEnsureRepositoryOptions): Promise<URI>;
30
- pullRepository(marketplace: IMarketplaceReference, options?: IPullRepositoryOptions): Promise<void>;
31
+ pullRepository(marketplace: IMarketplaceReference, options?: IPullRepositoryOptions): Promise<boolean>;
31
32
  private _getRepoCacheDirForReference;
32
33
  private _loadMarketplaceIndex;
33
34
  private _updateMarketplaceIndex;
@@ -36,8 +37,9 @@ export declare class AgentPluginRepositoryService implements IAgentPluginReposit
36
37
  private _getPluginDir;
37
38
  getPluginSourceInstallUri(sourceDescriptor: IPluginSourceDescriptor): URI;
38
39
  ensurePluginSource(plugin: IMarketplacePlugin, options?: IEnsureRepositoryOptions): Promise<URI>;
39
- updatePluginSource(plugin: IMarketplacePlugin, options?: IPullRepositoryOptions): Promise<void>;
40
- cleanupPluginSource(plugin: IMarketplacePlugin): Promise<void>;
40
+ updatePluginSource(plugin: IMarketplacePlugin, options?: IPullRepositoryOptions): Promise<boolean>;
41
+ fetchRepository(marketplace: IMarketplaceReference): Promise<boolean>;
42
+ cleanupPluginSource(plugin: IMarketplacePlugin, otherInstalledDescriptors?: readonly IPluginSourceDescriptor[]): Promise<void>;
41
43
  /**
42
44
  * Walk from {@link child}'s parent toward {@link _cacheRoot}, removing
43
45
  * each directory that is empty. Stops as soon as a non-empty directory
@@ -1,6 +1,7 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
4
+ import { SequencerByKey } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
4
5
  import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
5
6
  import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
6
7
  import { joinPath, dirname, isEqualOrParent, isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
@@ -16,8 +17,9 @@ import { ProgressLocation } from '@codingame/monaco-vscode-api/vscode/vs/platfor
16
17
  import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
17
18
  import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
18
19
  import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
19
- import { PluginSourceKind, MarketplaceReferenceKind } from '../common/plugins/pluginMarketplaceService.js';
20
+ import { PluginSourceKind } from '../common/plugins/pluginMarketplaceService.js';
20
21
  import { RelativePathPluginSource, GitHubPluginSource, GitUrlPluginSource, NpmPluginSource, PipPluginSource } from './pluginSources.js';
22
+ import { MarketplaceReferenceKind } from '../common/plugins/marketplaceReference.js';
21
23
  import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
22
24
 
23
25
  const MARKETPLACE_INDEX_STORAGE_KEY = "chat.plugins.marketplaces.index.v1";
@@ -39,6 +41,7 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
39
41
  this._progressService = _progressService;
40
42
  this._storageService = _storageService;
41
43
  this._marketplaceIndex = ( new Lazy(() => this._loadMarketplaceIndex()));
44
+ this._cloneSequencer = ( new SequencerByKey());
42
45
  this._cacheRoot = joinPath(environmentService.cacheHome, "agentPlugins");
43
46
  this._pluginSources = ( new Map([[PluginSourceKind.RelativePath, ( new RelativePathPluginSource())], [
44
47
  PluginSourceKind.GitHub,
@@ -71,19 +74,21 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
71
74
  }
72
75
  async ensureRepository(marketplace, options) {
73
76
  const repoDir = this.getRepositoryUri(marketplace, options?.marketplaceType);
74
- const repoExists = await this._fileService.exists(repoDir);
75
- if (repoExists) {
77
+ return this._cloneSequencer.queue(repoDir.fsPath, async () => {
78
+ const repoExists = await this._fileService.exists(repoDir);
79
+ if (repoExists) {
80
+ this._updateMarketplaceIndex(marketplace, repoDir, options?.marketplaceType);
81
+ return repoDir;
82
+ }
83
+ if (marketplace.kind === MarketplaceReferenceKind.LocalFileUri) {
84
+ throw ( new Error(`Local marketplace repository does not exist: ${repoDir.fsPath}`));
85
+ }
86
+ const progressTitle = options?.progressTitle ?? ( localize(5063, "Preparing plugin marketplace '{0}'...", marketplace.displayLabel));
87
+ const failureLabel = options?.failureLabel ?? marketplace.displayLabel;
88
+ await this._cloneRepository(repoDir, marketplace.cloneUrl, progressTitle, failureLabel);
76
89
  this._updateMarketplaceIndex(marketplace, repoDir, options?.marketplaceType);
77
90
  return repoDir;
78
- }
79
- if (marketplace.kind === MarketplaceReferenceKind.LocalFileUri) {
80
- throw ( new Error(`Local marketplace repository does not exist: ${repoDir.fsPath}`));
81
- }
82
- const progressTitle = options?.progressTitle ?? ( localize(5019, "Preparing plugin marketplace '{0}'...", marketplace.displayLabel));
83
- const failureLabel = options?.failureLabel ?? marketplace.displayLabel;
84
- await this._cloneRepository(repoDir, marketplace.cloneUrl, progressTitle, failureLabel);
85
- this._updateMarketplaceIndex(marketplace, repoDir, options?.marketplaceType);
86
- return repoDir;
91
+ });
87
92
  }
88
93
  async pullRepository(marketplace, options) {
89
94
  const repoDir = this.getRepositoryUri(marketplace, options?.marketplaceType);
@@ -92,36 +97,43 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
92
97
  this._logService.warn(
93
98
  `[AgentPluginRepositoryService] Cannot update plugin '${options?.pluginName ?? marketplace.displayLabel}': repository not cloned`
94
99
  );
95
- return;
100
+ return false;
96
101
  }
97
102
  const updateLabel = options?.pluginName ?? marketplace.displayLabel;
98
103
  try {
99
- await this._progressService.withProgress({
104
+ const doPull = async () => {
105
+ return !!(await this._commandService.executeCommand("_git.pull", repoDir.fsPath));
106
+ };
107
+ if (options?.silent) {
108
+ return await doPull();
109
+ }
110
+ return await this._progressService.withProgress({
100
111
  location: ProgressLocation.Notification,
101
- title: ( localize(5020, "Updating plugin '{0}'...", updateLabel)),
112
+ title: ( localize(5064, "Updating plugin '{0}'...", updateLabel)),
102
113
  cancellable: false
103
- }, async () => {
104
- await this._commandService.executeCommand("_git.pull", repoDir.fsPath);
105
- });
114
+ }, doPull);
106
115
  } catch (err) {
107
116
  this._logService.error(
108
117
  `[AgentPluginRepositoryService] Failed to update ${marketplace.displayLabel}:`,
109
118
  err
110
119
  );
111
- this._notificationService.notify({
112
- severity: Severity.Error,
113
- message: ( localize(
114
- 5021,
115
- "Failed to update plugin '{0}': {1}",
116
- options?.failureLabel ?? updateLabel,
117
- err?.message ?? String(err)
118
- )),
119
- actions: {
120
- primary: [( new Action("showGitOutput", ( localize(5022, "Show Git Output")), undefined, true, () => {
121
- this._commandService.executeCommand("git.showOutput");
122
- }))]
123
- }
124
- });
120
+ if (!options?.silent) {
121
+ this._notificationService.notify({
122
+ severity: Severity.Error,
123
+ message: ( localize(
124
+ 5065,
125
+ "Failed to update plugin '{0}': {1}",
126
+ options?.failureLabel ?? updateLabel,
127
+ err?.message ?? String(err)
128
+ )),
129
+ actions: {
130
+ primary: [( new Action("showGitOutput", ( localize(5066, "Show Git Output")), undefined, true, () => {
131
+ this._commandService.executeCommand("git.showOutput");
132
+ }))]
133
+ }
134
+ });
135
+ }
136
+ throw err;
125
137
  }
126
138
  }
127
139
  _getRepoCacheDirForReference(reference) {
@@ -193,13 +205,13 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
193
205
  this._notificationService.notify({
194
206
  severity: Severity.Error,
195
207
  message: ( localize(
196
- 5023,
208
+ 5067,
197
209
  "Failed to install plugin '{0}': {1}",
198
210
  failureLabel,
199
211
  err?.message ?? String(err)
200
212
  )),
201
213
  actions: {
202
- primary: [( new Action("showGitOutput", ( localize(5022, "Show Git Output")), undefined, true, () => {
214
+ primary: [( new Action("showGitOutput", ( localize(5066, "Show Git Output")), undefined, true, () => {
203
215
  this._commandService.executeCommand("git.showOutput");
204
216
  }))]
205
217
  }
@@ -232,12 +244,43 @@ let AgentPluginRepositoryService = class AgentPluginRepositoryService {
232
244
  }
233
245
  return repo.update(this._cacheRoot, plugin, options);
234
246
  }
235
- async cleanupPluginSource(plugin) {
247
+ async fetchRepository(marketplace) {
248
+ const repoDir = this.getRepositoryUri(marketplace);
249
+ const repoExists = await this._fileService.exists(repoDir);
250
+ if (!repoExists) {
251
+ return false;
252
+ }
253
+ try {
254
+ await this._commandService.executeCommand("_git.fetchRepository", repoDir.fsPath);
255
+ const behindCount = (await this._commandService.executeCommand("_git.revListCount", repoDir.fsPath, "HEAD", "@{u}")) ?? 0;
256
+ return behindCount > 0;
257
+ } catch (err) {
258
+ this._logService.debug(
259
+ `[AgentPluginRepositoryService] Silent fetch failed for ${marketplace.displayLabel}:`,
260
+ err
261
+ );
262
+ return false;
263
+ }
264
+ }
265
+ async cleanupPluginSource(plugin, otherInstalledDescriptors) {
236
266
  const repo = this.getPluginSource(plugin.sourceDescriptor.kind);
237
267
  const cleanupDir = repo.getCleanupTarget(this._cacheRoot, plugin.sourceDescriptor);
238
268
  if (!cleanupDir) {
239
269
  return;
240
270
  }
271
+ if (otherInstalledDescriptors) {
272
+ const shared = ( otherInstalledDescriptors.some(other => {
273
+ const otherRepo = this.getPluginSource(other.kind);
274
+ const otherTarget = otherRepo.getCleanupTarget(this._cacheRoot, other);
275
+ return otherTarget && isEqual(otherTarget, cleanupDir);
276
+ }));
277
+ if (shared) {
278
+ this._logService.info(
279
+ `[${plugin.sourceDescriptor.kind}] Skipping cleanup of shared cache: ${( cleanupDir.toString())}`
280
+ );
281
+ return;
282
+ }
283
+ }
241
284
  try {
242
285
  const exists = await this._fileService.exists(cleanupDir);
243
286
  if (exists) {
@@ -44,8 +44,14 @@ export declare class AgentPluginsListView extends AbstractExtensionsListView<IAg
44
44
  private getContextMenuActions;
45
45
  protected layoutBody(height: number, width: number): void;
46
46
  show(query: string): Promise<IPagedModel<IAgentPluginItem>>;
47
+ /**
48
+ * Builds the installed plugin list using only cached marketplace data
49
+ * (no IO). The cached data is populated by {@link fetchMarketplacePlugins}
50
+ * and exposed via the {@link IPluginMarketplaceService.lastFetchedPlugins}
51
+ * observable, which the view's autorun subscribes to for reactivity.
52
+ */
47
53
  private queryInstalled;
48
- private queryMarketplace;
54
+ private queryMarketplacePlugins;
49
55
  private updateBody;
50
56
  }
51
57
  export declare class AgentPluginsViewsContribution extends Disposable implements IWorkbenchContribution {