@codingame/monaco-vscode-chat-service-override 29.1.0 → 30.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 (258) hide show
  1. package/index.js +5 -2
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +37 -39
  4. package/vscode/src/vs/platform/agentHost/common/agentService.js +3 -1
  5. package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +11 -1
  6. package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +4 -4
  7. package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +132 -42
  8. package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +54 -0
  9. package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +15 -0
  10. package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +5 -1
  11. package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +188 -51
  12. package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +7 -6
  13. package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +1 -1
  14. package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +7 -2
  15. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.d.ts +6 -0
  16. package/vscode/src/vs/platform/sandbox/browser/sandboxHelperService.js +14 -0
  17. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +18 -0
  18. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +13 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
  20. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +37 -16
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +10 -8
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +37 -3
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +6 -6
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +20 -11
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +14 -14
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +18 -13
  36. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
  37. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +10 -10
  38. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
  39. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
  40. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.d.ts +36 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +482 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +10 -2
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +43 -10
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +13 -13
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +74 -76
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +4 -4
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +4 -4
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +27 -35
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +5 -8
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +86 -80
  61. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +3 -2
  62. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +38 -4
  63. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +14 -14
  64. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +38 -18
  65. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +427 -167
  66. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +37 -37
  67. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +15 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +108 -37
  69. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +8 -1
  70. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +28 -2
  71. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +2 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +11 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +1 -3
  74. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +3 -20
  75. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +4 -0
  76. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +65 -68
  77. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +2 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +1 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +64 -51
  80. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
  81. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +288 -195
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +21 -21
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +19 -19
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +21 -21
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +12 -12
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +21 -21
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +28 -28
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.d.ts +1 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +3 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +1 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +5 -2
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -0
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +2 -1
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +10 -3
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +4 -2
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +19 -7
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +3 -2
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +54 -12
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +3 -3
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -8
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +14 -14
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +50 -50
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +3 -1
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +86 -17
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +12 -12
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +65 -65
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +24 -16
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +17 -17
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -6
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
  137. package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
  138. package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
  139. package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
  140. package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
  141. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
  142. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +3 -6
  143. package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +54 -39
  144. package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +16 -16
  145. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +24 -3
  146. package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +72 -14
  147. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
  148. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
  149. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
  150. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
  151. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileContributions.js +181 -0
  152. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +3 -3
  153. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
  154. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
  155. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
  156. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
  157. package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +8 -6
  158. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +37 -37
  159. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +28 -23
  160. package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +6 -6
  161. package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +7 -7
  162. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.d.ts +12 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletionUtils.js +62 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +1 -10
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +148 -88
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
  172. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
  173. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -0
  174. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +16 -9
  175. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
  176. package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.d.ts +8 -0
  177. package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +158 -0
  178. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +8 -3
  179. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +155 -76
  180. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +1 -2
  181. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +5 -4
  182. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +5 -1
  183. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -6
  184. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +31 -1
  185. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +228 -1
  186. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +66 -0
  187. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +190 -0
  188. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +25 -3
  189. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +130 -107
  190. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.d.ts +1 -0
  191. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +19 -18
  192. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
  193. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  194. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
  195. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +2 -18
  196. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +169 -266
  197. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +12 -10
  198. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +149 -206
  199. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +3 -3
  200. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +27 -22
  201. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +20 -8
  202. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +183 -43
  203. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  204. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +1 -1
  205. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +2 -3
  206. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
  207. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +21 -21
  208. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
  209. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -11
  210. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
  211. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  212. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +11 -11
  213. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +6 -6
  214. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
  215. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +1 -1
  216. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
  217. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
  218. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
  219. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +2 -2
  220. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
  221. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +3 -1
  222. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +4 -2
  223. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +3 -2
  224. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
  225. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +1 -0
  226. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +1 -0
  227. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +1 -3
  228. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +26 -23
  229. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
  230. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +4 -9
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +16 -6
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +9 -9
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +150 -50
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +2 -2
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +66 -5
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +239 -48
  248. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +0 -14
  249. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +0 -208
  250. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +0 -22
  251. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +0 -637
  252. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +0 -24
  253. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +0 -384
  254. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +0 -33
  255. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +0 -47
  256. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +0 -30
  257. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +0 -55
  258. /package/vscode/src/vs/workbench/contrib/chat/{common → browser}/promptSyntax/promptFileContributions.d.ts +0 -0
@@ -3,25 +3,19 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
3
3
  import { splitGlobAware, parse, isEmptyPattern } from '@codingame/monaco-vscode-api/vscode/vs/base/common/glob';
4
4
  import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
5
5
  import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
6
- import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
7
6
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
8
- import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
7
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
9
8
  import { MarkerSeverity } from '@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers';
