@codingame/monaco-vscode-chat-service-override 26.2.2 → 27.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 (316) hide show
  1. package/index.js +31 -1
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +15 -0
  4. package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +53 -0
  5. package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +219 -0
  6. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +39 -0
  7. package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +83 -0
  8. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +123 -0
  9. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +274 -0
  10. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +71 -0
  11. package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +284 -0
  12. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +79 -0
  13. package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +378 -0
  14. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -2
  15. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +27 -40
  16. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +9 -3
  17. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +74 -18
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +1 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +54 -8
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +87 -53
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +71 -15
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +43 -21
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -3
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +1 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +154 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -8
  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 +53 -43
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +4 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +84 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +1 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +33 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  38. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +15 -29
  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.d.ts +13 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +16 -16
  42. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +12 -12
  43. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +33 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +204 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +77 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +541 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +10 -11
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +70 -65
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +7 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +27 -18
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +1 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +4 -2
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -5
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +2 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +90 -51
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +20 -5
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +3 -1
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +43 -27
  61. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +7 -2
  62. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +3 -1
  63. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +84 -22
  64. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  65. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.d.ts → localAgentSessionsController.d.ts} +7 -4
  66. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.js → localAgentSessionsController.js} +24 -17
  67. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +23 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +171 -0
  69. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +48 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +19 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +181 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +943 -0
  73. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -0
  74. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +248 -0
  75. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +57 -0
  76. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +27 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +118 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +727 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +22 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +38 -0
  81. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
  82. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +72 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +45 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +165 -0
  85. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +75 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +623 -0
  87. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +858 -0
  88. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +2 -0
  89. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +30 -1
  90. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.d.ts +32 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.js +26 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +19 -3
  93. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +36 -26
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +529 -363
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +18 -0
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +419 -0
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +12 -0
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +46 -0
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +34 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +198 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +55 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +305 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.d.ts +23 -0
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +64 -0
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +5 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +84 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +27 -0
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +110 -0
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +34 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +111 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +71 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +611 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +125 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +504 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.d.ts +10 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +914 -0
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +19 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +128 -0
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +58 -0
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +429 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +31 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +113 -0
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +14 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +126 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +38 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +279 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +18 -0
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +122 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +45 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +85 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +781 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +5 -22
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +2 -1
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +12 -12
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +16 -15
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
  146. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +63 -76
  147. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +26 -15
  148. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +2 -2
  149. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
  150. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  151. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +15 -7
  152. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +40 -413
  153. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +10 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +38 -6
  155. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +5 -1
  156. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +56 -46
  157. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +15 -11
  158. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +52 -0
  159. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +138 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +11 -1
  161. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +166 -41
  162. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +6 -0
  163. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +37 -23
  164. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +15 -0
  165. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +351 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +118 -63
  168. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
  169. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +28 -0
  170. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +182 -13
  171. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +892 -41
  172. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +5 -1
  173. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +55 -25
  174. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +28 -19
  175. package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.d.ts +14 -0
  176. package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.js +62 -0
  177. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +36 -0
  178. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +110 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.d.ts +10 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +39 -0
  181. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +3 -3
  182. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +6 -6
  183. package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.d.ts +10 -0
  184. package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +39 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +27 -0
  186. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +102 -0
  187. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  188. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +16 -1
  189. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +69 -47
  190. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +2 -41
  191. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  192. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +7 -7
  193. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  194. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +4 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
  196. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  197. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
  198. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +4 -4
  199. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +22 -0
  200. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +76 -0
  201. package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +5 -0
  202. package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +30 -0
  203. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +43 -31
  204. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +67 -42
  205. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +31 -0
  206. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +242 -0
  207. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +34 -0
  208. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +45 -0
  209. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
  210. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +33 -0
  211. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +311 -0
  212. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  213. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +4 -0
  214. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +10 -1
  215. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +10 -10
  216. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +8 -9
  217. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +64 -26
  218. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +4 -2
  219. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  220. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +2 -2
  221. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +15 -4
  222. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +42 -8
  223. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +8 -1
  224. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +58 -31
  225. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +6 -5
  226. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +8 -20
  227. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +15 -6
  228. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +39 -0
  229. package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +27 -0
  230. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +190 -0
  231. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +11 -0
  232. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +36 -0
  233. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +188 -0
  234. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +18 -8
  235. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +192 -85
  236. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +2 -1
  237. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +2 -1
  238. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -6
  239. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +16 -8
  240. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +8 -4
  241. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +111 -7
  242. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +2 -0
  243. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +52 -0
  244. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +29 -0
  245. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +73 -0
  246. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +622 -0
  247. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +64 -0
  248. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +478 -0
  249. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +35 -16
  250. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +1 -30
  251. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -5
  252. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +2 -8
  253. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +1 -1
  254. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +8 -8
  255. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +9 -9
  256. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +23 -22
  257. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +44 -14
  258. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +345 -113
  259. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +14 -1
  260. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +34 -24
  261. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +3 -0
  262. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +13 -0
  263. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  264. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +11 -5
  265. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +23 -0
  266. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +248 -24
  267. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +6 -11
  268. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +18 -81
  269. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +2 -3
  270. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +10 -10
  271. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  272. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  273. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
  274. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +6 -6
  275. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  276. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  277. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css +6 -2
  278. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  279. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +35 -26
  280. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +0 -1
  281. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +1 -5
  282. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +3 -3
  283. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
  284. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +4 -1
  285. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +13 -11
  286. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
  287. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +3 -1
  288. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
  289. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  290. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  291. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  292. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  293. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
  294. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  295. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  296. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +9 -0
  297. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +280 -65
  298. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +3 -1
  299. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +8 -0
  300. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -10
  301. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +1 -0
  302. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +47 -19
  303. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +8 -0
  304. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +31 -0
  305. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  306. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  307. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  308. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  309. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +6 -1
  310. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +38 -16
  311. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +0 -72
  312. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +0 -587
  313. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +0 -71
  314. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +0 -293
  315. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.d.ts +0 -2
  316. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.js +0 -31
