@codingame/monaco-vscode-api 1.85.0 → 1.85.2

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 (298) hide show
  1. package/README.md +31 -13
  2. package/contributions.js +1 -0
  3. package/missing-services.js +396 -68
  4. package/monaco-editor-treemending.patch +957 -950
  5. package/package.json +8 -7
  6. package/service-override/tools/editor.js +1 -1
  7. package/services.js +10 -6
  8. package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +14 -0
  9. package/vscode/src/vs/base/common/jsonFormatter.js +8 -1
  10. package/vscode/src/vs/platform/actions/browser/buttonbar.js +128 -0
  11. package/vscode/src/vs/platform/extensionManagement/common/extensionEnablementService.js +140 -0
  12. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -1
  13. package/vscode/src/vs/platform/extensions/common/extensions.d.ts +1062 -93
  14. package/vscode/src/vs/platform/files/common/inMemoryFilesystemProvider.js +220 -0
  15. package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +58 -0
  16. package/vscode/src/vs/platform/quickinput/browser/quickPickPin.js +102 -0
  17. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +56 -1
  18. package/vscode/src/vs/platform/userDataSync/common/content.js +9 -0
  19. package/vscode/src/vs/platform/userDataSync/common/settingsMerge.js +514 -0
  20. package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +154 -2
  21. package/vscode/src/vs/platform/userDataSync/common/userDataSyncAccount.js +43 -1
  22. package/vscode/src/vs/platform/userDataSync/common/userDataSyncMachines.js +177 -0
  23. package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +1 -1
  24. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +1 -1
  25. package/vscode/src/vs/workbench/api/common/extHostWebview.js +2 -2
  26. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +186 -4
  27. package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +105 -0
  28. package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +4 -0
  29. package/vscode/src/vs/workbench/browser/parts/views/treeView.js +1614 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +191 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +238 -2
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +75 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +205 -1
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +168 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +35 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +340 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1195 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +115 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +81 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.css.js +4 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +62 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +583 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +4 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +290 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +167 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +4 -0
  47. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +6 -1
  48. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +562 -0
  49. package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +31 -1
  50. package/vscode/src/vs/workbench/contrib/chat/common/chatProvider.js +24 -1
  51. package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +193 -0
  52. package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +22 -1
  53. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +52 -1
  54. package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +258 -0
  55. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +37 -0
  56. package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +25 -0
  57. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.css.js +4 -0
  58. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +388 -0
  59. package/vscode/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +7 -7
  60. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +61 -0
  61. package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +49 -0
  62. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +647 -0
  63. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +300 -0
  64. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +60 -0
  65. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +249 -0
  66. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +107 -0
  67. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +333 -0
  68. package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +4 -0
  69. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +99 -0
  70. package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +55 -0
  71. package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +2 -0
  72. package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +20 -0
  73. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +855 -0
  74. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +410 -0
  75. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +1591 -0
  76. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +178 -0
  77. package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +4 -0
  78. package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +4 -0
  79. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +1485 -0
  80. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +125 -0
  81. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +29 -0
  82. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +41 -0
  83. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +102 -0
  84. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +73 -2
  85. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +4 -0
  86. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +988 -0
  87. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +431 -0
  88. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +417 -0
  89. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +806 -0
  90. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +915 -0
  91. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +19 -0
  92. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +129 -10
  93. package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +205 -0
  94. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +150 -0
  95. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +480 -0
  96. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
  97. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +90 -0
  98. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
  99. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
  100. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +258 -0
  101. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +614 -0
  102. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
  103. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +44 -0
  104. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
  105. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
  106. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +169 -0
  107. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +64 -0
  108. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/cellOutputClipboard.js +49 -0
  109. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
  110. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +120 -0
  111. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +416 -0
  112. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
  113. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +663 -0
  114. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +593 -0
  115. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +72 -0
  116. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +326 -0
  117. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +539 -0
  118. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +265 -0
  119. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +348 -0
  120. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css.js +4 -0
  121. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +4 -0
  122. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css.js +4 -0
  123. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css.js +4 -0
  124. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css.js +4 -0
  125. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css.js +4 -0
  126. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css.js +4 -0
  127. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css.js +4 -0
  128. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css.js +4 -0
  129. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css.js +4 -0
  130. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css.js +4 -0
  131. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css.js +4 -0
  132. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css.js +4 -0
  133. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css.js +4 -0
  134. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +95 -3
  135. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +437 -0
  136. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +29 -0
  137. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2730 -0
  138. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +139 -0
  139. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +17 -0
  140. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +564 -0
  141. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +27 -0
  142. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +119 -0
  143. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +27 -0
  144. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +135 -0
  145. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +178 -0
  146. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +35 -0
  147. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +377 -0
  148. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +97 -0
  149. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +194 -0
  150. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +71 -0
  151. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +20 -0
  152. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +85 -0
  153. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +652 -0
  154. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +59 -0
  155. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +303 -0
  156. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +24 -0
  157. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +228 -0
  158. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +302 -0
  159. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +438 -0
  160. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +45 -0
  161. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +435 -0
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +95 -0
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +107 -0
  164. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +29 -0
  165. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +59 -0
  166. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +67 -0
  167. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +430 -0
  168. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +54 -0
  169. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +1131 -0
  170. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +21 -0
  171. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +1591 -0
  172. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +341 -0
  173. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +2155 -0
  174. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +65 -0
  175. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +95 -0
  176. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +507 -0
  177. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +85 -0
  178. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +47 -0
  179. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +40 -0
  180. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +435 -0
  181. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +31 -0
  182. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +257 -0
  183. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +239 -0
  184. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +103 -0
  185. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +211 -0
  186. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +808 -0
  187. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +8 -0
  188. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +381 -0
  189. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +527 -0
  190. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +163 -0
  191. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +651 -0
  192. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +173 -0
  193. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +98 -0
  194. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +62 -0
  195. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +101 -0
  196. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +346 -0
  197. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +152 -1
  198. package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +39 -0
  199. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +296 -0
  200. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +261 -0
  201. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.js +3 -1
  202. package/vscode/src/vs/workbench/contrib/notebook/common/notebookKernelService.js +2 -1
  203. package/vscode/src/vs/workbench/contrib/notebook/common/notebookKeymapService.js +3 -0
  204. package/vscode/src/vs/workbench/contrib/notebook/common/notebookLoggingService.js +3 -0
  205. package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +16 -0
  206. package/vscode/src/vs/workbench/contrib/notebook/common/notebookRange.js +66 -0
  207. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWorkerService.js +4 -0
  208. package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +130 -0
  209. package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +4 -0
  210. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +847 -0
  211. package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +89 -0
  212. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +1942 -0
  213. package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +107 -0
  214. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +49 -0
  215. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +387 -0
  216. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +2 -2
  217. package/vscode/src/vs/workbench/contrib/search/common/constants.js +66 -0
  218. package/vscode/src/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
  219. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +24 -0
  220. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +95 -0
  221. package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +6 -6
  222. package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +12 -2
  223. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +712 -0
  224. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
  225. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +130 -0
  226. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -1
  227. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/featuredExtensionService.js +159 -0
  228. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +375 -0
  229. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +563 -0
  230. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +932 -0
  231. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +20 -1
  232. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +205 -0
  233. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +11 -0
  234. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +9 -9
  235. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +1 -1
  236. package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +2 -2
  237. package/vscode/src/vs/workbench/services/languageStatus/common/languageStatusService.js +24 -1
  238. package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +15 -1
  239. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +41 -0
  240. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +588 -0
  241. package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +43 -0
  242. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +2 -2
  243. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +190 -2
  244. package/vscode/src/vs/workbench/services/search/common/search.js +3 -3
  245. package/vscode/src/vs/workbench/services/terminal/common/embedderTerminalService.js +75 -1
  246. package/vscode/src/vs/workbench/services/timer/browser/timerService.js +240 -1
  247. package/vscode/src/vs/workbench/services/userData/browser/userDataInit.js +31 -1
  248. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +25 -1
  249. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +75 -1
  250. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +74 -4
  251. package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +77 -0
  252. package/assets/break.mp3 +0 -0
  253. package/assets/chatRequestSent.mp3 +0 -0
  254. package/assets/chatResponsePending.mp3 +0 -0
  255. package/assets/chatResponseReceived1.mp3 +0 -0
  256. package/assets/chatResponseReceived2.mp3 +0 -0
  257. package/assets/chatResponseReceived3.mp3 +0 -0
  258. package/assets/chatResponseReceived4.mp3 +0 -0
  259. package/assets/clear.mp3 +0 -0
  260. package/assets/defaultIcon.png +0 -0
  261. package/assets/diffLineDeleted.mp3 +0 -0
  262. package/assets/diffLineInserted.mp3 +0 -0
  263. package/assets/diffLineModified.mp3 +0 -0
  264. package/assets/error.mp3 +0 -0
  265. package/assets/fake.html +0 -10
  266. package/assets/foldedAreas.mp3 +0 -0
  267. package/assets/format.mp3 +0 -0
  268. package/assets/index-no-csp.html +0 -1226
  269. package/assets/index.html +0 -1227
  270. package/assets/quickFixes.mp3 +0 -0
  271. package/assets/save.mp3 +0 -0
  272. package/assets/service-worker.js +0 -457
  273. package/assets/taskCompleted.mp3 +0 -0
  274. package/assets/taskFailed.mp3 +0 -0
  275. package/assets/terminalBell.mp3 +0 -0
  276. package/assets/warning.mp3 +0 -0
  277. package/assets/webWorkerExtensionHostIframe.html +0 -123
  278. package/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +0 -2
  279. package/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2
  280. package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -5
  281. package/vscode/src/vs/base/parts/request/browser/request.js +0 -60
  282. package/vscode/src/vs/platform/request/browser/requestService.js +0 -28
  283. package/vscode/src/vs/platform/request/common/requestIpc.js +0 -17
  284. package/vscode/src/vs/platform/url/common/urlService.js +0 -17
  285. package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +0 -120
  286. package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +0 -319
  287. package/vscode/src/vs/workbench/services/files/browser/elevatedFileService.js +0 -9
  288. package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +0 -408
  289. package/vscode/src/vs/workbench/services/request/browser/requestService.js +0 -48
  290. package/vscode/src/vs/workbench/services/textfile/browser/browserTextFileService.js +0 -56
  291. package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +0 -639
  292. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModelManager.js +0 -402
  293. package/vscode/src/vs/workbench/services/textfile/common/textFileSaveParticipant.js +0 -62
  294. package/vscode/src/vs/workbench/services/themes/browser/browserHostColorSchemeService.js +0 -38
  295. package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +0 -295
  296. package/vscode/src/vs/workbench/services/url/browser/urlService.js +0 -47
  297. package/vscode/src/vs/workbench/services/views/common/treeViewsService.js +0 -20
  298. package/vscode/src/vs/workbench/services/workspaces/common/canonicalUriService.js +0 -19
