@codingame/monaco-vscode-chat-service-override 37.1.0 → 37.2.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 (205) hide show
  1. package/index.js +15 -5
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/agentHost/browser/agentHostEnablementService.js +1 -1
  4. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +104 -0
  5. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +827 -0
  6. package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.d.ts +15 -0
  7. package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +71 -0
  8. package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +16 -0
  9. package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +95 -0
  10. package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.d.ts +22 -0
  11. package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +286 -0
  12. package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.d.ts +10 -0
  13. package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.js +38 -0
  14. package/vscode/src/vs/workbench/api/browser/mainThreadChatQuota.d.ts +9 -0
  15. package/vscode/src/vs/workbench/api/browser/mainThreadChatQuota.js +22 -0
  16. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +130 -0
  17. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +907 -0
  18. package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.d.ts +10 -0
  19. package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js +28 -0
  20. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +27 -0
  21. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +167 -0
  22. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +46 -0
  23. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +356 -0
  24. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +1 -1
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +1 -1
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +2 -2
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/exportAgentHostDebugLogsAction.js +1 -1
  28. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +1 -1
  29. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +2 -2
  30. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +1 -1
  31. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +2 -2
  32. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +1 -1
  33. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.d.ts +1 -1
  34. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.d.ts +1 -1
  35. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationSyncProvider.d.ts +1 -1
  36. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.d.ts +1 -1
  37. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostExistingSessionHarnessPickerEnablement.js +1 -1
  38. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.d.ts +1 -1
  39. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +1 -1
  40. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPromptCacheNotification.js +1 -1
  41. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.js +5 -3
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSettings.contribution.js +1 -1
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSignedOutModelsNotification.js +2 -2
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettings.contribution.js +2 -2
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/openSessionLinkOpener.contribution.js +1 -1
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +1 -1
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +1 -1
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +1 -1
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +1 -1
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +1 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +1 -1
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +1 -1
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +1 -1
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +1 -1
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +1 -1
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +1 -1
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +2 -2
  59. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +1 -1
  60. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +1 -1
  61. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.js +3 -3
  62. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +1 -1
  63. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationPresentation.d.ts +1 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +1 -1
  65. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +1 -1
  66. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigration.d.ts +1 -1
  67. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationMigrationCategories.js +1 -1
  68. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.d.ts +1 -1
  69. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +1 -1
  70. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -1
  71. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +1 -1
  72. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +12 -12
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.d.ts +1 -1
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/agentHostChatDebugProvider.js +1 -1
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +1 -1
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.d.ts +1 -1
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +1 -1
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +1 -1
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +1 -1
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +1 -1
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +1 -1
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +1 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +1 -1
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +1 -1
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +1 -1
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +1 -1
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +1 -1
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +1 -1
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatPromoNotification.js +1 -1
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuotaNotification.js +2 -2
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.d.ts +2 -0
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +57 -0
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +2 -2
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +1 -1
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +1 -1
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +1 -1
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +1 -1
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +1 -1
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +1 -1
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +1 -1
  107. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.d.ts +1 -1
  108. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationConfig.js +1 -1
  109. package/vscode/src/vs/workbench/contrib/chat/browser/expNotification/chatExpNotificationContribution.js +1 -1
  110. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +1 -1
  111. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +2 -2
  112. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +1 -1
  113. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +1 -1
  114. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +1 -1
  115. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +3 -3
  116. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +1 -1
  117. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +1 -1
  118. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +1 -1
  119. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +1 -1
  120. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +1 -1
  121. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +1 -1
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.js +1 -1
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCommandArgumentHint.js +1 -1
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +2 -2
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +10 -2
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.js +1 -1
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -1
  129. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugEvents.d.ts +1 -1
  130. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +253 -0
  131. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +20 -0
  132. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +1 -1
  133. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +1 -1
  134. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +2 -2
  135. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +300 -0
  136. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +272 -0
  137. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +25 -0
  138. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +178 -0
  139. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +78 -0
  140. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +51 -0
  141. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +2 -2
  142. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +2 -2
  143. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +67 -0
  144. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +195 -0
  145. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +67 -0
  146. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +294 -0
  147. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +212 -0
  148. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +955 -0
  149. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +31 -0
  150. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +122 -0
  151. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +1 -1
  152. package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +1 -1
  153. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +65 -0
  154. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +698 -0
  155. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +50 -0
  156. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +78 -0
  157. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +77 -0
  158. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +120 -0
  159. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +10 -0
  160. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +23 -0
  161. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +92 -0
  162. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +335 -0
  163. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +235 -0
  164. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +1673 -0
  165. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +202 -0
  166. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +872 -0
  167. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.d.ts +36 -0
  168. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +239 -0
  169. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.d.ts +21 -0
  170. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.js +143 -0
  171. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.d.ts +24 -0
  172. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +298 -0
  173. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.d.ts +25 -0
  174. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +177 -0
  175. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +73 -0
  176. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +577 -0
  177. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.d.ts +11 -0
  178. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +90 -0
  179. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.d.ts +16 -0
  180. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +130 -0
  181. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.d.ts +12 -0
  182. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.js +53 -0
  183. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +5 -0
  184. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +12 -0
  185. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.d.ts +10 -0
  186. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +91 -0
  187. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +38 -0
  188. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +518 -0
  189. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +6 -0
  190. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +231 -0
  191. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +1 -1
  192. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +4 -4
  193. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +1 -1
  194. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +1 -1
  195. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +1 -1
  196. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +1 -1
  197. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +1 -1
  198. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +1 -1
  199. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +1 -1
  200. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +1 -1
  201. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +1 -1
  202. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +1 -1
  203. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.d.ts +1 -1
  204. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCache.js +1 -1
  205. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalOutputCompressor.js +1 -1
