@codingame/monaco-vscode-api 37.1.0 → 37.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/missing-services.js +6 -26
  2. package/package.json +8 -8
  3. package/services.d.ts +1 -1
  4. package/services.js +3 -3
  5. package/tools.d.ts +4 -0
  6. package/tools.js +24 -1
  7. package/vscode/src/vs/platform/product/common/product.js +1 -1
  8. package/vscode/src/vs/platform/webWorker/browser/webWorkerServiceImpl.js +2 -2
  9. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +63 -0
  10. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +305 -0
  11. package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +2 -2
  12. package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +1 -2
  13. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +1 -1
  14. package/vscode/src/vs/workbench/browser/media/code-icon.svg +1 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.d.ts +1 -0
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.js +2 -1
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +2 -2
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.service.d.ts +1 -1
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.d.ts +30 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.js +39 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service.d.ts +1 -1
  22. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.service.d.ts +1 -1
  23. package/vscode/src/vs/workbench/contrib/chat/browser/chat.d.ts +1 -1
  24. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.service.d.ts +1 -1
  25. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.d.ts +1 -1
  26. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.service.d.ts +1 -1
  27. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.service.d.ts +1 -1
  28. package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.d.ts +1 -0
  29. package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.js +29 -0
  30. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.d.ts +2 -2
  31. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.service.d.ts +1 -1
  32. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.d.ts +1 -1
  33. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service.d.ts +2 -2
  34. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.service.d.ts +1 -1
  35. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.d.ts +1 -1
  36. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service.d.ts +1 -1
  37. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service.d.ts +2 -2
  38. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginSource.d.ts +1 -1
  39. package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatParserTypes.d.ts +1 -1
  40. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.d.ts +3 -0
  41. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.js +7 -0
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.d.ts +3 -3
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service.d.ts +1 -1
  44. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.d.ts +1 -1
  45. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.d.ts +1 -1
  46. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.d.ts +1 -1
  47. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.service.d.ts +1 -1
  48. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service.d.ts +1 -1
  49. package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.service.d.ts +1 -1
  50. package/vscode/src/vs/workbench/contrib/search/browser/AISearch/aiSearchModel.d.ts +1 -1
  51. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModel.d.ts +1 -1
  52. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModelBase.d.ts +1 -1
  53. package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/folderMatch.d.ts +1 -1
  54. package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon.d.ts +1 -1
  55. package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +4 -3
  56. package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.d.ts +34 -0
  57. package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.js +72 -0
  58. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.d.ts +44 -0
  59. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +96 -0
  60. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css +1148 -0
  61. package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.d.ts +81 -0
  62. package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.js +97 -0
  63. package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +32 -0
  64. package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +45 -0
  65. package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.d.ts +0 -7
  66. package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.js +0 -92
  67. package/vscode/src/vs/platform/layout/browser/zIndexRegistry.d.ts +0 -12
  68. package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +0 -64
  69. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.d.ts +0 -262
  70. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js +0 -865
  71. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +0 -57
  72. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +0 -311
  73. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -15
  74. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -80
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.d.ts +0 -2
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +0 -57
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -231
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -1850
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +0 -109
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +0 -85
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +0 -140
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +0 -186
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.d.ts +0 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.js +0 -5
  85. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.d.ts +0 -46
  86. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.js +0 -17
  87. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -253
  88. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -20
  89. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +0 -34
  90. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +0 -194
  91. package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +0 -87
  92. package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +0 -69
  93. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +0 -300
  94. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +0 -272
  95. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +0 -25
  96. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +0 -178
  97. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -78
  98. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -51
  99. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +0 -67
  100. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +0 -195
  101. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +0 -67
  102. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +0 -294
  103. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +0 -212
  104. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +0 -955
  105. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +0 -31
  106. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +0 -122
  107. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +0 -65
  108. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +0 -697
  109. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.d.ts +0 -150
  110. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.js +0 -142
  111. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
  112. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -77
  113. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
  114. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
  115. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
  116. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
  117. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +0 -92
  118. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +0 -335
  119. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -235
  120. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1673
  121. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -202
  122. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -872
  123. package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.d.ts +0 -35
  124. package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.js +0 -289
  125. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.d.ts +0 -72
  126. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.js +0 -600
  127. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.d.ts +0 -36
  128. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +0 -239
  129. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.d.ts +0 -22
  130. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.js +0 -143
  131. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.d.ts +0 -24
  132. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +0 -298
  133. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.d.ts +0 -25
  134. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +0 -177
  135. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +0 -73
  136. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +0 -577
  137. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.d.ts +0 -11
  138. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +0 -90
  139. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.d.ts +0 -16
  140. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +0 -130
  141. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.d.ts +0 -12
  142. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.js +0 -53
  143. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +0 -5
  144. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +0 -12
  145. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.d.ts +0 -10
  146. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +0 -92
  147. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +0 -38
  148. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +0 -518
  149. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +0 -6
  150. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +0 -231
  151. package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.d.ts +0 -20
  152. package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.js +0 -17
  153. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.d.ts +0 -6
  154. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +0 -283
  155. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.d.ts +0 -91
  156. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +0 -340
  157. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.d.ts +0 -17
  158. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +0 -272
  159. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css +0 -686
  160. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css +0 -348
  161. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css +0 -8
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css +0 -92
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css +0 -119
  164. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css +0 -79
  165. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css +0 -61
  166. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditController.css +0 -55
  167. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditorOverlay.css +0 -63
  168. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css +0 -79
  169. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css +0 -63
  170. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css +0 -92
  171. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css +0 -79
  172. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css +0 -24
  173. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css +0 -61
  174. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css +0 -102
  175. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.d.ts +0 -27
  176. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +0 -131
  177. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.d.ts +0 -18
  178. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.js +0 -92
  179. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.d.ts +0 -105
  180. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +0 -673
  181. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.d.ts +0 -9
  182. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +0 -37
  183. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.d.ts +0 -354
  184. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2926
  185. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.d.ts +0 -29
  186. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +0 -36
  187. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.d.ts +0 -1
  188. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +0 -19
  189. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.d.ts +0 -200
  190. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +0 -591
  191. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.d.ts +0 -56
  192. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +0 -30
  193. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.d.ts +0 -99
  194. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +0 -131
  195. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.d.ts +0 -30
  196. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +0 -115
  197. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.d.ts +0 -28
  198. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +0 -158
  199. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.d.ts +0 -40
  200. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +0 -183
  201. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.d.ts +0 -10
  202. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +0 -66
  203. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.d.ts +0 -52
  204. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +0 -429
  205. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.d.ts +0 -6
  206. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +0 -108
  207. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.d.ts +0 -36
  208. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +0 -221
  209. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.d.ts +0 -17
  210. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +0 -142
  211. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.d.ts +0 -5
  212. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +0 -23
  213. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.d.ts +0 -18
  214. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +0 -104
  215. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.d.ts +0 -92
  216. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +0 -762
  217. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.d.ts +0 -15
  218. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +0 -58
  219. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.d.ts +0 -36
  220. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +0 -357
  221. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.d.ts +0 -6
  222. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +0 -32
  223. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.d.ts +0 -47
  224. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +0 -260
  225. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.d.ts +0 -9
  226. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.js +0 -10
  227. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.d.ts +0 -10
  228. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +0 -24
  229. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.d.ts +0 -182
  230. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +0 -796
  231. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.d.ts +0 -13
  232. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +0 -79
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.d.ts +0 -30
  234. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +0 -126
  235. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.d.ts +0 -6
  236. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +0 -32
  237. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.d.ts +0 -8
  238. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +0 -50
  239. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.d.ts +0 -18
  240. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +0 -119
  241. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.d.ts +0 -57
  242. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +0 -443
  243. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.d.ts +0 -20
  244. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +0 -56
  245. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.d.ts +0 -24
  246. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.js +0 -121
  247. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.d.ts +0 -152
  248. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +0 -1288
  249. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.d.ts +0 -59
  250. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +0 -287
  251. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.d.ts +0 -117
  252. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.js +0 -6
  253. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.d.ts +0 -222
  254. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +0 -1840
  255. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.d.ts +0 -63
  256. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +0 -449
  257. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewMessages.d.ts +0 -432
  258. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.d.ts +0 -18
  259. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +0 -2546
  260. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.d.ts +0 -8
  261. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +0 -105
  262. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.d.ts +0 -137
  263. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +0 -646
  264. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.d.ts +0 -21
  265. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +0 -101
  266. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.d.ts +0 -13
  267. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.js +0 -111
  268. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.d.ts +0 -30
  269. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +0 -65
  270. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.d.ts +0 -13
  271. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +0 -49
  272. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.d.ts +0 -89
  273. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +0 -472
  274. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.d.ts +0 -11
  275. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +0 -34
  276. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.d.ts +0 -33
  277. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +0 -275
  278. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.d.ts +0 -69
  279. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +0 -269
  280. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.d.ts +0 -125
  281. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +0 -958
  282. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.d.ts +0 -9
  283. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +0 -11
  284. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.d.ts +0 -20
  285. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.js +0 -101
  286. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.d.ts +0 -65
  287. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +0 -458
  288. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.d.ts +0 -80
  289. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +0 -708
  290. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.d.ts +0 -37
  291. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +0 -193
  292. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.d.ts +0 -7
  293. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.js +0 -62
  294. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.d.ts +0 -108
  295. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +0 -717
  296. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.d.ts +0 -23
  297. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +0 -183
  298. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.d.ts +0 -11
  299. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +0 -134
  300. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.d.ts +0 -20
  301. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +0 -135
  302. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.d.ts +0 -27
  303. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +0 -213
  304. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.d.ts +0 -27
  305. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +0 -104
  306. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.d.ts +0 -115
  307. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +0 -480
  308. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.d.ts +0 -87
  309. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +0 -352
  310. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.d.ts +0 -81
  311. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.js +0 -9
  312. package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.d.ts +0 -10
  313. package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +0 -19