@@ -0,0 +1,193 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { CancellationToken } from 'monaco-editor/esm/vs/base/common/cancellation.js';
3
+ import { OffsetRange } from 'monaco-editor/esm/vs/editor/common/core/offsetRange.js';
4
+ import { Position } from 'monaco-editor/esm/vs/editor/common/core/position.js';
5
+ import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
6
+ import { IChatAgentService } from './chatAgents.js';
7
+ import { chatVariableLeader, chatAgentLeader, chatSubcommandLeader, ChatRequestTextPart, ChatRequestAgentPart, ChatRequestVariablePart, ChatRequestSlashCommandPart, ChatRequestAgentSubcommandPart, ChatRequestDynamicVariablePart } from './chatParserTypes.js';
8
+ import { IChatSlashCommandService } from './chatSlashCommands.js';
9
+ import { IChatVariablesService } from './chatVariables.js';
10
+ const agentReg = /^@([\w_\-]+)(?=(\s|$|\b))/i;
11
+ const variableReg = /^#([\w_\-]+)(:\d+)?(?=(\s|$|\b))/i;
12
+ const slashReg = /\/([\w_\-]+)(?=(\s|$|\b))/i;
13
+ let ChatRequestParser = class ChatRequestParser {
14
+ constructor(agentService, variableService, slashCommandService) {
15
+ this.agentService = agentService;
16
+ this.variableService = variableService;
17
+ this.slashCommandService = slashCommandService;
18
+ }
19
+ async parseChatRequest(sessionId, message) {
20
+ const parts = [];
21
+ const references = this.variableService.getDynamicVariables(sessionId);
22
+ let lineNumber = 1;
23
+ let column = 1;
24
+ for (let i = 0; i < message.length; i++) {
25
+ const previousChar = message.charAt(i - 1);
26
+ const char = message.charAt(i);
27
+ let newPart;
28
+ if (previousChar.match(/\s/) || i === 0) {
29
+ if (char === chatVariableLeader) {
30
+ newPart = this.tryToParseVariable(message.slice(i), i, ( new Position(lineNumber, column)), parts);
31
+ }
32
+ else if (char === chatAgentLeader) {
33
+ newPart = this.tryToParseAgent(message.slice(i), message, i, ( new Position(lineNumber, column)), parts);
34
+ }
35
+ else if (char === chatSubcommandLeader) {
36
+ newPart = await this.tryToParseSlashCommand(sessionId, message.slice(i), message, i, ( new Position(lineNumber, column)), parts);
37
+ }
38
+ if (!newPart) {
39
+ newPart = this.tryToParseDynamicVariable(message.slice(i), i, ( new Position(lineNumber, column)), references);
40
+ }
41
+ }
42
+ if (newPart) {
43
+ if (i !== 0) {
44
+ const previousPart = parts.at(-1);
45
+ const previousPartEnd = previousPart?.range.endExclusive ?? 0;
46
+ const previousPartEditorRangeEndLine = previousPart?.editorRange.endLineNumber ?? 1;
47
+ const previousPartEditorRangeEndCol = previousPart?.editorRange.endColumn ?? 1;
48
+ parts.push(( new ChatRequestTextPart(( new OffsetRange(previousPartEnd, i)), ( new Range(
49
+ previousPartEditorRangeEndLine,
50
+ previousPartEditorRangeEndCol,
51
+ lineNumber,
52
+ column
53
+ )), message.slice(previousPartEnd, i))));
54
+ }
55
+ parts.push(newPart);
56
+ }
57
+ if (char === '\n') {
58
+ lineNumber++;
59
+ column = 1;
60
+ }
61
+ else {
62
+ column++;
63
+ }
64
+ }
65
+ const lastPart = parts.at(-1);
66
+ const lastPartEnd = lastPart?.range.endExclusive ?? 0;
67
+ if (lastPartEnd < message.length) {
68
+ parts.push(( new ChatRequestTextPart(( new OffsetRange(lastPartEnd, message.length)), ( new Range(
69
+ lastPart?.editorRange.endLineNumber ?? 1,
70
+ lastPart?.editorRange.endColumn ?? 1,
71
+ lineNumber,
72
+ column
73
+ )), message.slice(lastPartEnd, message.length))));
74
+ }
75
+ return {
76
+ parts,
77
+ text: message,
78
+ };
79
+ }
80
+ tryToParseAgent(message, fullMessage, offset, position, parts) {
81
+ const nextVariableMatch = message.match(agentReg);
82
+ if (!nextVariableMatch) {
83
+ return;
84
+ }
85
+ const [full, name] = nextVariableMatch;
86
+ const varRange = ( new OffsetRange(offset, offset + full.length));
87
+ const varEditorRange = ( new Range(
88
+ position.lineNumber,
89
+ position.column,
90
+ position.lineNumber,
91
+ position.column + full.length
92
+ ));
93
+ const agent = this.agentService.getAgent(name);
94
+ if (!agent) {
95
+ return;
96
+ }
97
+ if (( parts.some(p => p instanceof ChatRequestAgentPart))) {
98
+ return;
99
+ }
100
+ if (( parts.some(
101
+ p => (p instanceof ChatRequestTextPart && p.text.trim() !== '') || !(p instanceof ChatRequestAgentPart)
102
+ ))) {
103
+ return;
104
+ }
105
+ const previousPart = parts.at(-1);
106
+ const previousPartEnd = previousPart?.range.endExclusive ?? 0;
107
+ const textSincePreviousPart = fullMessage.slice(previousPartEnd, offset);
108
+ if (textSincePreviousPart.trim() !== '') {
109
+ return;
110
+ }
111
+ return ( new ChatRequestAgentPart(varRange, varEditorRange, agent));
112
+ }
113
+ tryToParseVariable(message, offset, position, parts) {
114
+ const nextVariableMatch = message.match(variableReg);
115
+ if (!nextVariableMatch) {
116
+ return;
117
+ }
118
+ const [full, name] = nextVariableMatch;
119
+ const variableArg = nextVariableMatch[2] ?? '';
120
+ const varRange = ( new OffsetRange(offset, offset + full.length));
121
+ const varEditorRange = ( new Range(
122
+ position.lineNumber,
123
+ position.column,
124
+ position.lineNumber,
125
+ position.column + full.length
126
+ ));
127
+ if (this.variableService.hasVariable(name)) {
128
+ return ( new ChatRequestVariablePart(varRange, varEditorRange, name, variableArg));
129
+ }
130
+ return;
131
+ }
132
+ async tryToParseSlashCommand(sessionId, remainingMessage, fullMessage, offset, position, parts) {
133
+ const nextSlashMatch = remainingMessage.match(slashReg);
134
+ if (!nextSlashMatch) {
135
+ return;
136
+ }
137
+ if (( parts.some(p => p instanceof ChatRequestSlashCommandPart))) {
138
+ return;
139
+ }
140
+ const [full, command] = nextSlashMatch;
141
+ const slashRange = ( new OffsetRange(offset, offset + full.length));
142
+ const slashEditorRange = ( new Range(
143
+ position.lineNumber,
144
+ position.column,
145
+ position.lineNumber,
146
+ position.column + full.length
147
+ ));
148
+ const usedAgent = parts.find((p) => p instanceof ChatRequestAgentPart);
149
+ if (usedAgent) {
150
+ if (( parts.some(
151
+ p => (p instanceof ChatRequestTextPart && p.text.trim() !== '') || !(p instanceof ChatRequestAgentPart) && !(p instanceof ChatRequestTextPart)
152
+ ))) {
153
+ return;
154
+ }
155
+ const previousPart = parts.at(-1);
156
+ const previousPartEnd = previousPart?.range.endExclusive ?? 0;
157
+ const textSincePreviousPart = fullMessage.slice(previousPartEnd, offset);
158
+ if (textSincePreviousPart.trim() !== '') {
159
+ return;
160
+ }
161
+ const subCommands = await usedAgent.agent.provideSlashCommands(CancellationToken.None);
162
+ const subCommand = subCommands.find(c => c.name === command);
163
+ if (subCommand) {
164
+ return ( new ChatRequestAgentSubcommandPart(slashRange, slashEditorRange, subCommand));
165
+ }
166
+ }
167
+ else {
168
+ const slashCommands = this.slashCommandService.getCommands();
169
+ const slashCommand = slashCommands.find(c => c.command === command);
170
+ if (slashCommand) {
171
+ return ( new ChatRequestSlashCommandPart(slashRange, slashEditorRange, slashCommand));
172
+ }
173
+ }
174
+ return;
175
+ }
176
+ tryToParseDynamicVariable(message, offset, position, references) {
177
+ const refAtThisPosition = references.find(r => r.range.startLineNumber === position.lineNumber &&
178
+ r.range.startColumn === position.column);
179
+ if (refAtThisPosition) {
180
+ const length = refAtThisPosition.range.endColumn - refAtThisPosition.range.startColumn;
181
+ const text = message.substring(0, length);
182
+ const range = ( new OffsetRange(offset, offset + length));
183
+ return ( new ChatRequestDynamicVariablePart(range, refAtThisPosition.range, text, refAtThisPosition.data));
184
+ }
185
+ return;
186
+ }
187
+ };
188
+ ChatRequestParser = ( __decorate([
189
+ ( __param(0, IChatAgentService)),
190
+ ( __param(1, IChatVariablesService)),
191
+ ( __param(2, IChatSlashCommandService))
192
+ ], ChatRequestParser));
193
+ export { ChatRequestParser };
@@ -1,8 +1,29 @@
1
+ import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
2
+ import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
1
3
  import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
