@codingame/monaco-vscode-chat-service-override 16.1.0 → 17.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 (188) hide show
  1. package/index.js +6 -6
  2. package/package.json +30 -27
  3. package/vscode/src/vs/base/common/objectCache.d.ts +1 -1
  4. package/vscode/src/vs/base/common/objectCache.js +1 -1
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +41 -41
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +16 -15
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +4 -6
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +410 -443
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +6 -6
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +1 -7
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +3 -18
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -6
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +9 -12
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +1 -1
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +4 -2
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +32 -28
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.d.ts +10 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.js +61 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.d.ts +4 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.js +159 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.d.ts +9 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.js +140 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.d.ts +32 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.js +244 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.d.ts +12 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.js +30 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/runPrompt.d.ts +15 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/runPrompt.js +12 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.d.ts +2 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.js +13 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +171 -168
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +1 -1
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEdinputInputContentProvider.js +1 -1
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +5 -5
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +48 -45
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +5 -5
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +46 -44
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +118 -123
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +5 -7
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +45 -29
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +12 -7
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +48 -34
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +3 -3
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +53 -20
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +2 -2
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +32 -15
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +9 -23
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +80 -268
  54. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +36 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +214 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.js +1 -1
  57. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +7 -6
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +26 -10
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +7 -7
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +186 -106
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +19 -0
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +129 -0
  64. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.d.ts +9 -0
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +313 -0
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +4 -6
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +12 -16
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +0 -4
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +42 -181
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +3 -3
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +15 -1
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +2 -5
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +484 -384
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +2 -2
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +187 -101
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusItemService.d.ts +4 -1
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +3 -12
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +8 -52
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +53 -0
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +264 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +28 -22
  85. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
  86. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
  87. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +2 -1
  88. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +41 -45
  89. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +8 -32
  90. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSetup.css +2 -18
  91. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +20 -4
  92. package/vscode/src/vs/workbench/contrib/chat/browser/media/simpleBrowserOverlay.css +67 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.d.ts +6 -0
  94. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.js +73 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.d.ts +2 -1
  96. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.js +82 -67
  97. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.d.ts +4 -1
  98. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.js +44 -14
  99. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.d.ts +5 -4
  100. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.js +24 -14
  101. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/errors.js +2 -2
  102. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.js +2 -2
  103. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +6 -6
  104. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +2 -0
  105. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +7 -1
  106. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +14 -1
  107. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +8 -7
  108. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +84 -80
  109. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +1 -1
  110. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +3 -3
  111. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +1 -0
  112. package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.d.ts +5 -1
  113. package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.js +27 -3
  114. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.d.ts +5 -0
  115. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.js +62 -0
  116. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/index.d.ts +3 -0
  117. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/index.js +16 -0
  118. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/index.d.ts +2 -0
  119. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/index.js +17 -0
  120. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.d.ts +29 -0
  121. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.js +74 -0
  122. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.d.ts +14 -0
  123. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.js +40 -0
  124. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.d.ts +23 -0
  125. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.js +40 -0
  126. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.d.ts +5 -0
  127. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.js +9 -0
  128. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.d.ts +23 -0
  129. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.js +68 -0
  130. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/types.d.ts +13 -0
  131. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.d.ts +19 -0
  132. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.js +121 -0
  133. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.d.ts +13 -0
  134. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.js +13 -0
  135. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.d.ts +15 -0
  136. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.js +62 -0
  137. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.d.ts +15 -0
  138. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.js +65 -0
  139. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptLinkProvider.js +3 -8
  140. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptPathAutocompletion.d.ts +2 -2
  141. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptPathAutocompletion.js +14 -19
  142. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.d.ts +11 -0
  143. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.js +22 -0
  144. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.d.ts +17 -0
  145. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.js +83 -0
  146. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +4 -3
  147. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +8 -6
  148. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +17 -5
  149. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +223 -21
  150. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +5 -4
  151. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +28 -22
  152. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.d.ts +10 -0
  153. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.js +25 -0
  154. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +20 -31
  155. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
  156. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
  157. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +15 -12
  158. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
  159. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +2 -2
  160. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +12 -12
  161. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +2 -2
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
  164. package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.d.ts +0 -2
  165. package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.js +1 -14
  166. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.d.ts +0 -10
  167. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.js +0 -54
  168. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.d.ts +0 -25
  169. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.js +0 -79
  170. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.d.ts +0 -7
  171. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.js +0 -27
  172. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.d.ts +0 -5
  173. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.js +0 -53
  174. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.d.ts +0 -2
  175. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.js +0 -19
  176. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.d.ts +0 -5
  177. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.js +0 -27
  178. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.d.ts +0 -13
  179. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.js +0 -49
  180. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.d.ts +0 -6
  181. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.js +0 -80
  182. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.d.ts +0 -3
  183. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.js +0 -13
  184. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +0 -21
  185. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +0 -64
  186. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.d.ts +0 -9
  187. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.js +0 -117
  188. /package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptLinkProvider.d.ts +0 -0
