@codingame/monaco-vscode-api 1.83.15 → 1.85.0-next.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 (361) hide show
  1. package/README.md +430 -0
  2. package/api.js +13 -7
  3. package/assets/clear.mp3 +0 -0
  4. package/assets/format.mp3 +0 -0
  5. package/assets/save.mp3 +0 -0
  6. package/contributions.js +3 -0
  7. package/extensions.d.ts +13 -3
  8. package/external/{xterm-addon-image/typings/xterm-addon-image.d.ts → @xterm/addon-image/typings/addon-image.d.ts} +1 -1
  9. package/external/{xterm → @xterm/xterm}/typings/xterm.d.ts +13 -1
  10. package/lifecycle.js +2 -2
  11. package/localExtensionHost.js +6 -3
  12. package/missing-services.js +170 -22
  13. package/monaco-editor-treemending.patch +6884 -18018
  14. package/monaco-treemending.js +2 -2
  15. package/package.json +7 -7
  16. package/service-override/tools/editor.d.ts +8 -8
  17. package/service-override/tools/editor.js +44 -19
  18. package/services.d.ts +2 -2
  19. package/services.js +3 -3
  20. package/vscode/src/vs/base/browser/broadcast.js +6 -5
  21. package/vscode/src/vs/base/browser/dnd.d.ts +6 -0
  22. package/vscode/src/vs/base/browser/mouseEvent.d.ts +1 -1
  23. package/vscode/src/vs/base/browser/touch.d.ts +10 -0
  24. package/vscode/src/vs/base/browser/ui/actionbar/actionbar.d.ts +1 -0
  25. package/vscode/src/vs/base/browser/ui/iconLabel/iconHoverDelegate.d.ts +22 -15
  26. package/vscode/src/vs/base/browser/ui/menu/menubar.js +4 -3
  27. package/vscode/src/vs/base/browser/ui/splitview/paneview.css.js +1 -1
  28. package/vscode/src/vs/base/browser/ui/splitview/paneview.d.ts +3 -0
  29. package/vscode/src/vs/base/browser/ui/splitview/paneview.js +34 -11
  30. package/vscode/src/vs/base/common/actions.d.ts +1 -15
  31. package/vscode/src/vs/base/common/async.d.ts +1 -31
  32. package/vscode/src/vs/base/common/event.d.ts +2 -1
  33. package/vscode/src/vs/base/common/observableInternal/base.d.ts +23 -10
  34. package/vscode/src/vs/base/common/prefixTree.js +140 -0
  35. package/vscode/src/vs/base/common/product.d.ts +16 -2
  36. package/vscode/src/vs/base/common/resourceTree.js +135 -0
  37. package/vscode/src/vs/base/common/skipList.js +1 -0
  38. package/vscode/src/vs/base/common/tfIdf.js +137 -0
  39. package/vscode/src/vs/base/common/types.d.ts +13 -1
  40. package/vscode/src/vs/base/common/verifier.js +62 -0
  41. package/vscode/src/vs/editor/browser/editorBrowser.d.ts +4 -2
  42. package/vscode/src/vs/editor/common/config/editorOptions.d.ts +23 -4
  43. package/vscode/src/vs/editor/common/core/lineRange.d.ts +1 -0
  44. package/vscode/src/vs/editor/common/core/offsetRange.d.ts +3 -0
  45. package/vscode/src/vs/editor/common/core/position.d.ts +1 -0
  46. package/vscode/src/vs/editor/common/editorCommon.d.ts +2 -1
  47. package/vscode/src/vs/editor/common/languages.d.ts +23 -1
  48. package/vscode/src/vs/editor/common/services/languageFeatures.d.ts +2 -1
  49. package/vscode/src/vs/editor/common/services/resolverService.d.ts +11 -2
  50. package/vscode/src/vs/platform/accessibility/common/accessibility.d.ts +16 -1
  51. package/vscode/src/vs/platform/action/common/action.d.ts +8 -0
  52. package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +4 -0
  53. package/vscode/src/vs/platform/actions/browser/floatingMenu.js +26 -2
  54. package/vscode/src/vs/platform/actions/common/actions.d.ts +8 -0
  55. package/vscode/src/vs/platform/audioCues/browser/audioCueService.d.ts +6 -0
  56. package/vscode/src/vs/platform/commands/common/commands.d.ts +13 -5
  57. package/vscode/src/vs/platform/dialogs/common/dialogs.d.ts +9 -3
  58. package/vscode/src/vs/platform/dialogs/common/dialogs.js +5 -2
  59. package/vscode/src/vs/platform/editor/common/editor.d.ts +3 -15
  60. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +1 -0
  61. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +3 -15
  62. package/vscode/src/vs/platform/extensionManagement/common/implicitActivationEvents.js +5 -0
  63. package/vscode/src/vs/platform/extensions/common/extensions.d.ts +0 -1
  64. package/vscode/src/vs/platform/files/common/files.d.ts +72 -8
  65. package/vscode/src/vs/platform/files/common/watcher.js +77 -0
  66. package/vscode/src/vs/platform/keybinding/common/keybindingsRegistry.d.ts +2 -2
  67. package/vscode/src/vs/platform/layout/browser/layoutService.d.ts +52 -21
  68. package/vscode/src/vs/platform/request/browser/requestService.js +3 -0
  69. package/vscode/src/vs/platform/request/common/requestIpc.js +17 -0
  70. package/vscode/src/vs/platform/storage/common/storage.js +2 -2
  71. package/vscode/src/vs/platform/telemetry/common/telemetry.d.ts +1 -0
  72. package/vscode/src/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +41 -0
  73. package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +12 -7
  74. package/vscode/src/vs/platform/terminal/common/capabilities/{commandDetectionCapability.d.ts → commandDetection/terminalCommand.d.ts} +3 -2
  75. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/terminalCommand.js +257 -0
  76. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +651 -0
  77. package/vscode/src/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +29 -0
  78. package/vscode/src/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +48 -0
  79. package/vscode/src/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +94 -0
  80. package/vscode/src/vs/platform/terminal/common/terminalEnvironment.js +37 -0
  81. package/vscode/src/vs/platform/terminal/common/terminalStrings.js +16 -0
  82. package/vscode/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +319 -0
  83. package/vscode/src/vs/platform/window/common/window.d.ts +9 -2
  84. package/vscode/src/vs/platform/window/common/window.js +6 -1
  85. package/vscode/src/vs/platform/workspaces/common/workspaces.d.ts +2 -43
  86. package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +113 -81
  87. package/vscode/src/vs/workbench/api/common/extHost.protocol.js +5 -4
  88. package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +25 -3
  89. package/vscode/src/vs/workbench/api/common/extHostChat.js +13 -163
  90. package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +412 -0
  91. package/vscode/src/vs/workbench/api/common/extHostChatProvider.js +79 -11
  92. package/vscode/src/vs/workbench/api/common/extHostCommands.js +13 -12
  93. package/vscode/src/vs/workbench/api/common/extHostComments.js +1 -1
  94. package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +8 -6
  95. package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +1 -1
  96. package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +36 -19
  97. package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +52 -31
  98. package/vscode/src/vs/workbench/api/common/extHostIssueReporter.js +38 -0
  99. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +28 -3
  100. package/vscode/src/vs/workbench/api/common/extHostLanguages.js +10 -0
  101. package/vscode/src/vs/workbench/api/common/extHostNotebook.js +117 -2
  102. package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +32 -4
  103. package/vscode/src/vs/workbench/api/common/extHostSCM.js +85 -23
  104. package/vscode/src/vs/workbench/api/common/extHostSearch.js +3 -0
  105. package/vscode/src/vs/workbench/api/common/extHostSpeech.js +42 -0
  106. package/vscode/src/vs/workbench/api/common/extHostTask.js +2 -1
  107. package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -0
  108. package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +3 -3
  109. package/vscode/src/vs/workbench/api/common/extHostTesting.js +97 -47
  110. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +115 -16
  111. package/vscode/src/vs/workbench/api/common/extHostTypes.js +66 -36
  112. package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +6 -1
  113. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +182 -75
  114. package/vscode/src/vs/workbench/browser/actions/windowActions.js +176 -4
  115. package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +143 -2
  116. package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +237 -0
  117. package/vscode/src/vs/workbench/browser/composite.d.ts +0 -4
  118. package/vscode/src/vs/workbench/browser/composite.js +5 -4
  119. package/vscode/src/vs/workbench/browser/dnd.js +72 -23
  120. package/vscode/src/vs/workbench/browser/labels.js +7 -3
  121. package/vscode/src/vs/workbench/browser/media/part.css.js +1 -1
  122. package/vscode/src/vs/workbench/browser/panecomposite.d.ts +2 -2
  123. package/vscode/src/vs/workbench/browser/panecomposite.js +2 -0
  124. package/vscode/src/vs/workbench/browser/part.js +33 -2
  125. package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +99 -117
  126. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +173 -33
  127. package/vscode/src/vs/workbench/browser/parts/editor/editor.js +102 -6
  128. package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +256 -17
  129. package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +4 -0
  130. package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +68 -35
  131. package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +5 -5
  132. package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +35 -16
  133. package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +348 -0
  134. package/vscode/src/vs/workbench/browser/parts/editor/editorsObserver.js +43 -31
  135. package/vscode/src/vs/workbench/browser/parts/editor/media/editortabscontrol.css.js +4 -0
  136. package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -0
  137. package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +1 -0
  138. package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +14 -2
  139. package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +4 -4
  140. package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +277 -0
  141. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +5 -2
  142. package/vscode/src/vs/workbench/browser/parts/panel/media/panelpart.css.js +1 -1
  143. package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +3 -38
  144. package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.d.ts +54 -52
  145. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +2 -1
  146. package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +25 -0
  147. package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +258 -0
  148. package/vscode/src/vs/workbench/browser/parts/views/media/paneviewlet.css.js +1 -1
  149. package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +2 -5
  150. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +157 -117
  151. package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +50 -23
  152. package/vscode/src/vs/workbench/browser/parts/views/viewsService.js +26 -11
  153. package/vscode/src/vs/workbench/browser/parts/views/viewsViewlet.js +10 -6
  154. package/vscode/src/vs/workbench/browser/style.js +2 -1
  155. package/vscode/src/vs/workbench/browser/web.api.d.ts +39 -2
  156. package/vscode/src/vs/workbench/browser/window.js +55 -0
  157. package/vscode/src/vs/workbench/browser/workbench.contribution.js +220 -40
  158. package/vscode/src/vs/workbench/common/activity.js +3 -0
  159. package/vscode/src/vs/workbench/common/contextkeys.js +35 -5
  160. package/vscode/src/vs/workbench/common/contributions.js +4 -3
  161. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +14 -4
  162. package/vscode/src/vs/workbench/common/editor/diffEditorModel.js +1 -1
  163. package/vscode/src/vs/workbench/common/editor/editorGroupModel.js +22 -19
  164. package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +4 -3
  165. package/vscode/src/vs/workbench/common/editor/editorModel.d.ts +1 -2
  166. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +22 -4
  167. package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.js +3 -3
  168. package/vscode/src/vs/workbench/common/editor.d.ts +60 -30
  169. package/vscode/src/vs/workbench/common/editor.js +11 -3
  170. package/vscode/src/vs/workbench/common/theme.js +2 -2
  171. package/vscode/src/vs/workbench/common/views.d.ts +4 -4
  172. package/vscode/src/vs/workbench/common/views.js +3 -1
  173. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +97 -8
  174. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +17 -99
  175. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +103 -37
  176. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +2 -3
  177. package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +127 -0
  178. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +71 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +2 -1
  180. package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +33 -110
  181. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +64 -0
  182. package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +94 -0
  183. package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +6 -1
  184. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +1 -88
  185. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +4 -4
  186. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -2
  187. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +3 -1
  188. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +15 -16
  189. package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +91 -1
  190. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +9 -3
  191. package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +3 -1
  192. package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +2 -3
  193. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +1 -0
  194. package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +9 -1
  195. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +10 -1
  196. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +114 -22
  197. package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +1 -1
  198. package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +4 -1
  199. package/vscode/src/vs/workbench/contrib/files/browser/explorerFileContrib.js +19 -0
  200. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +10 -8
  201. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +62 -10
  202. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +2 -1
  203. package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +9 -8
  204. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +10 -1
  205. package/vscode/src/vs/workbench/contrib/files/browser/files.d.ts +1 -0
  206. package/vscode/src/vs/workbench/contrib/files/browser/files.js +7 -3
  207. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +4 -4
  208. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +64 -36
  209. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +42 -17
  210. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +145 -25
  211. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +423 -0
  212. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +82 -0
  213. package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
  214. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +36 -0
  215. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +3 -1
  216. package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +24 -3
  217. package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +11 -6
  218. package/vscode/src/vs/workbench/contrib/scm/common/scm.js +1 -2
  219. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/searchNotebookHelpers.js +31 -0
  220. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +61 -41
  221. package/vscode/src/vs/workbench/contrib/search/{browser/searchNotebookHelpers.js → common/cellSearchModel.js} +4 -63
  222. package/vscode/src/vs/workbench/contrib/search/common/searchNotebookHelpers.js +40 -0
  223. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +2 -2
  224. package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +3 -0
  225. package/vscode/src/vs/workbench/contrib/terminal/browser/detachedTerminal.js +92 -0
  226. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +100 -79
  227. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.d.ts +3 -3
  228. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +1 -1
  229. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalExtensions.js +25 -0
  230. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcon.js +7 -4
  231. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +64 -0
  232. package/vscode/src/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +36 -0
  233. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +540 -0
  234. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +104 -0
  235. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +518 -0
  236. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +390 -0
  237. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +17 -11
  238. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +814 -0
  239. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +5 -2
  240. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +2 -8
  241. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -0
  242. package/vscode/src/vs/workbench/contrib/testing/common/getComputedState.js +101 -0
  243. package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +30 -0
  244. package/vscode/src/vs/workbench/contrib/testing/common/storedValue.js +36 -0
  245. package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +115 -0
  246. package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +74 -0
  247. package/vscode/src/vs/workbench/contrib/testing/common/testExplorerFilterState.js +116 -0
  248. package/vscode/src/vs/workbench/contrib/testing/common/testProfileService.js +172 -1
  249. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +384 -0
  250. package/vscode/src/vs/workbench/contrib/testing/common/testResultService.js +156 -1
  251. package/vscode/src/vs/workbench/contrib/testing/common/testResultStorage.js +156 -0
  252. package/vscode/src/vs/workbench/contrib/testing/common/testService.js +75 -1
  253. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +72 -1
  254. package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +188 -0
  255. package/vscode/src/vs/workbench/contrib/testing/common/testingContinuousRunService.js +102 -0
  256. package/vscode/src/vs/workbench/contrib/testing/common/testingDecorations.js +29 -0
  257. package/vscode/src/vs/workbench/{services/editor/browser/editorDropService.js → contrib/testing/common/testingPeekOpener.js} +2 -2
  258. package/vscode/src/vs/workbench/contrib/testing/common/testingStates.js +47 -0
  259. package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +4 -3
  260. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +8 -9
  261. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +1 -1
  262. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewIconManager.js +5 -2
  263. package/vscode/src/vs/workbench/services/activity/browser/activityService.d.ts +16 -10
  264. package/vscode/src/vs/workbench/services/activity/common/activity.d.ts +14 -1
  265. package/vscode/src/vs/workbench/services/activity/common/activity.js +1 -7
  266. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +9 -28
  267. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +273 -0
  268. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.js +1 -0
  269. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +2 -0
  270. package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +2 -3
  271. package/vscode/src/vs/workbench/services/editor/browser/editorService.d.ts +7 -5
  272. package/vscode/src/vs/workbench/services/editor/browser/editorService.js +59 -37
  273. package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +193 -94
  274. package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.js +2 -2
  275. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.d.ts +8 -2
  276. package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +8 -1
  277. package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +62 -16
  278. package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +5 -3
  279. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +3 -2
  280. package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +4 -9
  281. package/vscode/src/vs/workbench/services/extensions/common/{extensionHostManager.d.ts → extensionHostManagers.d.ts} +2 -0
  282. package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.d.ts +1 -1
  283. package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +9 -0
  284. package/vscode/src/vs/workbench/services/extensions/common/extensions.js +22 -0
  285. package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +14 -3
  286. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +9 -0
  287. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +3 -3
  288. package/vscode/src/vs/workbench/services/history/common/history.d.ts +2 -2
  289. package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +49 -18
  290. package/vscode/src/vs/workbench/services/host/browser/host.d.ts +29 -7
  291. package/vscode/src/vs/workbench/services/hover/browser/hover.d.ts +51 -28
  292. package/vscode/src/vs/workbench/services/hover/browser/hoverService.d.ts +5 -2
  293. package/vscode/src/vs/workbench/services/keybinding/browser/unboundCommands.js +2 -2
  294. package/vscode/src/vs/workbench/services/languageStatus/common/languageStatusService.d.ts +4 -1
  295. package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +40 -36
  296. package/vscode/src/vs/workbench/services/panecomposite/browser/panecomposite.d.ts +0 -6
  297. package/vscode/src/vs/workbench/services/preferences/common/preferences.d.ts +3 -0
  298. package/vscode/src/vs/workbench/services/progress/browser/progressIndicator.js +2 -2
  299. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +16 -1
  300. package/vscode/src/vs/workbench/services/request/browser/requestService.js +48 -0
  301. package/vscode/src/vs/workbench/services/search/common/searchHelpers.js +4 -4
  302. package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +10 -51
  303. package/vscode/src/vs/workbench/services/suggest/browser/media/suggest.css.js +4 -0
  304. package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.js +10 -0
  305. package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.js +98 -0
  306. package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +428 -0
  307. package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +83 -0
  308. package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +32 -1
  309. package/vscode/src/vs/workbench/services/textfile/common/textEditorService.js +1 -5
  310. package/vscode/src/vs/workbench/services/themes/browser/browserHostColorSchemeService.js +4 -3
  311. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +9 -3
  312. package/vscode/src/vs/workbench/services/title/browser/titleService.d.ts +18 -0
  313. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +18 -3
  314. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorModel.js +16 -7
  315. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +6 -0
  316. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +13 -0
  317. package/vscode/src/vs/workbench/services/url/browser/urlService.js +2 -1
  318. package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.js +2 -2
  319. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +9 -0
  320. package/vscode-dts/vscode.proposed.chatAgents2.d.ts +375 -0
  321. package/vscode-dts/vscode.proposed.chatAgents2Additions.d.ts +80 -0
  322. package/vscode-dts/vscode.proposed.chatProvider.d.ts +5 -1
  323. package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +68 -10
  324. package/vscode-dts/vscode.proposed.chatTab.d.ts +21 -0
  325. package/vscode-dts/vscode.proposed.chatVariables.d.ts +5 -1
  326. package/vscode-dts/vscode.proposed.codeActionAI.d.ts +16 -0
  327. package/vscode-dts/vscode.proposed.contribSourceControlInputBoxMenu.d.ts +7 -0
  328. package/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts +51 -0
  329. package/vscode-dts/vscode.proposed.defaultChatAgent.d.ts +30 -0
  330. package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +26 -0
  331. package/vscode-dts/vscode.proposed.interactive.d.ts +26 -100
  332. package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +14 -7
  333. package/vscode-dts/vscode.proposed.languageStatusText.d.ts +12 -0
  334. package/vscode-dts/vscode.proposed.multiDocumentHighlightProvider.d.ts +63 -0
  335. package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +43 -0
  336. package/vscode-dts/vscode.proposed.resolvers.d.ts +100 -1
  337. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +9 -1
  338. package/vscode-dts/vscode.proposed.scmInputBoxActionButton.d.ts +19 -0
  339. package/vscode-dts/vscode.proposed.scmInputBoxValueProvider.d.ts +25 -0
  340. package/vscode-dts/vscode.proposed.speech.d.ts +35 -0
  341. package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +11 -7
  342. package/vscode-dts/vscode.proposed.testCoverage.d.ts +6 -1
  343. package/vscode-dts/vscode.proposed.testingActiveProfile.d.ts +21 -0
  344. package/external/xterm-headless/typings/xterm-headless.d.ts +0 -49
  345. package/vscode/src/vs/platform/backup/common/backup.d.ts +0 -14
  346. package/vscode/src/vs/platform/update/common/update.d.ts +0 -112
  347. package/vscode/src/vs/workbench/api/common/extHostChatAgents.js +0 -62
  348. package/vscode/src/vs/workbench/api/common/extHostChatSlashCommand.js +0 -62
  349. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.d.ts +0 -56
  350. package/vscode/src/vs/workbench/services/files/common/files.js +0 -4
  351. package/vscode/src/vs/workbench/services/host/browser/browserHostService.d.ts +0 -41
  352. package/vscode/src/vs/workbench/services/title/common/titleService.d.ts +0 -31
  353. package/vscode-dts/vscode.proposed.chatAgents.d.ts +0 -39
  354. package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +0 -47
  355. package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +0 -45
  356. /package/external/{xterm-addon-canvas/typings/xterm-addon-canvas.d.ts → @xterm/addon-canvas/typings/addon-canvas.d.ts} +0 -0
  357. /package/external/{xterm-addon-search/typings/xterm-addon-search.d.ts → @xterm/addon-search/typings/addon-search.d.ts} +0 -0
  358. /package/external/{xterm-addon-serialize/typings/xterm-addon-serialize.d.ts → @xterm/addon-serialize/typings/addon-serialize.d.ts} +0 -0
  359. /package/external/{xterm-addon-unicode11/typings/xterm-addon-unicode11.d.ts → @xterm/addon-unicode11/typings/addon-unicode11.d.ts} +0 -0
  360. /package/external/{xterm-addon-webgl/typings/xterm-addon-webgl.d.ts → @xterm/addon-webgl/typings/addon-webgl.d.ts} +0 -0
  361. /package/vscode/src/vs/workbench/services/title/{common → browser}/titleService.js +0 -0