@@ -0,0 +1,335 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
4
+ import { isCancellationError, CancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
5
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
6
+ import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
7
+ import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
8
+ import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
9
+ import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
10
+ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
11
+ import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
12
+ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
13
+ import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
14
+ import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service';
15
+ import { getSkillFolderName } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
16
+ import { PromptFileParser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser';
17
+ import { PromptsType, PromptFileSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
18
+ import { PromptsStorage, SKILL_PROVIDER_ACTIVATION_EVENT, PROMPT_FILE_PROVIDER_ACTIVATION_EVENT, INSTRUCTIONS_PROVIDER_ACTIVATION_EVENT, CUSTOM_AGENT_PROVIDER_ACTIVATION_EVENT } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
19
+
20
+ const ALL_PROMPT_TYPES = [
21
+ PromptsType.prompt,
22
+ PromptsType.instructions,
23
+ PromptsType.agent,
24
+ PromptsType.skill,
25
+ PromptsType.hook
26
+ ];
27
+ let ExtensionPromptFileService = class ExtensionPromptFileService extends Disposable {
28
+ constructor(
29
+ logger,
30
+ fileService,
31
+ modelService,
32
+ extensionService,
33
+ filesConfigService,
34
+ contextKeyService
35
+ ) {
36
+ super();
37
+ this.logger = logger;
38
+ this.fileService = fileService;
39
+ this.modelService = modelService;
40
+ this.extensionService = extensionService;
41
+ this.filesConfigService = filesConfigService;
42
+ this.contextKeyService = contextKeyService;
43
+ this.contributedFiles = {
44
+ [PromptsType.prompt]: ( new ResourceMap()),
45
+ [PromptsType.instructions]: ( new ResourceMap()),
46
+ [PromptsType.agent]: ( new ResourceMap()),
47
+ [PromptsType.skill]: ( new ResourceMap()),
48
+ [PromptsType.hook]: ( new ResourceMap())
49
+ };
50
+ this._promptFileProviders = [];
51
+ this._contributedWhenKeys = ( new Set());
52
+ this._contributedWhenClauses = ( new Map());
53
+ this._providerWhenClauses = ( new Map());
54
+ this._onDidChange = this._register(( new Emitter()));
55
+ this.onDidChange = this._onDidChange.event;
56
+ this._pendingReadonlyUris = [];
57
+ this._pendingReadonlyFlush = false;
58
+ this._register(this.contextKeyService.onDidChangeContext(e => {
59
+ if (e.affectsSome(this._contributedWhenKeys)) {
60
+ for (const type of ALL_PROMPT_TYPES) {
61
+ this._onDidChange.fire({
62
+ type
63
+ });
64
+ }
65
+ }
66
+ }));
67
+ }
68
+ async getExtensionPromptFiles(type, token) {
69
+ await this.extensionService.whenInstalledExtensionsRegistered();
70
+ const settledResults = await Promise.allSettled(( this.contributedFiles[type].values()));
71
+ const contributedFiles = ( settledResults.filter(result => result.status === "fulfilled").map(result => result.value));
72
+ const activationEvent = this._getProviderActivationEvent(type);
73
+ const providerFiles = activationEvent ? await this._listFromProviders(type, activationEvent, token) : [];
74
+ return [...contributedFiles, ...providerFiles].filter(file => {
75
+ if (!file.when) {
76
+ return true;
77
+ }
78
+ const when = ContextKeyExpr.deserialize(file.when);
79
+ if (!when) {
80
+ this.logger.warn(
81
+ `[getExtensionPromptFiles] Ignoring contributed prompt file with invalid when clause: ${file.when}`
82
+ );
83
+ return false;
84
+ }
85
+ return this.contextKeyService.contextMatchesRules(when);
86
+ });
87
+ }
88
+ registerContributedFile(type, uri, extension, name, description, when, sessionTypes) {
89
+ const bucket = this.contributedFiles[type];
90
+ if (( bucket.has(uri))) {
91
+ return Disposable.None;
92
+ }
93
+ const entryPromise = (async () => {
94
+ if (type === PromptsType.skill) {
95
+ try {
96
+ const validated = await this._validateAndSanitizeSkillFile(uri, CancellationToken.None);
97
+ name = validated.name;
98
+ description = validated.description;
99
+ } catch (e) {
100
+ const msg = e instanceof Error ? e.message : String(e);
101
+ this.logger.error(
102
+ `[registerContributedFile] Extension '${extension.identifier.value}' failed to validate skill file: ${uri}`,
103
+ msg
104
+ );
105
+ throw e;
106
+ }
107
+ }
108
+ return {
109
+ uri,
110
+ name,
111
+ description,
112
+ when,
113
+ sessionTypes,
114
+ storage: PromptsStorage.extension,
115
+ type,
116
+ extension,
117
+ source: PromptFileSource.ExtensionContribution
118
+ };
119
+ })();
120
+ bucket.set(uri, entryPromise);
121
+ this._enqueueReadonlyUpdate(uri);
122
+ if (when) {
123
+ this._contributedWhenClauses.set(`${type}/${( uri.toString())}`, when);
124
+ this._updateContributedWhenKeys();
125
+ }
126
+ this._onDidChange.fire({
127
+ type
128
+ });
129
+ return {
130
+ dispose: () => {
131
+ bucket.delete(uri);
132
+ if (when) {
133
+ this._contributedWhenClauses.delete(`${type}/${( uri.toString())}`);
134
+ this._updateContributedWhenKeys();
135
+ }
136
+ this._onDidChange.fire({
137
+ type
138
+ });
139
+ }
140
+ };
141
+ }
142
+ registerPromptFileProvider(extension, type, provider) {
143
+ const providerEntry = {
144
+ extension,
145
+ type,
146
+ ...provider
147
+ };
148
+ this._promptFileProviders.push(providerEntry);
149
+ const disposables = ( new DisposableStore());
150
+ if (provider.onDidChangePromptFiles) {
151
+ disposables.add(provider.onDidChangePromptFiles(() => {
152
+ this._onDidChange.fire({
153
+ type
154
+ });
155
+ }));
156
+ }
157
+ this._onDidChange.fire({
158
+ type
159
+ });
160
+ disposables.add({
161
+ dispose: () => {
162
+ const index = this._promptFileProviders.findIndex(p => p === providerEntry);
163
+ if (index >= 0) {
164
+ this._promptFileProviders.splice(index, 1);
165
+ this._providerWhenClauses.delete(providerEntry);
166
+ this._updateContributedWhenKeys();
167
+ this._onDidChange.fire({
168
+ type
169
+ });
170
+ }
171
+ }
172
+ });
173
+ return disposables;
174
+ }
175
+ async _listFromProviders(type, activationEvent, token) {
176
+ const result = [];
177
+ const readonlyUris = [];
178
+ await this.extensionService.activateByEvent(activationEvent);
179
+ const providers = this._promptFileProviders.filter(p => p.type === type);
180
+ if (providers.length === 0) {
181
+ return result;
182
+ }
183
+ for (const providerEntry of providers) {
184
+ if (token.isCancellationRequested) {
185
+ break;
186
+ }
187
+ try {
188
+ const files = await providerEntry.providePromptFiles({}, token);
189
+ this._providerWhenClauses.set(providerEntry, files?.flatMap(file => file.when ? [file.when] : []) ?? []);
190
+ this._updateContributedWhenKeys();
191
+ if (!files || token.isCancellationRequested) {
192
+ continue;
193
+ }
194
+ for (const file of files) {
195
+ readonlyUris.push(file.uri);
196
+ result.push({
197
+ uri: file.uri,
198
+ storage: PromptsStorage.extension,
199
+ type,
200
+ extension: providerEntry.extension,
201
+ source: PromptFileSource.ExtensionAPI,
202
+ name: file.name,
203
+ description: file.description,
204
+ when: file.when,
205
+ sessionTypes: file.sessionTypes
206
+ });
207
+ }
208
+ } catch (e) {
209
+ if (token.isCancellationRequested || isCancellationError(e)) {
210
+ break;
211
+ }
212
+ this.logger.error(
213
+ `[listFromProviders] Failed to get ${type} files from provider`,
214
+ e instanceof Error ? e.message : String(e)
215
+ );
216
+ }
217
+ }
218
+ void this.filesConfigService.updateReadonly(readonlyUris, true);
219
+ return result;
220
+ }
221
+ _getProviderActivationEvent(type) {
222
+ switch (type) {
223
+ case PromptsType.agent:
224
+ return CUSTOM_AGENT_PROVIDER_ACTIVATION_EVENT;
225
+ case PromptsType.instructions:
226
+ return INSTRUCTIONS_PROVIDER_ACTIVATION_EVENT;
227
+ case PromptsType.prompt:
228
+ return PROMPT_FILE_PROVIDER_ACTIVATION_EVENT;
229
+ case PromptsType.skill:
230
+ return SKILL_PROVIDER_ACTIVATION_EVENT;
231
+ case PromptsType.hook:
232
+ return undefined;
233
+ }
234
+ }
235
+ _enqueueReadonlyUpdate(uri) {
236
+ this._pendingReadonlyUris.push(uri);
237
+ if (!this._pendingReadonlyFlush) {
238
+ this._pendingReadonlyFlush = true;
239
+ queueMicrotask(() => {
240
+ const uris = this._pendingReadonlyUris;
241
+ this._pendingReadonlyUris = [];
242
+ this._pendingReadonlyFlush = false;
243
+ void this.filesConfigService.updateReadonly(uris, true);
244
+ });
245
+ }
246
+ }
247
+ _updateContributedWhenKeys() {
248
+ this._contributedWhenKeys.clear();
249
+ for (const whenClause of ( this._contributedWhenClauses.values())) {
250
+ const expr = ContextKeyExpr.deserialize(whenClause);
251
+ for (const key of expr?.keys() ?? []) {
252
+ this._contributedWhenKeys.add(key);
253
+ }
254
+ }
255
+ for (const whenClauses of ( this._providerWhenClauses.values())) {
256
+ for (const whenClause of whenClauses) {
257
+ const expr = ContextKeyExpr.deserialize(whenClause);
258
+ for (const key of expr?.keys() ?? []) {
259
+ this._contributedWhenKeys.add(key);
260
+ }
261
+ }
262
+ }
263
+ }
264
+ async _validateAndSanitizeSkillFile(uri, token) {
265
+ const parsedFile = await this._parsePromptFile(uri, token);
266
+ const folderName = getSkillFolderName(uri);
267
+ let name = parsedFile.header?.name;
268
+ if (!name) {
269
+ this.logger.debug(
270
+ `[validateAndSanitizeSkillFile] Agent skill file missing name attribute, using folder name "${folderName}": ${uri}`
271
+ );
272
+ name = folderName;
273
+ }
274
+ const description = parsedFile.header?.description;
275
+ let sanitizedName = this._truncateAgentSkillName(name, uri);
276
+ if (sanitizedName !== folderName) {
277
+ this.logger.debug(
278
+ `[validateAndSanitizeSkillFile] Agent skill name "${sanitizedName}" does not match folder name "${folderName}", using folder name: ${uri}`
279
+ );
280
+ sanitizedName = folderName;
281
+ }
282
+ const sanitizedDescription = description ? this._truncateAgentSkillDescription(description, uri) : undefined;
283
+ return {
284
+ name: sanitizedName,
285
+ description: sanitizedDescription
286
+ };
287
+ }
288
+ async _parsePromptFile(uri, token) {
289
+ const model = this.modelService.getModel(uri);
290
+ if (model) {
291
+ return ( new PromptFileParser()).parse(uri, model.getValue());
292
+ }
293
+ const fileContent = await this.fileService.readFile(uri);
294
+ if (token.isCancellationRequested) {
295
+ throw ( new CancellationError());
296
+ }
297
+ return ( new PromptFileParser()).parse(uri, ( fileContent.value.toString()));
298
+ }
299
+ _sanitizeAgentSkillText(text) {
300
+ return text.replace(/<[^>]+>/g, "");
301
+ }
302
+ _truncateAgentSkillName(name, uri) {
303
+ const MAX_NAME_LENGTH = 64;
304
+ const sanitized = this._sanitizeAgentSkillText(name);
305
+ if (sanitized !== name) {
306
+ this.logger.debug(`[findAgentSkills] Agent skill name contains XML tags, removed: ${uri}`);
307
+ }
308
+ if (sanitized.length > MAX_NAME_LENGTH) {
309
+ this.logger.debug(
310
+ `[findAgentSkills] Agent skill name exceeds ${MAX_NAME_LENGTH} characters, truncated: ${uri}`
311
+ );
312
+ return sanitized.substring(0, MAX_NAME_LENGTH);
313
+ }
314
+ return sanitized;
315
+ }
316
+ _truncateAgentSkillDescription(description, uri) {
317
+ const MAX_DESCRIPTION_LENGTH = 1024;
318
+ const sanitized = this._sanitizeAgentSkillText(description);
319
+ if (sanitized !== description) {
320
+ this.logger.debug(
321
+ `[findAgentSkills] Agent skill description contains XML tags, removed: ${uri}`
322
+ );
323
+ }
324
+ if (sanitized.length > MAX_DESCRIPTION_LENGTH) {
325
+ this.logger.debug(
326
+ `[findAgentSkills] Agent skill description exceeds ${MAX_DESCRIPTION_LENGTH} characters, truncated: ${uri}`
327
+ );
328
+ return sanitized.substring(0, MAX_DESCRIPTION_LENGTH);
329
+ }
330
+ return sanitized;
331
+ }
332
+ };
333
+ ExtensionPromptFileService = ( __decorate([( __param(0, ILogService)), ( __param(1, IFileService)), ( __param(2, IModelService)), ( __param(3, IExtensionService)), ( __param(4, IFilesConfigurationService)), ( __param(5, IContextKeyService))], ExtensionPromptFileService));
334
+
335
+ export { ExtensionPromptFileService };
@@ -0,0 +1,235 @@
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 { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
4
+ import { ResourceSet } from "@codingame/monaco-vscode-api/vscode/vs/base/common/map";
5
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
6
+ import { type ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
7
+ import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
8
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
9
+ import { IExtensionDescription } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
10
+ import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
11
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
12
+ import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
13
+ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
14
+ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
15
+ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
16
+ import { IUserDataProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
17
+ import { IResolvedPromptSourceFolder } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations";
18
+ import { PromptsType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes";
19
+ import { PromptFilesLocator } from "../utils/promptFilesLocator.js";
20
+ import { ParsedPromptFile } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser";
21
+ import { IAgentSource, IChatPromptSlashCommand, IConfiguredHooksInfo, ICustomAgent, IBuiltinPromptPath, IPromptPath, IAgentSkill, IInstructionFile, PromptsStorage, IPromptFileContext, IPromptFileResource, IPromptDiscoveryInfo, IAgentInstructionFile, Logger, IResolvedChatPromptSlashCommand } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService";
22
+ import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service";
23
+ import { ChatRequestHooks } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema";
24
+ import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
25
+ import { IWorkspaceTrustManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspaceTrust.service";
26
+ import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service";
27
+ import { IAgentPluginService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service";
28
+ /**
29
+ * Provides prompt services.
30
+ */
31
+ export declare class PromptsService extends Disposable implements IPromptsService {
32
+ readonly logger: ILogService;
33
+ private readonly labelService;
34
+ private readonly modelService;
35
+ protected readonly instantiationService: IInstantiationService;
36
+ private readonly userDataService;
37
+ private readonly configurationService;
38
+ protected readonly fileService: IFileService;
39
+ private readonly storageService;
40
+ private readonly telemetryService;
41
+ private readonly workspaceService;
42
+ protected readonly pathService: IPathService;
43
+ private readonly agentPluginService;
44
+ private readonly workspaceTrustService;
45
+ readonly _serviceBrand: undefined;
46
+ /**
47
+ * Bounds how many prompt files discovery reads in parallel.
48
+ *
49
+ * Owned by the service rather than created per invocation on purpose: an
50
+ * invalidation clears the cached discovery promise without cancelling the
51
+ * computation it was tracking, so several passes can run at once. A limiter
52
+ * per invocation would give each pass its own quota and the aggregate would
53
+ * still grow with the number of passes, which is the exhaustion this bound
54
+ * exists to prevent.
55
+ */
56
+ private readonly _discoveryLimiter;
57
+ /**
58
+ * Queues a discovery file read on the shared, service-wide limiter.
59
+ */
60
+ private queueDiscoveryRead;
61
+ /**
62
+ * Prompt files locator utility.
63
+ */
64
+ private readonly fileLocator;
65
+ /**
66
+ * Cached agent discovery info.
67
+ */
68
+ private readonly cachedCustomAgents;
69
+ /**
70
+ * Cached slash command discovery info.
71
+ */
72
+ private readonly cachedSlashCommands;
73
+ /**
74
+ * Cached hooks. Invalidated when hook files change.
75
+ */
76
+ private readonly cachedHooks;
77
+ /**
78
+ * Cached skill discovery info.
79
+ */
80
+ private readonly cachedSkills;
81
+ /**
82
+ * Cached instructions.
83
+ */
84
+ private readonly cachedInstructions;
85
+ private readonly agentInstructionsWatcher;
86
+ private readonly _onDidChangeAgentInstructions;
87
+ /**
88
+ * Synchronous mirror of the names exposed by {@link getPromptSlashCommands},
89
+ * maintained for {@link hasPromptSlashCommand} so callers (e.g. the chat request
90
+ * parser) can disambiguate `<cmd>:<sub>` vs bare `<cmd>` without an async hop.
91
+ */
92
+ private readonly knownPromptSlashCommandNames;
93
+ /**
94
+ * Cache for parsed prompt files keyed by URI.
95
+ * The number in the returned tuple is textModel.getVersionId(), which is an internal VS Code counter that increments every time the text model's content changes.
96
+ */
97
+ private readonly cachedParsedPromptFromModels;
98
+ /**
99
+ * Cached file locations commands. Caching only happens if the corresponding `fileLocatorEvents` event is used.
100
+ */
101
+ private readonly cachedFileLocations;
102
+ /**
103
+ * Lazily created events that notify listeners when the file locations for a given prompt type change.
104
+ * An event is created on demand for each prompt type and can be used by consumers to react to updates
105
+ * in the set of prompt files (e.g., when prompt files are added, removed, or modified).
106
+ */
107
+ private readonly fileLocatorEvents;
108
+ /**
109
+ * Owns the registry of extension-contributed prompt files (both via
110
+ * contribution points and via provider API).
111
+ */
112
+ private readonly extensionPromptFiles;
113
+ private readonly _onDidPluginPromptFilesChange;
114
+ private readonly _onDidPluginHooksChange;
115
+ private _pluginPromptFilesByType;
116
+ constructor(logger: ILogService, labelService: ILabelService, modelService: IModelService, instantiationService: IInstantiationService, userDataService: IUserDataProfileService, configurationService: IConfigurationService, fileService: IFileService, storageService: IStorageService, telemetryService: ITelemetryService, workspaceService: IWorkspaceContextService, pathService: IPathService, agentPluginService: IAgentPluginService, workspaceTrustService: IWorkspaceTrustManagementService);
117
+ private watchPluginPromptFilesForType;
118
+ protected createPromptFilesLocator(): PromptFilesLocator;
119
+ private getFileLocatorEvent;
120
+ getParsedPromptFile(textModel: ITextModel): ParsedPromptFile;
121
+ listPromptFiles(type: PromptsType, token: CancellationToken): Promise<readonly IPromptPath[]>;
122
+ private computeListPromptFiles;
123
+ /**
124
+ * Collects diagnostic information about which source folders were searched for display in the debug panel.
125
+ */
126
+ private _collectSourceFolderDiagnostics;
127
+ /**
128
+ * Registers a prompt file provider (CustomAgentProvider, InstructionsProvider, or PromptFileProvider).
129
+ * This will be called by the extension host bridge when
130
+ * an extension registers a provider via vscode.chat.registerCustomAgentProvider(),
131
+ * registerInstructionsProvider(), or registerPromptFileProvider().
132
+ */
133
+ registerPromptFileProvider(extension: IExtensionDescription, type: PromptsType, provider: {
134
+ onDidChangePromptFiles?: Event<void>;
135
+ providePromptFiles: (context: IPromptFileContext, token: CancellationToken) => Promise<IPromptFileResource[] | undefined>;
136
+ }): IDisposable;
137
+ listPromptFilesForStorage(type: PromptsType, storage: PromptsStorage, token: CancellationToken, root?: URI): Promise<readonly IPromptPath[]>;
138
+ private getExtensionPromptFiles;
139
+ /**
140
+ * Returns the built-in prompt files of the given type. The base service ships
141
+ * no built-in prompts; subclasses (e.g. the Agents app) override this to
142
+ * contribute bundled prompts such as built-in skills.
143
+ */
144
+ protected getBuiltinPromptFiles(type: PromptsType, token: CancellationToken): Promise<readonly IBuiltinPromptPath[]>;
145
+ getSourceFolders(type: PromptsType): Promise<readonly IPromptPath[]>;
146
+ getResolvedSourceFolders(type: PromptsType): Promise<readonly IResolvedPromptSourceFolder[]>;
147
+ private areStandalonePromptFilesBlocked;
148
+ private areAgentHooksAllowed;
149
+ /**
150
+ * Emitter for slash commands change events.
151
+ */
152
+ get onDidChangeSlashCommands(): Event<void>;
153
+ getPromptSlashCommands(token: CancellationToken): Promise<readonly IChatPromptSlashCommand[]>;
154
+ /**
155
+ * Computes discovery info for slash commands, combining prompts and skills.
156
+ */
157
+ private computeSlashCommandDiscoveryInfo;
158
+ /**
159
+ * Derives IChatPromptSlashCommand[] from cached discovery info.
160
+ */
161
+ private slashCommandsFromDiscoveryInfo;
162
+ isValidSlashCommandName(command: string): boolean;
163
+ hasPromptSlashCommand(name: string): boolean;
164
+ private knownPromptSlashCommandsHydrationStarted;
165
+ private refreshKnownPromptSlashCommandNames;
166
+ resolvePromptSlashCommand(name: string, sessionType: string | undefined, token: CancellationToken): Promise<IResolvedChatPromptSlashCommand | undefined>;
167
+ private asChatPromptSlashCommand;
168
+ getPromptSlashCommandName(uri: URI, token: CancellationToken): Promise<string>;
169
+ /**
170
+ * Emitter for custom agents change events.
171
+ */
172
+ get onDidChangeCustomAgents(): Event<void>;
173
+ get onDidChangeInstructions(): Event<void>;
174
+ get onDidChangeAgentInstructions(): Event<void>;
175
+ getCustomAgents(token: CancellationToken): Promise<readonly ICustomAgent[]>;
176
+ /**
177
+ * Derives ICustomAgent[] from cached discovery info.
178
+ */
179
+ private agentsFromDiscoveryInfo;
180
+ private computeAgentDiscoveryInfo;
181
+ parseNew(uri: URI, token: CancellationToken): Promise<ParsedPromptFile>;
182
+ registerContributedFile(type: PromptsType, uri: URI, extension: IExtensionDescription, name?: string, description?: string, when?: string, sessionTypes?: readonly string[]): IDisposable;
183
+ getPromptLocationLabel(promptPath: IPromptPath): string;
184
+ listNestedAgentMDs(token: CancellationToken): Promise<IAgentInstructionFile[]>;
185
+ listAgentInstructions(token: CancellationToken, logger: Logger | undefined): Promise<IAgentInstructionFile[]>;
186
+ getVoiceInstructions(token: CancellationToken): Promise<string | undefined>;
187
+ getDictationInstructions(token: CancellationToken): Promise<string | undefined>;
188
+ private getSpeechInstructions;
189
+ getAgentFileURIFromModeFile(oldURI: URI): URI | undefined;
190
+ private readonly disabledPromptsStorageKeyPrefix;
191
+ getDisabledPromptFiles(type: PromptsType): ResourceSet;
192
+ setDisabledPromptFiles(type: PromptsType, uris: ResourceSet): void;
193
+ private sanitizeAgentSkillText;
194
+ private truncateAgentSkillName;
195
+ private truncateAgentSkillDescription;
196
+ get onDidChangeSkills(): Event<void>;
197
+ get onDidChangeHooks(): Event<void>;
198
+ findAgentSkills(token: CancellationToken): Promise<IAgentSkill[] | undefined>;
199
+ /**
200
+ * Derives IAgentSkill[] from cached discovery info.
201
+ */
202
+ private skillsFromDiscoveryInfo;
203
+ /**
204
+ * Computes the full skill discovery info, including source folders and telemetry.
205
+ */
206
+ private computeSkillDiscovery;
207
+ getHooks(token: CancellationToken): Promise<IConfiguredHooksInfo | undefined>;
208
+ getDiscoveryInfo(type: PromptsType, token: CancellationToken): Promise<IPromptDiscoveryInfo>;
209
+ getInstructionFiles(token: CancellationToken): Promise<readonly IInstructionFile[]>;
210
+ private instructionsFromDiscoveryInfo;
211
+ private withPromptPathMetadata;
212
+ private computeInstructionFiles;
213
+ private computeHooks;
214
+ /**
215
+ * Precedence used when deduplicating skills that share the same canonical
216
+ * name: workspace > personal > plugin > extension API > extension contribution.
217
+ * Lower numbers win.
218
+ */
219
+ private getSkillPriority;
220
+ /**
221
+ * Returns the discovery results for skill files.
222
+ */
223
+ private computeSkillDiscoveryInfo;
224
+ private getInstructionsDiscoveryInfo;
225
+ }
226
+ export declare namespace CustomAgent {
227
+ function fromParsedPromptFile(ast: ParsedPromptFile, extra: {
228
+ name?: string;
229
+ description?: string;
230
+ source: IAgentSource;
231
+ hooks?: ChatRequestHooks;
232
+ sessionTypes: readonly string[] | undefined;
233
+ enabled: boolean;
234
+ }): ICustomAgent;
235
+ }