4
+ function isIDocumentContext(obj) {
5
+ return (!!obj &&
6
+ typeof obj === 'object' &&
7
+ 'uri' in obj && obj.uri instanceof URI &&
8
+ 'version' in obj && typeof obj.version === 'number' &&
9
+ 'ranges' in obj && Array.isArray(obj.ranges) && obj.ranges.every(Range.isIRange));
10
+ }
11
+ function isIUsedContext(obj) {
12
+ return (!!obj &&
13
+ typeof obj === 'object' &&
14
+ 'documents' in obj &&
15
+ Array.isArray(obj.documents) &&
16
+ obj.documents.every(isIDocumentContext));
17
+ }
2
18
  var InteractiveSessionVoteDirection;
3
19
  ( (function(InteractiveSessionVoteDirection) {
4
20
  InteractiveSessionVoteDirection[InteractiveSessionVoteDirection["Down"] = 0] = "Down";
5
21
  InteractiveSessionVoteDirection[InteractiveSessionVoteDirection["Up"] = 1] = "Up";
6
22
  })(InteractiveSessionVoteDirection || (InteractiveSessionVoteDirection = {})));
23
+ var InteractiveSessionCopyKind;
24
+ ( (function(InteractiveSessionCopyKind) {
25
+ InteractiveSessionCopyKind[InteractiveSessionCopyKind["Action"] = 1] = "Action";
26
+ InteractiveSessionCopyKind[InteractiveSessionCopyKind["Toolbar"] = 2] = "Toolbar";
27
+ })(InteractiveSessionCopyKind || (InteractiveSessionCopyKind = {})));
7
28
  const IChatService = ( createDecorator('IChatService'));
