@codingame/monaco-vscode-api 1.83.16 → 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 (328) hide show
  1. package/api.js +13 -7
  2. package/assets/clear.mp3 +0 -0
  3. package/assets/format.mp3 +0 -0
  4. package/assets/save.mp3 +0 -0
  5. package/extensions.d.ts +13 -3
  6. package/external/{xterm-addon-image/typings/xterm-addon-image.d.ts → @xterm/addon-image/typings/addon-image.d.ts} +1 -1
  7. package/external/{xterm → @xterm/xterm}/typings/xterm.d.ts +13 -1
  8. package/lifecycle.js +2 -2
  9. package/localExtensionHost.js +3 -1
  10. package/missing-services.js +115 -23
  11. package/monaco-editor-treemending.patch +6884 -18018
  12. package/monaco-treemending.js +2 -2
  13. package/package.json +7 -7
  14. package/service-override/tools/editor.d.ts +8 -8
  15. package/service-override/tools/editor.js +44 -19
  16. package/services.d.ts +2 -2
  17. package/services.js +3 -3
  18. package/vscode/src/vs/base/browser/broadcast.js +6 -5
  19. package/vscode/src/vs/base/browser/dnd.d.ts +6 -0
  20. package/vscode/src/vs/base/browser/mouseEvent.d.ts +1 -1
  21. package/vscode/src/vs/base/browser/touch.d.ts +10 -0
  22. package/vscode/src/vs/base/browser/ui/actionbar/actionbar.d.ts +1 -0
  23. package/vscode/src/vs/base/browser/ui/iconLabel/iconHoverDelegate.d.ts +22 -15
  24. package/vscode/src/vs/base/browser/ui/menu/menubar.js +4 -3
  25. package/vscode/src/vs/base/browser/ui/splitview/paneview.css.js +1 -1
  26. package/vscode/src/vs/base/browser/ui/splitview/paneview.d.ts +3 -0
  27. package/vscode/src/vs/base/browser/ui/splitview/paneview.js +34 -11
  28. package/vscode/src/vs/base/common/actions.d.ts +1 -15
  29. package/vscode/src/vs/base/common/async.d.ts +1 -31
  30. package/vscode/src/vs/base/common/event.d.ts +2 -1
  31. package/vscode/src/vs/base/common/observableInternal/base.d.ts +23 -10
  32. package/vscode/src/vs/base/common/prefixTree.js +21 -11
  33. package/vscode/src/vs/base/common/product.d.ts +16 -2
  34. package/vscode/src/vs/base/common/resourceTree.js +135 -0
  35. package/vscode/src/vs/base/common/skipList.js +1 -0
  36. package/vscode/src/vs/base/common/tfIdf.js +137 -0
  37. package/vscode/src/vs/base/common/types.d.ts +13 -1
  38. package/vscode/src/vs/base/common/verifier.js +62 -0
  39. package/vscode/src/vs/editor/browser/editorBrowser.d.ts +4 -2
  40. package/vscode/src/vs/editor/common/config/editorOptions.d.ts +23 -4
  41. package/vscode/src/vs/editor/common/core/lineRange.d.ts +1 -0
  42. package/vscode/src/vs/editor/common/core/offsetRange.d.ts +3 -0
  43. package/vscode/src/vs/editor/common/core/position.d.ts +1 -0
  44. package/vscode/src/vs/editor/common/editorCommon.d.ts +2 -1
  45. package/vscode/src/vs/editor/common/languages.d.ts +23 -1
  46. package/vscode/src/vs/editor/common/services/languageFeatures.d.ts +2 -1
  47. package/vscode/src/vs/editor/common/services/resolverService.d.ts +11 -2
  48. package/vscode/src/vs/platform/accessibility/common/accessibility.d.ts +16 -1
  49. package/vscode/src/vs/platform/action/common/action.d.ts +8 -0
  50. package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +4 -0
  51. package/vscode/src/vs/platform/actions/common/actions.d.ts +8 -0
  52. package/vscode/src/vs/platform/audioCues/browser/audioCueService.d.ts +6 -0
  53. package/vscode/src/vs/platform/commands/common/commands.d.ts +13 -5
  54. package/vscode/src/vs/platform/dialogs/common/dialogs.d.ts +9 -3
  55. package/vscode/src/vs/platform/dialogs/common/dialogs.js +5 -2
  56. package/vscode/src/vs/platform/editor/common/editor.d.ts +3 -15
  57. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +1 -0
  58. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +3 -15
  59. package/vscode/src/vs/platform/extensionManagement/common/implicitActivationEvents.js +5 -0
  60. package/vscode/src/vs/platform/extensions/common/extensions.d.ts +0 -1
  61. package/vscode/src/vs/platform/files/common/files.d.ts +72 -8
  62. package/vscode/src/vs/platform/files/common/watcher.js +77 -0
  63. package/vscode/src/vs/platform/keybinding/common/keybindingsRegistry.d.ts +2 -2
  64. package/vscode/src/vs/platform/layout/browser/layoutService.d.ts +52 -21
  65. package/vscode/src/vs/platform/request/browser/requestService.js +3 -0
  66. package/vscode/src/vs/platform/request/common/requestIpc.js +17 -0
  67. package/vscode/src/vs/platform/storage/common/storage.js +2 -2
  68. package/vscode/src/vs/platform/telemetry/common/telemetry.d.ts +1 -0
  69. package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +12 -7
  70. package/vscode/src/vs/platform/terminal/common/capabilities/{commandDetectionCapability.d.ts → commandDetection/terminalCommand.d.ts} +3 -2
  71. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/terminalCommand.js +257 -0
  72. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +439 -354
  73. package/vscode/src/vs/platform/window/common/window.d.ts +9 -2
  74. package/vscode/src/vs/platform/window/common/window.js +6 -1
  75. package/vscode/src/vs/platform/workspaces/common/workspaces.d.ts +2 -43
  76. package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +113 -81
  77. package/vscode/src/vs/workbench/api/common/extHost.protocol.js +5 -4
  78. package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +25 -3
  79. package/vscode/src/vs/workbench/api/common/extHostChat.js +13 -163
  80. package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +412 -0
  81. package/vscode/src/vs/workbench/api/common/extHostChatProvider.js +79 -11
  82. package/vscode/src/vs/workbench/api/common/extHostCommands.js +13 -12
  83. package/vscode/src/vs/workbench/api/common/extHostComments.js +1 -1
  84. package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +8 -6
  85. package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +1 -1
  86. package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +36 -19
  87. package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +52 -31
  88. package/vscode/src/vs/workbench/api/common/extHostIssueReporter.js +38 -0
  89. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +28 -3
  90. package/vscode/src/vs/workbench/api/common/extHostLanguages.js +10 -0
  91. package/vscode/src/vs/workbench/api/common/extHostNotebook.js +117 -2
  92. package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +32 -4
  93. package/vscode/src/vs/workbench/api/common/extHostSCM.js +85 -23
  94. package/vscode/src/vs/workbench/api/common/extHostSearch.js +3 -0
  95. package/vscode/src/vs/workbench/api/common/extHostSpeech.js +42 -0
  96. package/vscode/src/vs/workbench/api/common/extHostTask.js +2 -1
  97. package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -0
  98. package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +3 -3
  99. package/vscode/src/vs/workbench/api/common/extHostTesting.js +97 -47
  100. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +115 -16
  101. package/vscode/src/vs/workbench/api/common/extHostTypes.js +66 -36
  102. package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +6 -1
  103. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +182 -75
  104. package/vscode/src/vs/workbench/browser/actions/windowActions.js +176 -4
  105. package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +143 -2
  106. package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +237 -0
  107. package/vscode/src/vs/workbench/browser/composite.d.ts +0 -4
  108. package/vscode/src/vs/workbench/browser/composite.js +5 -4
  109. package/vscode/src/vs/workbench/browser/dnd.js +72 -23
  110. package/vscode/src/vs/workbench/browser/labels.js +7 -3
  111. package/vscode/src/vs/workbench/browser/media/part.css.js +1 -1
  112. package/vscode/src/vs/workbench/browser/panecomposite.d.ts +2 -2
  113. package/vscode/src/vs/workbench/browser/panecomposite.js +2 -0
  114. package/vscode/src/vs/workbench/browser/part.js +33 -2
  115. package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +99 -117
  116. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +173 -33
  117. package/vscode/src/vs/workbench/browser/parts/editor/editor.js +102 -6
  118. package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +256 -17
  119. package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +4 -0
  120. package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +68 -35
  121. package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +5 -5
  122. package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +35 -16
  123. package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +348 -0
  124. package/vscode/src/vs/workbench/browser/parts/editor/editorsObserver.js +43 -31
  125. package/vscode/src/vs/workbench/browser/parts/editor/media/editortabscontrol.css.js +4 -0
  126. package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -0
  127. package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +1 -0
  128. package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +14 -2
  129. package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +4 -4
  130. package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +277 -0
  131. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +5 -2
  132. package/vscode/src/vs/workbench/browser/parts/panel/media/panelpart.css.js +1 -1
  133. package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +3 -38
  134. package/vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.d.ts +54 -52
  135. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +2 -1
  136. package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +25 -0
  137. package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +258 -0
  138. package/vscode/src/vs/workbench/browser/parts/views/media/paneviewlet.css.js +1 -1
  139. package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +2 -5
  140. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +157 -117
  141. package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +50 -23
  142. package/vscode/src/vs/workbench/browser/parts/views/viewsService.js +26 -11
  143. package/vscode/src/vs/workbench/browser/parts/views/viewsViewlet.js +10 -6
  144. package/vscode/src/vs/workbench/browser/style.js +2 -1
  145. package/vscode/src/vs/workbench/browser/web.api.d.ts +39 -2
  146. package/vscode/src/vs/workbench/browser/window.js +55 -0
  147. package/vscode/src/vs/workbench/browser/workbench.contribution.js +220 -40
  148. package/vscode/src/vs/workbench/common/activity.js +3 -0
  149. package/vscode/src/vs/workbench/common/contextkeys.js +35 -5
  150. package/vscode/src/vs/workbench/common/contributions.js +4 -3
  151. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +14 -4
  152. package/vscode/src/vs/workbench/common/editor/diffEditorModel.js +1 -1
  153. package/vscode/src/vs/workbench/common/editor/editorGroupModel.js +22 -19
  154. package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +4 -3
  155. package/vscode/src/vs/workbench/common/editor/editorModel.d.ts +1 -2
  156. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +22 -4
  157. package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.js +3 -3
  158. package/vscode/src/vs/workbench/common/editor.d.ts +60 -30
  159. package/vscode/src/vs/workbench/common/editor.js +11 -3
  160. package/vscode/src/vs/workbench/common/theme.js +2 -2
  161. package/vscode/src/vs/workbench/common/views.d.ts +4 -4
  162. package/vscode/src/vs/workbench/common/views.js +3 -1
  163. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +97 -8
  164. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +17 -99
  165. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +103 -37
  166. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +2 -3
  167. package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +127 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +71 -0
  169. package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +2 -1
  170. package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +33 -110
  171. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +64 -0
  172. package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +94 -0
  173. package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +6 -1
  174. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +1 -88
  175. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +4 -4
  176. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -2
  177. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +3 -1
  178. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +15 -16
  179. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +9 -3
  180. package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +3 -1
  181. package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +2 -3
  182. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +1 -0
  183. package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +9 -1
  184. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +10 -1
  185. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +114 -22
  186. package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +1 -1
  187. package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +4 -1
  188. package/vscode/src/vs/workbench/contrib/files/browser/explorerFileContrib.js +19 -0
  189. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +10 -8
  190. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +62 -10
  191. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +2 -1
  192. package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +9 -8
  193. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +10 -1
  194. package/vscode/src/vs/workbench/contrib/files/browser/files.d.ts +1 -0
  195. package/vscode/src/vs/workbench/contrib/files/browser/files.js +7 -3
  196. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +4 -4
  197. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +64 -36
  198. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +42 -17
  199. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +145 -25
  200. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +1 -1
  201. package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
  202. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +36 -0
  203. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +3 -1
  204. package/vscode/src/vs/workbench/contrib/preferences/common/preferences.js +24 -3
  205. package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +11 -6
  206. package/vscode/src/vs/workbench/contrib/scm/common/scm.js +1 -2
  207. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/searchNotebookHelpers.js +31 -0
  208. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +61 -41
  209. package/vscode/src/vs/workbench/contrib/search/{browser/searchNotebookHelpers.js → common/cellSearchModel.js} +4 -63
  210. package/vscode/src/vs/workbench/contrib/search/common/searchNotebookHelpers.js +40 -0
  211. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +2 -2
  212. package/vscode/src/vs/workbench/{services/editor/browser/editorDropService.js → contrib/speech/common/speechService.js} +2 -2
  213. package/vscode/src/vs/workbench/contrib/terminal/browser/detachedTerminal.js +29 -4
  214. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +100 -79
  215. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.d.ts +3 -3
  216. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +1 -1
  217. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcon.js +7 -4
  218. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +5 -3
  219. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +143 -41
  220. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +17 -11
  221. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +41 -26
  222. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +5 -2
  223. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +2 -8
  224. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -0
  225. package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +115 -0
  226. package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +74 -0
  227. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +3 -3
  228. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +64 -1
  229. package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +9 -0
  230. package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +4 -3
  231. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +8 -9
  232. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +1 -1
  233. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewIconManager.js +5 -2
  234. package/vscode/src/vs/workbench/services/activity/browser/activityService.d.ts +16 -10
  235. package/vscode/src/vs/workbench/services/activity/common/activity.d.ts +14 -1
  236. package/vscode/src/vs/workbench/services/activity/common/activity.js +1 -7
  237. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +9 -28
  238. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +273 -0
  239. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.js +1 -0
  240. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +2 -0
  241. package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +2 -3
  242. package/vscode/src/vs/workbench/services/editor/browser/editorService.d.ts +7 -5
  243. package/vscode/src/vs/workbench/services/editor/browser/editorService.js +59 -37
  244. package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +193 -94
  245. package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.js +2 -2
  246. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.d.ts +8 -2
  247. package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +8 -1
  248. package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +62 -16
  249. package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +5 -3
  250. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +3 -2
  251. package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +4 -9
  252. package/vscode/src/vs/workbench/services/extensions/common/{extensionHostManager.d.ts → extensionHostManagers.d.ts} +2 -0
  253. package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.d.ts +1 -1
  254. package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +9 -0
  255. package/vscode/src/vs/workbench/services/extensions/common/extensions.js +22 -0
  256. package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +14 -3
  257. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +9 -0
  258. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +3 -3
  259. package/vscode/src/vs/workbench/services/history/common/history.d.ts +2 -2
  260. package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +49 -18
  261. package/vscode/src/vs/workbench/services/host/browser/host.d.ts +29 -7
  262. package/vscode/src/vs/workbench/services/hover/browser/hover.d.ts +51 -28
  263. package/vscode/src/vs/workbench/services/hover/browser/hoverService.d.ts +5 -2
  264. package/vscode/src/vs/workbench/services/keybinding/browser/unboundCommands.js +2 -2
  265. package/vscode/src/vs/workbench/services/languageStatus/common/languageStatusService.d.ts +4 -1
  266. package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +40 -36
  267. package/vscode/src/vs/workbench/services/panecomposite/browser/panecomposite.d.ts +0 -6
  268. package/vscode/src/vs/workbench/services/preferences/common/preferences.d.ts +3 -0
  269. package/vscode/src/vs/workbench/services/progress/browser/progressIndicator.js +2 -2
  270. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +16 -1
  271. package/vscode/src/vs/workbench/services/request/browser/requestService.js +48 -0
  272. package/vscode/src/vs/workbench/services/search/common/searchHelpers.js +4 -4
  273. package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +10 -51
  274. package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +2 -2
  275. package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +32 -1
  276. package/vscode/src/vs/workbench/services/textfile/common/textEditorService.js +1 -5
  277. package/vscode/src/vs/workbench/services/themes/browser/browserHostColorSchemeService.js +4 -3
  278. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +9 -3
  279. package/vscode/src/vs/workbench/services/title/browser/titleService.d.ts +18 -0
  280. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +18 -3
  281. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorModel.js +16 -7
  282. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +6 -0
  283. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +13 -0
  284. package/vscode/src/vs/workbench/services/url/browser/urlService.js +2 -1
  285. package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.js +2 -2
  286. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +9 -0
  287. package/vscode-dts/vscode.proposed.chatAgents2.d.ts +375 -0
  288. package/vscode-dts/vscode.proposed.chatAgents2Additions.d.ts +80 -0
  289. package/vscode-dts/vscode.proposed.chatProvider.d.ts +5 -1
  290. package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +68 -10
  291. package/vscode-dts/vscode.proposed.chatTab.d.ts +21 -0
  292. package/vscode-dts/vscode.proposed.chatVariables.d.ts +5 -1
  293. package/vscode-dts/vscode.proposed.codeActionAI.d.ts +16 -0
  294. package/vscode-dts/vscode.proposed.contribSourceControlInputBoxMenu.d.ts +7 -0
  295. package/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts +51 -0
  296. package/vscode-dts/vscode.proposed.defaultChatAgent.d.ts +30 -0
  297. package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +26 -0
  298. package/vscode-dts/vscode.proposed.interactive.d.ts +26 -100
  299. package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +14 -7
  300. package/vscode-dts/vscode.proposed.languageStatusText.d.ts +12 -0
  301. package/vscode-dts/vscode.proposed.multiDocumentHighlightProvider.d.ts +63 -0
  302. package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +43 -0
  303. package/vscode-dts/vscode.proposed.resolvers.d.ts +100 -1
  304. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +9 -1
  305. package/vscode-dts/vscode.proposed.scmInputBoxActionButton.d.ts +19 -0
  306. package/vscode-dts/vscode.proposed.scmInputBoxValueProvider.d.ts +25 -0
  307. package/vscode-dts/vscode.proposed.speech.d.ts +35 -0
  308. package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +11 -7
  309. package/vscode-dts/vscode.proposed.testCoverage.d.ts +6 -1
  310. package/vscode-dts/vscode.proposed.testingActiveProfile.d.ts +21 -0
  311. package/external/xterm-headless/typings/xterm-headless.d.ts +0 -49
  312. package/vscode/src/vs/platform/backup/common/backup.d.ts +0 -14
  313. package/vscode/src/vs/platform/update/common/update.d.ts +0 -112
  314. package/vscode/src/vs/workbench/api/common/extHostChatAgents.js +0 -62
  315. package/vscode/src/vs/workbench/api/common/extHostChatSlashCommand.js +0 -62
  316. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.d.ts +0 -56
  317. package/vscode/src/vs/workbench/services/files/common/files.js +0 -4
  318. package/vscode/src/vs/workbench/services/host/browser/browserHostService.d.ts +0 -41
  319. package/vscode/src/vs/workbench/services/title/common/titleService.d.ts +0 -31
  320. package/vscode-dts/vscode.proposed.chatAgents.d.ts +0 -39
  321. package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +0 -47
  322. package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +0 -45
  323. /package/external/{xterm-addon-canvas/typings/xterm-addon-canvas.d.ts → @xterm/addon-canvas/typings/addon-canvas.d.ts} +0 -0
  324. /package/external/{xterm-addon-search/typings/xterm-addon-search.d.ts → @xterm/addon-search/typings/addon-search.d.ts} +0 -0
  325. /package/external/{xterm-addon-serialize/typings/xterm-addon-serialize.d.ts → @xterm/addon-serialize/typings/addon-serialize.d.ts} +0 -0
  326. /package/external/{xterm-addon-unicode11/typings/xterm-addon-unicode11.d.ts → @xterm/addon-unicode11/typings/addon-unicode11.d.ts} +0 -0
  327. /package/external/{xterm-addon-webgl/typings/xterm-addon-webgl.d.ts → @xterm/addon-webgl/typings/addon-webgl.d.ts} +0 -0
  328. /package/vscode/src/vs/workbench/services/title/{common → browser}/titleService.js +0 -0
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
2
  import './media/editorstatus.css.js';