@@ -196,8 +196,8 @@ declare namespace Event {
196
196
  interface IChainableSythensis<T> {
197
197
  map<O>(fn: (i: T) => O): IChainableSythensis<O>;
198
198
  forEach(fn: (i: T) => void): IChainableSythensis<T>;
199
+ filter<R extends T>(fn: (e: T) => e is R): IChainableSythensis<R>;
199
200
  filter(fn: (e: T) => boolean): IChainableSythensis<T>;
200
- filter<R>(fn: (e: T | R) => e is R): IChainableSythensis<R>;
201
201
  reduce<R>(merge: (last: R, event: T) => R, initial: R): IChainableSythensis<R>;
202
202
  reduce<R>(merge: (last: R | undefined, event: T) => R): IChainableSythensis<R>;
203
203
  latch(equals?: (a: T, b: T) => boolean): IChainableSythensis<T>;
@@ -236,6 +236,7 @@ declare namespace Event {
236
236
  * runAndSubscribe(dataChangeEvent, () => this._updateUI());
237
237
  * ```
238
238
  */
239
+ function runAndSubscribe<T>(event: Event<T>, handler: (e: T) => any, initial: T): IDisposable;
239
240
  function runAndSubscribe<T>(event: Event<T>, handler: (e: T | undefined) => any): IDisposable;
240
241
  /**
241
242
  * Adds a listener to an event and calls the listener immediately with undefined as the event object. A new
@@ -1,8 +1,13 @@
1
+ import { DisposableStore } from '../lifecycle.js';
2
+
1
3
  /**
2
4
  * Represents an observable value.
3
5
  *
4
- * @template T The type of the value.
5
- * @template TChange The type of delta information (usually `void` and only used in advanced scenarios).
6
+ * @template T The type of the values the observable can hold.
7
+ * @template TChange The type used to describe value changes
8
+ * (usually `void` and only used in advanced scenarios).
9
+ * While observers can miss temporary values of an observable,
10
+ * they will receive all change values (as long as they are subscribed)!
6
11
  */
7
12
  interface IObservable<T, TChange = unknown> {
8
13
  /**
@@ -13,7 +18,7 @@ interface IObservable<T, TChange = unknown> {
13
18
  */
14
19
  get(): T;
15
20
  /**
16
- * Forces the observable to check for and report changes.
21
+ * Forces the observable to check for changes and report them.
17
22
  *
18
23
  * Has the same effect as calling {@link IObservable.get}, but does not force the observable
19
24
  * to actually construct the value, e.g. if change deltas are used.
@@ -32,19 +37,23 @@ interface IObservable<T, TChange = unknown> {
32
37
  */
33
38
  removeObserver(observer: IObserver): void;
34
39
  /**
35
- * Reads the current value and subscribes to this observable.
40
+ * Reads the current value and subscribes the reader to this observable.
36
41
  *
37
- * Just calls {@link IReader.readObservable} if a reader is given, otherwise {@link IObservable.get}
38
- * (see {@link ConvenientObservable.read}).
42
+ * Calls {@link IReader.readObservable} if a reader is given, otherwise {@link IObservable.get}
43
+ * (see {@link ConvenientObservable.read} for the implementation).
39
44
  */
40
45
  read(reader: IReader | undefined): T;
41
46
  /**
42
47
  * Creates a derived observable that depends on this observable.
43
48
  * Use the reader to read other observables
44
- * (see {@link ConvenientObservable.map}).
49
+ * (see {@link ConvenientObservable.map} for the implementation).
45
50
  */
46
51
  map<TNew>(fn: (value: T, reader: IReader) => TNew): IObservable<TNew>;
47
52
  map<TNew>(owner: object, fn: (value: T, reader: IReader) => TNew): IObservable<TNew>;
53
+ /**
54
+ * Makes sure this value is computed eagerly.
55
+ */
56
+ recomputeInitiallyAndOnChange(store: DisposableStore, handleValue?: (value: T) => void): IObservable<T>;
48
57
  /**
49
58
  * A human-readable name for debugging purposes.
50
59
  */
@@ -74,26 +83,30 @@ interface IObserver {
74
83
  * Signals that the given observable might have changed and a transaction potentially modifying that observable started.
75
84
  * Before the given observable can call this method again, is must call {@link IObserver.endUpdate}.
76
85
  *
86
+ * Implementations must not get/read the value of other observables, as they might not have received this event yet!
77
87
  * The method {@link IObservable.reportChanges} can be used to force the observable to report the changes.
78
88
  */
79
89
  beginUpdate<T>(observable: IObservable<T>): void;
80
90
  /**
81
91
  * Signals that the transaction that potentially modified the given observable ended.
92
+ * This is a good place to react to (potential) changes.
82
93
  */
83
94
  endUpdate<T>(observable: IObservable<T>): void;
84
95
  /**
85
96
  * Signals that the given observable might have changed.
86
97
  * The method {@link IObservable.reportChanges} can be used to force the observable to report the changes.
87
98
  *
88
- * Implementations must not call into other observables, as they might not have received this event yet!
99
+ * Implementations must not get/read the value of other observables, as they might not have received this event yet!
89
100
  * The change should be processed lazily or in {@link IObserver.endUpdate}.
90
101
  */
91
102
  handlePossibleChange<T>(observable: IObservable<T>): void;
92
103
  /**
93
- * Signals that the given observable changed.
104
+ * Signals that the given {@link observable} changed.
94
105
  *
95
- * Implementations must not call into other observables, as they might not have received this event yet!
106
+ * Implementations must not get/read the value of other observables, as they might not have received this event yet!
96
107
  * The change should be processed lazily or in {@link IObserver.endUpdate}.
108
+ *
109
+ * @param change Indicates how or why the value changed.
97
110
  */
98
111
  handleChange<T, TChange>(observable: IObservable<T, TChange>, change: TChange): void;
99
112
  }
@@ -0,0 +1,140 @@
1
+ import { Iterable } from 'monaco-editor/esm/vs/base/common/iterator.js';
2
+ const unset = Symbol('unset');
3
+ class WellDefinedPrefixTree {
4
+ constructor() {
5
+ this.root = ( new Node());
6
+ this._size = 0;
7
+ }
8
+ get size() {
9
+ return this._size;
10
+ }
11
+ get nodes() {
12
+ return this.root.children?.values() || Iterable.empty();
13
+ }
14
+ insert(key, value) {
15
+ this.opNode(key, n => n._value = value);
16
+ }
17
+ mutate(key, mutate) {
18
+ this.opNode(key, n => n._value = mutate(n._value === unset ? undefined : n._value));
19
+ }
20
+ delete(key) {
21
+ const path = [{ part: '', node: this.root }];
22
+ let i = 0;
23
+ for (const part of key) {
24
+ const node = path[i].node.children?.get(part);
25
+ if (!node) {
26
+ return undefined;
27
+ }
28
+ path.push({ part, node });
29
+ i++;
30
+ }
31
+ const value = path[i].node._value;
32
+ if (value === unset) {
33
+ return;
34
+ }
35
+ this._size--;
36
+ for (; i > 0; i--) {
37
+ const parent = path[i - 1];
38
+ parent.node.children.delete(path[i].part);
39
+ if (parent.node.children.size > 0 || parent.node._value !== unset) {
40
+ break;
41
+ }
42
+ }
43
+ return value;
44
+ }
45
+ find(key) {
46
+ let node = this.root;
47
+ for (const segment of key) {
48
+ const next = node.children?.get(segment);
49
+ if (!next) {
50
+ return undefined;
51
+ }
52
+ node = next;
53
+ }
54
+ return node._value === unset ? undefined : node._value;
55
+ }
56
+ hasKeyOrParent(key) {
57
+ let node = this.root;
58
+ for (const segment of key) {
59
+ const next = node.children?.get(segment);
60
+ if (!next) {
61
+ return false;
62
+ }
63
+ if (next._value !== unset) {
64
+ return true;
65
+ }
66
+ node = next;
67
+ }
68
+ return false;
69
+ }
70
+ hasKeyOrChildren(key) {
71
+ let node = this.root;
72
+ for (const segment of key) {
73
+ const next = node.children?.get(segment);
74
+ if (!next) {
75
+ return false;
76
+ }
77
+ node = next;
78
+ }
79
+ return true;
80
+ }
81
+ hasKey(key) {
82
+ let node = this.root;
83
+ for (const segment of key) {
84
+ const next = node.children?.get(segment);
85
+ if (!next) {
86
+ return false;
87
+ }
88
+ node = next;
89
+ }
90
+ return node._value !== unset;
91
+ }
92
+ opNode(key, fn) {
93
+ let node = this.root;
94
+ for (const part of key) {
95
+ if (!node.children) {
96
+ const next = ( new Node());
97
+ node.children = ( new Map([[part, next]]));
98
+ node = next;
99
+ }
100
+ else if (!( node.children.has(part))) {
101
+ const next = ( new Node());
102
+ node.children.set(part, next);
103
+ node = next;
104
+ }
105
+ else {
106
+ node = node.children.get(part);
107
+ }
108
+ }
109
+ if (node._value === unset) {
110
+ this._size++;
111
+ }
112
+ fn(node);
113
+ }
114
+ *values() {
115
+ const stack = [this.root];
116
+ while (stack.length > 0) {
117
+ const node = stack.pop();
118
+ if (node._value !== unset) {
119
+ yield node._value;
120
+ }
121
+ if (node.children) {
122
+ for (const child of ( node.children.values())) {
123
+ stack.push(child);
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
129
+ class Node {
130
+ constructor() {
131
+ this._value = unset;
132
+ }
133
+ get value() {
134
+ return this._value === unset ? undefined : this._value;
135
+ }
136
+ set value(value) {
137
+ this._value = value === undefined ? unset : value;
138
+ }
139
+ }
140
+ export { WellDefinedPrefixTree };
@@ -183,6 +183,7 @@ interface IProductConfiguration {
183
183
  readonly profileTemplatesUrl?: string;
184
184
  readonly commonlyUsedSettings?: string[];
185
185
  readonly aiGeneratedWorkspaceTrust?: IAiGeneratedWorkspaceTrust;
186
+ readonly gitHubEntitlement?: IGitHubEntitlement;
186
187
  }
187
188
  interface ITunnelApplicationConfig {
188
189
  authenticationProviders: IStringDictionary<{
@@ -214,7 +215,6 @@ type IFileContentCondition = (IFileLanguageCondition | IFilePathCondition) & {
214
215
  readonly contentPattern: string;
215
216
  };
216
217
  interface IAppCenterConfiguration {
217
- readonly 'win32-ia32': string;
218
218
  readonly 'win32-x64': string;
219
219
  readonly 'linux-x64': string;
220
220
  readonly 'darwin': string;
@@ -278,5 +278,19 @@ interface IAiGeneratedWorkspaceTrust {
278
278
  readonly dontTrustOption: string;
279
279
  readonly startupTrustRequestLearnMore: string;
280
280
  }
281
+ interface IGitHubEntitlement {
282
+ providerId: string;
283
+ command: {
284
+ title: string;
285
+ titleWithoutPlaceHolder: string;
286
+ action: string;
287
+ when: string;
288
+ };
289
+ entitlementUrl: string;
290
+ extensionId: string;
291
+ enablementKey: string;
292
+ confirmationMessage: string;
293
+ confirmationAction: string;
294
+ }
281
295
 
282
- export type { ConfigurationSyncStore, ExtensionUntrustedWorkspaceSupport, ExtensionVirtualWorkspaceSupport, IAiGeneratedWorkspaceTrust, IAppCenterConfiguration, IBuiltInExtension, IConfigBasedExtensionTip, IExeBasedExtensionTip, IExtensionRecommendationCondition, IExtensionRecommendations, IFeaturedExtension, IFileContentCondition, IFileLanguageCondition, IFileOpenCondition, IFilePathCondition, IProductConfiguration, IProductWalkthrough, IProductWalkthroughStep, IRemoteExtensionTip, ISettingsEditorOpenCondition, ISurveyData, ITunnelApplicationConfig, IVirtualWorkspaceExtensionTip };
296
+ export type { ConfigurationSyncStore, ExtensionUntrustedWorkspaceSupport, ExtensionVirtualWorkspaceSupport, IAiGeneratedWorkspaceTrust, IAppCenterConfiguration, IBuiltInExtension, IConfigBasedExtensionTip, IExeBasedExtensionTip, IExtensionRecommendationCondition, IExtensionRecommendations, IFeaturedExtension, IFileContentCondition, IFileLanguageCondition, IFileOpenCondition, IFilePathCondition, IGitHubEntitlement, IProductConfiguration, IProductWalkthrough, IProductWalkthroughStep, IRemoteExtensionTip, ISettingsEditorOpenCondition, ISurveyData, ITunnelApplicationConfig, IVirtualWorkspaceExtensionTip };
@@ -0,0 +1,135 @@
1
+ import { __decorate } from '../../../../../external/tslib/tslib.es6.js';
2
+ import { memoize } from 'monaco-editor/esm/vs/base/common/decorators.js';
3
+ import { PathIterator } from 'monaco-editor/esm/vs/base/common/ternarySearchTree.js';
4
+ import * as path from 'monaco-editor/esm/vs/base/common/path.js';
5
+ import { extUri } from 'monaco-editor/esm/vs/base/common/resources.js';
6
+ import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
7
+ class Node {
8
+ get childrenCount() {
9
+ return this._children.size;
10
+ }
11
+ get children() {
12
+ return ( this._children.values());
13
+ }
14
+ get name() {
15
+ return path.posix.basename(this.relativePath);
16
+ }
17
+ constructor(uri, relativePath, context, element = undefined, parent = undefined) {
18
+ this.uri = uri;
19
+ this.relativePath = relativePath;
20
+ this.context = context;
21
+ this.element = element;
22
+ this.parent = parent;
23
+ this._children = ( new Map());
24
+ }
25
+ get(path) {
26
+ return this._children.get(path);
27
+ }
28
+ set(path, child) {
29
+ this._children.set(path, child);
30
+ }
31
+ delete(path) {
32
+ this._children.delete(path);
33
+ }
34
+ clear() {
35
+ this._children.clear();
36
+ }
37
+ }
38
+ Node.__decorator = ( __decorate([
39
+ memoize
40
+ ], Node.prototype, "name", null));
41
+ function collect(node, result) {
42
+ if (typeof node.element !== 'undefined') {
43
+ result.push(node.element);
44
+ }
45
+ for (const child of node.children) {
46
+ collect(child, result);
47
+ }
48
+ return result;
49
+ }
50
+ class ResourceTree {
51
+ static getRoot(node) {
52
+ while (node.parent) {
53
+ node = node.parent;
54
+ }
55
+ return node;
56
+ }
57
+ static collect(node) {
58
+ return collect(node, []);
59
+ }
60
+ static isResourceNode(obj) {
61
+ return obj instanceof Node;
62
+ }
63
+ constructor(context, rootURI = URI.file('/'), extUri$1 = extUri) {
64
+ this.extUri = extUri$1;
65
+ this.root = ( new Node(rootURI, '', context));
66
+ }
67
+ add(uri, element) {
68
+ const key = this.extUri.relativePath(this.root.uri, uri) || uri.path;
69
+ const iterator = ( new PathIterator(false)).reset(key);
70
+ let node = this.root;
71
+ let path = '';
72
+ while (true) {
73
+ const name = iterator.value();
74
+ path = path + '/' + name;
75
+ let child = node.get(name);
76
+ if (!child) {
77
+ child = ( new Node(
78
+ this.extUri.joinPath(this.root.uri, path),
79
+ path,
80
+ this.root.context,
81
+ iterator.hasNext() ? undefined : element,
82
+ node
83
+ ));
84
+ node.set(name, child);
85
+ }
86
+ else if (!iterator.hasNext()) {
87
+ child.element = element;
88
+ }
89
+ node = child;
90
+ if (!iterator.hasNext()) {
91
+ return;
92
+ }
93
+ iterator.next();
94
+ }
95
+ }
96
+ delete(uri) {
97
+ const key = this.extUri.relativePath(this.root.uri, uri) || uri.path;
98
+ const iterator = ( new PathIterator(false)).reset(key);
99
+ return this._delete(this.root, iterator);
100
+ }
101
+ _delete(node, iterator) {
102
+ const name = iterator.value();
103
+ const child = node.get(name);
104
+ if (!child) {
105
+ return undefined;
106
+ }
107
+ if (iterator.hasNext()) {
108
+ const result = this._delete(child, iterator.next());
109
+ if (typeof result !== 'undefined' && child.childrenCount === 0) {
110
+ node.delete(name);
111
+ }
112
+ return result;
113
+ }
114
+ node.delete(name);
115
+ return child.element;
116
+ }
117
+ clear() {
118
+ this.root.clear();
119
+ }
120
+ getNode(uri) {
121
+ const key = this.extUri.relativePath(this.root.uri, uri) || uri.path;
122
+ const iterator = ( new PathIterator(false)).reset(key);
123
+ let node = this.root;
124
+ while (true) {
125
+ const name = iterator.value();
126
+ const child = node.get(name);
127
+ if (!child || !iterator.hasNext()) {
128
+ return child;
129
+ }
130
+ node = child;
131
+ iterator.next();
132
+ }
133
+ }
134
+ }
135
+ export { ResourceTree };
@@ -22,6 +22,7 @@ class SkipList {
22
22
  }
23
23
  clear() {
24
24
  this._header = ( new Node(this._maxLevel, NIL, NIL));
25
+ this._size = 0;
25
26
  }
26
27
  has(key) {
27
28
  return Boolean(SkipList._search(this, key, this.comparator));
@@ -0,0 +1,137 @@
1
+ function countMapFrom(values) {
2
+ const map = ( new Map());
3
+ for (const value of values) {
4
+ map.set(value, (map.get(value) ?? 0) + 1);
5
+ }
6
+ return map;
7
+ }
8
+ class TfIdfCalculator {
9
+ constructor() {
10
+ this.chunkCount = 0;
11
+ this.chunkOccurrences = ( new Map());
12
+ this.documents = ( new Map());
13
+ }
14
+ calculateScores(query, token) {
15
+ const embedding = this.computeEmbedding(query);
16
+ const idfCache = ( new Map());
17
+ const scores = [];
18
+ for (const [key, doc] of this.documents) {
19
+ if (token.isCancellationRequested) {
20
+ return [];
21
+ }
22
+ for (const chunk of doc.chunks) {
23
+ const score = this.computeSimilarityScore(chunk, embedding, idfCache);
24
+ if (score > 0) {
25
+ scores.push({ key, score });
26
+ }
27
+ }
28
+ }
29
+ return scores;
30
+ }
31
+ static termFrequencies(input) {
32
+ return countMapFrom(TfIdfCalculator.splitTerms(input));
33
+ }
34
+ static *splitTerms(input) {
35
+ const normalize = (word) => word.toLowerCase();
36
+ for (const [word] of input.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)) {
37
+ yield normalize(word);
38
+ const camelParts = word.replace(/([a-z])([A-Z])/g, '$1 $2').split(/\s+/g);
39
+ if (camelParts.length > 1) {
40
+ for (const part of camelParts) {
41
+ if (part.length > 2 && /\p{Letter}{3,}/gu.test(part)) {
42
+ yield normalize(part);
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ updateDocuments(documents) {
49
+ for (const { key } of documents) {
50
+ this.deleteDocument(key);
51
+ }
52
+ for (const doc of documents) {
53
+ const chunks = [];
54
+ for (const text of doc.textChunks) {
55
+ const tf = TfIdfCalculator.termFrequencies(text);
56
+ for (const term of ( tf.keys())) {
57
+ this.chunkOccurrences.set(term, (this.chunkOccurrences.get(term) ?? 0) + 1);
58
+ }
59
+ chunks.push({ text, tf });
60
+ }
61
+ this.chunkCount += chunks.length;
62
+ this.documents.set(doc.key, { chunks });
63
+ }
64
+ return this;
65
+ }
66
+ deleteDocument(key) {
67
+ const doc = this.documents.get(key);
68
+ if (!doc) {
69
+ return;
70
+ }
71
+ this.documents.delete(key);
72
+ this.chunkCount -= doc.chunks.length;
73
+ for (const chunk of doc.chunks) {
74
+ for (const term of ( chunk.tf.keys())) {
75
+ const currentOccurrences = this.chunkOccurrences.get(term);
76
+ if (typeof currentOccurrences === 'number') {
77
+ const newOccurrences = currentOccurrences - 1;
78
+ if (newOccurrences <= 0) {
79
+ this.chunkOccurrences.delete(term);
80
+ }
81
+ else {
82
+ this.chunkOccurrences.set(term, newOccurrences);
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ computeSimilarityScore(chunk, queryEmbedding, idfCache) {
89
+ let sum = 0;
90
+ for (const [term, termTfidf] of Object.entries(queryEmbedding)) {
91
+ const chunkTf = chunk.tf.get(term);
92
+ if (!chunkTf) {
93
+ continue;
94
+ }
95
+ let chunkIdf = idfCache.get(term);
96
+ if (typeof chunkIdf !== 'number') {
97
+ chunkIdf = this.computeIdf(term);
98
+ idfCache.set(term, chunkIdf);
99
+ }
100
+ const chunkTfidf = chunkTf * chunkIdf;
101
+ sum += chunkTfidf * termTfidf;
102
+ }
103
+ return sum;
104
+ }
105
+ computeEmbedding(input) {
106
+ const tf = TfIdfCalculator.termFrequencies(input);
107
+ return this.computeTfidf(tf);
108
+ }
109
+ computeIdf(term) {
110
+ const chunkOccurrences = this.chunkOccurrences.get(term) ?? 0;
111
+ return chunkOccurrences > 0
112
+ ? Math.log((this.chunkCount + 1) / chunkOccurrences)
113
+ : 0;
114
+ }
115
+ computeTfidf(termFrequencies) {
116
+ const embedding = Object.create(null);
117
+ for (const [word, occurrences] of termFrequencies) {
118
+ const idf = this.computeIdf(word);
119
+ if (idf > 0) {
120
+ embedding[word] = occurrences * idf;
121
+ }
122
+ }
123
+ return embedding;
124
+ }
125
+ }
126
+ function normalizeTfIdfScores(scores) {
127
+ const result = scores.slice(0);
128
+ result.sort((a, b) => b.score - a.score);
129
+ const max = result[0]?.score ?? 0;
130
+ if (max > 0) {
131
+ for (const score of result) {
132
+ score.score /= max;
133
+ }
134
+ }
135
+ return result;
136
+ }
137
+ export { TfIdfCalculator, normalizeTfIdfScores };
@@ -12,5 +12,17 @@ type AtLeastOne<T, U = {
12
12
  type OmitOptional<T> = {
13
13
  [K in keyof T as T[K] extends Required<T>[K] ? K : never]: T[K];
14
14
  };
15
+ /**
16
+ * A type that recursively makes all properties of `T` required
17
+ */
18
+ type DeepRequiredNonNullable<T> = {
19
+ [P in keyof T]-?: T[P] extends object ? DeepRequiredNonNullable<T[P]> : Required<NonNullable<T[P]>>;
20
+ };
21
+ /**
22
+ * Represents a type that is a partial version of a given type `T`, where all properties are optional and can be deeply nested.
23
+ */
24
+ type DeepPartial<T> = {
25
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : Partial<T[P]>;
26
+ };
15
27
 
16
- export type { AtLeastOne, OmitOptional, TypeConstraint };
28
+ export type { AtLeastOne, DeepPartial, DeepRequiredNonNullable, OmitOptional, TypeConstraint };
@@ -0,0 +1,62 @@
1
+ import { isObject } from 'monaco-editor/esm/vs/base/common/types.js';
2
+ class Verifier {
3
+ constructor(defaultValue) {
4
+ this.defaultValue = defaultValue;
5
+ }
6
+ verify(value) {
7
+ if (!this.isType(value)) {
8
+ return this.defaultValue;
9
+ }
10
+ return value;
11
+ }
12
+ }
13
+ class BooleanVerifier extends Verifier {
14
+ isType(value) {
15
+ return typeof value === 'boolean';
16
+ }
17
+ }
18
+ class NumberVerifier extends Verifier {
19
+ isType(value) {
20
+ return typeof value === 'number';
21
+ }
22
+ }
23
+ class SetVerifier extends Verifier {
24
+ isType(value) {
25
+ return value instanceof Set;
26
+ }
27
+ }
28
+ class EnumVerifier extends Verifier {
29
+ constructor(defaultValue, allowedValues) {
30
+ super(defaultValue);
31
+ this.allowedValues = allowedValues;
32
+ }
33
+ isType(value) {
34
+ return this.allowedValues.includes(value);
35
+ }
36
+ }
37
+ class ObjectVerifier extends Verifier {
38
+ constructor(defaultValue, verifier) {
39
+ super(defaultValue);
40
+ this.verifier = verifier;
41
+ }
42
+ verify(value) {
43
+ if (!this.isType(value)) {
44
+ return this.defaultValue;
45
+ }
46
+ return verifyObject(this.verifier, value);
47
+ }
48
+ isType(value) {
49
+ return isObject(value);
50
+ }
51
+ }
52
+ function verifyObject(verifiers, value) {
53
+ const result = Object.create(null);
54
+ for (const key in verifiers) {
55
+ if (Object.hasOwnProperty.call(verifiers, key)) {
56
+ const verifier = verifiers[key];
57
+ result[key] = verifier.verify(value[key]);
58
+ }
59
+ }
60
+ return result;
61
+ }
62
+ export { BooleanVerifier, EnumVerifier, NumberVerifier, ObjectVerifier, SetVerifier, verifyObject };
@@ -90,15 +90,17 @@ interface IDiffEditor extends IEditor {
90
90
  */
91
91
  setBoundarySashes(sashes: IBoundarySashes): void;
92
92
  /**
93
- * @internal
93
+ * Jumps to the next or previous diff.
94
94
  */
95
95
  goToDiff(target: 'next' | 'previous'): void;
96
96
  /**
97
- * @internal
97
+ * Scrolls to the first diff.
98
+ * (Waits until the diff computation finished.)
98
99
  */
99
100
  revealFirstDiff(): unknown;
100
101
  accessibleDiffViewerNext(): void;
101
102
  accessibleDiffViewerPrev(): void;
103
+ handleInitialized(): void;
102
104
  }
103
105
 
104
106
  export type { ICodeEditor, IDiffEditor };