@@ -0,0 +1,622 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
4
+ import { parse } from '@codingame/monaco-vscode-api/vscode/vs/base/common/json';
5
+ import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
+ import { ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
7
+ import { cloneAndChange } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
8
+ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
9
+ import { win32, posix } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
10
+ import { joinPath, basename, extname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
11
+ import { escapeRegExpCharacters } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
12
+ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
13
+ import { ConfigurationTarget, getConfigValueInTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
14
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
15
+ import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
16
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
17
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
18
+ import { McpServerType } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpPlatformTypes';
19
+ import { observableConfigValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/observable/common/platformObservableUtils';
20
+ import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
21
+ import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
22
+ import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
23
+ import { parseClaudeHooks } from '../promptSyntax/hookClaudeCompat.js';
24
+ import { parseCopilotHooks } from '../promptSyntax/hookCompatibility.js';
25
+ import { agentPluginDiscoveryRegistry } from './agentPluginService.js';
26
+ import { IPluginMarketplaceService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service';
27
+ import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
28
+ import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
29
+ import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
30
+
31
+ const COMMAND_FILE_SUFFIX = ".md";
32
+ var AgentPluginFormat;
33
+ (function(AgentPluginFormat) {
34
+ AgentPluginFormat[AgentPluginFormat["Copilot"] = 0] = "Copilot";
35
+ AgentPluginFormat[AgentPluginFormat["Claude"] = 1] = "Claude";
36
+ })(AgentPluginFormat || (AgentPluginFormat = {}));
37
+ function mapParsedHooks(parsed) {
38
+ return ( [...parsed.entries()].map((
39
+ [type, {
40
+ hooks,
41
+ originalId
42
+ }]
43
+ ) => ({
44
+ type,
45
+ hooks,
46
+ originalId
47
+ })));
48
+ }
49
+ function resolveWorkspaceRoot(pluginUri, workspaceContextService) {
50
+ const defaultFolder = workspaceContextService.getWorkspace().folders[0];
51
+ const folder = workspaceContextService.getWorkspaceFolder(pluginUri) ?? defaultFolder;
52
+ return folder?.uri;
53
+ }
54
+ let CopilotPluginFormatAdapter = class CopilotPluginFormatAdapter {
55
+ constructor(_workspaceContextService) {
56
+ this._workspaceContextService = _workspaceContextService;
57
+ this.format = AgentPluginFormat.Copilot;
58
+ this.manifestPaths = ["plugin.json"];
59
+ this.hookConfigPaths = ["hooks.json"];
60
+ this.hookWatchPaths = ["hooks.json"];
61
+ }
62
+ parseHooks(json, pluginUri, userHome) {
63
+ const workspaceRoot = resolveWorkspaceRoot(pluginUri, this._workspaceContextService);
64
+ return mapParsedHooks(parseCopilotHooks(json, workspaceRoot, userHome));
65
+ }
66
+ };
67
+ CopilotPluginFormatAdapter = ( __decorate([( __param(0, IWorkspaceContextService))], CopilotPluginFormatAdapter));
68
+ const shellUnsafeChars = /[\s&|<>()^;!`"']/;
69
+ function shellQuotePluginRootInCommand(command, fsPath, token = "${CLAUDE_PLUGIN_ROOT}") {
70
+ if (!command.includes(token)) {
71
+ return command;
72
+ }
73
+ if (!shellUnsafeChars.test(fsPath)) {
74
+ return command.replaceAll(token, fsPath);
75
+ }
76
+ const escapedToken = escapeRegExpCharacters(token);
77
+ const pattern = ( new RegExp(
78
+ `(["']?)` + escapedToken + `([\\w./\\\\~:-]*)`, "g"));
79
+ return command.replace(pattern, (_match, leadingQuote, suffix) => {
80
+ const fullPath = fsPath + suffix;
81
+ if (leadingQuote) {
82
+ return leadingQuote + fullPath;
83
+ }
84
+ return "\"" + fullPath.replace(/"/g, "\\\"") + "\"";
85
+ });
86
+ }
87
+ let ClaudePluginFormatAdapter = class ClaudePluginFormatAdapter {
88
+ constructor(_workspaceContextService) {
89
+ this._workspaceContextService = _workspaceContextService;
90
+ this.format = AgentPluginFormat.Claude;
91
+ this.manifestPaths = [".claude-plugin/plugin.json"];
92
+ this.hookConfigPaths = ["hooks/hooks.json"];
93
+ this.hookWatchPaths = ["hooks"];
94
+ }
95
+ parseHooks(json, pluginUri, userHome) {
96
+ const token = "${CLAUDE_PLUGIN_ROOT}";
97
+ const fsPath = pluginUri.fsPath;
98
+ const typedJson = json;
99
+ const mutateHookCommand = hook => {
100
+ for (const field of ["command", "windows", "linux", "osx"]) {
101
+ if (typeof hook[field] === "string") {
102
+ hook[field] = shellQuotePluginRootInCommand(hook[field], fsPath, token);
103
+ }
104
+ }
105
+ hook.env ??= {};
106
+ hook.env.CLAUDE_PLUGIN_ROOT = fsPath;
107
+ };
108
+ for (const lifecycle of ( Object.values(typedJson.hooks ?? {}))) {
109
+ if (!Array.isArray(lifecycle)) {
110
+ continue;
111
+ }
112
+ for (const lifecycleEntry of lifecycle) {
113
+ if (!lifecycleEntry || typeof lifecycleEntry !== "object") {
114
+ continue;
115
+ }
116
+ const entry = lifecycleEntry;
117
+ if (Array.isArray(entry.hooks)) {
118
+ for (const hook of entry.hooks) {
119
+ mutateHookCommand(hook);
120
+ }
121
+ } else {
122
+ mutateHookCommand(entry);
123
+ }
124
+ }
125
+ }
126
+ const replacer = v => {
127
+ return typeof v === "string" ? v.replaceAll("${CLAUDE_PLUGIN_ROOT}", pluginUri.fsPath) : undefined;
128
+ };
129
+ const workspaceRoot = resolveWorkspaceRoot(pluginUri, this._workspaceContextService);
130
+ const {
131
+ hooks,
132
+ disabledAllHooks
133
+ } = parseClaudeHooks(cloneAndChange(json, replacer), workspaceRoot, userHome);
134
+ if (disabledAllHooks) {
135
+ return [];
136
+ }
137
+ return mapParsedHooks(hooks);
138
+ }
139
+ };
140
+ ClaudePluginFormatAdapter = ( __decorate([( __param(0, IWorkspaceContextService))], ClaudePluginFormatAdapter));
141
+ let AgentPluginService = class AgentPluginService extends Disposable {
142
+ constructor(instantiationService, configurationService) {
143
+ super();
144
+ const pluginsEnabled = observableConfigValue(ChatConfiguration.PluginsEnabled, true, configurationService);
145
+ const discoveries = [];
146
+ for (const descriptor of agentPluginDiscoveryRegistry.getAll()) {
147
+ const discovery = instantiationService.createInstance(descriptor);
148
+ this._register(discovery);
149
+ discoveries.push(discovery);
150
+ discovery.start();
151
+ }
152
+ this.allPlugins = derived(read => {
153
+ if (!pluginsEnabled.read(read)) {
154
+ return [];
155
+ }
156
+ return this._dedupeAndSort(discoveries.flatMap(d => d.plugins.read(read)));
157
+ });
158
+ this.plugins = derived(reader => {
159
+ const all = this.allPlugins.read(reader);
160
+ return all.filter(p => p.enabled.read(reader));
161
+ });
162
+ }
163
+ setPluginEnabled(pluginUri, enabled) {
164
+ const plugin = this.allPlugins.get().find(p => ( p.uri.toString()) === ( pluginUri.toString()));
165
+ if (plugin) {
166
+ plugin.setEnabled(enabled);
167
+ }
168
+ }
169
+ _dedupeAndSort(plugins) {
170
+ const unique = [];
171
+ const seen = ( new ResourceSet());
172
+ for (const plugin of plugins) {
173
+ if (( seen.has(plugin.uri))) {
174
+ continue;
175
+ }
176
+ seen.add(plugin.uri);
177
+ unique.push(plugin);
178
+ }
179
+ unique.sort((a, b) => ( a.uri.toString()).localeCompare(( b.uri.toString())));
180
+ return unique;
181
+ }
182
+ };
183
+ AgentPluginService = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IConfigurationService))], AgentPluginService));
184
+ let ConfiguredAgentPluginDiscovery = class ConfiguredAgentPluginDiscovery extends Disposable {
185
+ constructor(
186
+ _configurationService,
187
+ _fileService,
188
+ _pluginMarketplaceService,
189
+ _workspaceContextService,
190
+ _pathService,
191
+ _logService,
192
+ _instantiationService
193
+ ) {
194
+ super();
195
+ this._configurationService = _configurationService;
196
+ this._fileService = _fileService;
197
+ this._pluginMarketplaceService = _pluginMarketplaceService;
198
+ this._workspaceContextService = _workspaceContextService;
199
+ this._pathService = _pathService;
200
+ this._logService = _logService;
201
+ this._instantiationService = _instantiationService;
202
+ this._pluginEntries = ( new Map());
203
+ this._plugins = observableValue("discoveredAgentPlugins", []);
204
+ this.plugins = this._plugins;
205
+ this._discoverVersion = 0;
206
+ this._pluginPathsConfig = observableConfigValue(ChatConfiguration.PluginPaths, {}, _configurationService);
207
+ }
208
+ start() {
209
+ const scheduler = this._register(( new RunOnceScheduler(() => this._refreshPlugins(), 0)));
210
+ this._register(autorun(reader => {
211
+ this._pluginPathsConfig.read(reader);
212
+ scheduler.schedule();
213
+ }));
214
+ scheduler.schedule();
215
+ }
216
+ async _refreshPlugins() {
217
+ const version = ++this._discoverVersion;
218
+ const plugins = await this._discoverPlugins();
219
+ if (version !== this._discoverVersion || this._store.isDisposed) {
220
+ return;
221
+ }
222
+ this._plugins.set(plugins, undefined);
223
+ }
224
+ async _discoverPlugins() {
225
+ const plugins = [];
226
+ const seenPluginUris = ( new Set());
227
+ const config = this._pluginPathsConfig.get();
228
+ for (const [path, enabled] of Object.entries(config)) {
229
+ if (!path.trim()) {
230
+ continue;
231
+ }
232
+ const resources = this._resolvePluginPath(path.trim());
233
+ for (const resource of resources) {
234
+ let stat;
235
+ try {
236
+ stat = await this._fileService.resolve(resource);
237
+ } catch {
238
+ this._logService.debug(
239
+ `[ConfiguredAgentPluginDiscovery] Could not resolve plugin path: ${( resource.toString())}`
240
+ );
241
+ continue;
242
+ }
243
+ if (!stat.isDirectory) {
244
+ this._logService.debug(
245
+ `[ConfiguredAgentPluginDiscovery] Plugin path is not a directory: ${( resource.toString())}`
246
+ );
247
+ continue;
248
+ }
249
+ const key = ( stat.resource.toString());
250
+ if (!( seenPluginUris.has(key))) {
251
+ const adapter = await this._detectPluginFormatAdapter(stat.resource);
252
+ const fromMarketplace = await this._pluginMarketplaceService.getMarketplacePluginMetadata(stat.resource);
253
+ seenPluginUris.add(key);
254
+ plugins.push(this._toPlugin(stat.resource, path, enabled, adapter, fromMarketplace));
255
+ }
256
+ }
257
+ }
258
+ this._disposePluginEntriesExcept(seenPluginUris);
259
+ plugins.sort((a, b) => ( a.uri.toString()).localeCompare(( b.uri.toString())));
260
+ return plugins;
261
+ }
262
+ _resolvePluginPath(path) {
263
+ if (win32.isAbsolute(path) || posix.isAbsolute(path)) {
264
+ return [URI.file(path)];
265
+ }
266
+ return ( this._workspaceContextService.getWorkspace().folders.map(folder => joinPath(folder.uri, path)));
267
+ }
268
+ _updatePluginPathEnabled(configKey, value) {
269
+ const inspected = this._configurationService.inspect(ChatConfiguration.PluginPaths);
270
+ const targets = [
271
+ ConfigurationTarget.WORKSPACE_FOLDER,
272
+ ConfigurationTarget.WORKSPACE,
273
+ ConfigurationTarget.USER_LOCAL,
274
+ ConfigurationTarget.USER_REMOTE,
275
+ ConfigurationTarget.USER,
276
+ ConfigurationTarget.APPLICATION
277
+ ];
278
+ for (const target of targets) {
279
+ const mapping = getConfigValueInTarget(inspected, target);
280
+ if (mapping && Object.prototype.hasOwnProperty.call(mapping, configKey)) {
281
+ this._configurationService.updateValue(ChatConfiguration.PluginPaths, {
282
+ ...mapping,
283
+ [configKey]: value
284
+ }, target);
285
+ return;
286
+ }
287
+ }
288
+ const current = getConfigValueInTarget(inspected, ConfigurationTarget.USER_LOCAL) ?? {};
289
+ this._configurationService.updateValue(ChatConfiguration.PluginPaths, {
290
+ ...current,
291
+ [configKey]: value
292
+ }, ConfigurationTarget.USER_LOCAL);
293
+ }
294
+ async _detectPluginFormatAdapter(pluginUri) {
295
+ const isInClaudeDirectory = pluginUri.path.split("/").includes(".claude");
296
+ if (isInClaudeDirectory || (await this._pathExists(joinPath(pluginUri, ".claude-plugin", "plugin.json")))) {
297
+ return this._instantiationService.createInstance(ClaudePluginFormatAdapter);
298
+ }
299
+ return this._instantiationService.createInstance(CopilotPluginFormatAdapter);
300
+ }
301
+ async _pathExists(resource) {
302
+ try {
303
+ await this._fileService.resolve(resource);
304
+ return true;
305
+ } catch {
306
+ return false;
307
+ }
308
+ }
309
+ _toPlugin(uri, configKey, initialEnabled, adapter, fromMarketplace) {
310
+ const key = ( uri.toString());
311
+ const existing = this._pluginEntries.get(key);
312
+ if (existing) {
313
+ if (existing.adapter.format !== adapter.format) {
314
+ existing.store.dispose();
315
+ this._pluginEntries.delete(key);
316
+ } else {
317
+ existing.plugin.enabled.set(initialEnabled, undefined);
318
+ return existing.plugin;
319
+ }
320
+ }
321
+ const store = ( new DisposableStore());
322
+ const commands = observableValue("agentPluginCommands", []);
323
+ const skills = observableValue("agentPluginSkills", []);
324
+ const agents = observableValue("agentPluginAgents", []);
325
+ const hooks = observableValue("agentPluginHooks", []);
326
+ const mcpServerDefinitions = observableValue("agentPluginMcpServerDefinitions", []);
327
+ const enabled = observableValue("agentPluginEnabled", initialEnabled);
328
+ const commandsDir = joinPath(uri, "commands");
329
+ const skillsDir = joinPath(uri, "skills");
330
+ const agentsDir = joinPath(uri, "agents");
331
+ const commandsScheduler = store.add(( new RunOnceScheduler(async () => {
332
+ commands.set(await this._readCommands(uri), undefined);
333
+ }, 200)));
334
+ const skillsScheduler = store.add(( new RunOnceScheduler(async () => {
335
+ skills.set(await this._readSkills(uri), undefined);
336
+ }, 200)));
337
+ const agentsScheduler = store.add(( new RunOnceScheduler(async () => {
338
+ agents.set(await this._readAgents(uri), undefined);
339
+ }, 200)));
340
+ const hooksScheduler = store.add(( new RunOnceScheduler(async () => {
341
+ hooks.set(await this._readHooks(uri, adapter), undefined);
342
+ }, 200)));
343
+ const mcpScheduler = store.add(( new RunOnceScheduler(async () => {
344
+ mcpServerDefinitions.set(await this._readMcpDefinitions(uri, adapter), undefined);
345
+ }, 200)));
346
+ store.add(this._fileService.watch(uri, {
347
+ recursive: true,
348
+ excludes: []
349
+ }));
350
+ store.add(this._fileService.onDidFilesChange(e => {
351
+ if (e.affects(commandsDir)) {
352
+ commandsScheduler.schedule();
353
+ }
354
+ if (e.affects(skillsDir)) {
355
+ skillsScheduler.schedule();
356
+ }
357
+ if (e.affects(agentsDir)) {
358
+ agentsScheduler.schedule();
359
+ }
360
+ if (( adapter.hookWatchPaths.some(path => e.affects(joinPath(uri, path))))) {
361
+ hooksScheduler.schedule();
362
+ }
363
+ if (e.affects(joinPath(uri, ".mcp.json")) || ( adapter.manifestPaths.some(path => e.affects(joinPath(uri, path))))) {
364
+ mcpScheduler.schedule();
365
+ hooksScheduler.schedule();
366
+ }
367
+ }));
368
+ commandsScheduler.schedule();
369
+ skillsScheduler.schedule();
370
+ agentsScheduler.schedule();
371
+ hooksScheduler.schedule();
372
+ mcpScheduler.schedule();
373
+ const plugin = {
374
+ uri,
375
+ enabled,
376
+ setEnabled: value => {
377
+ this._updatePluginPathEnabled(configKey, value);
378
+ },
379
+ hooks,
380
+ commands,
381
+ skills,
382
+ agents,
383
+ mcpServerDefinitions,
384
+ fromMarketplace
385
+ };
386
+ this._pluginEntries.set(key, {
387
+ store,
388
+ plugin,
389
+ adapter
390
+ });
391
+ return plugin;
392
+ }
393
+ async _readMcpDefinitions(pluginUri, adapter) {
394
+ const mcpUri = joinPath(pluginUri, ".mcp.json");
395
+ const mcpFileConfig = await this._readJsonFile(mcpUri);
396
+ const fileDefinitions = this._parseMcpServerDefinitionMap(mcpFileConfig);
397
+ const pluginJsonDefinitions = await this._readInlinePluginJsonMcpDefinitions(pluginUri, adapter);
398
+ const merged = ( new Map());
399
+ for (const definition of fileDefinitions) {
400
+ merged.set(definition.name, definition.configuration);
401
+ }
402
+ for (const definition of pluginJsonDefinitions) {
403
+ if (!( merged.has(definition.name))) {
404
+ merged.set(definition.name, definition.configuration);
405
+ }
406
+ }
407
+ const definitions = ( [...merged.entries()].map(([name, configuration]) => ({
408
+ name,
409
+ configuration
410
+ }))).sort((a, b) => a.name.localeCompare(b.name));
411
+ return definitions;
412
+ }
413
+ async _readInlinePluginJsonMcpDefinitions(pluginUri, adapter) {
414
+ for (const manifestPath of ( adapter.manifestPaths.map(path => joinPath(pluginUri, path)))) {
415
+ const manifest = await this._readJsonFile(manifestPath);
416
+ if (!manifest || typeof manifest !== "object") {
417
+ continue;
418
+ }
419
+ const definitions = this._parseMcpServerDefinitionMap(manifest);
420
+ if (definitions.length > 0) {
421
+ return definitions;
422
+ }
423
+ }
424
+ return [];
425
+ }
426
+ _parseMcpServerDefinitionMap(raw) {
427
+ if (!raw || typeof raw !== "object" || !raw.hasOwnProperty("mcpServers")) {
428
+ return [];
429
+ }
430
+ const definitions = [];
431
+ for (const [name, configValue] of Object.entries(raw.mcpServers)) {
432
+ const configuration = this._normalizeMcpServerConfiguration(configValue);
433
+ if (!configuration) {
434
+ continue;
435
+ }
436
+ definitions.push({
437
+ name,
438
+ configuration
439
+ });
440
+ }
441
+ return definitions;
442
+ }
443
+ _normalizeMcpServerConfiguration(rawConfig) {
444
+ if (!rawConfig || typeof rawConfig !== "object") {
445
+ return undefined;
446
+ }
447
+ const candidate = rawConfig;
448
+ const type = typeof candidate["type"] === "string" ? candidate["type"] : undefined;
449
+ const command = typeof candidate["command"] === "string" ? candidate["command"] : undefined;
450
+ const url = typeof candidate["url"] === "string" ? candidate["url"] : undefined;
451
+ const args = Array.isArray(candidate["args"]) ? candidate["args"].filter(value => typeof value === "string") : undefined;
452
+ const env = candidate["env"] && typeof candidate["env"] === "object" ? Object.fromEntries(( Object.entries(candidate["env"]).filter(
453
+ ([, value]) => typeof value === "string" || typeof value === "number" || value === null
454
+ ).map(([key, value]) => [key, value]))) : undefined;
455
+ const envFile = typeof candidate["envFile"] === "string" ? candidate["envFile"] : undefined;
456
+ const cwd = typeof candidate["cwd"] === "string" ? candidate["cwd"] : undefined;
457
+ const headers = candidate["headers"] && typeof candidate["headers"] === "object" ? Object.fromEntries(( Object.entries(candidate["headers"]).filter(([, value]) => typeof value === "string").map(([key, value]) => [key, value]))) : undefined;
458
+ const dev = candidate["dev"] && typeof candidate["dev"] === "object" ? candidate["dev"] : undefined;
459
+ if (type === "ws") {
460
+ return undefined;
461
+ }
462
+ if (type === McpServerType.LOCAL || (!type && command)) {
463
+ if (!command) {
464
+ return undefined;
465
+ }
466
+ return {
467
+ type: McpServerType.LOCAL,
468
+ command,
469
+ args,
470
+ env,
471
+ envFile,
472
+ cwd,
473
+ dev
474
+ };
475
+ }
476
+ if (type === McpServerType.REMOTE || type === "sse" || (!type && url)) {
477
+ if (!url) {
478
+ return undefined;
479
+ }
480
+ return {
481
+ type: McpServerType.REMOTE,
482
+ url,
483
+ headers,
484
+ dev
485
+ };
486
+ }
487
+ return undefined;
488
+ }
489
+ async _readHooks(pluginUri, adapter) {
490
+ const userHome = (await this._pathService.userHome()).fsPath;
491
+ for (const hooksUri of ( adapter.hookConfigPaths.map(path => joinPath(pluginUri, path)))) {
492
+ const json = await this._readJsonFile(hooksUri);
493
+ if (json) {
494
+ try {
495
+ return adapter.parseHooks(json, pluginUri, userHome);
496
+ } catch (e) {
497
+ this._logService.info(
498
+ `[ConfiguredAgentPluginDiscovery] Failed to parse hooks from ${( hooksUri.toString())}:`,
499
+ e
500
+ );
501
+ }
502
+ }
503
+ }
504
+ for (const manifestPath of ( adapter.manifestPaths.map(path => joinPath(pluginUri, path)))) {
505
+ const manifest = await this._readJsonFile(manifestPath);
506
+ if (manifest && typeof manifest === "object") {
507
+ const hooks = manifest["hooks"];
508
+ if (hooks && typeof hooks === "object") {
509
+ try {
510
+ return adapter.parseHooks({
511
+ hooks
512
+ }, pluginUri, userHome);
513
+ } catch (e) {
514
+ this._logService.info(
515
+ `[ConfiguredAgentPluginDiscovery] Failed to parse hooks from manifest ${( manifestPath.toString())}:`,
516
+ e
517
+ );
518
+ }
519
+ }
520
+ }
521
+ }
522
+ return [];
523
+ }
524
+ async _readJsonFile(uri) {
525
+ try {
526
+ const fileContents = await this._fileService.readFile(uri);
527
+ return parse(( fileContents.value.toString()));
528
+ } catch {
529
+ return undefined;
530
+ }
531
+ }
532
+ async _readSkills(uri) {
533
+ const skillsDir = joinPath(uri, "skills");
534
+ let stat;
535
+ try {
536
+ stat = await this._fileService.resolve(skillsDir);
537
+ } catch {
538
+ return [];
539
+ }
540
+ if (!stat.isDirectory || !stat.children) {
541
+ return [];
542
+ }
543
+ const skills = [];
544
+ for (const child of stat.children) {
545
+ const skillMd = URI.joinPath(child.resource, "SKILL.md");
546
+ if (!(await this._pathExists(skillMd))) {
547
+ continue;
548
+ }
549
+ skills.push({
550
+ uri: skillMd,
551
+ name: basename(child.resource)
552
+ });
553
+ }
554
+ skills.sort((a, b) => a.name.localeCompare(b.name));
555
+ return skills;
556
+ }
557
+ async _readAgents(uri) {
558
+ const agentsDir = joinPath(uri, "agents");
559
+ let stat;
560
+ try {
561
+ stat = await this._fileService.resolve(agentsDir);
562
+ } catch {
563
+ return [];
564
+ }
565
+ if (!stat.isDirectory || !stat.children) {
566
+ return [];
567
+ }
568
+ const agents = [];
569
+ for (const child of stat.children) {
570
+ if (!child.isFile || extname(child.resource).toLowerCase() !== COMMAND_FILE_SUFFIX) {
571
+ continue;
572
+ }
573
+ const name = basename(child.resource).slice(0, -COMMAND_FILE_SUFFIX.length);
574
+ agents.push({
575
+ uri: child.resource,
576
+ name
577
+ });
578
+ }
579
+ agents.sort((a, b) => a.name.localeCompare(b.name));
580
+ return agents;
581
+ }
582
+ async _readCommands(uri) {
583
+ const commandsDir = joinPath(uri, "commands");
584
+ let stat;
585
+ try {
586
+ stat = await this._fileService.resolve(commandsDir);
587
+ } catch {
588
+ return [];
589
+ }
590
+ if (!stat.isDirectory || !stat.children) {
591
+ return [];
592
+ }
593
+ const commands = [];
594
+ for (const child of stat.children) {
595
+ if (!child.isFile || extname(child.resource).toLowerCase() !== COMMAND_FILE_SUFFIX) {
596
+ continue;
597
+ }
598
+ const name = basename(child.resource).slice(0, -COMMAND_FILE_SUFFIX.length);
599
+ commands.push({
600
+ uri: child.resource,
601
+ name
602
+ });
603
+ }
604
+ commands.sort((a, b) => a.name.localeCompare(b.name));
605
+ return commands;
606
+ }
607
+ _disposePluginEntriesExcept(keep) {
608
+ for (const [key, entry] of this._pluginEntries) {
609
+ if (!( keep.has(key))) {
610
+ entry.store.dispose();
611
+ this._pluginEntries.delete(key);
612
+ }
613
+ }
614
+ }
615
+ dispose() {
616
+ this._disposePluginEntriesExcept(( new Set()));
617
+ super.dispose();
618
+ }
619
+ };
620
+ ConfiguredAgentPluginDiscovery = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IFileService)), ( __param(2, IPluginMarketplaceService)), ( __param(3, IWorkspaceContextService)), ( __param(4, IPathService)), ( __param(5, ILogService)), ( __param(6, IInstantiationService))], ConfiguredAgentPluginDiscovery));
621
+
622
+ export { AgentPluginService, ConfiguredAgentPluginDiscovery, shellQuotePluginRootInCommand };
@@ -0,0 +1,64 @@
1
+ import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
2
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
3
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
4
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
5
+ import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
6
+ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
7
+ import { IRequestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service";
8
+ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
9
+ import { IAgentPluginRepositoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service";
10
+ import { IPluginMarketplaceService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service";
11
+ export declare enum MarketplaceType {
12
+ Copilot = "copilot",
13
+ Claude = "claude"
14
+ }
15
+ export declare enum MarketplaceReferenceKind {
16
+ GitHubShorthand = "githubShorthand",
17
+ GitUri = "gitUri",
18
+ LocalFileUri = "localFileUri"
19
+ }
20
+ export interface IMarketplaceReference {
21
+ readonly rawValue: string;
22
+ readonly displayLabel: string;
23
+ readonly cloneUrl: string;
24
+ readonly canonicalId: string;
25
+ readonly cacheSegments: readonly string[];
26
+ readonly kind: MarketplaceReferenceKind;
27
+ readonly githubRepo?: string;
28
+ readonly localRepositoryUri?: URI;
29
+ }
30
+ export interface IMarketplacePlugin {
31
+ readonly name: string;
32
+ readonly description: string;
33
+ readonly version: string;
34
+ /** Subdirectory within the repository where the plugin lives. */
35
+ readonly source: string;
36
+ /** Marketplace label shown in UI and plugin provenance. */
37
+ readonly marketplace: string;
38
+ /** Canonical reference for clone/update/install location resolution. */
39
+ readonly marketplaceReference: IMarketplaceReference;
40
+ /** The type of marketplace this plugin comes from. */
41
+ readonly marketplaceType: MarketplaceType;
42
+ readonly readmeUri?: URI;
43
+ }
44
+ export declare class PluginMarketplaceService implements IPluginMarketplaceService {
45
+ private readonly _configurationService;
46
+ private readonly _requestService;
47
+ private readonly _fileService;
48
+ private readonly _pluginRepositoryService;
49
+ private readonly _logService;
50
+ private readonly _storageService;
51
+ readonly _serviceBrand: undefined;
52
+ private readonly _gitHubMarketplaceCache;
53
+ readonly onDidChangeMarketplaces: Event<void>;
54
+ constructor(_configurationService: IConfigurationService, _requestService: IRequestService, _fileService: IFileService, _pluginRepositoryService: IAgentPluginRepositoryService, _logService: ILogService, _storageService: IStorageService);
55
+ fetchMarketplacePlugins(token: CancellationToken): Promise<IMarketplacePlugin[]>;
56
+ private _fetchFromGitHubRepo;
57
+ private _getCachedGitHubMarketplacePlugins;
58
+ private _loadPersistedGitHubMarketplaceCache;
59
+ private _savePersistedGitHubMarketplaceCache;
60
+ getMarketplacePluginMetadata(pluginUri: URI): Promise<IMarketplacePlugin | undefined>;
61
+ private _fetchFromClonedRepo;
62
+ }
63
+ export declare function parseMarketplaceReferences(values: readonly unknown[]): IMarketplaceReference[];
64
+ export declare function parseMarketplaceReference(value: string): IMarketplaceReference | undefined;