10
- import { IMarkerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers.service';
11
9
  import { ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
12
10
  import { IChatModeService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes.service';
13
- import { ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
11
+ import { ChatModeKind, ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
14
12
  import { ILanguageModelChatMetadata } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
15
13
  import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
16
14
  import { SpecedToolAliases } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
17
15
  import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
18
- import { PromptsType, Target, getPromptsTypeForLanguageId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
16
+ import { PromptsType, Target } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
19
17
  import { PromptHeaderAttributes, parseCommaSeparatedList } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser';
20
- import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
21
- import { Delayer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
22
- import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
23
18
  import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
24
- import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
25
19
  import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
26
20
  import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
27
21
  import { LEGACY_MODE_FILE_EXTENSION, AGENTS_SOURCE_FOLDER, VALID_SKILL_NAME_REGEX, CLAUDE_AGENTS_SOURCE_FOLDER, isInClaudeRulesFolder } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
@@ -67,13 +61,13 @@ let PromptValidator = class PromptValidator {
67
61
  const location = this.promptsService.getAgentFileURIFromModeFile(promptAST.uri);
68
62
  if (location && (await this.fileService.canCreateFile(location))) {
69
63
  report(toMarker(( localize(
70
- 7410,
64
+ 7475,
71
65
  "Chat modes have been renamed to agents. Please move this file to {0}",
72
66
  (location.toString())
73
67
  )), ( new Range(1, 1, 1, 4)), MarkerSeverity.Warning));
74
68
  } else {
75
69
  report(toMarker(( localize(
76
- 7411,
70
+ 7476,
77
71
  "Chat modes have been renamed to agents. Please move the file to {0}",
78
72
  AGENTS_SOURCE_FOLDER
79
73
  )), ( new Range(1, 1, 1, 4)), MarkerSeverity.Warning));
@@ -86,12 +80,12 @@ let PromptValidator = class PromptValidator {
86
80
  }
87
81
  const nameAttribute = promptAST.header?.attributes.find(attr => attr.key === PromptHeaderAttributes.name);
88
82
  if (!nameAttribute) {
89
- report(toMarker(( localize(7412, "Skill must provide a name.")), ( new Range(1, 1, 1, 4)), MarkerSeverity.Error));
83
+ report(toMarker(( localize(7477, "Skill must provide a name.")), ( new Range(1, 1, 1, 4)), MarkerSeverity.Error));
90
84
  return;
91
85
  }
92
86
  const descriptionAttribute = promptAST.header?.attributes.find(attr => attr.key === PromptHeaderAttributes.description);
93
87
  if (!descriptionAttribute) {
94
- report(toMarker(( localize(7413, "Skill must provide a description.")), ( new Range(1, 1, 1, 4)), MarkerSeverity.Error));
88
+ report(toMarker(( localize(7478, "Skill must provide a description.")), ( new Range(1, 1, 1, 4)), MarkerSeverity.Error));
95
89
  return;
96
90
  }
97
91
  if (nameAttribute.value.type === "scalar") {
@@ -99,7 +93,7 @@ let PromptValidator = class PromptValidator {
99
93
  if (skillName.length > 0) {
100
94
  if (!VALID_SKILL_NAME_REGEX.test(skillName)) {
101
95
  report(toMarker(( localize(
102
- 7414,
96
+ 7479,
103
97
  "Skill name may only contain lowercase letters, numbers, and hyphens."
104
98
  )), nameAttribute.value.range, MarkerSeverity.Error));
105
99
  }
@@ -109,7 +103,7 @@ let PromptValidator = class PromptValidator {
109
103
  const folderName = pathParts[skillIndex - 1];
110
104
  if (folderName && skillName !== folderName) {
111
105
  report(toMarker(( localize(
112
- 7415,
106
+ 7480,
113
107
  "The skill name '{0}' should match the folder name '{1}'.",
114
108
  skillName,
115
109
  folderName
@@ -128,7 +122,7 @@ let PromptValidator = class PromptValidator {
128
122
  for (const ref of body.fileReferences) {
129
123
  const resolved = body.resolveFilePath(ref.content);
130
124
  if (!resolved) {
131
- report(toMarker(( localize(7416, "Invalid file reference '{0}'.", ref.content)), ref.range, MarkerSeverity.Warning));
125
+ report(toMarker(( localize(7481, "Invalid file reference '{0}'.", ref.content)), ref.range, MarkerSeverity.Warning));
132
126
  continue;
133
127
  }
134
128
  if (promptAST.uri.scheme === resolved.scheme) {
@@ -140,7 +134,7 @@ let PromptValidator = class PromptValidator {
140
134
  }
141
135
  } catch {}
142
136
  const loc = this.labelService.getUriLabel(resolved);
143
- report(toMarker(( localize(7417, "File '{0}' not found at '{1}'.", ref.content, loc)), ref.range, MarkerSeverity.Warning));
137
+ report(toMarker(( localize(7482, "File '{0}' not found at '{1}'.", ref.content, loc)), ref.range, MarkerSeverity.Warning));
144
138
  })());
145
139
  }
146
140
  }
@@ -157,7 +151,7 @@ let PromptValidator = class PromptValidator {
157
151
  if (currentNames.size === 1) {
158
152
  const newName = Array.from(currentNames)[0];
159
153
  report(toMarker(( localize(
160
- 7418,
154
+ 7483,
161
155
  "Tool or toolset '{0}' has been renamed, use '{1}' instead.",
162
156
  variable.name,
163
157
  newName
@@ -165,7 +159,7 @@ let PromptValidator = class PromptValidator {
165
159
  } else {
166
160
  const newNames = Array.from(currentNames).sort((a, b) => a.localeCompare(b)).join(", ");
167
161
  report(toMarker(( localize(
168
- 7419,
162
+ 7484,
169
163
  "Tool or toolset '{0}' has been renamed, use the following tools instead: {1}",
170
164
  variable.name,
171
165
  newNames
@@ -173,13 +167,13 @@ let PromptValidator = class PromptValidator {
173
167
  }
174
168
  }
175
169
  } else {
176
- report(toMarker(( localize(7420, "Unknown tool or toolset '{0}'.", variable.name)), variable.range, MarkerSeverity.Warning));
170
+ report(toMarker(( localize(7485, "Unknown tool or toolset '{0}'.", variable.name)), variable.range, MarkerSeverity.Warning));
177
171
  }
178
172
  } else if (headerToolsMap) {
179
173
  const tool = this.languageModelToolsService.getToolByFullReferenceName(variable.name);
180
174
  if (tool && headerToolsMap.get(tool) === false) {
181
175
  report(toMarker(( localize(
182
- 7421,
176
+ 7486,
183
177
  "Tool or toolset '{0}' also needs to be enabled in the header.",
184
178
  variable.name
185
179
  )), variable.range, MarkerSeverity.Warning));
@@ -220,7 +214,6 @@ let PromptValidator = class PromptValidator {
220
214
  this.validateTarget(attributes, report);
221
215
  this.validateInfer(attributes, report);
222
216
  this.validateUserInvocable(attributes, report);
223
- this.validateUserInvokable(attributes, report);
224
217
  this.validateDisableModelInvocation(attributes, report);
225
218
  this.validateTools(attributes, ChatModeKind.Agent, target, report);
226
219
  if (this.configurationService.getValue(PromptsConfig.USE_CUSTOM_AGENT_HOOKS)) {
@@ -240,7 +233,6 @@ let PromptValidator = class PromptValidator {
240
233
  }
241
234
  case PromptsType.skill:
242
235
  this.validateUserInvocable(attributes, report);
243
- this.validateUserInvokable(attributes, report);
244
236
  this.validateDisableModelInvocation(attributes, report);
245
237
  break;
246
238
  }
@@ -264,7 +256,7 @@ let PromptValidator = class PromptValidator {
264
256
  switch (promptType) {
265
257
  case PromptsType.prompt:
266
258
  report(toMarker(( localize(
267
- 7422,
259
+ 7487,
268
260
  "Attribute '{0}' is not supported in prompt files. Supported: {1}.",
269
261
  attribute.key,
270
262
  supportedNames.value
@@ -273,7 +265,7 @@ let PromptValidator = class PromptValidator {
273
265
  case PromptsType.agent:
274
266
  if (target === Target.GitHubCopilot) {
275
267
  report(toMarker(( localize(
276
- 7423,
268
+ 7488,
277
269
  "Attribute '{0}' is not supported in custom GitHub Copilot agent files. Supported: {1}.",
278
270
  attribute.key,
279
271
  supportedNames.value
@@ -282,13 +274,13 @@ let PromptValidator = class PromptValidator {
282
274
  ; else {
283
275
  if (( validGithubCopilotAttributeNames.value.has(attribute.key))) {
284
276
  report(toMarker(( localize(
285
- 7424,
277
+ 7489,
286
278
  "Attribute '{0}' is ignored when running locally in VS Code.",
287
279
  attribute.key
288
280
  )), attribute.range, MarkerSeverity.Info));
289
281
  } else {
290
282
  report(toMarker(( localize(
291
- 7425,
283
+ 7490,
292
284
  "Attribute '{0}' is not supported in VS Code agent files. Supported: {1}.",
293
285
  attribute.key,
294
286
  supportedNames.value
@@ -299,14 +291,14 @@ let PromptValidator = class PromptValidator {
299
291
  case PromptsType.instructions:
300
292
  if (target === Target.Claude) {
301
293
  report(toMarker(( localize(
302
- 7426,
294
+ 7491,
303
295
  "Attribute '{0}' is not supported in rules files. Supported: {1}.",
304
296
  attribute.key,
305
297
  supportedNames.value
306
298
  )), attribute.range, MarkerSeverity.Warning));
307
299
  } else {
308
300
  report(toMarker(( localize(
309
- 7427,
301
+ 7492,
310
302
  "Attribute '{0}' is not supported in instructions files. Supported: {1}.",
311
303
  attribute.key,
312
304
  supportedNames.value
@@ -315,7 +307,7 @@ let PromptValidator = class PromptValidator {
315
307
  break;
316
308
  case PromptsType.skill:
317
309
  report(toMarker(( localize(
318
- 7428,
310
+ 7493,
319
311
  "Attribute '{0}' is not supported in skill files. Supported: {1}.",
320
312
  attribute.key,
321
313
  supportedNames.value
@@ -331,11 +323,11 @@ let PromptValidator = class PromptValidator {
331
323
  return;
332
324
  }
333
325
  if (nameAttribute.value.type !== "scalar") {
334
- report(toMarker(( localize(7429, "The 'name' attribute must be a string.")), nameAttribute.range, MarkerSeverity.Error));
326
+ report(toMarker(( localize(7494, "The 'name' attribute must be a string.")), nameAttribute.range, MarkerSeverity.Error));
335
327
  return;
336
328
  }
337
329
  if (nameAttribute.value.value.trim().length === 0) {
338
- report(toMarker(( localize(7430, "The 'name' attribute must not be empty.")), nameAttribute.value.range, MarkerSeverity.Error));
330
+ report(toMarker(( localize(7495, "The 'name' attribute must not be empty.")), nameAttribute.value.range, MarkerSeverity.Error));
339
331
  return;
340
332
  }
341
333
  }
@@ -345,11 +337,11 @@ let PromptValidator = class PromptValidator {
345
337
  return;
346
338
  }
347
339
  if (descriptionAttribute.value.type !== "scalar") {
348
- report(toMarker(( localize(7431, "The 'description' attribute must be a string.")), descriptionAttribute.range, MarkerSeverity.Error));
340
+ report(toMarker(( localize(7496, "The 'description' attribute must be a string.")), descriptionAttribute.range, MarkerSeverity.Error));
349
341
  return;
350
342
  }
351
343
  if (descriptionAttribute.value.value.trim().length === 0) {
352
- report(toMarker(( localize(7432, "The 'description' attribute should not be empty.")), descriptionAttribute.value.range, MarkerSeverity.Error));
344
+ report(toMarker(( localize(7497, "The 'description' attribute should not be empty.")), descriptionAttribute.value.range, MarkerSeverity.Error));
353
345
  return;
354
346
  }
355
347
  }
@@ -359,11 +351,11 @@ let PromptValidator = class PromptValidator {
359
351
  return;
360
352
  }
361
353
  if (argumentHintAttribute.value.type !== "scalar") {
362
- report(toMarker(( localize(7433, "The 'argument-hint' attribute must be a string.")), argumentHintAttribute.range, MarkerSeverity.Error));
354
+ report(toMarker(( localize(7498, "The 'argument-hint' attribute must be a string.")), argumentHintAttribute.range, MarkerSeverity.Error));
363
355
  return;
364
356
  }
365
357
  if (argumentHintAttribute.value.value.trim().length === 0) {
366
- report(toMarker(( localize(7434, "The 'argument-hint' attribute should not be empty.")), argumentHintAttribute.value.range, MarkerSeverity.Error));
358
+ report(toMarker(( localize(7499, "The 'argument-hint' attribute should not be empty.")), argumentHintAttribute.value.range, MarkerSeverity.Error));
367
359
  return;
368
360
  }
369
361
  }
@@ -373,30 +365,30 @@ let PromptValidator = class PromptValidator {
373
365
  return;
374
366
  }
375
367
  if (attribute.value.type !== "scalar" && attribute.value.type !== "sequence") {
376
- report(toMarker(( localize(7435, "The 'model' attribute must be a string or an array of strings.")), attribute.value.range, MarkerSeverity.Error));
368
+ report(toMarker(( localize(7500, "The 'model' attribute must be a string or an array of strings.")), attribute.value.range, MarkerSeverity.Error));
377
369
  return;
378
370
  }
379
371
  const modelNames = [];
380
372
  if (attribute.value.type === "scalar") {
381
373
  const modelName = attribute.value.value.trim();
382
374
  if (modelName.length === 0) {
383
- report(toMarker(( localize(7436, "The 'model' attribute must be a non-empty string.")), attribute.value.range, MarkerSeverity.Error));
375
+ report(toMarker(( localize(7501, "The 'model' attribute must be a non-empty string.")), attribute.value.range, MarkerSeverity.Error));
384
376
  return;
385
377
  }
386
378
  modelNames.push([modelName, attribute.value.range]);
387
379
  } else if (attribute.value.type === "sequence") {
388
380
  if (attribute.value.items.length === 0) {
389
- report(toMarker(( localize(7437, "The 'model' array must not be empty.")), attribute.value.range, MarkerSeverity.Error));
381
+ report(toMarker(( localize(7502, "The 'model' array must not be empty.")), attribute.value.range, MarkerSeverity.Error));
390
382
  return;
391
383
  }
392
384
  for (const item of attribute.value.items) {
393
385
  if (item.type !== "scalar") {
394
- report(toMarker(( localize(7438, "The 'model' array must contain only strings.")), item.range, MarkerSeverity.Error));
386
+ report(toMarker(( localize(7503, "The 'model' array must contain only strings.")), item.range, MarkerSeverity.Error));
395
387
  return;
396
388
  }
397
389
  const modelName = item.value.trim();
398
390
  if (modelName.length === 0) {
399
- report(toMarker(( localize(7439, "Model names in the array must be non-empty strings.")), item.range, MarkerSeverity.Error));
391
+ report(toMarker(( localize(7504, "Model names in the array must be non-empty strings.")), item.range, MarkerSeverity.Error));
400
392
  return;
401
393
  }
402
394
  modelNames.push([modelName, item.range]);
@@ -409,9 +401,9 @@ let PromptValidator = class PromptValidator {
409
401
  for (const [modelName, range] of modelNames) {
410
402
  const modelMetadata = this.findModelByName(modelName);
411
403
  if (!modelMetadata) {
412
- report(toMarker(( localize(7440, "Unknown model '{0}'.", modelName)), range, MarkerSeverity.Warning));
404
+ report(toMarker(( localize(7505, "Unknown model '{0}'.", modelName)), range, MarkerSeverity.Warning));
413
405
  } else if (agentKind === ChatModeKind.Agent && !ILanguageModelChatMetadata.suitableForAgentMode(modelMetadata)) {
414
- report(toMarker(( localize(7441, "Model '{0}' is not suited for agent mode.", modelName)), range, MarkerSeverity.Warning));
406
+ report(toMarker(( localize(7506, "Model '{0}' is not suited for agent mode.", modelName)), range, MarkerSeverity.Warning));
415
407
  }
416
408
  }
417
409
  }
@@ -425,13 +417,13 @@ let PromptValidator = class PromptValidator {
425
417
  continue;
426
418
  }
427
419
  if (attribute.value.type !== "scalar") {
428
- report(toMarker(( localize(7442, "The '{0}' attribute must be a string.", claudeAttributeName)), attribute.value.range, MarkerSeverity.Error));
420
+ report(toMarker(( localize(7507, "The '{0}' attribute must be a string.", claudeAttributeName)), attribute.value.range, MarkerSeverity.Error));
429
421
  continue;
430
422
  } else {
431
423
  const modelName = attribute.value.value.trim();
432
424
  if (enumValues.every(model => model.name !== modelName)) {
433
425
  const validValues = ( enumValues.map(model => model.name)).join(", ");
434
- report(toMarker(( localize(7443, "Unknown value '{0}', valid: {1}.", modelName, validValues)), attribute.value.range, MarkerSeverity.Warning));
426
+ report(toMarker(( localize(7508, "Unknown value '{0}', valid: {1}.", modelName, validValues)), attribute.value.range, MarkerSeverity.Warning));
435
427
  }
436
428
  }
437
429
  }
@@ -450,12 +442,12 @@ let PromptValidator = class PromptValidator {
450
442
  if (modeAttribute) {
451
443
  if (agentAttribute) {
452
444
  report(toMarker(( localize(
453
- 7444,
445
+ 7509,
454
446
  "The 'mode' attribute has been deprecated. The 'agent' attribute is used instead."
455
447
  )), modeAttribute.range, MarkerSeverity.Warning));
456
448
  } else {
457
449
  report(toMarker(( localize(
458
- 7445,
450
+ 7510,
459
451
  "The 'mode' attribute has been deprecated. Please rename it to 'agent'."
460
452
  )), modeAttribute.range, MarkerSeverity.Error));
461
453
  }
@@ -465,12 +457,12 @@ let PromptValidator = class PromptValidator {
465
457
  return undefined;
466
458
  }
467
459
  if (attribute.value.type !== "scalar") {
468
- report(toMarker(( localize(7446, "The '{0}' attribute must be a string.", attribute.key)), attribute.value.range, MarkerSeverity.Error));
460
+ report(toMarker(( localize(7511, "The '{0}' attribute must be a string.", attribute.key)), attribute.value.range, MarkerSeverity.Error));
469
461
  return undefined;
470
462
  }
471
463
  const agentValue = attribute.value.value;
472
464
  if (agentValue.trim().length === 0) {
473
- report(toMarker(( localize(7447, "The '{0}' attribute must be a non-empty string.", attribute.key)), attribute.value.range, MarkerSeverity.Error));
465
+ report(toMarker(( localize(7512, "The '{0}' attribute must be a non-empty string.", attribute.key)), attribute.value.range, MarkerSeverity.Error));
474
466
  return undefined;
475
467
  }
476
468
  return this.validateAgentValue(attribute.value, report);
@@ -485,7 +477,7 @@ let PromptValidator = class PromptValidator {
485
477
  availableAgents.push(agent.name.get());
486
478
  }
487
479
  const errorMessage = ( localize(
488
- 7448,
480
+ 7513,
489
481
  "Unknown agent '{0}'. Available agents: {1}.",
490
482
  value.value,
491
483
  availableAgents.join(", ")
@@ -500,7 +492,7 @@ let PromptValidator = class PromptValidator {
500
492
  }
501
493
  if (agentKind !== ChatModeKind.Agent) {
502
494
  report(toMarker(( localize(
503
- 7449,
495
+ 7514,
504
496
  "The 'tools' attribute is only supported when using agents. Attribute will be ignored."
505
497
  )), attribute.range, MarkerSeverity.Warning));
506
498
  }
@@ -510,7 +502,7 @@ let PromptValidator = class PromptValidator {
510
502
  }
511
503
  if (value.type !== "sequence") {
512
504
  report(toMarker(( localize(
513
- 7450,
505
+ 7515,
514
506
  "The 'tools' attribute must be an array or a comma separated string."
515
507
  )), attribute.value.range, MarkerSeverity.Error));
516
508
  return;
@@ -526,7 +518,7 @@ let PromptValidator = class PromptValidator {
526
518
  const deprecatedNames = this.languageModelToolsService.getDeprecatedFullReferenceNames();
527
519
  for (const item of valueItem.items) {
528
520
  if (item.type !== "scalar") {
529
- report(toMarker(( localize(7451, "Each tool name in the 'tools' attribute must be a string.")), item.range, MarkerSeverity.Error));
521
+ report(toMarker(( localize(7516, "Each tool name in the 'tools' attribute must be a string.")), item.range, MarkerSeverity.Error));
530
522
  } else if (item.value) {
531
523
  if (!( available.has(item.value))) {
532
524
  const currentNames = deprecatedNames.get(item.value);
@@ -534,7 +526,7 @@ let PromptValidator = class PromptValidator {
534
526
  if (currentNames?.size === 1) {
535
527
  const newName = Array.from(currentNames)[0];
536
528
  report(toMarker(( localize(
537
- 7452,
529
+ 7517,
538
530
  "Tool or toolset '{0}' has been renamed, use '{1}' instead.",
539
531
  item.value,
540
532
  newName
@@ -542,14 +534,14 @@ let PromptValidator = class PromptValidator {
542
534
  } else {
543
535
  const newNames = Array.from(currentNames).sort((a, b) => a.localeCompare(b)).join(", ");
544
536
  report(toMarker(( localize(
545
- 7453,
537
+ 7518,
546
538
  "Tool or toolset '{0}' has been renamed, use the following tools instead: {1}",
547
539
  item.value,
548
540
  newNames
549
541
  )), item.range, MarkerSeverity.Info));
550
542
  }
551
543
  } else {
552
- report(toMarker(( localize(7454, "Unknown tool '{0}'.", item.value)), item.range, MarkerSeverity.Warning));
544
+ report(toMarker(( localize(7519, "Unknown tool '{0}'.", item.value)), item.range, MarkerSeverity.Warning));
553
545
  }
554
546
  }
555
547
  }
@@ -562,25 +554,25 @@ let PromptValidator = class PromptValidator {
562
554
  return;
563
555
  }
564
556
  if (attribute.value.type !== "scalar") {
565
- report(toMarker(( localize(7455, "The 'applyTo' attribute must be a string.")), attribute.value.range, MarkerSeverity.Error));
557
+ report(toMarker(( localize(7520, "The 'applyTo' attribute must be a string.")), attribute.value.range, MarkerSeverity.Error));
566
558
  return;
567
559
  }
568
560
  const pattern = attribute.value.value;
569
561
  try {
570
562
  const patterns = splitGlobAware(pattern, ",");
571
563
  if (patterns.length === 0) {
572
- report(toMarker(( localize(7456, "The 'applyTo' attribute must be a valid glob pattern.")), attribute.value.range, MarkerSeverity.Error));
564
+ report(toMarker(( localize(7521, "The 'applyTo' attribute must be a valid glob pattern.")), attribute.value.range, MarkerSeverity.Error));
573
565
  return;
574
566
  }
575
567
  for (const pattern of patterns) {
576
568
  const globPattern = parse(pattern);
577
569
  if (isEmptyPattern(globPattern)) {
578
- report(toMarker(( localize(7456, "The 'applyTo' attribute must be a valid glob pattern.")), attribute.value.range, MarkerSeverity.Error));
570
+ report(toMarker(( localize(7521, "The 'applyTo' attribute must be a valid glob pattern.")), attribute.value.range, MarkerSeverity.Error));
579
571
  return;
580
572
  }
581
573
  }
582
574
  } catch (_error) {
583
- report(toMarker(( localize(7456, "The 'applyTo' attribute must be a valid glob pattern.")), attribute.value.range, MarkerSeverity.Error));
575
+ report(toMarker(( localize(7521, "The 'applyTo' attribute must be a valid glob pattern.")), attribute.value.range, MarkerSeverity.Error));
584
576
  }
585
577
  }
586
578
  validatePaths(attributes, report) {
@@ -589,26 +581,26 @@ let PromptValidator = class PromptValidator {
589
581
  return;
590
582
  }
591
583
  if (attribute.value.type !== "sequence") {
592
- report(toMarker(( localize(7457, "The 'paths' attribute must be an array of glob patterns.")), attribute.value.range, MarkerSeverity.Error));
584
+ report(toMarker(( localize(7522, "The 'paths' attribute must be an array of glob patterns.")), attribute.value.range, MarkerSeverity.Error));
593
585
  return;
594
586
  }
595
587
  for (const item of attribute.value.items) {
596
588
  if (item.type !== "scalar") {
597
- report(toMarker(( localize(7458, "Each entry in the 'paths' attribute must be a string.")), item.range, MarkerSeverity.Error));
589
+ report(toMarker(( localize(7523, "Each entry in the 'paths' attribute must be a string.")), item.range, MarkerSeverity.Error));
598
590
  continue;
599
591
  }
600
592
  const pattern = item.value.trim();
601
593
  if (pattern.length === 0) {
602
- report(toMarker(( localize(7459, "Path entries must be non-empty glob patterns.")), item.range, MarkerSeverity.Error));
594
+ report(toMarker(( localize(7524, "Path entries must be non-empty glob patterns.")), item.range, MarkerSeverity.Error));
603
595
  continue;
604
596
  }
605
597
  try {
606
598
  const globPattern = parse(pattern);
607
599
  if (isEmptyPattern(globPattern)) {
608
- report(toMarker(( localize(7460, "'{0}' is not a valid glob pattern.", pattern)), item.range, MarkerSeverity.Error));
600
+ report(toMarker(( localize(7525, "'{0}' is not a valid glob pattern.", pattern)), item.range, MarkerSeverity.Error));
609
601
  }
610
602
  } catch (_error) {
611
- report(toMarker(( localize(7460, "'{0}' is not a valid glob pattern.", pattern)), item.range, MarkerSeverity.Error));
603
+ report(toMarker(( localize(7525, "'{0}' is not a valid glob pattern.", pattern)), item.range, MarkerSeverity.Error));
612
604
  }
613
605
  }
614
606
  }
@@ -618,7 +610,7 @@ let PromptValidator = class PromptValidator {
618
610
  return;
619
611
  }
620
612
  if (attribute.value.type !== "sequence" && attribute.value.type !== "scalar") {
621
- report(toMarker(( localize(7461, "The 'excludeAgent' attribute must be an string or array.")), attribute.value.range, MarkerSeverity.Error));
613
+ report(toMarker(( localize(7526, "The 'excludeAgent' attribute must be an string or array.")), attribute.value.range, MarkerSeverity.Error));
622
614
  return;
623
615
  }
624
616
  }
@@ -629,7 +621,7 @@ let PromptValidator = class PromptValidator {
629
621
  }
630
622
  if (attribute.value.type !== "map") {
631
623
  report(toMarker(( localize(
632
- 7462,
624
+ 7527,
633
625
  "The 'hooks' attribute must be a map of hook event types to command arrays."
634
626
  )), attribute.value.range, MarkerSeverity.Error));
635
627
  return;
@@ -638,7 +630,7 @@ let PromptValidator = class PromptValidator {
638
630
  for (const prop of attribute.value.properties) {
639
631
  if (!( validHookNames.has(prop.key.value))) {
640
632
  report(toMarker(( localize(
641
- 7463,
633
+ 7528,
642
634
  "Unknown hook event type '{0}'. Supported: {1}.",
643
635
  prop.key.value,
644
636
  Array.from(validHookNames).join(", ")
@@ -646,7 +638,7 @@ let PromptValidator = class PromptValidator {
646
638
  }
647
639
  if (prop.value.type !== "sequence") {
648
640
  report(toMarker(( localize(
649
- 7464,
641
+ 7529,
650
642
  "Hook event '{0}' must have an array of command objects as its value.",
651
643
  prop.key.value
652
644
  )), prop.value.range, MarkerSeverity.Error));
@@ -659,19 +651,19 @@ let PromptValidator = class PromptValidator {
659
651
  }
660
652
  validateHookCommand(item, target, report) {
661
653
  if (item.type !== "map") {
662
- report(toMarker(( localize(7465, "Each hook command must be an object.")), item.range, MarkerSeverity.Error));
654
+ report(toMarker(( localize(7530, "Each hook command must be an object.")), item.range, MarkerSeverity.Error));
663
655
  return;
664
656
  }
665
657
  const hooksProperty = item.properties.find(p => p.key.value === "hooks");
666
658
  if (hooksProperty) {
667
659
  for (const prop of item.properties) {
668
660
  if (prop.key.value !== "hooks" && prop.key.value !== "matcher") {
669
- report(toMarker(( localize(7466, "Unknown property '{0}' in hook matcher.", prop.key.value)), prop.key.range, MarkerSeverity.Warning));
661
+ report(toMarker(( localize(7531, "Unknown property '{0}' in hook matcher.", prop.key.value)), prop.key.range, MarkerSeverity.Warning));
670
662
  }
671
663
  }
672
664
  if (hooksProperty.value.type !== "sequence") {
673
665
  report(toMarker(( localize(
674
- 7467,
666
+ 7532,
675
667
  "The 'hooks' property in a matcher must be an array of command objects."
676
668
  )), hooksProperty.value.range, MarkerSeverity.Error));
677
669
  return;
@@ -700,37 +692,37 @@ let PromptValidator = class PromptValidator {
700
692
  for (const prop of item.properties) {
701
693
  const key = prop.key.value;
702
694
  if (!( validProperties.has(key))) {
703
- report(toMarker(( localize(7468, "Unknown property '{0}' in hook command.", key)), prop.key.range, MarkerSeverity.Warning));
695
+ report(toMarker(( localize(7533, "Unknown property '{0}' in hook command.", key)), prop.key.range, MarkerSeverity.Warning));
704
696
  }
705
697
  if (key === "type") {
706
698
  hasType = true;
707
699
  if (prop.value.type !== "scalar" || prop.value.value !== "command") {
708
- report(toMarker(( localize(7469, "The 'type' property in a hook command must be 'command'.")), prop.value.range, MarkerSeverity.Error));
700
+ report(toMarker(( localize(7534, "The 'type' property in a hook command must be 'command'.")), prop.value.range, MarkerSeverity.Error));
709
701
  }
710
702
  } else if (( validCommandFields.has(key))) {
711
703
  hasCommandField = true;
712
704
  if (prop.value.type !== "scalar" || prop.value.value.trim().length === 0) {
713
705
  report(toMarker(( localize(
714
- 7470,
706
+ 7535,
715
707
  "The '{0}' property in a hook command must be a non-empty string.",
716
708
  key
717
709
  )), prop.value.range, MarkerSeverity.Error));
718
710
  }
719
711
  } else if (key === "cwd") {
720
712
  if (prop.value.type !== "scalar") {
721
- report(toMarker(( localize(7471, "The 'cwd' property in a hook command must be a string.")), prop.value.range, MarkerSeverity.Error));
713
+ report(toMarker(( localize(7536, "The 'cwd' property in a hook command must be a string.")), prop.value.range, MarkerSeverity.Error));
722
714
  }
723
715
  } else if (key === "env") {
724
716
  if (prop.value.type !== "map") {
725
717
  report(toMarker(( localize(
726
- 7472,
718
+ 7537,
727
719
  "The 'env' property in a hook command must be a map of string values."
728
720
  )), prop.value.range, MarkerSeverity.Error));
729
721
  } else {
730
722
  for (const envProp of prop.value.properties) {
731
723
  if (envProp.value.type !== "scalar") {
732
724
  report(toMarker(( localize(
733
- 7473,
725
+ 7538,
734
726
  "Environment variable '{0}' must have a string value.",
735
727
  envProp.key.value
736
728
  )), envProp.value.range, MarkerSeverity.Error));
@@ -739,19 +731,19 @@ let PromptValidator = class PromptValidator {
739
731
  }
740
732
  } else if (key === "timeout" || key === "timeoutSec") {
741
733
  if (prop.value.type !== "scalar" || isNaN(Number(prop.value.value))) {
742
- report(toMarker(( localize(7474, "The '{0}' property in a hook command must be a number.", key)), prop.value.range, MarkerSeverity.Error));
734
+ report(toMarker(( localize(7539, "The '{0}' property in a hook command must be a number.", key)), prop.value.range, MarkerSeverity.Error));
743
735
  }
744
736
  }
745
737
  }
746
738
  if (!hasType) {
747
- report(toMarker(( localize(7475, "Hook command is missing required property 'type'.")), item.range, MarkerSeverity.Error));
739
+ report(toMarker(( localize(7540, "Hook command is missing required property 'type'.")), item.range, MarkerSeverity.Error));
748
740
  }
749
741
  if (!hasCommandField) {
750
742
  if (isCopilotCli) {
751
- report(toMarker(( localize(7476, "Hook command must specify at least one of 'bash' or 'powershell'.")), item.range, MarkerSeverity.Error));
743
+ report(toMarker(( localize(7541, "Hook command must specify at least one of 'bash' or 'powershell'.")), item.range, MarkerSeverity.Error));
752
744
  } else {
753
745
  report(toMarker(( localize(
754
- 7477,
746
+ 7542,
755
747
  "Hook command must specify at least one of 'command', 'windows', 'linux', or 'osx'."
756
748
  )), item.range, MarkerSeverity.Error));
757
749
  }
@@ -763,14 +755,14 @@ let PromptValidator = class PromptValidator {
763
755
  return;
764
756
  }
765
757
  if (attribute.value.type !== "sequence") {
766
- report(toMarker(( localize(7478, "The 'handoffs' attribute must be an array.")), attribute.value.range, MarkerSeverity.Error));
758
+ report(toMarker(( localize(7543, "The 'handoffs' attribute must be an array.")), attribute.value.range, MarkerSeverity.Error));
767
759
  return;
768
760
  }
769
761
  const seenLabels = ( new Map());
770
762
  for (const item of attribute.value.items) {
771
763
  if (item.type !== "map") {
772
764
  report(toMarker(( localize(
773
- 7479,
765
+ 7544,
774
766
  "Each handoff in the 'handoffs' attribute must be an object with 'label', 'agent', 'prompt' and optional 'send'."
775
767
  )), item.range, MarkerSeverity.Error));
776
768
  continue;
@@ -780,44 +772,44 @@ let PromptValidator = class PromptValidator {
780
772
  switch (prop.key.value) {
781
773
  case "label":
782
774
  if (prop.value.type !== "scalar" || prop.value.value.trim().length === 0) {
783
- report(toMarker(( localize(7480, "The 'label' property in a handoff must be a non-empty string.")), prop.value.range, MarkerSeverity.Error));
775
+ report(toMarker(( localize(7545, "The 'label' property in a handoff must be a non-empty string.")), prop.value.range, MarkerSeverity.Error));
784
776
  } else if (!/[a-zA-Z0-9]/.test(prop.value.value)) {
785
777
  report(toMarker(( localize(
786
- 7481,
778
+ 7546,
787
779
  "The 'label' property in a handoff must contain at least one alphanumeric character."
788
780
  )), prop.value.range, MarkerSeverity.Error));
789
781
  }
790
782
  break;
791
783
  case "agent":
792
784
  if (prop.value.type !== "scalar" || prop.value.value.trim().length === 0) {
793
- report(toMarker(( localize(7482, "The 'agent' property in a handoff must be a non-empty string.")), prop.value.range, MarkerSeverity.Error));
785
+ report(toMarker(( localize(7547, "The 'agent' property in a handoff must be a non-empty string.")), prop.value.range, MarkerSeverity.Error));
794
786
  } else {
795
787
  this.validateAgentValue(prop.value, report);
796
788
  }
797
789
  break;
798
790
  case "prompt":
799
791
  if (prop.value.type !== "scalar") {
800
- report(toMarker(( localize(7483, "The 'prompt' property in a handoff must be a string.")), prop.value.range, MarkerSeverity.Error));
792
+ report(toMarker(( localize(7548, "The 'prompt' property in a handoff must be a string.")), prop.value.range, MarkerSeverity.Error));
801
793
  }
802
794
  break;
803
795
  case "send":
804
796
  if (!isTrueOrFalse(prop.value)) {
805
- report(toMarker(( localize(7484, "The 'send' property in a handoff must be a boolean.")), prop.value.range, MarkerSeverity.Error));
797
+ report(toMarker(( localize(7549, "The 'send' property in a handoff must be a boolean.")), prop.value.range, MarkerSeverity.Error));
806
798
  }
807
799
  break;
808
800
  case "showContinueOn":
809
801
  if (!isTrueOrFalse(prop.value)) {
810
- report(toMarker(( localize(7485, "The 'showContinueOn' property in a handoff must be a boolean.")), prop.value.range, MarkerSeverity.Error));
802
+ report(toMarker(( localize(7550, "The 'showContinueOn' property in a handoff must be a boolean.")), prop.value.range, MarkerSeverity.Error));
811
803
  }
812
804
  break;
813
805
  case "model":
814
806
  if (prop.value.type !== "scalar") {
815
- report(toMarker(( localize(7486, "The 'model' property in a handoff must be a string.")), prop.value.range, MarkerSeverity.Error));
807
+ report(toMarker(( localize(7551, "The 'model' property in a handoff must be a string.")), prop.value.range, MarkerSeverity.Error));
816
808
  }
817
809
  break;
818
810
  default:
819
811
  report(toMarker(( localize(
820
- 7487,
812
+ 7552,
821
813
  "Unknown property '{0}' in handoff object. Supported properties are 'label', 'agent', 'prompt' and optional 'send', 'showContinueOn', 'model'.",
822
814
  prop.key.value
823
815
  )), prop.value.range, MarkerSeverity.Warning));
@@ -826,7 +818,7 @@ let PromptValidator = class PromptValidator {
826
818
  }
827
819
  if (required.size > 0) {
828
820
  report(toMarker(( localize(
829
- 7488,
821
+ 7553,
830
822
  "Missing required properties {0} in handoff object.",
831
823
  ( Array.from(required).map(s => `'${s}'`)).join(", ")
832
824
  )), item.range, MarkerSeverity.Error));
@@ -836,7 +828,7 @@ let PromptValidator = class PromptValidator {
836
828
  const normalizedLabel = labelProp.value.value.toLowerCase();
837
829
  if (normalizedLabel && ( seenLabels.has(normalizedLabel))) {
838
830
  report(toMarker(( localize(
839
- 7489,
831
+ 7554,
840
832
  "Duplicate handoff label '{0}'. Each handoff must have a unique label.",
841
833
  labelProp.value.value
842
834
  )), labelProp.value.range, MarkerSeverity.Error));
@@ -852,7 +844,7 @@ let PromptValidator = class PromptValidator {
852
844
  return;
853
845
  }
854
846
  report(toMarker(( localize(
855
- 7490,
847
+ 7555,
856
848
  "The 'infer' attribute is deprecated in favour of 'user-invocable' and 'disable-model-invocation'."
857
849
  )), attribute.value.range, MarkerSeverity.Error));
858
850
  }
@@ -862,18 +854,18 @@ let PromptValidator = class PromptValidator {
862
854
  return;
863
855
  }
864
856
  if (attribute.value.type !== "scalar") {
865
- report(toMarker(( localize(7491, "The 'target' attribute must be a string.")), attribute.value.range, MarkerSeverity.Error));
857
+ report(toMarker(( localize(7556, "The 'target' attribute must be a string.")), attribute.value.range, MarkerSeverity.Error));
866
858
  return;
867
859
  }
868
860
  const targetValue = attribute.value.value.trim();
869
861
  if (targetValue.length === 0) {
870
- report(toMarker(( localize(7492, "The 'target' attribute must be a non-empty string.")), attribute.value.range, MarkerSeverity.Error));
862
+ report(toMarker(( localize(7557, "The 'target' attribute must be a non-empty string.")), attribute.value.range, MarkerSeverity.Error));
871
863
  return;
872
864
  }
873
865
  const validTargets = ["github-copilot", "vscode"];
874
866
  if (!validTargets.includes(targetValue)) {
875
867
  report(toMarker(( localize(
876
- 7493,
868
+ 7558,
877
869
  "The 'target' attribute must be one of: {0}.",
878
870
  validTargets.join(", ")
879
871
  )), attribute.value.range, MarkerSeverity.Error));
@@ -885,19 +877,9 @@ let PromptValidator = class PromptValidator {
885
877
  return;
886
878
  }
887
879
  if (!isTrueOrFalse(attribute.value)) {
888
- report(toMarker(( localize(7494, "The 'user-invocable' attribute must be 'true' or 'false'.")), attribute.value.range, MarkerSeverity.Error));
889
- return;
890
- }
891
- }
892
- validateUserInvokable(attributes, report) {
893
- const attribute = attributes.find(attr => attr.key === PromptHeaderAttributes.userInvokable);
894
- if (!attribute) {
880
+ report(toMarker(( localize(7559, "The 'user-invocable' attribute must be 'true' or 'false'.")), attribute.value.range, MarkerSeverity.Error));
895
881
  return;
896
882
  }
897
- report(toMarker(( localize(
898
- 7495,
899
- "The 'user-invokable' attribute is deprecated. Use 'user-invocable' instead."
900
- )), attribute.range, MarkerSeverity.Warning));
901
883
  }
902
884
  validateDisableModelInvocation(attributes, report) {
903
885
  const attribute = attributes.find(attr => attr.key === PromptHeaderAttributes.disableModelInvocation);
@@ -906,11 +888,19 @@ let PromptValidator = class PromptValidator {
906
888
  }
907
889
  if (!isTrueOrFalse(attribute.value)) {
908
890
  report(toMarker(( localize(
909
- 7496,
891
+ 7560,
910
892
  "The 'disable-model-invocation' attribute must be 'true' or 'false'."
911
893
  )), attribute.value.range, MarkerSeverity.Error));
912
894
  return;
913
895
  }
896
+ if (attribute.value.type === "scalar" && attribute.value.value === "false") {
897
+ if (!this.isCustomAgentInSubagentEnabled()) {
898
+ report(toMarker(( localize(
899
+ 7561,
900
+ "For agents to be used as subagent you also need to enable the 'chat.customAgentInSubagent.enabled' setting."
901
+ )), attribute.value.range, MarkerSeverity.Warning));
902
+ }
903
+ }
914
904
  }
915
905
  async validateAgentsAttribute(attributes, header, report) {
916
906
  const attribute = attributes.find(attr => attr.key === PromptHeaderAttributes.agents);
@@ -918,21 +908,27 @@ let PromptValidator = class PromptValidator {
918
908
  return;
919
909
  }
920
910
  if (attribute.value.type !== "sequence") {
921
- report(toMarker(( localize(7497, "The 'agents' attribute must be an array.")), attribute.value.range, MarkerSeverity.Error));
911
+ report(toMarker(( localize(7562, "The 'agents' attribute must be an array.")), attribute.value.range, MarkerSeverity.Error));
922
912
  return;
923
913
  }
914
+ if (!this.isCustomAgentInSubagentEnabled()) {
915
+ report(toMarker(( localize(
916
+ 7563,
917
+ "For agents to be used as subagent you also need to enable the 'chat.customAgentInSubagent.enabled' setting."
918
+ )), attribute.range, MarkerSeverity.Warning));
919
+ }
924
920
  const agents = await this.promptsService.getCustomAgents(CancellationToken.None);
925
921
  const availableAgentNames = ( new Set(( agents.map(agent => agent.name))));
926
922
  availableAgentNames.add(ChatMode.Agent.name.get());
927
923
  const agentNames = [];
928
924
  for (const item of attribute.value.items) {
929
925
  if (item.type !== "scalar") {
930
- report(toMarker(( localize(7498, "Each agent name in the 'agents' attribute must be a string.")), item.range, MarkerSeverity.Error));
926
+ report(toMarker(( localize(7564, "Each agent name in the 'agents' attribute must be a string.")), item.range, MarkerSeverity.Error));
931
927
  } else if (item.value) {
932
928
  agentNames.push(item.value);
933
929
  if (item.value !== "*" && !( availableAgentNames.has(item.value))) {
934
930
  report(toMarker(( localize(
935
- 7499,
931
+ 7565,
936
932
  "Unknown agent '{0}'. Available agents: {1}.",
937
933
  item.value,
938
934
  Array.from(availableAgentNames).join(", ")
@@ -944,32 +940,35 @@ let PromptValidator = class PromptValidator {
944
940
  const tools = header.tools;
945
941
  if (tools && !tools.includes(SpecedToolAliases.agent)) {
946
942
  report(toMarker(( localize(
947
- 7500,
943
+ 7566,
948
944
  "When 'agents' and 'tools' are specified, the 'agent' tool must be included in the 'tools' attribute."
949
945
  )), attribute.value.range, MarkerSeverity.Warning));
950
946
  }
951
947
  }
952
948
  }
949
+ isCustomAgentInSubagentEnabled() {
950
+ return !!this.configurationService.getValue(ChatConfiguration.SubagentToolCustomAgents);
951
+ }
953
952
  validateGithubPermissions(attributes, report) {
954
953
  const attribute = attributes.find(attr => attr.key === GithubPromptHeaderAttributes.github);
955
954
  if (!attribute) {
956
955
  return;
957
956
  }
958
957
  if (attribute.value.type !== "map") {
959
- report(toMarker(( localize(7501, "The 'github' attribute must be an object.")), attribute.value.range, MarkerSeverity.Error));
958
+ report(toMarker(( localize(7567, "The 'github' attribute must be an object.")), attribute.value.range, MarkerSeverity.Error));
960
959
  return;
961
960
  }
962
961
  for (const prop of attribute.value.properties) {
963
962
  if (prop.key.value !== "permissions") {
964
963
  report(toMarker(( localize(
965
- 7502,
964
+ 7568,
966
965
  "Unknown property '{0}' in 'github' object. Supported: 'permissions'.",
967
966
  prop.key.value
968
967
  )), prop.key.range, MarkerSeverity.Warning));
969
968
  continue;
970
969
  }
971
970
  if (prop.value.type !== "map") {
972
- report(toMarker(( localize(7503, "The 'permissions' property must be an object.")), prop.value.range, MarkerSeverity.Error));
971
+ report(toMarker(( localize(7569, "The 'permissions' property must be an object.")), prop.value.range, MarkerSeverity.Error));
973
972
  continue;
974
973
  }
975
974
  for (const permProp of prop.value.properties) {
@@ -978,7 +977,7 @@ let PromptValidator = class PromptValidator {
978
977
  if (!scopeInfo) {
979
978
  const validScopes = ( Object.keys(githubPermissionScopes)).sort().join(", ");
980
979
  report(toMarker(( localize(
981
- 7504,
980
+ 7570,
982
981
  "Unknown permission scope '{0}'. Valid scopes: {1}.",
983
982
  scope,
984
983
  validScopes
@@ -986,13 +985,13 @@ let PromptValidator = class PromptValidator {
986
985
  continue;
987
986
  }
988
987
  if (permProp.value.type !== "scalar") {
989
- report(toMarker(( localize(7505, "The permission value for '{0}' must be a string.", scope)), permProp.value.range, MarkerSeverity.Error));
988
+ report(toMarker(( localize(7571, "The permission value for '{0}' must be a string.", scope)), permProp.value.range, MarkerSeverity.Error));
990
989
  continue;
991
990
  }
992
991
  const value = permProp.value.value;
993
992
  if (!scopeInfo.allowedValues.includes(value)) {
994
993
  report(toMarker(( localize(
995
- 7506,
994
+ 7572,
996
995
  "Invalid permission value '{0}' for scope '{1}'. Allowed values: {2}.",
997
996
  value,
998
997
  scope,
@@ -1007,39 +1006,39 @@ PromptValidator = ( __decorate([( __param(0, ILanguageModelsService)), ( __param
1007
1006
  const githubPermissionScopes = {
1008
1007
  "actions": {
1009
1008
  allowedValues: ["read", "write", "none"],
1010
- description: ( localize(7507, "Access to GitHub Actions workflows and runs"))
1009
+ description: ( localize(7573, "Access to GitHub Actions workflows and runs"))
1011
1010
  },
1012
1011
  "checks": {
1013
1012
  allowedValues: ["read", "none"],
1014
- description: ( localize(7508, "Access to check runs and statuses"))
1013
+ description: ( localize(7574, "Access to check runs and statuses"))
1015
1014
  },
1016
1015
  "contents": {
1017
1016
  allowedValues: ["read", "write", "none"],
1018
- description: ( localize(7509, "Access to repository contents (files, commits, branches)"))
1017
+ description: ( localize(7575, "Access to repository contents (files, commits, branches)"))
1019
1018
  },
1020
1019
  "discussions": {
1021
1020
  allowedValues: ["read", "write", "none"],
1022
- description: ( localize(7510, "Access to discussions"))
1021
+ description: ( localize(7576, "Access to discussions"))
1023
1022
  },
1024
1023
  "issues": {
1025
1024
  allowedValues: ["read", "write", "none"],
1026
- description: ( localize(7511, "Access to issues (read, create, update, comment)"))
1025
+ description: ( localize(7577, "Access to issues (read, create, update, comment)"))
1027
1026
  },
1028
1027
  "metadata": {
1029
1028
  allowedValues: ["read"],
1030
- description: ( localize(7512, "Repository metadata (always read-only)"))
1029
+ description: ( localize(7578, "Repository metadata (always read-only)"))
1031
1030
  },
1032
1031
  "pull-requests": {
1033
1032
  allowedValues: ["read", "write", "none"],
1034
- description: ( localize(7513, "Access to pull requests (read, create, update, review)"))
1033
+ description: ( localize(7579, "Access to pull requests (read, create, update, review)"))
1035
1034
  },
1036
1035
  "security-events": {
1037
1036
  allowedValues: ["read", "none"],
1038
- description: ( localize(7514, "Access to security-related events"))
1037
+ description: ( localize(7580, "Access to security-related events"))
1039
1038
  },
1040
1039
  "workflows": {
1041
1040
  allowedValues: ["write", "none"],
1042
- description: ( localize(7515, "Access to modify workflow files"))
1041
+ description: ( localize(7581, "Access to modify workflow files"))
1043
1042
  }
1044
1043
  };
1045
1044
  function isTrueOrFalse(value) {
@@ -1077,7 +1076,6 @@ const allAttributeNames = {
1077
1076
  PromptHeaderAttributes.agents,
1078
1077
  PromptHeaderAttributes.hooks,
1079
1078
  PromptHeaderAttributes.userInvocable,
1080
- PromptHeaderAttributes.userInvokable,
1081
1079
  PromptHeaderAttributes.disableModelInvocation,
1082
1080
  GithubPromptHeaderAttributes.github
1083
1081
  ],
@@ -1089,7 +1087,6 @@ const allAttributeNames = {
1089
1087
  PromptHeaderAttributes.metadata,
1090
1088
  PromptHeaderAttributes.argumentHint,
1091
1089
  PromptHeaderAttributes.userInvocable,
1092
- PromptHeaderAttributes.userInvokable,
1093
1090
  PromptHeaderAttributes.disableModelInvocation
1094
1091
  ],
1095
1092
  [PromptsType.hook]: []
@@ -1124,107 +1121,107 @@ function getValidAttributeNames(promptType, includeNonRecommended, target) {
1124
1121
  return includeNonRecommended ? allAttributeNames[promptType] : recommendedAttributeNames[promptType];
1125
1122
  }
1126
1123
  function isNonRecommendedAttribute(attributeName) {
1127
- return attributeName === PromptHeaderAttributes.advancedOptions || attributeName === PromptHeaderAttributes.excludeAgent || attributeName === PromptHeaderAttributes.mode || attributeName === PromptHeaderAttributes.infer || attributeName === PromptHeaderAttributes.userInvokable;
1124
+ return attributeName === PromptHeaderAttributes.advancedOptions || attributeName === PromptHeaderAttributes.excludeAgent || attributeName === PromptHeaderAttributes.mode || attributeName === PromptHeaderAttributes.infer;
1128
1125
  }
1129
1126
  const knownClaudeTools = [{
1130
1127
  name: "Bash",
1131
- description: ( localize(7516, "Execute shell commands")),
1128
+ description: ( localize(7582, "Execute shell commands")),
1132
1129
  toolEquivalent: [SpecedToolAliases.execute]
1133
1130
  }, {
1134
1131
  name: "Edit",
1135
- description: ( localize(7517, "Make targeted file edits")),
1132
+ description: ( localize(7583, "Make targeted file edits")),
1136
1133
  toolEquivalent: ["edit/editNotebook", "edit/editFiles"]
1137
1134
  }, {
1138
1135
  name: "Glob",
1139
- description: ( localize(7518, "Find files by pattern")),
1136
+ description: ( localize(7584, "Find files by pattern")),
1140
1137
  toolEquivalent: ["search/fileSearch"]
1141
1138
  }, {
1142
1139
  name: "Grep",
1143
- description: ( localize(7519, "Search file contents with regex")),
1140
+ description: ( localize(7585, "Search file contents with regex")),
1144
1141
  toolEquivalent: ["search/textSearch"]
1145
1142
  }, {
1146
1143
  name: "Read",
1147
- description: ( localize(7520, "Read file contents")),
1144
+ description: ( localize(7586, "Read file contents")),
1148
1145
  toolEquivalent: ["read/readFile", "read/getNotebookSummary"]
1149
1146
  }, {
1150
1147
  name: "Write",
1151
- description: ( localize(7521, "Create/overwrite files")),
1148
+ description: ( localize(7587, "Create/overwrite files")),
1152
1149
  toolEquivalent: ["edit/createDirectory", "edit/createFile", "edit/createJupyterNotebook"]
1153
1150
  }, {
1154
1151
  name: "WebFetch",
1155
- description: ( localize(7522, "Fetch URL content")),
1152
+ description: ( localize(7588, "Fetch URL content")),
1156
1153
  toolEquivalent: [SpecedToolAliases.web]
1157
1154
  }, {
1158
1155
  name: "WebSearch",
1159
- description: ( localize(7523, "Perform web searches")),
1156
+ description: ( localize(7589, "Perform web searches")),
1160
1157
  toolEquivalent: [SpecedToolAliases.web]
1161
1158
  }, {
1162
1159
  name: "Task",
1163
- description: ( localize(7524, "Run subagents for complex tasks")),
1160
+ description: ( localize(7590, "Run subagents for complex tasks")),
1164
1161
  toolEquivalent: [SpecedToolAliases.agent]
1165
1162
  }, {
1166
1163
  name: "Skill",
1167
- description: ( localize(7525, "Execute skills")),
1164
+ description: ( localize(7591, "Execute skills")),
1168
1165
  toolEquivalent: []
1169
1166
  }, {
1170
1167
  name: "LSP",
1171
- description: ( localize(7526, "Code intelligence (requires plugin)")),
1168
+ description: ( localize(7592, "Code intelligence (requires plugin)")),
1172
1169
  toolEquivalent: []
1173
1170
  }, {
1174
1171
  name: "NotebookEdit",
1175
- description: ( localize(7527, "Modify Jupyter notebooks")),
1172
+ description: ( localize(7593, "Modify Jupyter notebooks")),
1176
1173
  toolEquivalent: ["edit/editNotebook"]
1177
1174
  }, {
1178
1175
  name: "AskUserQuestion",
1179
- description: ( localize(7528, "Ask multiple-choice questions")),
1176
+ description: ( localize(7594, "Ask multiple-choice questions")),
1180
1177
  toolEquivalent: ["vscode/askQuestions"]
1181
1178
  }, {
1182
1179
  name: "MCPSearch",
1183
- description: ( localize(7529, "Searches for MCP tools when tool search is enabled")),
1180
+ description: ( localize(7595, "Searches for MCP tools when tool search is enabled")),
1184
1181
  toolEquivalent: []
1185
1182
  }];
1186
1183
  const knownClaudeModels = [{
1187
1184
  name: "sonnet",
1188
- description: ( localize(7530, "Latest Claude Sonnet")),
1185
+ description: ( localize(7596, "Latest Claude Sonnet")),
1189
1186
  modelEquivalent: "Claude Sonnet 4.5 (copilot)"
1190
1187
  }, {
1191
1188
  name: "opus",
1192
- description: ( localize(7531, "Latest Claude Opus")),
1189
+ description: ( localize(7597, "Latest Claude Opus")),
1193
1190
  modelEquivalent: "Claude Opus 4.6 (copilot)"
1194
1191
  }, {
1195
1192
  name: "haiku",
1196
- description: ( localize(7532, "Latest Claude Haiku, fast for simple tasks")),
1193
+ description: ( localize(7598, "Latest Claude Haiku, fast for simple tasks")),
1197
1194
  modelEquivalent: "Claude Haiku 4.5 (copilot)"
1198
1195
  }, {
1199
1196
  name: "inherit",
1200
- description: ( localize(7533, "Inherit model from parent agent or prompt")),
1197
+ description: ( localize(7599, "Inherit model from parent agent or prompt")),
1201
1198
  modelEquivalent: undefined
1202
1199
  }];
1203
1200
  const claudeAgentAttributes = {
1204
1201
  "name": {
1205
1202
  type: "scalar",
1206
- description: ( localize(7534, "Unique identifier using lowercase letters and hyphens (required)"))
1203
+ description: ( localize(7600, "Unique identifier using lowercase letters and hyphens (required)"))
1207
1204
  },
1208
1205
  "description": {
1209
1206
  type: "scalar",
1210
- description: ( localize(7535, "When to delegate to this subagent (required)"))
1207
+ description: ( localize(7601, "When to delegate to this subagent (required)"))
1211
1208
  },
1212
1209
  "tools": {
1213
1210
  type: "sequence",
1214
- description: ( localize(7536, "Array of tools the subagent can use. Inherits all tools if omitted")),
1211
+ description: ( localize(7602, "Array of tools the subagent can use. Inherits all tools if omitted")),
1215
1212
  defaults: ["Read, Edit, Bash"],
1216
1213
  items: knownClaudeTools
1217
1214
  },
1218
1215
  "disallowedTools": {
1219
1216
  type: "sequence",
1220
- description: ( localize(7537, "Tools to deny, removed from inherited or specified list")),
1217
+ description: ( localize(7603, "Tools to deny, removed from inherited or specified list")),
1221
1218
  defaults: ["Write, Edit, Bash"],
1222
1219
  items: knownClaudeTools
1223
1220
  },
1224
1221
  "model": {
1225
1222
  type: "scalar",
1226
1223
  description: ( localize(
1227
- 7538,
1224
+ 7604,
1228
1225
  "Model to use: sonnet, opus, haiku, or inherit. Defaults to inherit."
1229
1226
  )),
1230
1227
  defaults: ["sonnet", "opus", "haiku", "inherit"],
@@ -1233,77 +1230,77 @@ const claudeAgentAttributes = {
1233
1230
  "permissionMode": {
1234
1231
  type: "scalar",
1235
1232
  description: ( localize(
1236
- 7539,
1233
+ 7605,
1237
1234
  "Permission mode: default, acceptEdits, dontAsk, bypassPermissions, or plan."
1238
1235
  )),
1239
1236
  defaults: ["default", "acceptEdits", "dontAsk", "bypassPermissions", "plan"],
1240
1237
  enums: [{
1241
1238
  name: "default",
1242
1239
  description: ( localize(
1243
- 7540,
1240
+ 7606,
1244
1241
  "Standard behavior: prompts for permission on first use of each tool."
1245
1242
  ))
1246
1243
  }, {
1247
1244
  name: "acceptEdits",
1248
- description: ( localize(7541, "Automatically accepts file edit permissions for the session."))
1245
+ description: ( localize(7607, "Automatically accepts file edit permissions for the session."))
1249
1246
  }, {
1250
1247
  name: "plan",
1251
1248
  description: ( localize(
1252
- 7542,
1249
+ 7608,
1253
1250
  "Plan Mode: Claude can analyze but not modify files or execute commands."
1254
1251
  ))
1255
1252
  }, {
1256
1253
  name: "delegate",
1257
1254
  description: ( localize(
1258
- 7543,
1255
+ 7609,
1259
1256
  "Coordination-only mode for agent team leads. Only available when an agent team is active."
1260
1257
  ))
1261
1258
  }, {
1262
1259
  name: "dontAsk",
1263
1260
  description: ( localize(
1264
- 7544,
1261
+ 7610,
1265
1262
  "Auto-denies tools unless pre-approved via /permissions or permissions.allow rules."
1266
1263
  ))
1267
1264
  }, {
1268
1265
  name: "bypassPermissions",
1269
1266
  description: ( localize(
1270
- 7545,
1267
+ 7611,
1271
1268
  "Skips all permission prompts (requires safe environment like containers)."
1272
1269
  ))
1273
1270
  }]
1274
1271
  },
1275
1272
  "skills": {
1276
1273
  type: "sequence",
1277
- description: ( localize(7546, "Skills to load into the subagent's context at startup."))
1274
+ description: ( localize(7612, "Skills to load into the subagent's context at startup."))
1278
1275
  },
1279
1276
  "mcpServers": {
1280
1277
  type: "sequence",
1281
- description: ( localize(7547, "MCP servers available to this subagent."))
1278
+ description: ( localize(7613, "MCP servers available to this subagent."))
1282
1279
  },
1283
1280
  "hooks": {
1284
1281
  type: "object",
1285
- description: ( localize(7548, "Lifecycle hooks scoped to this subagent."))
1282
+ description: ( localize(7614, "Lifecycle hooks scoped to this subagent."))
1286
1283
  },
1287
1284
  "memory": {
1288
1285
  type: "scalar",
1289
1286
  description: ( localize(
1290
- 7549,
1287
+ 7615,
1291
1288
  "Persistent memory scope: user, project, or local. Enables cross-session learning."
1292
1289
  )),
1293
1290
  defaults: ["user", "project", "local"],
1294
1291
  enums: [{
1295
1292
  name: "user",
1296
- description: ( localize(7550, "Remember learnings across all projects."))
1293
+ description: ( localize(7616, "Remember learnings across all projects."))
1297
1294
  }, {
1298
1295
  name: "project",
1299
1296
  description: ( localize(
1300
- 7551,
1297
+ 7617,
1301
1298
  "The subagent's knowledge is project-specific and shareable via version control."
1302
1299
  ))
1303
1300
  }, {
1304
1301
  name: "local",
1305
1302
  description: ( localize(
1306
- 7552,
1303
+ 7618,
1307
1304
  "The subagent's knowledge is project-specific but should not be checked into version control."
1308
1305
  ))
1309
1306
  }]
@@ -1313,14 +1310,14 @@ const claudeRulesAttributes = {
1313
1310
  "description": {
1314
1311
  type: "scalar",
1315
1312
  description: ( localize(
1316
- 7553,
1313
+ 7619,
1317
1314
  "A description of what this rule covers, used to provide context about when it applies."
1318
1315
  ))
1319
1316
  },
1320
1317
  "paths": {
1321
1318
  type: "sequence",
1322
1319
  description: ( localize(
1323
- 7554,
1320
+ 7620,
1324
1321
  "Array of glob patterns that describe for which files the rule applies. Based on these patterns, the file is automatically included in the prompt when the context contains a file that matches.\nExample: `['src/**/*.ts', 'test/**']`"
1325
1322
  ))
1326
1323
  }
@@ -1356,99 +1353,5 @@ function toMarker(message, range, severity = MarkerSeverity.Error) {
1356
1353
  ...range
1357
1354
  };
1358
1355
  }
1359
- let PromptValidatorContribution = class PromptValidatorContribution extends Disposable {
1360
- constructor(
1361
- modelService,
1362
- instantiationService,
1363
- markerService,
1364
- promptsService,
1365
- languageModelsService,
1366
- languageModelToolsService,
1367
- chatModeService
1368
- ) {
1369
- super();
1370
- this.modelService = modelService;
1371
- this.markerService = markerService;
1372
- this.promptsService = promptsService;
1373
- this.languageModelsService = languageModelsService;
1374
- this.languageModelToolsService = languageModelToolsService;
1375
- this.chatModeService = chatModeService;
1376
- this.localDisposables = this._register(( new DisposableStore()));
1377
- this.validator = instantiationService.createInstance(PromptValidator);
1378
- this.updateRegistration();
1379
- }
1380
- updateRegistration() {
1381
- this.localDisposables.clear();
1382
- const trackers = ( new ResourceMap());
1383
- this.localDisposables.add(toDisposable(() => {
1384
- trackers.forEach(tracker => tracker.dispose());
1385
- trackers.clear();
1386
- }));
1387
- this.modelService.getModels().forEach(model => {
1388
- const promptType = getPromptsTypeForLanguageId(model.getLanguageId());
1389
- if (promptType) {
1390
- trackers.set(model.uri, ( new ModelTracker(model, promptType, this.validator, this.promptsService, this.markerService)));
1391
- }
1392
- });
1393
- this.localDisposables.add(this.modelService.onModelAdded(model => {
1394
- const promptType = getPromptsTypeForLanguageId(model.getLanguageId());
1395
- if (promptType && !( trackers.has(model.uri))) {
1396
- trackers.set(model.uri, ( new ModelTracker(model, promptType, this.validator, this.promptsService, this.markerService)));
1397
- }
1398
- }));
1399
- this.localDisposables.add(this.modelService.onModelRemoved(model => {
1400
- const tracker = trackers.get(model.uri);
1401
- if (tracker) {
1402
- tracker.dispose();
1403
- trackers.delete(model.uri);
1404
- }
1405
- }));
1406
- this.localDisposables.add(this.modelService.onModelLanguageChanged(event => {
1407
- const {
1408
- model
1409
- } = event;
1410
- const tracker = trackers.get(model.uri);
1411
- if (tracker) {
1412
- tracker.dispose();
1413
- trackers.delete(model.uri);
1414
- }
1415
- const promptType = getPromptsTypeForLanguageId(model.getLanguageId());
1416
- if (promptType) {
1417
- trackers.set(model.uri, ( new ModelTracker(model, promptType, this.validator, this.promptsService, this.markerService)));
1418
- }
1419
- }));
1420
- const validateAll = () => trackers.forEach(tracker => tracker.validate());
1421
- this.localDisposables.add(this.languageModelToolsService.onDidChangeTools(() => validateAll()));
1422
- this.localDisposables.add(this.chatModeService.onDidChangeChatModes(() => validateAll()));
1423
- this.localDisposables.add(this.languageModelsService.onDidChangeLanguageModels(() => validateAll()));
1424
- }
1425
- };
1426
- PromptValidatorContribution = ( __decorate([( __param(0, IModelService)), ( __param(1, IInstantiationService)), ( __param(2, IMarkerService)), ( __param(3, IPromptsService)), ( __param(4, ILanguageModelsService)), ( __param(5, ILanguageModelToolsService)), ( __param(6, IChatModeService))], PromptValidatorContribution));
1427
- let ModelTracker = class ModelTracker extends Disposable {
1428
- constructor(textModel, promptType, validator, promptsService, markerService) {
1429
- super();
1430
- this.textModel = textModel;
1431
- this.promptType = promptType;
1432
- this.validator = validator;
1433
- this.promptsService = promptsService;
1434
- this.markerService = markerService;
1435
- this.delayer = this._register(( new Delayer(200)));
1436
- this._register(textModel.onDidChangeContent(() => this.validate()));
1437
- this.validate();
1438
- }
1439
- validate() {
1440
- this.delayer.trigger(async () => {
1441
- const markers = [];
1442
- const ast = this.promptsService.getParsedPromptFile(this.textModel);
1443
- await this.validator.validate(ast, this.promptType, m => markers.push(m));
1444
- this.markerService.changeOne(MARKERS_OWNER_ID, this.textModel.uri, markers);
1445
- });
1446
- }
1447
- dispose() {
1448
- this.markerService.remove(MARKERS_OWNER_ID, [this.textModel.uri]);
1449
- super.dispose();
1450
- }
1451
- };
1452
- ModelTracker = ( __decorate([( __param(3, IPromptsService)), ( __param(4, IMarkerService))], ModelTracker));
1453
1356
 
1454
- export { MARKERS_OWNER_ID, PromptValidator, PromptValidatorContribution, claudeAgentAttributes, claudeRulesAttributes, getTarget, getValidAttributeNames, githubPermissionScopes, isNonRecommendedAttribute, isVSCodeOrDefaultTarget, knownClaudeModels, knownClaudeTools };
1357
+ export { MARKERS_OWNER_ID, PromptValidator, claudeAgentAttributes, claudeRulesAttributes, getTarget, getValidAttributeNames, githubPermissionScopes, isNonRecommendedAttribute, isVSCodeOrDefaultTarget, knownClaudeModels, knownClaudeTools };