@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,298 +0,0 @@
1
-
2
- import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
3
- import { Disposable } from '../../../../../../base/common/lifecycle.js';
4
- import { Codicon } from '../../../../../../base/common/codicons.js';
5
- import { ThemeIcon } from '../../../../../../base/common/themables.js';
6
- import { ToolDataSource, ToolInvocationPresentation } from '../languageModelToolsService.js';
7
- import { ILogService } from '../../../../../../platform/log/common/log.service.js';
8
- import { ITelemetryService } from '../../../../../../platform/telemetry/common/telemetry.service.js';
9
- import { IChatTodoListService } from '../chatTodoListService.service.js';
10
- import { localize } from '../../../../../../nls.js';
11
- import { MarkdownString } from '../../../../../../base/common/htmlContent.js';
12
- import { URI } from '../../../../../../base/common/uri.js';
13
-
14
- const ManageTodoListToolToolId = "manage_todo_list";
15
- function createManageTodoListToolData() {
16
- const inputSchema = {
17
- type: "object",
18
- properties: {
19
- todoList: {
20
- type: "array",
21
- description: "Complete array of all todo items. Must include ALL items - both existing and new.",
22
- items: {
23
- type: "object",
24
- properties: {
25
- id: {
26
- type: "number",
27
- description: "Unique identifier for the todo. Use sequential numbers starting from 1."
28
- },
29
- title: {
30
- type: "string",
31
- description: "Concise action-oriented todo label (3-7 words). Displayed in UI."
32
- },
33
- status: {
34
- type: "string",
35
- enum: ["not-started", "in-progress", "completed"],
36
- description: "not-started: Not begun | in-progress: Currently working (max 1) | completed: Fully finished with no blockers"
37
- }
38
- },
39
- required: ["id", "title", "status"]
40
- }
41
- }
42
- },
43
- required: ["todoList"]
44
- };
45
- return {
46
- id: ManageTodoListToolToolId,
47
- toolReferenceName: "todo",
48
- legacyToolReferenceFullNames: ["todos"],
49
- canBeReferencedInPrompt: true,
50
- icon: ThemeIcon.fromId(Codicon.checklist.id),
51
- displayName: ( localize(10876, "Manage and track todo items for task planning")),
52
- userDescription: ( localize(10877, "Manage and track todo items for task planning")),
53
- modelDescription: "Manage a structured todo list to track progress and plan tasks throughout your coding session. Use this tool VERY frequently to ensure task visibility and proper planning.\n\nWhen to use this tool:\n- Complex multi-step work requiring planning and tracking\n- When user provides multiple tasks or requests (numbered/comma-separated)\n- After receiving new instructions that require multiple steps\n- BEFORE starting work on any todo (mark as in-progress)\n- IMMEDIATELY after completing each todo (mark completed individually)\n- When breaking down larger tasks into smaller actionable steps\n- To give users visibility into your progress and planning\n\nWhen NOT to use:\n- Single, trivial tasks that can be completed in one step\n- Purely conversational/informational requests\n- When just reading files or performing simple searches\n\nCRITICAL workflow:\n1. Plan tasks by writing todo list with specific, actionable items\n2. Mark ONE todo as in-progress before starting work\n3. Complete the work for that specific todo\n4. Mark that todo as completed IMMEDIATELY\n5. Move to next todo and repeat\n\nTodo states:\n- not-started: Todo not yet begun\n- in-progress: Currently working (limit ONE at a time)\n- completed: Finished successfully\n\nIMPORTANT: Mark todos completed as soon as they are done. Do not batch completions.",
54
- source: ToolDataSource.Internal,
55
- inputSchema: inputSchema
56
- };
57
- }
58
- createManageTodoListToolData();
59
- let ManageTodoListTool = class ManageTodoListTool extends Disposable {
60
- constructor(chatTodoListService, logService, telemetryService) {
61
- super();
62
- this.chatTodoListService = chatTodoListService;
63
- this.logService = logService;
64
- this.telemetryService = telemetryService;
65
- }
66
- async invoke(invocation, _countTokens, _progress, _token) {
67
- const args = invocation.parameters;
68
- let chatSessionResource = invocation.context?.sessionResource;
69
- if (!chatSessionResource && args.operation === "read" && args.chatSessionResource) {
70
- try {
71
- chatSessionResource = ( URI.parse(args.chatSessionResource));
72
- } catch (error) {
73
- this.logService.error("ManageTodoListTool: Invalid chatSessionResource URI", error);
74
- }
75
- }
76
- if (!chatSessionResource) {
77
- return {
78
- content: [{
79
- kind: "text",
80
- value: "Error: No session resource available"
81
- }]
82
- };
83
- }
84
- this.logService.debug(`ManageTodoListTool: Invoking with options ${JSON.stringify(args)}`);
85
- try {
86
- if (args.operation === "read") {
87
- return this.handleReadOperation(chatSessionResource);
88
- } else {
89
- return this.handleWriteOperation(args, chatSessionResource);
90
- }
91
- } catch (error) {
92
- const errorMessage = `Error: ${error instanceof Error ? error.message : "Unknown error"}`;
93
- return {
94
- content: [{
95
- kind: "text",
96
- value: errorMessage
97
- }]
98
- };
99
- }
100
- }
101
- async prepareToolInvocation(context, _token) {
102
- const args = context.parameters;
103
- const chatSessionResource = context.chatSessionResource;
104
- if (!chatSessionResource) {
105
- return undefined;
106
- }
107
- const currentTodoItems = this.chatTodoListService.getTodos(chatSessionResource);
108
- let message;
109
- if (args.operation === "read") {
110
- message = ( localize(10878, "Read todo list"));
111
- } else if (args.todoList) {
112
- message = this.generatePastTenseMessage(currentTodoItems, args.todoList);
113
- }
114
- const items = args.todoList ?? currentTodoItems;
115
- const todoList = ( items.map(todo => ({
116
- id: ( todo.id.toString()),
117
- title: todo.title,
118
- status: todo.status
119
- })));
120
- const invocationLabel = message?.replace(/^(Starting|Completed): /i, "") ?? ( localize(10879, "Updating todo list"));
121
- const invocationMessage = ( new MarkdownString(invocationLabel));
122
- return {
123
- invocationMessage,
124
- presentation: items.length ? undefined : ToolInvocationPresentation.Hidden,
125
- pastTenseMessage: ( new MarkdownString(message ?? ( localize(10880, "Updated todo list")))),
126
- toolSpecificData: {
127
- kind: "todoList",
128
- todoList: todoList
129
- }
130
- };
131
- }
132
- generatePastTenseMessage(currentTodos, newTodos) {
133
- if (currentTodos.length === 0 && newTodos.length > 0) {
134
- return newTodos.length === 1 ? ( localize(10881, "Created 1 todo")) : ( localize(10882, "Created {0} todos", newTodos.length));
135
- }
136
- const currentTodoMap = ( new Map(( currentTodos.map(todo => [todo.id, todo]))));
137
- const startedTodos = newTodos.filter(newTodo => {
138
- const currentTodo = currentTodoMap.get(newTodo.id);
139
- return currentTodo && currentTodo.status !== "in-progress" && newTodo.status === "in-progress";
140
- });
141
- if (startedTodos.length > 0) {
142
- const startedTodo = startedTodos[0];
143
- const totalTodos = newTodos.length;
144
- const currentPosition = newTodos.findIndex(todo => todo.id === startedTodo.id) + 1;
145
- return localize(
146
- 10883,
147
- "Starting: *{0}* ({1}/{2})",
148
- startedTodo.title,
149
- currentPosition,
150
- totalTodos
151
- );
152
- }
153
- const completedTodos = newTodos.filter(newTodo => {
154
- const currentTodo = currentTodoMap.get(newTodo.id);
155
- return currentTodo && currentTodo.status !== "completed" && newTodo.status === "completed";
156
- });
157
- if (completedTodos.length > 0) {
158
- const completedTodo = completedTodos[0];
159
- const totalTodos = newTodos.length;
160
- const currentPosition = newTodos.findIndex(todo => todo.id === completedTodo.id) + 1;
161
- return localize(
162
- 10884,
163
- "Completed: *{0}* ({1}/{2})",
164
- completedTodo.title,
165
- currentPosition,
166
- totalTodos
167
- );
168
- }
169
- const addedTodos = newTodos.filter(newTodo => !( currentTodoMap.has(newTodo.id)));
170
- if (addedTodos.length > 0) {
171
- return addedTodos.length === 1 ? ( localize(10885, "Added 1 todo")) : ( localize(10886, "Added {0} todos", addedTodos.length));
172
- }
173
- return localize(10887, "Updated todo list");
174
- }
175
- handleRead(todoItems, sessionResource) {
176
- if (todoItems.length === 0) {
177
- return "No todo list found.";
178
- }
179
- const markdownTaskList = this.formatTodoListAsMarkdownTaskList(todoItems);
180
- return `# Todo List\n\n${markdownTaskList}`;
181
- }
182
- handleReadOperation(chatSessionResource) {
183
- const todoItems = this.chatTodoListService.getTodos(chatSessionResource);
184
- const readResult = this.handleRead(todoItems, chatSessionResource);
185
- const statusCounts = this.calculateStatusCounts(todoItems);
186
- this.telemetryService.publicLog2("todoListToolInvoked", {
187
- operation: "read",
188
- notStartedCount: statusCounts.notStartedCount,
189
- inProgressCount: statusCounts.inProgressCount,
190
- completedCount: statusCounts.completedCount
191
- });
192
- return {
193
- content: [{
194
- kind: "text",
195
- value: readResult
196
- }]
197
- };
198
- }
199
- handleWriteOperation(args, chatSessionResource) {
200
- if (!args.todoList) {
201
- return {
202
- content: [{
203
- kind: "text",
204
- value: "Error: todoList is required for write operation"
205
- }]
206
- };
207
- }
208
- const todoList = ( args.todoList.map(parsedTodo => ({
209
- id: parsedTodo.id,
210
- title: parsedTodo.title,
211
- status: parsedTodo.status
212
- })));
213
- const existingTodos = this.chatTodoListService.getTodos(chatSessionResource);
214
- const changes = this.calculateTodoChanges(existingTodos, todoList);
215
- this.chatTodoListService.setTodos(chatSessionResource, todoList);
216
- const statusCounts = this.calculateStatusCounts(todoList);
217
- const warnings = [];
218
- if (todoList.length < 3) {
219
- warnings.push(
220
- "Warning: Small todo list (<3 items). This task might not need a todo list."
221
- );
222
- } else if (todoList.length > 10) {
223
- warnings.push(
224
- "Warning: Large todo list (>10 items). Consider keeping the list focused and actionable."
225
- );
226
- }
227
- if (changes > 3) {
228
- warnings.push(
229
- "Warning: Did you mean to update so many todos at the same time? Consider working on them one by one."
230
- );
231
- }
232
- this.telemetryService.publicLog2("todoListToolInvoked", {
233
- operation: "write",
234
- notStartedCount: statusCounts.notStartedCount,
235
- inProgressCount: statusCounts.inProgressCount,
236
- completedCount: statusCounts.completedCount
237
- });
238
- return {
239
- content: [{
240
- kind: "text",
241
- value: `Successfully wrote todo list${warnings.length ? "\n\n" + warnings.join("\n") : ""}`
242
- }],
243
- toolMetadata: {
244
- warnings: warnings
245
- }
246
- };
247
- }
248
- calculateStatusCounts(todos) {
249
- const notStartedCount = todos.filter(todo => todo.status === "not-started").length;
250
- const inProgressCount = todos.filter(todo => todo.status === "in-progress").length;
251
- const completedCount = todos.filter(todo => todo.status === "completed").length;
252
- return {
253
- notStartedCount,
254
- inProgressCount,
255
- completedCount
256
- };
257
- }
258
- formatTodoListAsMarkdownTaskList(todoList) {
259
- if (todoList.length === 0) {
260
- return "";
261
- }
262
- return ( todoList.map(todo => {
263
- let checkbox;
264
- switch (todo.status) {
265
- case "completed":
266
- checkbox = "[x]";
267
- break;
268
- case "in-progress":
269
- checkbox = "[-]";
270
- break;
271
- case "not-started":
272
- default:
273
- checkbox = "[ ]";
274
- break;
275
- }
276
- const lines = [`- ${checkbox} ${todo.title}`];
277
- return lines.join("\n");
278
- })).join("\n");
279
- }
280
- calculateTodoChanges(oldList, newList) {
281
- let modified = 0;
282
- const minLen = Math.min(oldList.length, newList.length);
283
- for (let i = 0; i < minLen; i++) {
284
- const o = oldList[i];
285
- const n = newList[i];
286
- if (o.title !== n.title || o.status !== n.status) {
287
- modified++;
288
- }
289
- }
290
- const added = Math.max(0, newList.length - oldList.length);
291
- const removed = Math.max(0, oldList.length - newList.length);
292
- const totalChanges = added + removed + modified;
293
- return totalChanges;
294
- }
295
- };
296
- ManageTodoListTool = ( __decorate([( __param(0, IChatTodoListService)), ( __param(1, ILogService)), ( __param(2, ITelemetryService))], ManageTodoListTool));
297
-
298
- export { ManageTodoListTool, ManageTodoListToolToolId, createManageTodoListToolData };
@@ -1,25 +0,0 @@
1
- import { CancellationToken } from "../../../../../../base/common/cancellation.js";
2
- import { Disposable } from "../../../../../../base/common/lifecycle.js";
3
- import { ILogService } from "../../../../../../platform/log/common/log.service.js";
4
- import { IChatPlanApprovalAction } from "../../chatService/chatService.js";
5
- import { IChatService } from "../../chatService/chatService.service.js";
6
- import { CountTokensCallback, IPreparedToolInvocation, IToolData, IToolImpl, IToolInvocation, IToolInvocationPreparationContext, IToolResult, ToolProgress } from "../languageModelToolsService.js";
7
- export declare const ReviewPlanToolId = "vscode_reviewPlan";
8
- export interface IReviewPlanParams {
9
- readonly title?: string;
10
- readonly plan?: string;
11
- readonly content: string;
12
- readonly actions: IChatPlanApprovalAction[];
13
- readonly canProvideFeedback: boolean;
14
- }
15
- export declare function createReviewPlanToolData(): IToolData;
16
- export declare const ReviewPlanToolData: IToolData;
17
- export declare class ReviewPlanTool extends Disposable implements IToolImpl {
18
- private readonly chatService;
19
- private readonly logService;
20
- constructor(chatService: IChatService, logService: ILogService);
21
- invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
22
- prepareToolInvocation(context: IToolInvocationPreparationContext, _token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
23
- private toResult;
24
- private getRequest;
25
- }
@@ -1,177 +0,0 @@
1
-
2
- import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
3
- import { raceCancellation } from '../../../../../../base/common/async.js';
4
- import { Codicon } from '../../../../../../base/common/codicons.js';
5
- import { CancellationError } from '../../../../../../base/common/errors.js';
6
- import { MarkdownString } from '../../../../../../base/common/htmlContent.js';
7
- import { Disposable } from '../../../../../../base/common/lifecycle.js';
8
- import { ThemeIcon } from '../../../../../../base/common/themables.js';
9
- import { URI } from '../../../../../../base/common/uri.js';
10
- import { generateUuid } from '../../../../../../base/common/uuid.js';
11
- import { localize } from '../../../../../../nls.js';
12
- import { ILogService } from '../../../../../../platform/log/common/log.service.js';
13
- import { IChatService } from '../../chatService/chatService.service.js';
14
- import { ChatPlanReviewData } from '../../model/chatProgressTypes/chatPlanReviewData.js';
15
- import { ToolDataSource } from '../languageModelToolsService.js';
16
-
17
- const ReviewPlanToolId = "vscode_reviewPlan";
18
- function createReviewPlanToolData() {
19
- const approvalActionSchema = {
20
- type: "object",
21
- properties: {
22
- label: {
23
- type: "string",
24
- description: "Short action label shown in the dropdown button."
25
- },
26
- description: {
27
- type: "string",
28
- description: "Optional detail shown below the label in the dropdown list."
29
- },
30
- default: {
31
- type: "boolean",
32
- description: "Whether this action should be selected by default."
33
- },
34
- permissionLevel: {
35
- type: "string",
36
- enum: ["autopilot"],
37
- description: "When set to \"autopilot\", a confirmation dialog is shown before proceeding."
38
- }
39
- },
40
- required: ["label"]
41
- };
42
- const inputSchema = {
43
- type: "object",
44
- properties: {
45
- title: {
46
- type: "string",
47
- description: "Title displayed in the widget header. Defaults to \"Plan summary\" if omitted."
48
- },
49
- plan: {
50
- type: "string",
51
- description: "Optional URI of an editable plan file. An Edit button in the widget header opens it in the editor."
52
- },
53
- content: {
54
- type: "string",
55
- description: "Markdown content rendered in the body of the widget. May be the plan summary or full plan text."
56
- },
57
- actions: {
58
- type: "array",
59
- description: "List of approval actions offered in the primary dropdown button. Order is preserved.",
60
- items: approvalActionSchema,
61
- minItems: 1
62
- },
63
- canProvideFeedback: {
64
- type: "boolean",
65
- description: "When true, an additional feedback textarea is shown below the plan content."
66
- }
67
- },
68
- required: ["content", "actions", "canProvideFeedback"]
69
- };
70
- return {
71
- id: ReviewPlanToolId,
72
- toolReferenceName: "reviewPlan",
73
- canBeReferencedInPrompt: false,
74
- icon: ThemeIcon.fromId(Codicon.checklist.id),
75
- displayName: ( localize(10888, "Review Plan")),
76
- userDescription: ( localize(10889, "Ask the user to review and approve a plan before proceeding.")),
77
- modelDescription: "Use this tool to present a plan to the user for review. Provide the plan content as markdown, a list of approval actions (with optional default), and whether the user can provide freeform feedback. Optionally provide a URI to the backing plan file so the user can edit it. The tool returns the chosen action, whether the plan was rejected, and any feedback.",
78
- source: ToolDataSource.Internal,
79
- inputSchema
80
- };
81
- }
82
- const ReviewPlanToolData = createReviewPlanToolData();
83
- let ReviewPlanTool = class ReviewPlanTool extends Disposable {
84
- constructor(chatService, logService) {
85
- super();
86
- this.chatService = chatService;
87
- this.logService = logService;
88
- }
89
- async invoke(invocation, _countTokens, _progress, token) {
90
- const parameters = invocation.parameters;
91
- const {
92
- title,
93
- plan,
94
- content,
95
- actions,
96
- canProvideFeedback
97
- } = parameters;
98
- if (!actions || actions.length === 0) {
99
- throw ( new Error(( localize(10890, "At least one approval action must be provided."))));
100
- }
101
- const {
102
- request
103
- } = this.getRequest(invocation.context?.sessionResource, invocation.chatRequestId);
104
- if (!request) {
105
- this.logService.warn("[ReviewPlanTool] Missing chat context; returning rejected result.");
106
- return this.toResult({
107
- rejected: true
108
- });
109
- }
110
- let planUri;
111
- if (plan) {
112
- try {
113
- planUri = ( URI.parse(plan));
114
- } catch {
115
- try {
116
- planUri = URI.file(plan);
117
- } catch {
118
- planUri = undefined;
119
- }
120
- }
121
- }
122
- const reviewData = ( new ChatPlanReviewData(title ?? ( localize(10891, "Plan summary")), content, actions, canProvideFeedback, planUri?.toJSON(), generateUuid()));
123
- this.chatService.appendProgress(request, reviewData);
124
- const result = await raceCancellation(reviewData.completion.p, token);
125
- if (token.isCancellationRequested) {
126
- reviewData.dismiss();
127
- throw ( new CancellationError());
128
- }
129
- return this.toResult(result ?? {
130
- rejected: true
131
- });
132
- }
133
- async prepareToolInvocation(context, _token) {
134
- const parameters = context.parameters;
135
- if (!parameters.actions || parameters.actions.length === 0) {
136
- throw ( new Error(( localize(10890, "At least one approval action must be provided."))));
137
- }
138
- return {
139
- invocationMessage: ( new MarkdownString(( localize(10892, "Asking you to review the plan")))),
140
- pastTenseMessage: ( new MarkdownString(( localize(10893, "Asked you to review the plan"))))
141
- };
142
- }
143
- toResult(result) {
144
- return {
145
- content: [{
146
- kind: "text",
147
- value: JSON.stringify(result)
148
- }]
149
- };
150
- }
151
- getRequest(chatSessionResource, chatRequestId) {
152
- if (!chatSessionResource) {
153
- return {
154
- request: undefined
155
- };
156
- }
157
- const model = this.chatService.getSession(chatSessionResource);
158
- if (!model) {
159
- return {
160
- request: undefined
161
- };
162
- }
163
- let request;
164
- if (chatRequestId) {
165
- request = model.getRequests().find(r => r.id === chatRequestId);
166
- }
167
- if (!request) {
168
- request = model.getRequests().at(-1);
169
- }
170
- return {
171
- request
172
- };
173
- }
174
- };
175
- ReviewPlanTool = ( __decorate([( __param(0, IChatService)), ( __param(1, ILogService))], ReviewPlanTool));
176
-
177
- export { ReviewPlanTool, ReviewPlanToolData, ReviewPlanToolId, createReviewPlanToolData };
@@ -1,73 +0,0 @@
1
- import { CancellationToken } from "../../../../../../base/common/cancellation.js";
2
- import { type Event } from "../../../../../../base/common/event.js";
3
- import { Disposable } from "../../../../../../base/common/lifecycle.js";
4
- import { IConfigurationService } from "../../../../../../platform/configuration/common/configuration.service.js";
5
- import { IInstantiationService } from "../../../../../../platform/instantiation/common/instantiation.js";
6
- import { ILogService } from "../../../../../../platform/log/common/log.service.js";
7
- import { IProductService } from "../../../../../../platform/product/common/productService.service.js";
8
- import { ITelemetryService } from "../../../../../../platform/telemetry/common/telemetry.service.js";
9
- import { IChatService } from "../../chatService/chatService.service.js";
10
- import { ILanguageModelsService } from "../../languageModels.service.js";
11
- import { IChatAgentService } from "../../participants/chatAgents.service.js";
12
- import { IPromptsService } from "../../promptSyntax/service/promptsService.service.js";
13
- import { CountTokensCallback, IPreparedToolInvocation, IToolData, IToolImpl, IToolInvocation, IToolInvocationPreparationContext, IToolResult, ToolProgress } from "../languageModelToolsService.js";
14
- import { ILanguageModelToolsService } from "../languageModelToolsService.service.js";
15
- export interface IRunSubagentToolInputParams {
16
- prompt: string;
17
- description: string;
18
- agentName?: string;
19
- model?: string;
20
- }
21
- export declare const RUN_SUBAGENT_MAX_NESTING_DEPTH = 5;
22
- export declare class RunSubagentTool extends Disposable implements IToolImpl {
23
- private readonly chatAgentService;
24
- private readonly chatService;
25
- private readonly languageModelToolsService;
26
- private readonly languageModelsService;
27
- private readonly logService;
28
- private readonly configurationService;
29
- private readonly promptsService;
30
- private readonly instantiationService;
31
- private readonly productService;
32
- private readonly telemetryService;
33
- static readonly Id = "runSubagent";
34
- private readonly _onDidUpdateToolData;
35
- readonly onDidUpdateToolData: Event<void>;
36
- /** Hack to port data between prepare/invoke */
37
- private readonly _resolvedModels;
38
- /** Tracks the current subagent nesting depth per session to detect and limit recursion. */
39
- private readonly _sessionDepth;
40
- private _autoModelResolution;
41
- constructor(chatAgentService: IChatAgentService, chatService: IChatService, languageModelToolsService: ILanguageModelToolsService, languageModelsService: ILanguageModelsService, logService: ILogService, configurationService: IConfigurationService, promptsService: IPromptsService, instantiationService: IInstantiationService, productService: IProductService, telemetryService: ITelemetryService);
42
- getToolData(): IToolData;
43
- invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, token: CancellationToken): Promise<IToolResult>;
44
- private getSubAgentByName;
45
- /**
46
- * Checks if a model exceeds the main model's cost tier based on multiplier.
47
- * @returns An object with `exceeds: true` and a reason string if blocked, or `exceeds: false` if allowed.
48
- */
49
- private checkMultiplierConstraint;
50
- /**
51
- * Returns information about available models for error messages.
52
- * Includes which models are unavailable due to multiplier restrictions.
53
- */
54
- private getAvailableModelsInfo;
55
- /**
56
- * Resolves the model to be used by a subagent.
57
- * @param explicitModelQualifiedName Optional explicit model specified by the caller.
58
- * If provided and not found or not allowed, throws an error with available models.
59
- * @param currentModeInstructions The current agent inherited when no subagent is requested.
60
- * Its configured model keeps precedence over the Auto default.
61
- * @throws Error if the requested model is not found or exceeds the main model's cost tier.
62
- */
63
- private resolveSubagentModel;
64
- private inheritedAgentHasModel;
65
- private isSelectableForAgentMode;
66
- private findEligibleAutoModelId;
67
- private resolveAutoModelId;
68
- private activateAutoModel;
69
- prepareToolInvocation(context: IToolInvocationPreparationContext, _token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
70
- private normalizeRequestedAgentName;
71
- private getCurrentModeInstructions;
72
- private validateSubagentAllowed;
73
- }