3
3
  import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
4
- import { runAtThisOrScheduleAtNextAnimationFrame } from 'monaco-editor/esm/vs/base/browser/dom.js';
4
+ import { runAtThisOrScheduleAtNextAnimationFrame, getWindowById } from 'monaco-editor/esm/vs/base/browser/dom.js';
5
5
  import { format, splitLines, compare } from 'monaco-editor/esm/vs/base/common/strings.js';
6
6
  import { extname, basename, isEqual } from 'monaco-editor/esm/vs/base/common/resources.js';
7
7
  import { areFunctions, assertIsDefined } from 'monaco-editor/esm/vs/base/common/types.js';
@@ -44,6 +44,9 @@ import { ContextKeyExpr } from 'monaco-editor/esm/vs/platform/contextkey/common/
44
44
  import { Action2 } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
45
45
  import { KeyChord } from 'monaco-editor/esm/vs/base/common/keyCodes.js';
46
46
  import { TabFocus } from 'monaco-editor/esm/vs/editor/browser/config/tabFocus.js';
47
+ import { mainWindow } from 'monaco-editor/esm/vs/base/browser/window.js';
48
+ import { IEditorGroupsService } from '../../../services/editor/common/editorGroupsService.js';
49
+ import { ServiceCollection } from 'monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js';
47
50
  var ShowLanguageExtensionsAction_1;