@@ -1,35 +0,0 @@
1
- import { URI } from "../../../../../base/common/uri.js";
2
- import { IDynamicVariable } from "../attachments/chatVariables.js";
3
- import { IChatVariablesService } from "../attachments/chatVariables.service.js";
4
- import { ChatAgentLocation, ChatModeKind } from "../constants.js";
5
- import { IChatAgentAttachmentCapabilities, IChatAgentData } from "../participants/chatAgents.js";
6
- import { IChatAgentService } from "../participants/chatAgents.service.js";
7
- import { IChatSlashCommandService } from "../participants/chatSlashCommands.service.js";
8
- import { IPromptsService } from "../promptSyntax/service/promptsService.service.js";
9
- import { ToolAndToolSetEnablementMap } from "../tools/languageModelToolsService.js";
10
- import { IParsedChatRequest } from "./chatParserTypes.js";
11
- export declare const agentReg: RegExp;
12
- export declare const variableReg: RegExp;
13
- export declare const slashReg: RegExp;
14
- export interface IChatParserContext {
15
- /** Used only as a disambiguator, when the query references an agent that has a duplicate with the same name. */
16
- selectedAgent?: IChatAgentData;
17
- mode?: ChatModeKind;
18
- /** Parse as this agent, even when it does not appear in the query text */
19
- forcedAgent?: IChatAgentData;
20
- attachmentCapabilities?: IChatAgentAttachmentCapabilities;
21
- sessionType?: string;
22
- }
23
- export declare class ChatRequestParser {
24
- private readonly agentService;
25
- private readonly variableService;
26
- private readonly slashCommandService;
27
- private readonly promptsService;
28
- constructor(agentService: IChatAgentService, variableService: IChatVariablesService, slashCommandService: IChatSlashCommandService, promptsService: IPromptsService);
29
- parseChatRequest(sessionResource: URI, message: string, location?: ChatAgentLocation, context?: IChatParserContext): IParsedChatRequest;
30
- parseChatRequestWithReferences(references: ReadonlyArray<IDynamicVariable>, selectedToolAndToolSets: ToolAndToolSetEnablementMap, message: string, location?: ChatAgentLocation, context?: IChatParserContext): IParsedChatRequest;
31
- private tryToParseAgent;
32
- private tryToParseVariable;
33
- private tryToParseSlashCommand;
34
- private tryToParseDynamicVariable;
35
- }
@@ -1,289 +0,0 @@
1
-
2
- import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
3
- import { Position } from '../../../../../editor/common/core/position.js';
4
- import { Range } from '../../../../../editor/common/core/range.js';
5
- import { OffsetRange } from '../../../../../editor/common/core/ranges/offsetRange.js';
6
- import { IChatVariablesService } from '../attachments/chatVariables.service.js';
7
- import { ChatAgentLocation, ChatModeKind } from '../constants.js';
8
- import { getChatSessionType } from '../model/chatUri.js';
9
- import { IChatAgentService } from '../participants/chatAgents.service.js';
10
- import { IChatSlashCommandService } from '../participants/chatSlashCommands.service.js';
11
- import { matchesSessionType } from '../promptSyntax/service/promptsService.js';
12
- import { IPromptsService } from '../promptSyntax/service/promptsService.service.js';
13
- import { isToolSet } from '../tools/languageModelToolsService.js';
14
- import { chatVariableLeader, chatAgentLeader, chatSubcommandLeader, ChatRequestTextPart, ChatRequestAgentPart, ChatRequestToolPart, ChatRequestToolSetPart, ChatRequestAgentSubcommandPart, ChatRequestSlashCommandPart, ChatRequestSlashPromptPart, ChatRequestDynamicVariablePart } from './chatParserTypes.js';
15
-
16
- const agentReg = /^@([\w_\-\.]+)(?=(\s|$|\b))/i;
17
- const variableReg = /^#([\w_\-]+)(:\d+)?(?=(\s|$|\b))/i;
18
- const slashReg = /^\/([\p{L}\d_\-\.:]+)(?=(\s|$|\b))/iu;
19
- let ChatRequestParser = class ChatRequestParser {
20
- constructor(agentService, variableService, slashCommandService, promptsService) {
21
- this.agentService = agentService;
22
- this.variableService = variableService;
23
- this.slashCommandService = slashCommandService;
24
- this.promptsService = promptsService;
25
- }
26
- parseChatRequest(sessionResource, message, location = ChatAgentLocation.Chat, context = {}) {
27
- const references = this.variableService.getDynamicVariables(sessionResource);
28
- const selectedToolAndToolSets = this.variableService.getSelectedToolAndToolSets(sessionResource);
29
- if (!context.sessionType) {
30
- context = {
31
- ...context,
32
- sessionType: getChatSessionType(sessionResource)
33
- };
34
- }
35
- return this.parseChatRequestWithReferences(references, selectedToolAndToolSets, message, location, context);
36
- }
37
- parseChatRequestWithReferences(
38
- references,
39
- selectedToolAndToolSets,
40
- message,
41
- location = ChatAgentLocation.Chat,
42
- context
43
- ) {
44
- const parts = [];
45
- const toolsByName = ( new Map());
46
- const toolSetsByName = ( new Map());
47
- for (const [entry, enabled] of selectedToolAndToolSets) {
48
- if (enabled) {
49
- if (isToolSet(entry)) {
50
- toolSetsByName.set(entry.referenceName, entry);
51
- } else {
52
- toolsByName.set(entry.toolReferenceName ?? entry.displayName, entry);
53
- }
54
- }
55
- }
56
- let lineNumber = 1;
57
- let column = 1;
58
- for (let i = 0; i < message.length; i++) {
59
- const previousChar = message.charAt(i - 1);
60
- const char = message.charAt(i);
61
- let newPart;
62
- if (previousChar.match(/\s/) || i === 0) {
63
- if (char === chatVariableLeader) {
64
- newPart = this.tryToParseVariable(message.slice(i), i, ( new Position(lineNumber, column)), parts, toolsByName, toolSetsByName);
65
- } else if (char === chatAgentLeader) {
66
- newPart = this.tryToParseAgent(message.slice(i), message, i, ( new Position(lineNumber, column)), parts, location, context);
67
- } else if (char === chatSubcommandLeader) {
68
- newPart = this.tryToParseSlashCommand(message.slice(i), message, i, ( new Position(lineNumber, column)), parts, location, context);
69
- }
70
- if (!newPart) {
71
- newPart = this.tryToParseDynamicVariable(message.slice(i), i, ( new Position(lineNumber, column)), references);
72
- }
73
- }
74
- if (newPart) {
75
- if (i !== 0) {
76
- const previousPart = parts.at(-1);
77
- const previousPartEnd = previousPart?.range.endExclusive ?? 0;
78
- const previousPartEditorRangeEndLine = previousPart?.editorRange.endLineNumber ?? 1;
79
- const previousPartEditorRangeEndCol = previousPart?.editorRange.endColumn ?? 1;
80
- parts.push(( new ChatRequestTextPart(( new OffsetRange(previousPartEnd, i)), ( new Range(
81
- previousPartEditorRangeEndLine,
82
- previousPartEditorRangeEndCol,
83
- lineNumber,
84
- column
85
- )), message.slice(previousPartEnd, i))));
86
- }
87
- parts.push(newPart);
88
- }
89
- if (char === "\n") {
90
- lineNumber++;
91
- column = 1;
92
- } else {
93
- column++;
94
- }
95
- }
96
- const lastPart = parts.at(-1);
97
- const lastPartEnd = lastPart?.range.endExclusive ?? 0;
98
- if (lastPartEnd < message.length) {
99
- parts.push(( new ChatRequestTextPart(( new OffsetRange(lastPartEnd, message.length)), ( new Range(
100
- lastPart?.editorRange.endLineNumber ?? 1,
101
- lastPart?.editorRange.endColumn ?? 1,
102
- lineNumber,
103
- column
104
- )), message.slice(lastPartEnd, message.length))));
105
- }
106
- return {
107
- parts,
108
- text: message
109
- };
110
- }
111
- tryToParseAgent(message, fullMessage, offset, position, parts, location, context) {
112
- const nextAgentMatch = message.match(agentReg);
113
- if (!nextAgentMatch) {
114
- return;
115
- }
116
- const [full, name] = nextAgentMatch;
117
- const agentRange = ( new OffsetRange(offset, offset + full.length));
118
- const agentEditorRange = ( new Range(
119
- position.lineNumber,
120
- position.column,
121
- position.lineNumber,
122
- position.column + full.length
123
- ));
124
- let agents = this.agentService.getAgentsByName(name);
125
- if (!agents.length) {
126
- const fqAgent = this.agentService.getAgentByFullyQualifiedId(name);
127
- if (fqAgent) {
128
- agents = [fqAgent];
129
- }
130
- }
131
- const agent = agents.length > 1 && context?.selectedAgent ? context.selectedAgent : agents.find(a => a.locations.includes(location));
132
- if (!agent) {
133
- return;
134
- }
135
- if (context?.mode && !agent.modes.includes(context.mode)) {
136
- return;
137
- }
138
- if (( parts.some(p => p instanceof ChatRequestAgentPart))) {
139
- return;
140
- }
141
- if (( parts.some(
142
- p => (p instanceof ChatRequestTextPart && p.text.trim() !== "") || !(p instanceof ChatRequestAgentPart)
143
- ))) {
144
- return;
145
- }
146
- const previousPart = parts.at(-1);
147
- const previousPartEnd = previousPart?.range.endExclusive ?? 0;
148
- const textSincePreviousPart = fullMessage.slice(previousPartEnd, offset);
149
- if (textSincePreviousPart.trim() !== "") {
150
- return;
151
- }
152
- return ( new ChatRequestAgentPart(agentRange, agentEditorRange, agent));
153
- }
154
- tryToParseVariable(message, offset, position, parts, toolsByName, toolSetsByName) {
155
- const nextVariableMatch = message.match(variableReg);
156
- if (!nextVariableMatch) {
157
- return;
158
- }
159
- const [full, name] = nextVariableMatch;
160
- const varRange = ( new OffsetRange(offset, offset + full.length));
161
- const varEditorRange = ( new Range(
162
- position.lineNumber,
163
- position.column,
164
- position.lineNumber,
165
- position.column + full.length
166
- ));
167
- const tool = toolsByName.get(name);
168
- if (tool) {
169
- return ( new ChatRequestToolPart(varRange, varEditorRange, name, tool.id, tool.displayName, tool.icon));
170
- }
171
- const toolset = toolSetsByName.get(name);
172
- if (toolset) {
173
- const value = ( Array.from(toolset.getTools()).map(t => ( new ChatRequestToolPart(
174
- varRange,
175
- varEditorRange,
176
- t.toolReferenceName ?? t.displayName,
177
- t.id,
178
- t.displayName,
179
- t.icon
180
- )).toVariableEntry()));
181
- return ( new ChatRequestToolSetPart(
182
- varRange,
183
- varEditorRange,
184
- toolset.id,
185
- toolset.referenceName,
186
- toolset.icon,
187
- value
188
- ));
189
- }
190
- return;
191
- }
192
- tryToParseSlashCommand(remainingMessage, fullMessage, offset, position, parts, location, context) {
193
- const nextSlashMatch = remainingMessage.match(slashReg);
194
- if (!nextSlashMatch) {
195
- return;
196
- }
197
- if (( parts.some(
198
- p => !(p instanceof ChatRequestAgentPart) && !(p instanceof ChatRequestTextPart && p.text.trim() === "")
199
- ))) {
200
- return;
201
- }
202
- const previousPart = parts.at(-1);
203
- const previousPartEnd = previousPart?.range.endExclusive ?? 0;
204
- const textSincePreviousPart = fullMessage.slice(previousPartEnd, offset);
205
- if (textSincePreviousPart.trim() !== "") {
206
- return;
207
- }
208
- const [full, command] = nextSlashMatch;
209
- const slashRange = ( new OffsetRange(offset, offset + full.length));
210
- const slashEditorRange = ( new Range(
211
- position.lineNumber,
212
- position.column,
213
- position.lineNumber,
214
- position.column + full.length
215
- ));
216
- const usedAgent = parts.find(p => p instanceof ChatRequestAgentPart)?.agent ?? (context?.forcedAgent ? context.forcedAgent : undefined);
217
- if (usedAgent) {
218
- const subCommand = usedAgent.slashCommands.find(c => c.name === command);
219
- if (subCommand) {
220
- return ( new ChatRequestAgentSubcommandPart(slashRange, slashEditorRange, subCommand));
221
- }
222
- }
223
- const capabilities = context?.attachmentCapabilities ?? usedAgent?.capabilities;
224
- const slashCommands = this.slashCommandService.getCommands(location, context?.mode ?? ChatModeKind.Ask);
225
- const slashCommand = slashCommands.find(
226
- c => c.command === command && matchesSessionType(c.sessionTypes, context?.sessionType)
227
- );
228
- if (!usedAgent || slashCommand?.silent || capabilities?.supportsPromptAttachments) {
229
- if (slashCommand) {
230
- return ( new ChatRequestSlashCommandPart(slashRange, slashEditorRange, slashCommand));
231
- } else if (!usedAgent) {
232
- const defaultAgent = this.agentService.getDefaultAgent(location, context?.mode);
233
- const subCommand = defaultAgent?.slashCommands.find(c => c.name === command);
234
- if (subCommand) {
235
- return ( new ChatRequestAgentSubcommandPart(slashRange, slashEditorRange, subCommand));
236
- }
237
- }
238
- const afterSlash = remainingMessage.slice(full.length);
239
- const subMatch = afterSlash.match(/^[ \t]+([\p{L}\d_\-\.]+)/u);
240
- if (subMatch) {
241
- const candidate = `${command}:${subMatch[1]}`;
242
- if (this.promptsService.hasPromptSlashCommand(candidate)) {
243
- const consumedLength = full.length + subMatch[0].length;
244
- const extendedRange = ( new OffsetRange(offset, offset + consumedLength));
245
- const extendedEditorRange = ( new Range(
246
- position.lineNumber,
247
- position.column,
248
- position.lineNumber,
249
- position.column + consumedLength
250
- ));
251
- const displayText = remainingMessage.slice(0, consumedLength);
252
- return ( new ChatRequestSlashPromptPart(extendedRange, extendedEditorRange, candidate, displayText));
253
- }
254
- }
255
- if (this.promptsService.isValidSlashCommandName(command)) {
256
- return ( new ChatRequestSlashPromptPart(slashRange, slashEditorRange, command));
257
- }
258
- }
259
- return;
260
- }
261
- tryToParseDynamicVariable(message, offset, position, references) {
262
- const refAtThisPosition = references.find(
263
- r => r.range.startLineNumber === position.lineNumber && r.range.startColumn === position.column
264
- );
265
- if (refAtThisPosition) {
266
- const length = refAtThisPosition.range.endColumn - refAtThisPosition.range.startColumn;
267
- const text = message.substring(0, length);
268
- const range = ( new OffsetRange(offset, offset + length));
269
- return ( new ChatRequestDynamicVariablePart(
270
- range,
271
- refAtThisPosition.range,
272
- text,
273
- refAtThisPosition.id,
274
- refAtThisPosition.modelDescription,
275
- refAtThisPosition.data,
276
- refAtThisPosition.fullName,
277
- refAtThisPosition.icon,
278
- refAtThisPosition.isFile,
279
- refAtThisPosition.isDirectory,
280
- refAtThisPosition._meta,
281
- refAtThisPosition.isAttachmentReference
282
- ));
283
- }
284
- return;
285
- }
286
- };
287
- ChatRequestParser = ( __decorate([( __param(0, IChatAgentService)), ( __param(1, IChatVariablesService)), ( __param(2, IChatSlashCommandService)), ( __param(3, IPromptsService))], ChatRequestParser));
288
-
289
- export { ChatRequestParser, agentReg, slashReg, variableReg };
@@ -1,72 +0,0 @@
1
- import { CancellationToken } from "../../../../../../base/common/cancellation.js";
2
- import { Disposable } from "../../../../../../base/common/lifecycle.js";
3
- import { IChatQuestionAnswers } from "../../chatService/chatService.js";
4
- import { IChatService } from "../../chatService/chatService.service.js";
5
- import { IConfigurationService } from "../../../../../../platform/configuration/common/configuration.service.js";
6
- import { ILogService } from "../../../../../../platform/log/common/log.service.js";
7
- import { ITelemetryService } from "../../../../../../platform/telemetry/common/telemetry.service.js";
8
- import { CountTokensCallback, IPreparedToolInvocation, IToolData, IToolImpl, IToolInvocation, IToolInvocationPreparationContext, IToolResult, ToolProgress } from "../languageModelToolsService.js";
9
- /**
10
- * Response returned to the model when the user is not available (autopilot mode).
11
- */
12
- export declare const AUTOPILOT_ASK_USER_RESPONSE = "The user is not available to respond and will review your work later. Work autonomously and make good decisions.";
13
- export declare const AskQuestionsToolId = "vscode_askQuestions";
14
- export interface IQuestionOption {
15
- readonly label: string;
16
- readonly description?: string;
17
- readonly recommended?: boolean;
18
- }
19
- export interface IQuestion {
20
- readonly header: string;
21
- readonly question: string;
22
- readonly message?: string;
23
- readonly multiSelect?: boolean;
24
- readonly options?: IQuestionOption[];
25
- readonly allowFreeformInput?: boolean;
26
- }
27
- export interface IAskQuestionsParams {
28
- readonly questions: IQuestion[];
29
- }
30
- export interface IQuestionAnswer {
31
- readonly selected: string[];
32
- readonly freeText: string | null;
33
- readonly skipped: boolean;
34
- }
35
- export interface IAnswerResult {
36
- readonly answers: Record<string, IQuestionAnswer>;
37
- }
38
- export declare function createAskQuestionsToolData(): IToolData;
39
- export declare const AskQuestionsToolData: IToolData;
40
- export declare class AskQuestionsTool extends Disposable implements IToolImpl {
41
- private readonly chatService;
42
- private readonly telemetryService;
43
- private readonly logService;
44
- private readonly configService;
45
- constructor(chatService: IChatService, telemetryService: ITelemetryService, logService: ILogService, configService: IConfigurationService);
46
- invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
47
- prepareToolInvocation(context: IToolInvocationPreparationContext, _token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
48
- private getRequest;
49
- /**
50
- * Resolves the terminal execution ID for the request.
51
- * Prefer structured metadata and fall back to legacy message parsing for
52
- * old sessions that may not carry the metadata yet.
53
- * As a final fallback, search completed runInTerminal tool invocations in
54
- * the response for the terminal ID, but only when the tool output indicates
55
- * the terminal is still running and waiting for input (foreground/timeout
56
- * path where the model calls ask_questions from the same turn as
57
- * runInTerminal).
58
- */
59
- private extractTerminalId;
60
- private toQuestionCarousel;
61
- private toChatQuestion;
62
- protected convertCarouselAnswers(questions: IQuestion[], carouselAnswers: IChatQuestionAnswers | undefined, idToHeaderMap: Map<string, string>): IAnswerResult;
63
- private collectMetrics;
64
- private createSkippedResult;
65
- private createAutopilotResult;
66
- /**
67
- * Build carousel answer data keyed by carousel question IDs for rendering
68
- * the completed summary in the UI during autopilot mode.
69
- */
70
- private buildAutopilotCarouselAnswers;
71
- private sendTelemetry;
72
- }