@@ -1,62 +1,264 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
4
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
5
+ import { PROMPT_LANGUAGE_ID } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/promptSyntax/constants';
6
+ import { flatten, forEach } from '../utils/treeUtils.js';
7
+ import { PromptParser } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptParser';
8
+ import { match } from '@codingame/monaco-vscode-api/vscode/vs/base/common/glob';
9
+ import { pick } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
3
10
  import { assert } from '@codingame/monaco-vscode-api/vscode/vs/base/common/assert';
11
+ import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
12
+ import { ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
4
13
  import { PromptFilesLocator } from '../utils/promptFilesLocator.js';
5
14
  import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
15
  import { ObjectCache } from '../../../../../../base/common/objectCache.js';
7
16
  import { TextModelPromptParser } from '../parsers/textModelPromptParser.js';
17
+ import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
18
+ import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
19
+ import { PROMPT_FILE_EXTENSION } from '@codingame/monaco-vscode-51fed910-d648-5620-9b80-9232cd79d116-common/vscode/vs/platform/prompts/common/constants';
8
20
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
9
21
  import { IUserDataProfileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
10
22
 
11
23
  let PromptsService = class PromptsService extends Disposable {
12
- constructor(initService, userDataService) {
24
+ constructor(labelService, modelService, initService, userDataService) {
13
25
  super();
26
+ this.labelService = labelService;
27
+ this.modelService = modelService;
14
28
  this.initService = initService;
15
29
  this.userDataService = userDataService;
16
30
  this.fileLocator = this.initService.createInstance(PromptFilesLocator);
17
31
  this.cache = this._register(( new ObjectCache((model) => {
18
- const parser = initService.createInstance(TextModelPromptParser, model, []);
19
- parser.start();
32
+ assert(model.isDisposed() === false, 'Text model must not be disposed.');
33
+ const parser = initService.createInstance(TextModelPromptParser, model, { seenReferences: [] }).start();
20
34
  parser.assertNotDisposed('Created prompt parser must not be disposed.');
21
35
  return parser;
22
36
  })));
23
37
  }
24
38
  getSyntaxParserFor(model) {
25
- assert(!model.isDisposed(), 'Cannot create a prompt syntax parser for a disposed model.');
39
+ assert(model.isDisposed() === false, 'Cannot create a prompt syntax parser for a disposed model.');
26
40
  return this.cache.get(model);
27
41
  }
28
- async listPromptFiles() {
42
+ async listPromptFiles(type) {
29
43
  const userLocations = [this.userDataService.currentProfile.promptsHome];
30
44
  const prompts = await Promise.all([
31
- this.fileLocator.listFilesIn(userLocations)
32
- .then(withType('user')),
33
- this.fileLocator.listFiles()
34
- .then(withType('local')),
45
+ this.fileLocator.listFilesIn(userLocations, type)
46
+ .then(withType('user', type)),
47
+ this.fileLocator.listFiles(type)
48
+ .then(withType('local', type)),
35
49
  ]);
36
50
  return prompts.flat();
37
51
  }
38
52
  getSourceFolders(type) {
39
- assert(type === 'local' || type === 'user', `Unknown prompt type '${type}'.`);
40
- const prompts = (type === 'user')
41
- ? [this.userDataService.currentProfile.promptsHome]
42
- : this.fileLocator.getConfigBasedSourceFolders();
43
- return ( prompts.map(addType(type)));
53
+ assert(type === 'prompt' || type === 'instructions', `Unknown prompt type '${type}'.`);
54
+ const result = [];
55
+ for (const uri of this.fileLocator.getConfigBasedSourceFolders(type)) {
56
+ result.push({ uri, storage: 'local', type });
57
+ }
58
+ const userHome = this.userDataService.currentProfile.promptsHome;
59
+ result.push({ uri: userHome, storage: 'user', type });
60
+ return result;
61
+ }
62
+ asPromptSlashCommand(command) {
63
+ if (command.match(/^[\w_\-\.]+/)) {
64
+ return { command, detail: ( localize(5092, 'Prompt file: {0}', command)) };
65
+ }
66
+ return undefined;
67
+ }
68
+ async resolvePromptSlashCommand(data) {
69
+ if (data.promptPath) {
70
+ return data.promptPath;
71
+ }
72
+ const files = await this.listPromptFiles('prompt');
73
+ const command = data.command;
74
+ const result = files.find(file => getPromptCommandName(file.uri.path) === command);
75
+ if (result) {
76
+ return result;
77
+ }
78
+ const model = this.modelService.getModels().find(model => model.getLanguageId() === PROMPT_LANGUAGE_ID && getPromptCommandName(model.uri.path) === command);
79
+ if (model) {
80
+ return { uri: model.uri, storage: 'local', type: 'prompt' };
81
+ }
82
+ return undefined;
83
+ }
84
+ async findPromptSlashCommands() {
85
+ const promptFiles = await this.listPromptFiles('prompt');
86
+ return (promptFiles.map(promptPath => {
87
+ const command = getPromptCommandName(promptPath.uri.path);
88
+ return {
89
+ command,
90
+ detail: ( localize(
91
+ 5092,
92
+ 'Prompt file: {0}',
93
+ this.labelService.getUriLabel(promptPath.uri, { relative: true })
94
+ )),
95
+ promptPath
96
+ };
97
+ }));
98
+ }
99
+ async findInstructionFilesFor(files) {
100
+ const result = [];
101
+ const instructionFiles = await this.listPromptFiles('instructions');
102
+ if (instructionFiles.length === 0) {
103
+ return result;
104
+ }
105
+ const instructions = await this.getAllMetadata(( instructionFiles.map(pick('uri'))));
106
+ for (const instruction of instructions.flatMap(flatten)) {
107
+ const { metadata, uri } = instruction;
108
+ const { applyTo } = metadata;
109
+ if (applyTo === undefined) {
110
+ continue;
111
+ }
112
+ if ((applyTo === '**') || (applyTo === '**/*')) {
113
+ result.push(uri);
114
+ continue;
115
+ }
116
+ for (const file of files) {
117
+ if (match(applyTo, file.fsPath)) {
118
+ result.push(uri);
119
+ }
120
+ }
121
+ }
122
+ return [...( new ResourceSet(result))];
123
+ }
124
+ async getAllMetadata(promptUris) {
125
+ const metadata = await Promise.all(( promptUris.map(async (uri) => {
126
+ let parser;
127
+ try {
128
+ parser = this.initService.createInstance(PromptParser, uri, { allowNonPromptFiles: true }).start();
129
+ await parser.allSettled();
130
+ return collectMetadata(parser);
131
+ }
132
+ finally {
133
+ parser?.dispose();
134
+ }
135
+ })));
136
+ return metadata;
137
+ }
138
+ async getCombinedToolsMetadata(promptUris) {
139
+ if (promptUris.length === 0) {
140
+ return null;
141
+ }
142
+ const filesMetadata = await this.getAllMetadata(promptUris);
143
+ const allTools = ( filesMetadata
144
+ .map((fileMetadata) => {
145
+ const result = [];
146
+ let isFirst = true;
147
+ let isRootInAgentMode = false;
148
+ let hasTools = false;
149
+ let chatMode;
150
+ forEach((node) => {
151
+ const { metadata } = node;
152
+ const { mode, tools } = metadata;
153
+ if (isFirst === true) {
154
+ isFirst = false;
155
+ if ((mode === ChatMode.Agent) || (tools !== undefined)) {
156
+ isRootInAgentMode = true;
157
+ chatMode = ChatMode.Agent;
158
+ }
159
+ }
160
+ chatMode ??= mode;
161
+ if (chatMode && mode) {
162
+ chatMode = morePrivilegedChatMode(chatMode, mode);
163
+ }
164
+ if (isRootInAgentMode && tools !== undefined) {
165
+ result.push(...tools);
166
+ hasTools = true;
167
+ }
168
+ return false;
169
+ }, fileMetadata);
170
+ if (chatMode === ChatMode.Agent) {
171
+ return {
172
+ tools: (hasTools)
173
+ ? [...( new Set(result))]
174
+ : undefined,
175
+ mode: ChatMode.Agent,
176
+ };
177
+ }
178
+ return {
179
+ mode: chatMode,
180
+ };
181
+ }));
182
+ let hasAnyTools = false;
183
+ let resultingChatMode;
184
+ const result = [];
185
+ for (const { tools, mode } of allTools) {
186
+ resultingChatMode ??= mode;
187
+ if (resultingChatMode && mode) {
188
+ resultingChatMode = morePrivilegedChatMode(resultingChatMode, mode);
189
+ }
190
+ if (tools) {
191
+ result.push(...tools);
192
+ hasAnyTools = true;
193
+ }
194
+ }
195
+ if (resultingChatMode === ChatMode.Agent) {
196
+ return {
197
+ tools: (hasAnyTools)
198
+ ? [...( new Set(result))]
199
+ : undefined,
200
+ mode: resultingChatMode,
201
+ };
202
+ }
203
+ return {
204
+ tools: undefined,
205
+ mode: resultingChatMode,
206
+ };
44
207
  }
45
208
  };
46
209
  PromptsService = ( __decorate([
47
- ( __param(0, IInstantiationService)),
48
- ( __param(1, IUserDataProfileService))
210
+ ( __param(0, ILabelService)),
211
+ ( __param(1, IModelService)),
212
+ ( __param(2, IInstantiationService)),
213
+ ( __param(3, IUserDataProfileService))
49
214
  ], PromptsService));
50
- const addType = (type) => {
215
+ const morePrivilegedChatMode = (chatMode1, chatMode2) => {
216
+ if (chatMode1 === chatMode2) {
217
+ return chatMode1;
218
+ }
219
+ if ((chatMode1 === ChatMode.Agent) || (chatMode2 === ChatMode.Agent)) {
220
+ return ChatMode.Agent;
221
+ }
222
+ if ((chatMode1 === ChatMode.Edit) || (chatMode2 === ChatMode.Edit)) {
223
+ return ChatMode.Edit;
224
+ }
225
+ throw ( new Error([
226
+ 'Invalid logic encountered: ',
227
+ `at this point modes '${chatMode1}' and '${chatMode2}' are different, but`,
228
+ `both must have be equal to '${ChatMode.Ask}' at the same time.`,
229
+ ].join(' ')));
230
+ };
231
+ const collectMetadata = (reference) => {
232
+ const childMetadata = [];
233
+ for (const child of reference.references) {
234
+ if (child.errorCondition !== undefined) {
235
+ continue;
236
+ }
237
+ childMetadata.push(collectMetadata(child));
238
+ }
239
+ const children = (childMetadata.length > 0)
240
+ ? childMetadata
241
+ : undefined;
242
+ return {
243
+ uri: reference.uri,
244
+ metadata: reference.metadata,
245
+ children,
246
+ };
247
+ };
248
+ function getPromptCommandName(path) {
249
+ const name = basename(path, PROMPT_FILE_EXTENSION);
250
+ return name;
251
+ }
252
+ const addType = (storage, type) => {
51
253
  return (uri) => {
52
- return { uri, type: type };
254
+ return { uri, storage, type };
53
255
  };
54
256
  };
55
- const withType = (type) => {
257
+ const withType = (storage, type) => {
56
258
  return (uris) => {
57
259
  return ( uris
58
- .map(addType(type)));
260
+ .map(addType(storage, type)));
59
261
  };
60
262
  };
61
263
 
62
- export { PromptsService };
264
+ export { PromptsService, getPromptCommandName };
@@ -1,3 +1,4 @@
1
+ import { TPromptsType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/types";
1
2
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
3
  import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
3
4
  import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
@@ -7,10 +8,10 @@ export declare class PromptFilesLocator {
7
8
  private readonly configService;
8
9
  private readonly workspaceService;
9
10
  constructor(fileService: IFileService, configService: IConfigurationService, workspaceService: IWorkspaceContextService);
10
- listFiles(): Promise<readonly URI[]>;
11
- listFilesIn(folders: readonly URI[]): Promise<readonly URI[]>;
12
- getConfigBasedSourceFolders(): readonly URI[];
13
- private findInstructionFiles;
11
+ listFiles(type: TPromptsType): Promise<readonly URI[]>;
12
+ listFilesIn(folders: readonly URI[], type: TPromptsType): Promise<readonly URI[]>;
13
+ getConfigBasedSourceFolders(type: TPromptsType): readonly URI[];
14
+ private findFilesInLocations;
14
15
  }
15
16
  export declare const isValidGlob: (pattern: string) => boolean;
16
17
  export declare const firstNonGlobParent: (location: URI) => URI;
@@ -6,11 +6,11 @@ import { assert } from '@codingame/monaco-vscode-api/vscode/vs/base/common/asser
6
6
  import { isAbsolute } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
7
7
  import { ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
8
8
  import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
9
- import { PromptsConfig } from '@codingame/monaco-vscode-a1eb43d5-da63-5f76-8ad4-acf0d6c3b749-common/vscode/vs/platform/prompts/common/config';
10
- import { basename, extUri, dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
9
+ import { PromptsConfig } from '@codingame/monaco-vscode-51fed910-d648-5620-9b80-9232cd79d116-common/vscode/vs/platform/prompts/common/config';
10
+ import { basename, dirname, extUri } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
11
11
  import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
12
12
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
13
- import { PROMPT_FILE_EXTENSION, isPromptFile } from '@codingame/monaco-vscode-a1eb43d5-da63-5f76-8ad4-acf0d6c3b749-common/vscode/vs/platform/prompts/common/constants';
13
+ import { PROMPT_FILE_EXTENSION, getPromptFileType } from '@codingame/monaco-vscode-51fed910-d648-5620-9b80-9232cd79d116-common/vscode/vs/platform/prompts/common/constants';
14
14
 
15
15
  let PromptFilesLocator = class PromptFilesLocator {
16
16
  constructor(fileService, configService, workspaceService) {
@@ -18,16 +18,16 @@ let PromptFilesLocator = class PromptFilesLocator {
18
18
  this.configService = configService;
19
19
  this.workspaceService = workspaceService;
20
20
  }
21
- async listFiles() {
22
- const configuredLocations = PromptsConfig.promptSourceFolders(this.configService);
21
+ async listFiles(type) {
22
+ const configuredLocations = PromptsConfig.promptSourceFolders(this.configService, type);
23
23
  const absoluteLocations = toAbsoluteLocations(configuredLocations, this.workspaceService);
24
- return await this.listFilesIn(absoluteLocations);
24
+ return await this.listFilesIn(absoluteLocations, type);
25
25
  }
26
- async listFilesIn(folders) {
27
- return await this.findInstructionFiles(folders);
26
+ async listFilesIn(folders, type) {
27
+ return await this.findFilesInLocations(folders, type);
28
28
  }
29
- getConfigBasedSourceFolders() {
30
- const configuredLocations = PromptsConfig.promptSourceFolders(this.configService);
29
+ getConfigBasedSourceFolders(type) {
30
+ const configuredLocations = PromptsConfig.promptSourceFolders(this.configService, type);
31
31
  const absoluteLocations = toAbsoluteLocations(configuredLocations, this.workspaceService);
32
32
  const result = ( new ResourceSet());
33
33
  for (const absoluteLocation of absoluteLocations) {
@@ -46,23 +46,29 @@ let PromptFilesLocator = class PromptFilesLocator {
46
46
  if (isValidGlob(path) === true) {
47
47
  continue;
48
48
  }
49
- result.add(URI.file(path));
49
+ result.add(absoluteLocation.with({ path }));
50
50
  }
51
51
  return [...result];
52
52
  }
53
- async findInstructionFiles(absoluteLocations) {
53
+ async findFilesInLocations(absoluteLocations, type) {
54
54
  const paths = ( new ResourceSet());
55
55
  for (const absoluteLocation of absoluteLocations) {
56
56
  assert(isAbsolute(absoluteLocation.path), `Provided location must be an absolute path, got '${absoluteLocation.path}'.`);
57
- const location = (isValidGlob(basename(absoluteLocation)) || absoluteLocation.path.endsWith(PROMPT_FILE_EXTENSION))
58
- ? absoluteLocation
59
- : extUri.joinPath(absoluteLocation, `*${PROMPT_FILE_EXTENSION}`);
60
- const promptFiles = await findAllPromptFiles(firstNonGlobParent(location), this.fileService);
61
- for (const file of promptFiles) {
62
- if (match(location.path, file.path)) {
57
+ const nonGlobParent = firstNonGlobParent(absoluteLocation);
58
+ if (nonGlobParent === absoluteLocation) {
59
+ const promptFiles = await findFilesInLocation(absoluteLocation, type, this.fileService);
60
+ for (const file of promptFiles) {
63
61
  paths.add(file);
64
62
  }
65
63
  }
64
+ else {
65
+ const promptFiles = await findFilesInLocation(nonGlobParent, type, this.fileService);
66
+ for (const file of promptFiles) {
67
+ if (match(absoluteLocation.path, file.path)) {
68
+ paths.add(file);
69
+ }
70
+ }
71
+ }
66
72
  }
67
73
  return [...paths];
68
74
  }
@@ -133,22 +139,22 @@ const firstNonGlobParent = (location) => {
133
139
  }
134
140
  return firstNonGlobParent(parent);
135
141
  };
136
- const findAllPromptFiles = async (location, fileService) => {
142
+ const findFilesInLocation = async (location, type, fileService) => {
137
143
  const result = [];
138
144
  try {
139
145
  const info = await fileService.resolve(location);
140
- if (info.isFile && isPromptFile(info.resource)) {
146
+ if (info.isFile && getPromptFileType(info.resource) === type) {
141
147
  result.push(info.resource);
142
148
  return result;
143
149
  }
144
150
  if (info.isDirectory && info.children) {
145
151
  for (const child of info.children) {
146
- if (child.isFile && isPromptFile(child.resource)) {
152
+ if (child.isFile && getPromptFileType(child.resource) === type) {
147
153
  result.push(child.resource);
148
154
  continue;
149
155
  }
150
156
  if (child.isDirectory) {
151
- const promptFiles = await findAllPromptFiles(child.resource, fileService);
157
+ const promptFiles = await findFilesInLocation(child.resource, type, fileService);
152
158
  result.push(...promptFiles);
153
159
  continue;
154
160
  }
@@ -0,0 +1,10 @@
1
+ export type TTree<TTreenNode> = {
2
+ children?: readonly TTree<TTreenNode>[];
3
+ } & TTreenNode;
4
+ export declare const flatten: <TTreeNode>(treeRoot: TTree<TTreeNode>) => Omit<TTreeNode, "children">[];
5
+ export declare const forEach: <TTreeNode>(callback: (node: TTreeNode) => boolean, treeRoot: TTree<TTreeNode>) => ReturnType<typeof callback>;
6
+ export declare const map: <TTreeNode extends object, TNewTreeNode extends object>(callback: (originalNode: Readonly<TTree<TTreeNode>>, newChildren: Readonly<TNewTreeNode>[] | undefined) => TTree<TNewTreeNode>, treeRoot: TTree<TTreeNode>) => TTree<TNewTreeNode>;
7
+ type TRestParameters<T extends (...args: any[]) => any> = T extends (first: any, ...rest: infer R) => any ? R : never;
8
+ type TCurriedFunction<T extends (...args: any[]) => any> = ((...args: TRestParameters<T>) => ReturnType<T>);
9
+ export declare const curry: <T, K>(callback: (arg1: T, ...args: any[]) => K, arg1: T) => TCurriedFunction<typeof callback>;
10
+ export {};
@@ -0,0 +1,25 @@
1
+
2
+
3
+ const flatten = (treeRoot) => {
4
+ const result = [];
5
+ result.push(treeRoot);
6
+ for (const child of treeRoot.children ?? []) {
7
+ result.push(...flatten(child));
8
+ }
9
+ return result;
10
+ };
11
+ const forEach = (callback, treeRoot) => {
12
+ const shouldStop = callback(treeRoot);
13
+ if (shouldStop === true) {
14
+ return true;
15
+ }
16
+ for (const child of treeRoot.children ?? []) {
17
+ const shouldStop = forEach(callback, child);
18
+ if (shouldStop === true) {
19
+ return true;
20
+ }
21
+ }
22
+ return false;
23
+ };
24
+
25
+ export { flatten, forEach };
@@ -26,7 +26,7 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
26
26
  },
27
27
  jsonSchema: {
28
28
  description: ( localize(
29
- 5007,
29
+ 5093,
30
30
  'Contributes a tool that can be invoked by a language model in a chat session, or from a standalone command. Registered tools can be used by all extensions.'
31
31
  )),
32
32
  type: 'array',
@@ -52,7 +52,7 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
52
52
  properties: {
53
53
  name: {
54
54
  description: ( localize(
55
- 5008,
55
+ 5094,
56
56
  "A unique name for this tool. This name must be a globally unique identifier, and is also used as a name when presenting this tool to a language model."
57
57
  )),
58
58
  type: 'string',
@@ -60,7 +60,7 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
60
60
  },
61
61
  toolReferenceName: {
62
62
  markdownDescription: ( localize(
63
- 5009,
63
+ 5095,
64
64
  "If {0} is enabled for this tool, the user may use '#' with this name to invoke the tool in a query. Otherwise, the name is not required. Name must not contain whitespace.",
65
65
  '`canBeReferencedInPrompt`'
66
66
  )),
@@ -69,32 +69,32 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
69
69
  },
70
70
  displayName: {
71
71
  description: ( localize(
72
- 5010,
72
+ 5096,
73
73
  "A human-readable name for this tool that may be used to describe it in the UI."
74
74
  )),
75
75
  type: 'string'
76
76
  },
77
77
  userDescription: {
78
- description: ( localize(5011, "A description of this tool that may be shown to the user.")),
78
+ description: ( localize(5097, "A description of this tool that may be shown to the user.")),
79
79
  type: 'string'
80
80
  },
81
81
  modelDescription: {
82
82
  description: ( localize(
83
- 5012,
83
+ 5098,
84
84
  "A description of this tool that may be used by a language model to select it."
85
85
  )),
86
86
  type: 'string'
87
87
  },
88
88
  inputSchema: {
89
89
  description: ( localize(
90
- 5013,
90
+ 5099,
91
91
  "A JSON schema for the input this tool accepts. The input must be an object at the top level. A particular language model may not support all JSON schema features. See the documentation for the language model family you are using for more information."
92
92
  )),
93
93
  $ref: toolsParametersSchemaSchemaId
94
94
  },
95
95
  canBeReferencedInPrompt: {
96
96
  markdownDescription: ( localize(
97
- 5014,
97
+ 5100,
98
98
  "If true, this tool shows up as an attachment that the user can add manually to their request. Chat participants will receive the tool in {0}.",
99
99
  '`ChatRequest#toolReferences`'
100
100
  )),
@@ -102,7 +102,7 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
102
102
  },
103
103
  icon: {
104
104
  markdownDescription: ( localize(
105
- 5015,
105
+ 5101,
106
106
  "An icon that represents this tool. Either a file path, an object with file paths for dark and light themes, or a theme icon reference, like `$(zap)`"
107
107
  )),
108
108
  anyOf: [{
@@ -112,11 +112,11 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
112
112
  type: 'object',
113
113
  properties: {
114
114
  light: {
115
- description: ( localize(5016, 'Icon path when a light theme is used')),
115
+ description: ( localize(5102, 'Icon path when a light theme is used')),
116
116
  type: 'string'
117
117
  },
118
118
  dark: {
119
- description: ( localize(5017, 'Icon path when a dark theme is used')),
119
+ description: ( localize(5103, 'Icon path when a dark theme is used')),
120
120
  type: 'string'
121
121
  }
122
122
  }
@@ -124,14 +124,14 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
124
124
  },
125
125
  when: {
126
126
  markdownDescription: ( localize(
127
- 5018,
127
+ 5104,
128
128
  "Condition which must be true for this tool to be enabled. Note that a tool may still be invoked by another extension even when its `when` condition is false."
129
129
  )),
130
130
  type: 'string'
131
131
  },
132
132
  tags: {
133
133
  description: ( localize(
134
- 5019,
134
+ 5105,
135
135
  "A set of tags that roughly describe the tool's capabilities. A tool user may use these to filter the set of tools to just ones that are relevant for the task at hand, or they may want to pick a tag that can be used to identify just the tools contributed by this extension."
136
136
  )),
137
137
  type: 'array',
@@ -147,7 +147,6 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
147
147
  function toToolKey(extensionIdentifier, toolName) {
148
148
  return `${extensionIdentifier.value}/${toolName}`;
149
149
  }
150
- const CopilotAgentModeTag = 'vscode_editing';
151
150
  let LanguageModelToolsExtensionPointHandler = class LanguageModelToolsExtensionPointHandler {
152
151
  static { this.ID = 'workbench.contrib.toolsExtensionPointHandler'; }
153
152
  constructor(languageModelToolsService, logService, productService) {
@@ -171,15 +170,8 @@ let LanguageModelToolsExtensionPointHandler = class LanguageModelToolsExtensionP
171
170
  logService.error(`Extension '${extension.description.identifier.value}' CANNOT register tool with name starting with "vscode_" or "copilot_"`);
172
171
  continue;
173
172
  }
174
- if (rawTool.tags?.includes(CopilotAgentModeTag)) {
175
- if (!isProposedApiEnabled(extension.description, 'languageModelToolsForAgent') && !isProposedApiEnabled(extension.description, 'chatParticipantPrivate')) {
176
- logService.error(`Extension '${extension.description.identifier.value}' CANNOT register tool with tag "${CopilotAgentModeTag}" without enabling 'languageModelToolsForAgent' proposal`);
177
- continue;
178
- }
179
- }
180
- if (rawTool.tags?.some(tag => tag !== CopilotAgentModeTag && (tag.startsWith('copilot_') || tag.startsWith('vscode_'))) && !isProposedApiEnabled(extension.description, 'chatParticipantPrivate')) {
173
+ if (rawTool.tags?.some(tag => tag.startsWith('copilot_') || tag.startsWith('vscode_')) && !isProposedApiEnabled(extension.description, 'chatParticipantPrivate')) {
181
174
  logService.error(`Extension '${extension.description.identifier.value}' CANNOT register tool with tags starting with "vscode_" or "copilot_"`);
182
- continue;
183
175
  }
184
176
  const rawIcon = rawTool.icon;
185
177
  let icon;
@@ -200,16 +192,13 @@ let LanguageModelToolsExtensionPointHandler = class LanguageModelToolsExtensionP
200
192
  isProposedApiEnabled(extension.description, 'chatParticipantPrivate');
201
193
  const tool = {
202
194
  ...rawTool,
203
- source: { type: 'extension', extensionId: extension.description.identifier, isExternalTool: !isBuiltinTool },
195
+ source: { type: 'extension', label: extension.description.displayName ?? extension.description.name, extensionId: extension.description.identifier, isExternalTool: !isBuiltinTool },
204
196
  inputSchema: rawTool.inputSchema,
205
197
  id: rawTool.name,
206
198
  icon,
207
199
  when: rawTool.when ? ContextKeyExpr.deserialize(rawTool.when) : undefined,
208
- requiresConfirmation: !isBuiltinTool,
209
200
  alwaysDisplayInputOutput: !isBuiltinTool,
210
- supportsToolPicker: isBuiltinTool ?
211
- false :
212
- rawTool.canBeReferencedInPrompt
201
+ supportsToolPicker: rawTool.canBeReferencedInPrompt
213
202
  };
214
203
  const disposable = languageModelToolsService.registerToolData(tool);
215
204
  this._registrationDisposables.set(toToolKey(extension.description.identifier, rawTool.name), disposable);
@@ -242,9 +231,9 @@ class LanguageModelToolDataRenderer extends Disposable {
242
231
  return { data: { headers: [], rows: [] }, dispose: () => { } };
243
232
  }
244
233
  const headers = [
245
- ( localize(5020, "Name")),
246
- ( localize(5021, "Display Name")),
247
- ( localize(5022, "Description")),
234
+ ( localize(5106, "Name")),
235
+ ( localize(5107, "Display Name")),
236
+ ( localize(5108, "Description")),
248
237
  ];
249
238
  const rows = ( contribs.map(t => {
250
239
  return [
@@ -264,7 +253,7 @@ class LanguageModelToolDataRenderer extends Disposable {
264
253
  }
265
254
  ( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
266
255
  id: 'languageModelTools',
267
- label: ( localize(5023, "Language Model Tools")),
256
+ label: ( localize(5109, "Language Model Tools")),
268
257
  access: {
269
258
  canToggle: false
270
259
  },
@@ -4,7 +4,7 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
4
4
  import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
5
5
  import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
6
6
  import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service";
7
- import { IChatModel } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatModel";
7
+ import { IChatModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel";
8
8
  import { ISpeechToTextEvent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/speech/common/speechService";
9
9
  import { ISpeechService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/speech/common/speechService.service";
10
10
  import { IVoiceChatService } from "./voiceChatService.service.js";
@@ -7,7 +7,7 @@ import { rtrim } from '@codingame/monaco-vscode-api/vscode/vs/base/common/string
7
7
  import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
8
8
  import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
9
9
  import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
10
- import { chatAgentLeader, chatSubcommandLeader } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
10
+ import { chatAgentLeader, chatSubcommandLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
11
11
  import { SpeechToTextStatus } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/speech/common/speechService';
12
12
  import { ISpeechService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/speech/common/speechService.service';
13
13
 
@@ -21,7 +21,7 @@ var PhraseTextType;
21
21
  const VoiceChatInProgress = ( new RawContextKey(
22
22
  'voiceChatInProgress',
23
23
  false,
24
- { type: 'boolean', description: ( localize(5024, "A speech-to-text session is in progress for chat.")) }
24
+ { type: 'boolean', description: ( localize(5110, "A speech-to-text session is in progress for chat.")) }
25
25
  ));
26
26
  let VoiceChatService = class VoiceChatService extends Disposable {
27
27
  static { VoiceChatService_1 = this; }