48
51
  class SideBySideEditorEncodingSupport {
49
52
  constructor(primary, secondary) {
@@ -257,8 +260,9 @@ const nlsEOLCRLF = ( localizeWithPath(
257
260
  "CRLF"
258
261
  ));
259
262
  let EditorStatus = class EditorStatus extends Disposable {
260
- constructor(editorService, quickInputService, languageService, textFileService, statusbarService, instantiationService, configurationService) {
263
+ constructor(targetWindowId, editorService, quickInputService, languageService, textFileService, statusbarService, instantiationService, configurationService) {
261
264
  super();
265
+ this.targetWindowId = targetWindowId;
262
266
  this.editorService = editorService;
263
267
  this.quickInputService = quickInputService;
264
268
  this.languageService = languageService;
@@ -278,8 +282,8 @@ let EditorStatus = class EditorStatus extends Disposable {
278
282
  this.state = ( new State());
279
283
  this.activeEditorListeners = this._register(( new DisposableStore()));
280
284
  this.delayedRender = this._register(( new MutableDisposable()));
281
- this.toRender = null;
282
- this.tabFocusMode = instantiationService.createInstance(TabFocusMode);
285
+ this.tabFocusMode = this.instantiationService.createInstance(TabFocusMode);
286
+ this.toRender = undefined;
283
287
  this.registerCommands();
284
288
  this.registerListeners();
285
289
  }
@@ -557,12 +561,12 @@ let EditorStatus = class EditorStatus extends Disposable {
557
561
  }
558
562
  if (!this.toRender) {
559
563
  this.toRender = changed;
560
- this.delayedRender.value = runAtThisOrScheduleAtNextAnimationFrame(() => {
564
+ this.delayedRender.value = runAtThisOrScheduleAtNextAnimationFrame(getWindowById(this.targetWindowId)?.window ?? mainWindow, () => {
561
565
  this.delayedRender.clear();
562
566
  const toRender = this.toRender;
563
- this.toRender = null;
567
+ this.toRender = undefined;
564
568
  if (toRender) {
565
- this.doRenderNow(toRender);
569
+ this.doRenderNow();
566
570
  }
567
571
  });
568
572
  }
@@ -570,7 +574,7 @@ let EditorStatus = class EditorStatus extends Disposable {
570
574
  this.toRender.combine(changed);
571
575
  }
572
576
  }
573
- doRenderNow(changed) {
577
+ doRenderNow() {
574
578
  this.updateTabFocusModeElement(!!this.state.tabFocusMode);
575
579
  this.updateColumnSelectionModeElement(!!this.state.columnSelectionMode);
576
580
  this.updateIndentationElement(this.state.indentation);
@@ -806,14 +810,29 @@ let EditorStatus = class EditorStatus extends Disposable {
806
810
  }
807
811
  };
808
812
  EditorStatus = ( __decorate([
809
- ( __param(0, IEditorService)),
810
- ( __param(1, IQuickInputService)),
811
- ( __param(2, ILanguageService)),
812
- ( __param(3, ITextFileService)),
813
- ( __param(4, IStatusbarService)),
814
- ( __param(5, IInstantiationService)),
815
- ( __param(6, IConfigurationService))
813
+ ( __param(1, IEditorService)),
814
+ ( __param(2, IQuickInputService)),
815
+ ( __param(3, ILanguageService)),
816
+ ( __param(4, ITextFileService)),
817
+ ( __param(5, IStatusbarService)),
818
+ ( __param(6, IInstantiationService)),
819
+ ( __param(7, IConfigurationService))
816
820
  ], EditorStatus));
821
+ let EditorStatusContribution = class EditorStatusContribution extends Disposable {
822
+ constructor(instantiationService, editorGroupService, editorService) {
823
+ super();
824
+ const mainInstantiationService = instantiationService.createChild(( new ServiceCollection([IEditorService, editorService.createScoped('main', this._store)])));
825
+ this._register(mainInstantiationService.createInstance(EditorStatus, mainWindow.vscodeWindowId));
826
+ this._register(editorGroupService.onDidCreateAuxiliaryEditorPart(({ part, instantiationService, disposables }) => {
827
+ disposables.add(instantiationService.createInstance(EditorStatus, part.windowId));
828
+ }));
829
+ }
830
+ };
831
+ EditorStatusContribution = ( __decorate([
832
+ ( __param(0, IInstantiationService)),
833
+ ( __param(1, IEditorGroupsService)),
834
+ ( __param(2, IEditorService))
835
+ ], EditorStatusContribution));
817
836
  let ShowCurrentMarkerInStatusbarContribution = class ShowCurrentMarkerInStatusbarContribution extends Disposable {
818
837
  constructor(statusbarService, markerService, configurationService) {
819
838
  super();
@@ -1406,4 +1425,4 @@ class ChangeEncodingAction extends Action2 {
1406
1425
  activeTextEditorControl.focus();
1407
1426
  }
1408
1427
  }
1409
- export { ChangeEOLAction, ChangeEncodingAction, ChangeLanguageAction, EditorStatus, ShowLanguageExtensionsAction };
1428
+ export { ChangeEOLAction, ChangeEncodingAction, ChangeLanguageAction, EditorStatusContribution, ShowLanguageExtensionsAction };
@@ -0,0 +1,348 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import './media/editortabscontrol.css.js';
3
+ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
4
+ import { DataTransfers, applyDragImage } from 'monaco-editor/esm/vs/base/browser/dnd.js';
5
+ import { getWindow, isMouseEvent } from 'monaco-editor/esm/vs/base/browser/dom.js';
6
+ import { StandardMouseEvent } from 'monaco-editor/esm/vs/base/browser/mouseEvent.js';
7
+ import { prepareActions } from 'monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js';
8
+ import { ActionRunner } from 'monaco-editor/esm/vs/base/common/actions.js';
9
+ import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
10
+ import { createActionViewItem } from 'monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js';
11
+ import { MenuId } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
12
+ import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
13
+ import { IContextMenuService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
14
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
15
+ import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
16
+ import { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
17
+ import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
18
+ import { listActiveSelectionBackground, listActiveSelectionForeground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
19
+ import { Themable, IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
20
+ import { DraggedEditorGroupIdentifier, isWindowDraggedOver, fillEditorsDragData } from '../../dnd.js';
21
+ import { EditorPane } from './editorPane.js';
22
+ import { EditorResourceAccessor, SideBySideEditor } from '../../../common/editor.js';
23
+ import { ResourceContextKey, ActiveEditorPinnedContext, ActiveEditorFirstInGroupContext, ActiveEditorLastInGroupContext, ActiveEditorStickyContext, ActiveEditorAvailableEditorIdsContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, ActiveEditorGroupLockedContext, applyAvailableEditorIds } from '../../../common/contextkeys.js';
24
+ import { assertIsDefined } from 'monaco-editor/esm/vs/base/common/types.js';
25
+ import { isFirefox } from 'monaco-editor/esm/vs/base/browser/browser.js';
26
+ import { isCancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
27
+ import { SideBySideEditorInput } from '../../../common/editor/sideBySideEditorInput.js';
28
+ import { WorkbenchToolBar } from 'monaco-editor/esm/vs/platform/actions/browser/toolbar.js';
29
+ import { LocalSelectionTransfer } from 'monaco-editor/esm/vs/platform/dnd/browser/dnd.js';
30
+ import { IEditorResolverService } from '../../../services/editor/common/editorResolverService.js';
31
+ import { EDITOR_CORE_NAVIGATION_COMMANDS } from './editorCommands.js';
32
+ import { isMacintosh } from 'monaco-editor/esm/vs/base/common/platform.js';
33
+ import { IHostService } from '../../../services/host/browser/host.js';
34
+ var EditorTabsControl_1;
35
+ class EditorCommandsContextActionRunner extends ActionRunner {
36
+ constructor(context) {
37
+ super();
38
+ this.context = context;
39
+ }
40
+ run(action, context) {
41
+ let mergedContext = this.context;
42
+ if (context?.preserveFocus) {
43
+ mergedContext = {
44
+ ...this.context,
45
+ preserveFocus: true
46
+ };
47
+ }
48
+ return super.run(action, mergedContext);
49
+ }
50
+ }
51
+ let EditorTabsControl = class EditorTabsControl extends Themable {
52
+ static { EditorTabsControl_1 = this; }
53
+ static { this.EDITOR_TAB_HEIGHT = {
54
+ normal: 35,
55
+ compact: 22
56
+ }; }
57
+ constructor(parent, editorPartsView, groupsView, groupView, tabsModel, contextMenuService, instantiationService, contextKeyService, keybindingService, notificationService, quickInputService, themeService, editorResolverService, hostService) {
58
+ super(themeService);
59
+ this.parent = parent;
60
+ this.editorPartsView = editorPartsView;
61
+ this.groupsView = groupsView;
62
+ this.groupView = groupView;
63
+ this.tabsModel = tabsModel;
64
+ this.contextMenuService = contextMenuService;
65
+ this.instantiationService = instantiationService;
66
+ this.contextKeyService = contextKeyService;
67
+ this.keybindingService = keybindingService;
68
+ this.notificationService = notificationService;
69
+ this.quickInputService = quickInputService;
70
+ this.editorResolverService = editorResolverService;
71
+ this.hostService = hostService;
72
+ this.editorTransfer = LocalSelectionTransfer.getInstance();
73
+ this.groupTransfer = LocalSelectionTransfer.getInstance();
74
+ this.treeItemsTransfer = LocalSelectionTransfer.getInstance();
75
+ this.editorActionsToolbarDisposables = this._register(( new DisposableStore()));
76
+ this.editorActionsDisposables = this._register(( new DisposableStore()));
77
+ this.resourceContext = this._register(instantiationService.createInstance(ResourceContextKey));
78
+ this.editorPinnedContext = ActiveEditorPinnedContext.bindTo(contextKeyService);
79
+ this.editorIsFirstContext = ActiveEditorFirstInGroupContext.bindTo(contextKeyService);
80
+ this.editorIsLastContext = ActiveEditorLastInGroupContext.bindTo(contextKeyService);
81
+ this.editorStickyContext = ActiveEditorStickyContext.bindTo(contextKeyService);
82
+ this.editorAvailableEditorIds = ActiveEditorAvailableEditorIdsContext.bindTo(this.contextKeyService);
83
+ this.editorCanSplitInGroupContext = ActiveEditorCanSplitInGroupContext.bindTo(contextKeyService);
84
+ this.sideBySideEditorContext = SideBySideEditorActiveContext.bindTo(contextKeyService);
85
+ this.groupLockedContext = ActiveEditorGroupLockedContext.bindTo(contextKeyService);
86
+ this.renderDropdownAsChildElement = false;
87
+ this.create(parent);
88
+ }
89
+ create(parent) {
90
+ this.updateTabHeight();
91
+ }
92
+ get editorActionsEnabled() {
93
+ return this.groupsView.partOptions.editorActionsLocation === 'default' && this.groupsView.partOptions.showTabs !== 'none';
94
+ }
95
+ createEditorActionsToolBar(parent, classes) {
96
+ this.editorActionsToolbarContainer = document.createElement('div');
97
+ this.editorActionsToolbarContainer.classList.add(...classes);
98
+ parent.appendChild(this.editorActionsToolbarContainer);
99
+ this.handleEditorActionToolBarVisibility(this.editorActionsToolbarContainer);
100
+ }
101
+ handleEditorActionToolBarVisibility(container) {
102
+ const editorActionsEnabled = this.editorActionsEnabled;
103
+ const editorActionsVisible = !!this.editorActionsToolbar;
104
+ if (editorActionsEnabled && !editorActionsVisible) {
105
+ this.doCreateEditorActionsToolBar(container);
106
+ }
107
+ else if (!editorActionsEnabled && editorActionsVisible) {
108
+ this.editorActionsToolbar?.getElement().remove();
109
+ this.editorActionsToolbar = undefined;
110
+ this.editorActionsToolbarDisposables.clear();
111
+ this.editorActionsDisposables.clear();
112
+ }
113
+ container.classList.toggle('hidden', !editorActionsEnabled);
114
+ }
115
+ doCreateEditorActionsToolBar(container) {
116
+ const context = { groupId: this.groupView.id };
117
+ this.editorActionsToolbar = this.editorActionsToolbarDisposables.add(this.instantiationService.createInstance(WorkbenchToolBar, container, {
118
+ actionViewItemProvider: action => this.actionViewItemProvider(action),
119
+ orientation: 0 ,
120
+ ariaLabel: ( localizeWithPath(
121
+ 'vs/workbench/browser/parts/editor/editorTabsControl',
122
+ 'ariaLabelEditorActions',
123
+ "Editor actions"
124
+ )),
125
+ getKeyBinding: action => this.getKeybinding(action),
126
+ actionRunner: this.editorActionsToolbarDisposables.add(( new EditorCommandsContextActionRunner(context))),
127
+ anchorAlignmentProvider: () => 1 ,
128
+ renderDropdownAsChildElement: this.renderDropdownAsChildElement,
129
+ telemetrySource: 'editorPart',
130
+ resetMenu: MenuId.EditorTitle,
131
+ overflowBehavior: { maxItems: 9, exempted: EDITOR_CORE_NAVIGATION_COMMANDS },
132
+ highlightToggledItems: true
133
+ }));
134
+ this.editorActionsToolbar.context = context;
135
+ this.editorActionsToolbarDisposables.add(this.editorActionsToolbar.actionRunner.onDidRun(e => {
136
+ if (e.error && !isCancellationError(e.error)) {
137
+ this.notificationService.error(e.error);
138
+ }
139
+ }));
140
+ }
141
+ actionViewItemProvider(action) {
142
+ const activeEditorPane = this.groupView.activeEditorPane;
143
+ if (activeEditorPane instanceof EditorPane) {
144
+ const result = activeEditorPane.getActionViewItem(action);
145
+ if (result) {
146
+ return result;
147
+ }
148
+ }
149
+ return createActionViewItem(this.instantiationService, action, { menuAsChild: this.renderDropdownAsChildElement });
150
+ }
151
+ updateEditorActionsToolbar() {
152
+ if (!this.editorActionsEnabled) {
153
+ return;
154
+ }
155
+ this.editorActionsDisposables.clear();
156
+ const editorActions = this.groupView.createEditorActions(this.editorActionsDisposables);
157
+ this.editorActionsDisposables.add(editorActions.onDidChange(() => this.updateEditorActionsToolbar()));
158
+ const editorActionsToolbar = assertIsDefined(this.editorActionsToolbar);
159
+ const { primary, secondary } = this.prepareEditorActions(editorActions.actions);
160
+ editorActionsToolbar.setActions(prepareActions(primary), prepareActions(secondary));
161
+ }
162
+ getEditorPaneAwareContextKeyService() {
163
+ return this.groupView.activeEditorPane?.scopedContextKeyService ?? this.contextKeyService;
164
+ }
165
+ clearEditorActionsToolbar() {
166
+ if (!this.editorActionsEnabled) {
167
+ return;
168
+ }
169
+ const editorActionsToolbar = assertIsDefined(this.editorActionsToolbar);
170
+ editorActionsToolbar.setActions([], []);
171
+ }
172
+ onGroupDragStart(e, element) {
173
+ if (e.target !== element) {
174
+ return;
175
+ }
176
+ this.groupTransfer.setData([( new DraggedEditorGroupIdentifier(this.groupView.id))], DraggedEditorGroupIdentifier.prototype);
177
+ if (e.dataTransfer) {
178
+ e.dataTransfer.effectAllowed = 'copyMove';
179
+ }
180
+ let hasDataTransfer = false;
181
+ if (this.groupsView.partOptions.showTabs === 'multiple') {
182
+ hasDataTransfer = this.doFillResourceDataTransfers(this.groupView.getEditors(1 ), e);
183
+ }
184
+ else {
185
+ if (this.groupView.activeEditor) {
186
+ hasDataTransfer = this.doFillResourceDataTransfers([this.groupView.activeEditor], e);
187
+ }
188
+ }
189
+ if (!hasDataTransfer && isFirefox) {
190
+ e.dataTransfer?.setData(DataTransfers.TEXT, String(this.groupView.label));
191
+ }
192
+ if (this.groupView.activeEditor) {
193
+ let label = this.groupView.activeEditor.getName();
194
+ if (this.groupsView.partOptions.showTabs === 'multiple' && this.groupView.count > 1) {
195
+ label = ( localizeWithPath(
196
+ 'vs/workbench/browser/parts/editor/editorTabsControl',
197
+ 'draggedEditorGroup',
198
+ "{0} (+{1})",
199
+ label,
200
+ this.groupView.count - 1
201
+ ));
202
+ }
203
+ applyDragImage(e, label, 'monaco-editor-group-drag-image', this.getColor(listActiveSelectionBackground), this.getColor(listActiveSelectionForeground));
204
+ }
205
+ }
206
+ async onGroupDragEnd(e, previousDragEvent, element) {
207
+ this.groupTransfer.clearData(DraggedEditorGroupIdentifier.prototype);
208
+ if (e.target !== element ||
209
+ !this.isNewWindowOperation(previousDragEvent ?? e) ||
210
+ isWindowDraggedOver()) {
211
+ return;
212
+ }
213
+ const auxiliaryEditorPart = await this.maybeCreateAuxiliaryEditorPartAt(e, element);
214
+ if (!auxiliaryEditorPart) {
215
+ return;
216
+ }
217
+ const targetGroup = auxiliaryEditorPart.activeGroup;
218
+ this.groupsView.mergeGroup(this.groupView, targetGroup.id, {
219
+ mode: this.isMoveOperation(previousDragEvent ?? e, targetGroup.id) ? 1 : 0
220
+ });
221
+ targetGroup.focus();
222
+ }
223
+ async maybeCreateAuxiliaryEditorPartAt(e, offsetElement) {
224
+ const { point, display } = (await this.hostService.getCursorScreenPoint()) ?? { point: { x: e.screenX, y: e.screenY } };
225
+ const window = getWindow(e);
226
+ if (window.document.visibilityState === 'visible') {
227
+ if (point.x >= window.screenX && point.x <= window.screenX + window.outerWidth && point.y >= window.screenY && point.y <= window.screenY + window.outerHeight) {
228
+ return;
229
+ }
230
+ }
231
+ const offsetX = offsetElement.offsetWidth / 2;
232
+ const offsetY = 30 + offsetElement.offsetHeight / 2;
233
+ const bounds = {
234
+ x: point.x - offsetX,
235
+ y: point.y - offsetY
236
+ };
237
+ if (display) {
238
+ if (bounds.x < display.x) {
239
+ bounds.x = display.x;
240
+ }
241
+ if (bounds.y < display.y) {
242
+ bounds.y = display.y;
243
+ }
244
+ }
245
+ return this.editorPartsView.createAuxiliaryEditorPart({ bounds });
246
+ }
247
+ isNewWindowOperation(e) {
248
+ if (this.groupsView.partOptions.dragToOpenWindow) {
249
+ return !e.altKey;
250
+ }
251
+ return e.altKey;
252
+ }
253
+ isMoveOperation(e, sourceGroup, sourceEditor) {
254
+ if (sourceEditor?.hasCapability(8 )) {
255
+ return true;
256
+ }
257
+ const isCopy = (e.ctrlKey && !isMacintosh) || (e.altKey && isMacintosh);
258
+ return (!isCopy || sourceGroup === this.groupView.id);
259
+ }
260
+ doFillResourceDataTransfers(editors, e) {
261
+ if (editors.length) {
262
+ this.instantiationService.invokeFunction(fillEditorsDragData, ( editors.map(editor => ({ editor, groupId: this.groupView.id }))), e, { disableStandardTransfer: this.isNewWindowOperation(e) });
263
+ return true;
264
+ }
265
+ return false;
266
+ }
267
+ onTabContextMenu(editor, e, node) {
268
+ const currentResourceContext = this.resourceContext.get();
269
+ this.resourceContext.set(EditorResourceAccessor.getOriginalUri(editor, { supportSideBySide: SideBySideEditor.PRIMARY } ?? null));
270
+ const currentPinnedContext = !!this.editorPinnedContext.get();
271
+ this.editorPinnedContext.set(this.tabsModel.isPinned(editor));
272
+ const currentEditorIsFirstContext = !!this.editorIsFirstContext.get();
273
+ this.editorIsFirstContext.set(this.tabsModel.isFirst(editor));
274
+ const currentEditorIsLastContext = !!this.editorIsLastContext.get();
275
+ this.editorIsLastContext.set(this.tabsModel.isLast(editor));
276
+ const currentStickyContext = !!this.editorStickyContext.get();
277
+ this.editorStickyContext.set(this.tabsModel.isSticky(editor));
278
+ const currentGroupLockedContext = !!this.groupLockedContext.get();
279
+ this.groupLockedContext.set(this.tabsModel.isLocked);
280
+ const currentEditorCanSplitContext = !!this.editorCanSplitInGroupContext.get();
281
+ this.editorCanSplitInGroupContext.set(editor.hasCapability(32 ));
282
+ const currentSideBySideEditorContext = !!this.sideBySideEditorContext.get();
283
+ this.sideBySideEditorContext.set(editor.typeId === SideBySideEditorInput.ID);
284
+ const currentEditorAvailableEditorIds = this.editorAvailableEditorIds.get() ?? '';
285
+ applyAvailableEditorIds(this.editorAvailableEditorIds, editor, this.editorResolverService);
286
+ let anchor = node;
287
+ if (isMouseEvent(e)) {
288
+ anchor = ( new StandardMouseEvent(getWindow(node), e));
289
+ }
290
+ this.contextMenuService.showContextMenu({
291
+ getAnchor: () => anchor,
292
+ menuId: MenuId.EditorTitleContext,
293
+ menuActionOptions: { shouldForwardArgs: true, arg: this.resourceContext.get() },
294
+ contextKeyService: this.contextKeyService,
295
+ getActionsContext: () => ({ groupId: this.groupView.id, editorIndex: this.groupView.getIndexOfEditor(editor) }),
296
+ getKeyBinding: action => this.getKeybinding(action),
297
+ onHide: () => {
298
+ this.resourceContext.set(currentResourceContext || null);
299
+ this.editorPinnedContext.set(currentPinnedContext);
300
+ this.editorIsFirstContext.set(currentEditorIsFirstContext);
301
+ this.editorIsLastContext.set(currentEditorIsLastContext);
302
+ this.editorStickyContext.set(currentStickyContext);
303
+ this.groupLockedContext.set(currentGroupLockedContext);
304
+ this.editorCanSplitInGroupContext.set(currentEditorCanSplitContext);
305
+ this.sideBySideEditorContext.set(currentSideBySideEditorContext);
306
+ this.editorAvailableEditorIds.set(currentEditorAvailableEditorIds);
307
+ this.groupsView.activeGroup.focus();
308
+ }
309
+ });
310
+ }
311
+ getKeybinding(action) {
312
+ return this.keybindingService.lookupKeybinding(action.id, this.getEditorPaneAwareContextKeyService());
313
+ }
314
+ getKeybindingLabel(action) {
315
+ const keybinding = this.getKeybinding(action);
316
+ return keybinding ? keybinding.getLabel() ?? undefined : undefined;
317
+ }
318
+ get tabHeight() {
319
+ return this.groupsView.partOptions.tabHeight !== 'compact' ? EditorTabsControl_1.EDITOR_TAB_HEIGHT.normal : EditorTabsControl_1.EDITOR_TAB_HEIGHT.compact;
320
+ }
321
+ updateTabHeight() {
322
+ this.parent.style.setProperty('--editor-group-tab-height', `${this.tabHeight}px`);
323
+ }
324
+ updateOptions(oldOptions, newOptions) {
325
+ if (oldOptions.tabHeight !== newOptions.tabHeight) {
326
+ this.updateTabHeight();
327
+ }
328
+ if (oldOptions.editorActionsLocation !== newOptions.editorActionsLocation ||
329
+ oldOptions.showTabs !== newOptions.showTabs) {
330
+ if (this.editorActionsToolbarContainer) {
331
+ this.handleEditorActionToolBarVisibility(this.editorActionsToolbarContainer);
332
+ this.updateEditorActionsToolbar();
333
+ }
334
+ }
335
+ }
336
+ };
337
+ EditorTabsControl = EditorTabsControl_1 = ( __decorate([
338
+ ( __param(5, IContextMenuService)),
339
+ ( __param(6, IInstantiationService)),
340
+ ( __param(7, IContextKeyService)),
341
+ ( __param(8, IKeybindingService)),
342
+ ( __param(9, INotificationService)),
343
+ ( __param(10, IQuickInputService)),
344
+ ( __param(11, IThemeService)),
345
+ ( __param(12, IEditorResolverService)),
346
+ ( __param(13, IHostService))
347
+ ], EditorTabsControl));
348
+ export { EditorCommandsContextActionRunner, EditorTabsControl };
@@ -35,29 +35,31 @@ let EditorsObserver = class EditorsObserver extends Disposable {
35
35
  }
36
36
  return arg1;
37
37
  }
38
- constructor(editorGroupsService, storageService) {
38
+ constructor(editorGroupsContainer, editorGroupService, storageService) {
39
39
  super();
40
- this.editorGroupsService = editorGroupsService;
40
+ this.editorGroupService = editorGroupService;
41
41
  this.storageService = storageService;
42
42
  this.keyMap = ( new Map());
43
43
  this.mostRecentEditorsMap = ( new LinkedMap());
44
44
  this.editorsPerResourceCounter = ( new ResourceMap());
45
45
  this._onDidMostRecentlyActiveEditorsChange = this._register(( new Emitter()));
46
46
  this.onDidMostRecentlyActiveEditorsChange = this._onDidMostRecentlyActiveEditorsChange.event;
47
+ this.editorGroupsContainer = editorGroupsContainer ?? editorGroupService;
48
+ this.isScoped = !!editorGroupsContainer;
47
49
  this.registerListeners();
50
+ this.loadState();
48
51
  }
49
52
  registerListeners() {
53
+ this._register(this.editorGroupsContainer.onDidAddGroup(group => this.onGroupAdded(group)));
54
+ this._register(this.editorGroupsContainer.onDidChangeEditorPartOptions(e => this.onDidChangeEditorPartOptions(e)));
50
55
  this._register(this.storageService.onWillSaveState(() => this.saveState()));
51
- this._register(this.editorGroupsService.onDidAddGroup(group => this.onGroupAdded(group)));
52
- this._register(this.editorGroupsService.onDidChangeEditorPartOptions(e => this.onDidChangeEditorPartOptions(e)));
53
- this.editorGroupsService.whenReady.then(() => this.loadState());
54
56
  }
55
57
  onGroupAdded(group) {
56
58
  const groupEditorsMru = group.getEditors(0 );
57
59
  for (let i = groupEditorsMru.length - 1; i >= 0; i--) {
58
60
  this.addMostRecentEditor(group, groupEditorsMru[i], false , true );
59
61
  }
60
- if (this.editorGroupsService.activeGroup === group && group.activeEditor) {
62
+ if (this.editorGroupsContainer.activeGroup === group && group.activeEditor) {
61
63
  this.addMostRecentEditor(group, group.activeEditor, true , false );
62
64
  }
63
65
  this.registerGroupListeners(group);
@@ -67,12 +69,12 @@ let EditorsObserver = class EditorsObserver extends Disposable {
67
69
  groupDisposables.add(group.onDidModelChange(e => {
68
70
  switch (e.kind) {
69
71
  case 0 : {
70
- if (this.editorGroupsService.activeGroup === group && group.activeEditor) {
72
+ if (this.editorGroupsContainer.activeGroup === group && group.activeEditor) {
71
73
  this.addMostRecentEditor(group, group.activeEditor, true , false );
72
74
  }
73
75
  break;
74
76
  }
75
- case 3 : {
77
+ case 4 : {
76
78
  if (e.editor) {
77
79
  this.addMostRecentEditor(group, e.editor, false , true );
78
80
  this.ensureOpenedEditorsLimit({ groupId: group.id, editor: e.editor }, group.id);
@@ -86,14 +88,14 @@ let EditorsObserver = class EditorsObserver extends Disposable {
86
88
  }));
87
89
  groupDisposables.add(group.onDidActiveEditorChange(e => {
88
90
  if (e.editor) {
89
- this.addMostRecentEditor(group, e.editor, this.editorGroupsService.activeGroup === group, false );
91
+ this.addMostRecentEditor(group, e.editor, this.editorGroupsContainer.activeGroup === group, false );
90
92
  }
91
93
  }));
92
94
  Event.once(group.onWillDispose)(() => dispose(groupDisposables));
93
95
  }
94
96
  onDidChangeEditorPartOptions(event) {
95
97
  if (!equals(event.newPartOptions.limit, event.oldPartOptions.limit)) {
96
- const activeGroup = this.editorGroupsService.activeGroup;
98
+ const activeGroup = this.editorGroupsContainer.activeGroup;
97
99
  let exclude = undefined;
98
100
  if (activeGroup.activeEditor) {
99
101
  exclude = { editor: activeGroup.activeEditor, groupId: activeGroup.id };
@@ -191,21 +193,21 @@ let EditorsObserver = class EditorsObserver extends Disposable {
191
193
  return key;
192
194
  }
193
195
  async ensureOpenedEditorsLimit(exclude, groupId) {
194
- if (!this.editorGroupsService.partOptions.limit?.enabled ||
195
- typeof this.editorGroupsService.partOptions.limit.value !== 'number' ||
196
- this.editorGroupsService.partOptions.limit.value <= 0) {
196
+ if (!this.editorGroupsContainer.partOptions.limit?.enabled ||
197
+ typeof this.editorGroupsContainer.partOptions.limit.value !== 'number' ||
198
+ this.editorGroupsContainer.partOptions.limit.value <= 0) {
197
199
  return;
198
200
  }
199
- const limit = this.editorGroupsService.partOptions.limit.value;
200
- if (this.editorGroupsService.partOptions.limit?.perEditorGroup) {
201
+ const limit = this.editorGroupsContainer.partOptions.limit.value;
202
+ if (this.editorGroupsContainer.partOptions.limit?.perEditorGroup) {
201
203
  if (typeof groupId === 'number') {
202
- const group = this.editorGroupsService.getGroup(groupId);
204
+ const group = this.editorGroupsContainer.getGroup(groupId);
203
205
  if (group) {
204
206
  await this.doEnsureOpenedEditorsLimit(limit, ( group.getEditors(0 ).map(editor => ({ editor, groupId }))), exclude);
205
207
  }
206
208
  }
207
209
  else {
208
- for (const group of this.editorGroupsService.groups) {
210
+ for (const group of this.editorGroupsContainer.groups) {
209
211
  await this.ensureOpenedEditorsLimit(exclude, group.id);
210
212
  }
211
213
  }
@@ -216,7 +218,7 @@ let EditorsObserver = class EditorsObserver extends Disposable {
216
218
  }
217
219
  async doEnsureOpenedEditorsLimit(limit, mostRecentEditors, exclude) {
218
220
  let mostRecentEditorsCountingForLimit;
219
- if (this.editorGroupsService.partOptions.limit?.excludeDirty) {
221
+ if (this.editorGroupsContainer.partOptions.limit?.excludeDirty) {
220
222
  mostRecentEditorsCountingForLimit = mostRecentEditors.filter(({ editor }) => {
221
223
  if ((editor.isDirty() && !editor.isSaving()) || editor.hasCapability(512 )) {
222
224
  return false;
@@ -237,7 +239,7 @@ let EditorsObserver = class EditorsObserver extends Disposable {
237
239
  if (exclude && editor === exclude.editor && groupId === exclude.groupId) {
238
240
  return false;
239
241
  }
240
- if (this.editorGroupsService.getGroup(groupId)?.isSticky(editor)) {
242
+ if (this.editorGroupsContainer.getGroup(groupId)?.isSticky(editor)) {
241
243
  return false;
242
244
  }
243
245
  return true;
@@ -257,13 +259,16 @@ let EditorsObserver = class EditorsObserver extends Disposable {
257
259
  }
258
260
  }
259
261
  for (const [groupId, editors] of mapGroupToEditorsToClose) {
260
- const group = this.editorGroupsService.getGroup(groupId);
262
+ const group = this.editorGroupsContainer.getGroup(groupId);
261
263
  if (group) {
262
264
  await group.closeEditors(editors, { preserveFocus: true });
263
265
  }
264
266
  }
265
267
  }
266
268
  saveState() {
269
+ if (this.isScoped) {
270
+ return;
271
+ }
267
272
  if (this.mostRecentEditorsMap.isEmpty()) {
268
273
  this.storageService.remove(EditorsObserver_1.STORAGE_KEY, 1 );
269
274
  }
@@ -277,7 +282,7 @@ let EditorsObserver = class EditorsObserver extends Disposable {
277
282
  const mapGroupToSerializableEditorsOfGroup = ( new Map());
278
283
  return {
279
284
  entries: coalesce(( entries.map(({ editor, groupId }) => {
280
- const group = this.editorGroupsService.getGroup(groupId);
285
+ const group = this.editorGroupsContainer.getGroup(groupId);
281
286
  if (!group) {
282
287
  return undefined;
283
288
  }
@@ -297,13 +302,20 @@ let EditorsObserver = class EditorsObserver extends Disposable {
297
302
  })))
298
303
  };
299
304
  }
300
- loadState() {
301
- const serialized = this.storageService.get(EditorsObserver_1.STORAGE_KEY, 1 );
302
- if (serialized) {
303
- this.deserialize(JSON.parse(serialized));
305
+ async loadState() {
306
+ if (this.editorGroupsContainer === this.editorGroupService.mainPart || this.editorGroupsContainer === this.editorGroupService) {
307
+ await this.editorGroupService.mainPart.whenReady;
304
308
  }
305
- else {
306
- const groups = this.editorGroupsService.getGroups(1 );
309
+ let hasRestorableState = false;
310
+ if (!this.isScoped) {
311
+ const serialized = this.storageService.get(EditorsObserver_1.STORAGE_KEY, 1 );
312
+ if (serialized) {
313
+ hasRestorableState = true;
314
+ this.deserialize(JSON.parse(serialized));
315
+ }
316
+ }
317
+ if (!hasRestorableState) {
318
+ const groups = this.editorGroupsContainer.getGroups(1 );
307
319
  for (let i = groups.length - 1; i >= 0; i--) {
308
320
  const group = groups[i];
309
321
  const groupEditorsMru = group.getEditors(0 );
@@ -312,14 +324,14 @@ let EditorsObserver = class EditorsObserver extends Disposable {
312
324
  }
313
325
  }
314
326
  }
315
- for (const group of this.editorGroupsService.groups) {
327
+ for (const group of this.editorGroupsContainer.groups) {
316
328
  this.registerGroupListeners(group);
317
329
  }
318
330
  }
319
331
  deserialize(serialized) {
320
332
  const mapValues = [];
321
333
  for (const { groupId, index } of serialized.entries) {
322
- const group = this.editorGroupsService.getGroup(groupId);
334
+ const group = this.editorGroupsContainer.getGroup(groupId);
323
335
  if (!group) {
324
336
  continue;
325
337
  }
@@ -335,7 +347,7 @@ let EditorsObserver = class EditorsObserver extends Disposable {
335
347
  }
336
348
  };
337
349
  EditorsObserver = EditorsObserver_1 = ( __decorate([
338
- ( __param(0, IEditorGroupsService)),
339
- ( __param(1, IStorageService))
350
+ ( __param(1, IEditorGroupsService)),
351
+ ( __param(2, IStorageService))
340
352
  ], EditorsObserver));
341
353
  export { EditorsObserver };
@@ -0,0 +1,4 @@
1
+ import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
2
+ var css = ".monaco-workbench .part.editor>.content .editor-group-container>.title{cursor:pointer}.monaco-workbench .part.editor>.content .editor-group-container>.title .tabs-container>.tab .tab-label,.monaco-workbench .part.editor>.content .editor-group-container>.title .title-label{flex:1;white-space:nowrap}.monaco-workbench .part.editor>.content .editor-group-container>.title .tabs-container>.tab .tab-label a,.monaco-workbench .part.editor>.content .editor-group-container>.title .title-label a{font-size:13px}.monaco-workbench .part.editor>.content .editor-group-container>.title .monaco-icon-label:before,.monaco-workbench .part.editor>.content .editor-group-container>.title .tabs-container>.tab .monaco-icon-label:before,.monaco-workbench .part.editor>.content .editor-group-container>.title .tabs-container>.tab .tab-label a,.monaco-workbench .part.editor>.content .editor-group-container>.title .tabs-container>.tab .tab-label span,.monaco-workbench .part.editor>.content .editor-group-container>.title .title-label a,.monaco-workbench .part.editor>.content .editor-group-container>.title .title-label h2{cursor:pointer}.monaco-workbench .part.editor>.content .editor-group-container>.title .monaco-icon-label:before{height:var(--editor-group-tab-height)}.monaco-workbench .part.editor>.content .editor-group-container>.title.breadcrumbs .monaco-icon-label:after,.monaco-workbench .part.editor>.content .editor-group-container>.title.tabs .monaco-icon-label:after{margin-right:0}.monaco-editor-group-drag-image{border-radius:10px;display:inline-block;font-size:12px;padding:1px 7px;position:absolute}";
3
+ n(css,{});
4
+ export { css, css as default };