8
- export { IChatService, InteractiveSessionVoteDirection };
29
+ export { IChatService, InteractiveSessionCopyKind, InteractiveSessionVoteDirection, isIDocumentContext, isIUsedContext };
@@ -1,3 +1,54 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
3
+ import { Disposable, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
1
4
  import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
5
+ import { IExtensionService } from '../../../services/extensions/common/extensions.js';
2
6
  const IChatSlashCommandService = ( createDecorator('chatSlashCommandService'));
3
- export { IChatSlashCommandService };
7
+ let ChatSlashCommandService = class ChatSlashCommandService extends Disposable {
8
+ constructor(_extensionService) {
9
+ super();
10
+ this._extensionService = _extensionService;
11
+ this._commands = ( new Map());
12
+ this._onDidChangeCommands = this._register(( new Emitter()));
13
+ this.onDidChangeCommands = this._onDidChangeCommands.event;
14
+ }
15
+ dispose() {
16
+ super.dispose();
17
+ this._commands.clear();
18
+ }
19
+ registerSlashCommand(data, command) {
20
+ if (( this._commands.has(data.command))) {
21
+ throw new Error(`Already registered a command with id ${data.command}}`);
22
+ }
23
+ this._commands.set(data.command, { data, command });
24
+ this._onDidChangeCommands.fire();
25
+ return toDisposable(() => {
26
+ if (this._commands.delete(data.command)) {
27
+ this._onDidChangeCommands.fire();
28
+ }
29
+ });
30
+ }
31
+ getCommands() {
32
+ return Array.from(( this._commands.values()), v => v.data);
33
+ }
34
+ hasCommand(id) {
35
+ return ( this._commands.has(id));
36
+ }
37
+ async executeCommand(id, prompt, progress, history, token) {
38
+ const data = this._commands.get(id);
39
+ if (!data) {
40
+ throw new Error('No command with id ${id} NOT registered');
41
+ }
42
+ if (!data.command) {
43
+ await this._extensionService.activateByEvent(`onSlash:${id}`);
44
+ }
45
+ if (!data.command) {
46
+ throw new Error(`No command with id ${id} NOT resolved`);
47
+ }
48
+ return await data.command(prompt, progress, history, token);
49
+ }
50
+ };
51
+ ChatSlashCommandService = ( __decorate([
52
+ ( __param(0, IExtensionService))
53
+ ], ChatSlashCommandService));
54
+ export { ChatSlashCommandService, IChatSlashCommandService };
@@ -0,0 +1,258 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
3
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
5
+ import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
6
+ import { ChatModelInitState } from './chatModel.js';
7
+ import { countWords } from './chatWordCounter.js';
8
+ function isRequestVM(item) {
9
+ return !!item && typeof item === 'object' && 'message' in item;
10
+ }
11
+ function isResponseVM(item) {
12
+ return !!item && typeof item.setVote !== 'undefined';
13
+ }
14
+ function isWelcomeVM(item) {
15
+ return !!item && typeof item === 'object' && 'content' in item;
16
+ }
17
+ let ChatViewModel = class ChatViewModel extends Disposable {
18
+ get inputPlaceholder() {
19
+ return this._inputPlaceholder ?? this._model.inputPlaceholder;
20
+ }
21
+ setInputPlaceholder(text) {
22
+ this._inputPlaceholder = text;
23
+ this._onDidChange.fire({ kind: 'changePlaceholder' });
24
+ }
25
+ resetInputPlaceholder() {
26
+ this._inputPlaceholder = undefined;
27
+ this._onDidChange.fire({ kind: 'changePlaceholder' });
28
+ }
29
+ get sessionId() {
30
+ return this._model.sessionId;
31
+ }
32
+ get requestInProgress() {
33
+ return this._model.requestInProgress;
34
+ }
35
+ get providerId() {
36
+ return this._model.providerId;
37
+ }
38
+ get initState() {
39
+ return this._model.initState;
40
+ }
41
+ constructor(_model, instantiationService) {
42
+ super();
43
+ this._model = _model;
44
+ this.instantiationService = instantiationService;
45
+ this._onDidDisposeModel = this._register(( new Emitter()));
46
+ this.onDidDisposeModel = this._onDidDisposeModel.event;
47
+ this._onDidChange = this._register(( new Emitter()));
48
+ this.onDidChange = this._onDidChange.event;
49
+ this._items = [];
50
+ this._inputPlaceholder = undefined;
51
+ _model.getRequests().forEach((request, i) => {
52
+ this._items.push(( new ChatRequestViewModel(request)));
53
+ if (request.response) {
54
+ this.onAddResponse(request.response);
55
+ }
56
+ });
57
+ this._register(_model.onDidDispose(() => this._onDidDisposeModel.fire()));
58
+ this._register(_model.onDidChange(e => {
59
+ if (e.kind === 'addRequest') {
60
+ this._items.push(( new ChatRequestViewModel(e.request)));
61
+ if (e.request.response) {
62
+ this.onAddResponse(e.request.response);
63
+ }
64
+ }
65
+ else if (e.kind === 'addResponse') {
66
+ this.onAddResponse(e.response);
67
+ }
68
+ else if (e.kind === 'removeRequest') {
69
+ const requestIdx = this._items.findIndex(item => isRequestVM(item) && item.id === e.requestId);
70
+ if (requestIdx >= 0) {
71
+ this._items.splice(requestIdx, 1);
72
+ }
73
+ const responseIdx = e.responseId && this._items.findIndex(item => isResponseVM(item) && item.id === e.responseId);
74
+ if (typeof responseIdx === 'number' && responseIdx >= 0) {
75
+ const items = this._items.splice(responseIdx, 1);
76
+ const item = items[0];
77
+ if (isResponseVM(item)) {
78
+ item.dispose();
79
+ }
80
+ }
81
+ }
82
+ const modelEventToVmEvent = e.kind === 'addRequest' ? { kind: 'addRequest' } :
83
+ e.kind === 'initialize' ? { kind: 'initialize' } :
84
+ null;
85
+ this._onDidChange.fire(modelEventToVmEvent);
86
+ }));
87
+ }
88
+ onAddResponse(responseModel) {
89
+ const response = this.instantiationService.createInstance(ChatResponseViewModel, responseModel);
90
+ this._register(response.onDidChange(() => this._onDidChange.fire(null)));
91
+ this._items.push(response);
92
+ }
93
+ getItems() {
94
+ return [...(this._model.welcomeMessage ? [this._model.welcomeMessage] : []), ...this._items];
95
+ }
96
+ dispose() {
97
+ super.dispose();
98
+ this._items
99
+ .filter((item) => item instanceof ChatResponseViewModel)
100
+ .forEach((item) => item.dispose());
101
+ }
102
+ };
103
+ ChatViewModel = ( __decorate([
104
+ ( __param(1, IInstantiationService))
105
+ ], ChatViewModel));
106
+ class ChatRequestViewModel {
107
+ get id() {
108
+ return this._model.id;
109
+ }
110
+ get dataId() {
111
+ return this.id + `_${ChatModelInitState[this._model.session.initState]}`;
112
+ }
113
+ get sessionId() {
114
+ return this._model.session.sessionId;
115
+ }
116
+ get username() {
117
+ return this._model.username;
118
+ }
119
+ get avatarIconUri() {
120
+ return this._model.avatarIconUri;
121
+ }
122
+ get message() {
123
+ return this._model.message;
124
+ }
125
+ get messageText() {
126
+ return 'kind' in this.message ? this.message.message : this.message.text;
127
+ }
128
+ constructor(_model) {
129
+ this._model = _model;
130
+ }
131
+ }
132
+ let ChatResponseViewModel = class ChatResponseViewModel extends Disposable {
133
+ get id() {
134
+ return this._model.id;
135
+ }
136
+ get dataId() {
137
+ return this._model.id + `_${this._modelChangeCount}` + `_${ChatModelInitState[this._model.session.initState]}`;
138
+ }
139
+ get providerId() {
140
+ return this._model.providerId;
141
+ }
142
+ get sessionId() {
143
+ return this._model.session.sessionId;
144
+ }
145
+ get username() {
146
+ return this._model.username;
147
+ }
148
+ get avatarIconUri() {
149
+ return this._model.avatarIconUri;
150
+ }
151
+ get agent() {
152
+ return this._model.agent;
153
+ }
154
+ get slashCommand() {
155
+ return this._model.slashCommand;
156
+ }
157
+ get response() {
158
+ return this._model.response;
159
+ }
160
+ get usedContext() {
161
+ return this._model.usedContext;
162
+ }
163
+ get contentReferences() {
164
+ return this._model.contentReferences;
165
+ }
166
+ get progressMessages() {
167
+ return this._model.progressMessages;
168
+ }
169
+ get isComplete() {
170
+ return this._model.isComplete;
171
+ }
172
+ get isCanceled() {
173
+ return this._model.isCanceled;
174
+ }
175
+ get replyFollowups() {
176
+ return this._model.followups?.filter((f) => f.kind === 'reply');
177
+ }
178
+ get commandFollowups() {
179
+ return this._model.followups?.filter((f) => f.kind === 'command');
180
+ }
181
+ get errorDetails() {
182
+ return this._model.errorDetails;
183
+ }
184
+ get vote() {
185
+ return this._model.vote;
186
+ }
187
+ get requestId() {
188
+ return this._model.requestId;
189
+ }
190
+ get usedReferencesExpanded() {
191
+ if (typeof this._usedReferencesExpanded === 'boolean') {
192
+ return this._usedReferencesExpanded;
193
+ }
194
+ return this.response.value.length === 0;
195
+ }
196
+ set usedReferencesExpanded(v) {
197
+ this._usedReferencesExpanded = v;
198
+ }
199
+ get vulnerabilitiesListExpanded() {
200
+ return this._vulnerabilitiesListExpanded;
201
+ }
202
+ set vulnerabilitiesListExpanded(v) {
203
+ this._vulnerabilitiesListExpanded = v;
204
+ }
205
+ get contentUpdateTimings() {
206
+ return this._contentUpdateTimings;
207
+ }
208
+ constructor(_model, logService) {
209
+ super();
210
+ this._model = _model;
211
+ this.logService = logService;
212
+ this._modelChangeCount = 0;
213
+ this._onDidChange = this._register(( new Emitter()));
214
+ this.onDidChange = this._onDidChange.event;
215
+ this.renderData = undefined;
216
+ this._vulnerabilitiesListExpanded = false;
217
+ this._contentUpdateTimings = undefined;
218
+ if (!_model.isComplete) {
219
+ this._contentUpdateTimings = {
220
+ loadingStartTime: Date.now(),
221
+ lastUpdateTime: Date.now(),
222
+ impliedWordLoadRate: 0,
223
+ lastWordCount: 0
224
+ };
225
+ }
226
+ this._register(_model.onDidChange(() => {
227
+ if (this._contentUpdateTimings) {
228
+ const now = Date.now();
229
+ const wordCount = countWords(_model.response.asString());
230
+ const timeDiff = now - this._contentUpdateTimings.loadingStartTime;
231
+ const impliedWordLoadRate = this._contentUpdateTimings.lastWordCount / (timeDiff / 1000);
232
+ this.trace('onDidChange', `Update- got ${this._contentUpdateTimings.lastWordCount} words over ${timeDiff}ms = ${impliedWordLoadRate} words/s. ${wordCount} words are now available.`);
233
+ this._contentUpdateTimings = {
234
+ loadingStartTime: this._contentUpdateTimings.loadingStartTime,
235
+ lastUpdateTime: now,
236
+ impliedWordLoadRate,
237
+ lastWordCount: wordCount
238
+ };
239
+ }
240
+ else {
241
+ this.logService.warn('ChatResponseViewModel#onDidChange: got model update but contentUpdateTimings is not initialized');
242
+ }
243
+ this._modelChangeCount++;
244
+ this._onDidChange.fire();
245
+ }));
246
+ }
247
+ trace(tag, message) {
248
+ this.logService.trace(`ChatResponseViewModel#${tag}: ${message}`);
249
+ }
250
+ setVote(vote) {
251
+ this._modelChangeCount++;
252
+ this._model.setVote(vote);
253
+ }
254
+ };
255
+ ChatResponseViewModel = ( __decorate([
256
+ ( __param(1, ILogService))
257
+ ], ChatResponseViewModel));
258
+ export { ChatRequestViewModel, ChatResponseViewModel, ChatViewModel, isRequestVM, isResponseVM, isWelcomeVM };
@@ -0,0 +1,37 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
3
+ import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
4
+ import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
5
+ import { Memento } from '../../../common/memento.js';
6
+ const IChatWidgetHistoryService = ( createDecorator('IChatWidgetHistoryService'));
7
+ let ChatWidgetHistoryService = class ChatWidgetHistoryService {
8
+ constructor(storageService) {
9
+ this._onDidClearHistory = ( new Emitter());
10
+ this.onDidClearHistory = this._onDidClearHistory.event;
11
+ this.memento = ( new Memento('interactive-session', storageService));
12
+ const loadedState = this.memento.getMemento(1 , 1 );
13
+ for (const provider in loadedState.history) {
14
+ loadedState.history[provider] = ( loadedState.history[provider].map(entry => typeof entry === 'string' ? { text: entry } : entry));
15
+ }
16
+ this.viewState = loadedState;
17
+ }
18
+ getHistory(providerId) {
19
+ return this.viewState.history?.[providerId] ?? [];
20
+ }
21
+ saveHistory(providerId, history) {
22
+ if (!this.viewState.history) {
23
+ this.viewState.history = {};
24
+ }
25
+ this.viewState.history[providerId] = history;
26
+ this.memento.saveMemento();
27
+ }
28
+ clearHistory() {
29
+ this.viewState.history = {};
30
+ this.memento.saveMemento();
31
+ this._onDidClearHistory.fire();
32
+ }
33
+ };
34
+ ChatWidgetHistoryService = ( __decorate([
35
+ ( __param(0, IStorageService))
36
+ ], ChatWidgetHistoryService));
37
+ export { ChatWidgetHistoryService, IChatWidgetHistoryService };
@@ -0,0 +1,25 @@
1
+ const wordSeparatorCharPattern = /[\s\|\-]/;
2
+ function getNWords(str, numWordsToCount) {
3
+ let wordCount = numWordsToCount;
4
+ let i = 0;
5
+ while (i < str.length && wordCount > 0) {
6
+ while (i < str.length && str[i].match(wordSeparatorCharPattern)) {
7
+ i++;
8
+ }
9
+ while (i < str.length && !str[i].match(wordSeparatorCharPattern)) {
10
+ i++;
11
+ }
12
+ wordCount--;
13
+ }
14
+ const value = str.substring(0, i);
15
+ return {
16
+ value,
17
+ actualWordCount: numWordsToCount - wordCount,
18
+ isFullString: i >= str.length
19
+ };
20
+ }
21
+ function countWords(str) {
22
+ const result = getNWords(str, Number.MAX_SAFE_INTEGER);
23
+ return result.actualWordCount;
24
+ }
25
+ export { countWords, getNWords };
@@ -0,0 +1,4 @@
1
+ import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
2
+ var css = ".monaco-workbench .simple-find-part-wrapper{max-width:calc(100% - 64px);overflow:hidden;padding:0 10px 10px;pointer-events:none;position:absolute;right:18px;top:0;z-index:10}.simple-find-part .monaco-inputbox>.ibwrapper>input{text-overflow:clip}.monaco-workbench .simple-find-part{align-items:center;background-color:var(--vscode-editorWidget-background)!important;border:1px solid var(--vscode-widget-border);border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-shadow:0 0 8px 2px var(--vscode-widget-shadow);color:var(--vscode-editorWidget-foreground);display:flex;font-size:12px;padding:4px;pointer-events:all;position:relative;top:-45px;transition:top .2s linear;visibility:hidden;z-index:10}.monaco-workbench.reduce-motion .monaco-editor .find-widget{transition:top 0ms linear}.monaco-workbench .simple-find-part.visible{visibility:visible}.monaco-workbench .simple-find-part.suppress-transition{transition:none}.monaco-workbench .simple-find-part.visible-transition{top:0}.monaco-workbench .simple-find-part .monaco-findInput{flex:1}.monaco-workbench .simple-find-part .matchesCount{max-width:73px;min-width:73px;padding-left:5px;width:73px}.monaco-workbench .simple-find-part.reduced-find-widget .matchesCount{display:none}.monaco-workbench .simple-find-part .button{background-position:50%;background-repeat:no-repeat;cursor:pointer;display:flex;flex:initial;height:20px;justify-content:center;line-height:20px;margin-left:3px;min-width:20px;width:20px}.monaco-workbench div.simple-find-part div.button.disabled{cursor:default;opacity:.3!important}div.simple-find-part-wrapper div.button{border-radius:5px}.no-results.matchesCount{color:var(--vscode-errorForeground)}div.simple-find-part-wrapper div.button:hover:not(.disabled){background-color:var(--vscode-toolbar-hoverBackground);outline:1px dashed var(--vscode-toolbar-hoverOutline);outline-offset:-1px}.monaco-workbench .simple-find-part .monaco-sash{border-bottom-left-radius:4px;border-left:1px solid;left:0!important}.monaco-workbench .simple-find-part .monaco-sash.vertical:before{left:calc(50% - var(--vscode-sash-hover-size)/4);width:2px}";
3
+ n(css,{});
4
+ export { css, css as default };