@codingame/monaco-vscode-extensions-service-override 11.1.2 → 12.0.1

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 (217) hide show
  1. package/index.d.ts +40 -2
  2. package/index.js +266 -1
  3. package/package.json +81 -11
  4. package/vscode/src/vs/base/common/console.d.ts +22 -0
  5. package/vscode/src/vs/base/common/console.js +3 -0
  6. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.d.ts +24 -0
  7. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +54 -53
  8. package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.d.ts +14 -0
  9. package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +4 -2
  10. package/vscode/src/vs/platform/lifecycle/common/lifecycle.d.ts +1 -0
  11. package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +1 -0
  12. package/vscode/src/vs/platform/remote/common/managedSocket.d.ts +30 -0
  13. package/vscode/src/vs/platform/remote/common/managedSocket.js +1 -0
  14. package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.d.ts +12 -0
  15. package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +2 -1
  16. package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.d.ts +15 -0
  17. package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +2 -1
  18. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +73 -0
  19. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +67 -39
  20. package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.d.ts +18 -0
  21. package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +5 -3
  22. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.d.ts +1 -0
  23. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +12 -11
  24. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +65 -0
  25. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +33 -14
  26. package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.d.ts +15 -0
  27. package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +2 -1
  28. package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.d.ts +15 -0
  29. package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +2 -1
  30. package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.d.ts +9 -0
  31. package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +2 -1
  32. package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.d.ts +21 -0
  33. package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +2 -1
  34. package/vscode/src/vs/workbench/api/browser/mainThreadCommands.d.ts +20 -0
  35. package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +2 -1
  36. package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +169 -0
  37. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +50 -58
  38. package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.d.ts +20 -0
  39. package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +13 -10
  40. package/vscode/src/vs/workbench/api/browser/mainThreadConsole.d.ts +13 -0
  41. package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +2 -1
  42. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.d.ts +38 -0
  43. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +82 -75
  44. package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.d.ts +53 -0
  45. package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +7 -6
  46. package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.d.ts +14 -0
  47. package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +2 -1
  48. package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.d.ts +21 -0
  49. package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +2 -1
  50. package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.d.ts +13 -0
  51. package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +2 -1
  52. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.d.ts +21 -0
  53. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +2 -1
  54. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +58 -0
  55. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +5 -3
  56. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +40 -0
  57. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +23 -13
  58. package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.d.ts +10 -0
  59. package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +2 -1
  60. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.d.ts +9 -0
  61. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +8 -7
  62. package/vscode/src/vs/workbench/api/browser/mainThreadEditor.d.ts +65 -0
  63. package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +15 -16
  64. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +37 -0
  65. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +53 -52
  66. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +60 -0
  67. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +97 -5
  68. package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.d.ts +34 -0
  69. package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +4 -3
  70. package/vscode/src/vs/workbench/api/browser/mainThreadErrors.d.ts +6 -0
  71. package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +2 -1
  72. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.d.ts +42 -0
  73. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +42 -45
  74. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.d.ts +32 -0
  75. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +7 -6
  76. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.d.ts +25 -0
  77. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +64 -60
  78. package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.d.ts +9 -0
  79. package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +2 -1
  80. package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.d.ts +12 -0
  81. package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +2 -1
  82. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +108 -0
  83. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +31 -28
  84. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +18 -0
  85. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +2 -1
  86. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +42 -0
  87. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +23 -22
  88. package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.d.ts +29 -0
  89. package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +2 -1
  90. package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.d.ts +13 -0
  91. package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +2 -1
  92. package/vscode/src/vs/workbench/api/browser/mainThreadLogService.d.ts +20 -0
  93. package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +2 -1
  94. package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.d.ts +27 -0
  95. package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +6 -3
  96. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.d.ts +22 -0
  97. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +46 -47
  98. package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.d.ts +22 -0
  99. package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +3 -2
  100. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.d.ts +24 -0
  101. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +2 -1
  102. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.d.ts +29 -0
  103. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +4 -3
  104. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.d.ts +17 -0
  105. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +5 -3
  106. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +27 -0
  107. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +4 -3
  108. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.d.ts +49 -0
  109. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +3 -2
  110. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.d.ts +10 -0
  111. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +2 -1
  112. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.d.ts +9 -0
  113. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +9 -8
  114. package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.d.ts +26 -0
  115. package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +39 -6
  116. package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.d.ts +12 -0
  117. package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.js +2 -1
  118. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.d.ts +17 -0
  119. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +13 -13
  120. package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.d.ts +13 -0
  121. package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +4 -2
  122. package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.d.ts +19 -0
  123. package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +2 -1
  124. package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.d.ts +9 -0
  125. package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +2 -1
  126. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.d.ts +52 -0
  127. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +11 -7
  128. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.d.ts +9 -0
  129. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +9 -8
  130. package/vscode/src/vs/workbench/api/browser/mainThreadSearch.d.ts +24 -0
  131. package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +9 -19
  132. package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.d.ts +21 -0
  133. package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +2 -1
  134. package/vscode/src/vs/workbench/api/browser/mainThreadShare.d.ts +13 -0
  135. package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +2 -1
  136. package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.d.ts +21 -0
  137. package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +2 -1
  138. package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.d.ts +15 -0
  139. package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +6 -4
  140. package/vscode/src/vs/workbench/api/browser/mainThreadStorage.d.ts +22 -0
  141. package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +4 -2
  142. package/vscode/src/vs/workbench/api/browser/mainThreadTask.d.ts +28 -0
  143. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +174 -195
  144. package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.d.ts +20 -0
  145. package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +4 -3
  146. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.d.ts +80 -0
  147. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +27 -9
  148. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.d.ts +12 -0
  149. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +7 -5
  150. package/vscode/src/vs/workbench/api/browser/mainThreadTesting.d.ts +44 -0
  151. package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +6 -5
  152. package/vscode/src/vs/workbench/api/browser/mainThreadTheming.d.ts +10 -0
  153. package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +2 -1
  154. package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.d.ts +16 -0
  155. package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +2 -1
  156. package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.d.ts +45 -0
  157. package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +41 -16
  158. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.d.ts +44 -0
  159. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +29 -30
  160. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.d.ts +25 -0
  161. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +21 -25
  162. package/vscode/src/vs/workbench/api/browser/mainThreadUrls.d.ts +17 -0
  163. package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +2 -1
  164. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.d.ts +6 -0
  165. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +2 -1
  166. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +42 -0
  167. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +9 -8
  168. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.d.ts +26 -0
  169. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +2 -1
  170. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.d.ts +29 -0
  171. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +19 -18
  172. package/vscode/src/vs/workbench/api/browser/mainThreadWindow.d.ts +22 -0
  173. package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +10 -1
  174. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.d.ts +71 -0
  175. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +34 -35
  176. package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.d.ts +12 -0
  177. package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +1 -0
  178. package/vscode/src/vs/workbench/common/comments.d.ts +10 -0
  179. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.d.ts +39 -0
  180. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +14 -12
  181. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.d.ts +16 -0
  182. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +6 -4
  183. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.d.ts +25 -0
  184. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +62 -60
  185. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +74 -0
  186. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +63 -45
  187. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +57 -0
  188. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +16 -12
  189. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.d.ts +20 -0
  190. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +3 -2
  191. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +203 -0
  192. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +217 -180
  193. package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +32 -0
  194. package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +4 -2
  195. package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.d.ts +8 -0
  196. package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +1 -0
  197. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.d.ts +68 -0
  198. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +37 -39
  199. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +40 -0
  200. package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.d.ts +38 -0
  201. package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +15 -14
  202. package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.d.ts +2 -0
  203. package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +4 -2
  204. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.d.ts +14 -0
  205. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +18 -19
  206. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.d.ts +3 -0
  207. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +8 -7
  208. package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.d.ts +54 -0
  209. package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +4 -3
  210. package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.d.ts +4 -0
  211. package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +1 -0
  212. package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.d.ts +68 -0
  213. package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +12 -9
  214. package/_virtual/semver.js +0 -5
  215. package/extensions.js +0 -257
  216. package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -11
  217. package/tools/url.js +0 -10
@@ -1,26 +1,27 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { Event } from 'vscode/vscode/vs/base/common/event';
3
4
  import { DisposableStore, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
4
5
  import { isEqual } from 'vscode/vscode/vs/base/common/resources';
5
6
  import { URI } from 'vscode/vscode/vs/base/common/uri';
6
7
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
7
8
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
8
- import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
9
- import { EditorResourceAccessor, SideBySideEditor } from 'vscode/vscode/vs/workbench/common/editor';
10
- import { DiffEditorInput } from 'vscode/vscode/vs/workbench/common/editor/diffEditorInput';
11
- import { isGroupEditorMoveEvent } from 'vscode/vscode/vs/workbench/common/editor/editorGroupModel';
12
- import { SideBySideEditorInput } from 'vscode/vscode/vs/workbench/common/editor/sideBySideEditorInput';
13
- import { AbstractTextResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor/textResourceEditorInput';
14
- import { ChatEditorInput } from '@codingame/monaco-vscode-chat-extensions-interactive-notebook-search-terminal-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
15
- import { CustomEditorInput } from 'vscode/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
16
- import { InteractiveEditorInput } from 'vscode/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput';
17
- import { MergeEditorInput } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
18
- import { MultiDiffEditorInput } from 'vscode/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
19
- import { NotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
20
- import { TerminalEditorInput } from 'vscode/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput';
21
- import { WebviewInput } from 'vscode/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput';
22
- import { editorGroupToColumn, columnToEditorGroup } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupColumn';
23
- import { preferredSideBySideGroupDirection } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
9
+ import { ExtHostContext, TabInputKind, TabModelOperationKind, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
10
+ import { EditorResourceAccessor, SideBySideEditor, GroupModelChangeKind } from 'vscode/vscode/vs/workbench/common/editor';
11
+ import { DiffEditorInput } from '@codingame/monaco-vscode-5108c2c9-4ada-52d8-8c4b-fe03b3160e71-common/vscode/vs/workbench/common/editor/diffEditorInput';
12
+ import { isGroupEditorMoveEvent } from '@codingame/monaco-vscode-c3c61c00-c254-5856-9dc9-d7929c1f9062-common/vscode/vs/workbench/common/editor/editorGroupModel';
13
+ import { SideBySideEditorInput } from '@codingame/monaco-vscode-5108c2c9-4ada-52d8-8c4b-fe03b3160e71-common/vscode/vs/workbench/common/editor/sideBySideEditorInput';
14
+ import { AbstractTextResourceEditorInput } from '@codingame/monaco-vscode-0139c6af-2375-559c-af57-b738f2fd6d8e-common/vscode/vs/workbench/common/editor/textResourceEditorInput';
15
+ import { ChatEditorInput } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
16
+ import { CustomEditorInput } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
17
+ import { InteractiveEditorInput } from '@codingame/monaco-vscode-eba0b9b3-174c-5dae-9867-a37810ca1808-common/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput';
18
+ import { MergeEditorInput } from '@codingame/monaco-vscode-8ccb7637-50ea-5359-97bf-00015d7fe567-common/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
19
+ import { MultiDiffEditorInput } from '@codingame/monaco-vscode-1cc4ea0a-c5b6-54ed-bb60-078a99119b55-common/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
20
+ import { NotebookEditorInput } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
21
+ import { TerminalEditorInput } from '@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput';
22
+ import { WebviewInput } from '@codingame/monaco-vscode-22790577-4553-50b6-978d-0acc75c394cc-common/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput';
23
+ import { editorGroupToColumn, columnToEditorGroup } from '@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common/vscode/vs/workbench/services/editor/common/editorGroupColumn';
24
+ import { GroupDirection, preferredSideBySideGroupDirection } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
24
25
  import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
25
26
  import { SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
26
27
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
@@ -73,7 +74,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
73
74
  _editorInputToDto(editor) {
74
75
  if (editor instanceof MergeEditorInput) {
75
76
  return {
76
- kind: 3 ,
77
+ kind: TabInputKind.TextMergeInput,
77
78
  base: editor.base,
78
79
  input1: editor.input1.uri,
79
80
  input2: editor.input2.uri,
@@ -82,7 +83,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
82
83
  }
83
84
  if (editor instanceof AbstractTextResourceEditorInput) {
84
85
  return {
85
- kind: 1 ,
86
+ kind: TabInputKind.TextInput,
86
87
  uri: editor.resource
87
88
  };
88
89
  }
@@ -95,48 +96,48 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
95
96
  && primaryResource
96
97
  && secondaryResource) {
97
98
  return {
98
- kind: 1 ,
99
+ kind: TabInputKind.TextInput,
99
100
  uri: primaryResource
100
101
  };
101
102
  }
102
- return { kind: 0 };
103
+ return { kind: TabInputKind.UnknownInput };
103
104
  }
104
105
  if (editor instanceof NotebookEditorInput) {
105
106
  return {
106
- kind: 4 ,
107
+ kind: TabInputKind.NotebookInput,
107
108
  notebookType: editor.viewType,
108
109
  uri: editor.resource
109
110
  };
110
111
  }
111
112
  if (editor instanceof CustomEditorInput) {
112
113
  return {
113
- kind: 6 ,
114
+ kind: TabInputKind.CustomEditorInput,
114
115
  viewType: editor.viewType,
115
116
  uri: editor.resource,
116
117
  };
117
118
  }
118
119
  if (editor instanceof WebviewInput) {
119
120
  return {
120
- kind: 7 ,
121
+ kind: TabInputKind.WebviewEditorInput,
121
122
  viewType: editor.viewType
122
123
  };
123
124
  }
124
125
  if (editor instanceof TerminalEditorInput) {
125
126
  return {
126
- kind: 8
127
+ kind: TabInputKind.TerminalEditorInput
127
128
  };
128
129
  }
129
130
  if (editor instanceof DiffEditorInput) {
130
131
  if (editor.modified instanceof AbstractTextResourceEditorInput && editor.original instanceof AbstractTextResourceEditorInput) {
131
132
  return {
132
- kind: 2 ,
133
+ kind: TabInputKind.TextDiffInput,
133
134
  modified: editor.modified.resource,
134
135
  original: editor.original.resource
135
136
  };
136
137
  }
137
138
  if (editor.modified instanceof NotebookEditorInput && editor.original instanceof NotebookEditorInput) {
138
139
  return {
139
- kind: 5 ,
140
+ kind: TabInputKind.NotebookDiffInput,
140
141
  notebookType: editor.original.viewType,
141
142
  modified: editor.modified.resource,
142
143
  original: editor.original.resource
@@ -145,14 +146,14 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
145
146
  }
146
147
  if (editor instanceof InteractiveEditorInput) {
147
148
  return {
148
- kind: 9 ,
149
+ kind: TabInputKind.InteractiveEditorInput,
149
150
  uri: editor.resource,
150
151
  inputBoxUri: editor.inputResource
151
152
  };
152
153
  }
153
154
  if (editor instanceof ChatEditorInput) {
154
155
  return {
155
- kind: 10 ,
156
+ kind: TabInputKind.ChatEditorInput,
156
157
  };
157
158
  }
158
159
  if (editor instanceof MultiDiffEditorInput) {
@@ -160,18 +161,18 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
160
161
  for (const resource of (editor?.resources.get() ?? [])) {
161
162
  if (resource.originalUri && resource.modifiedUri) {
162
163
  diffEditors.push({
163
- kind: 2 ,
164
+ kind: TabInputKind.TextDiffInput,
164
165
  original: resource.originalUri,
165
166
  modified: resource.modifiedUri
166
167
  });
167
168
  }
168
169
  }
169
170
  return {
170
- kind: 11 ,
171
+ kind: TabInputKind.MultiDiffEditorInput,
171
172
  diffEditors
172
173
  };
173
174
  }
174
- return { kind: 0 };
175
+ return { kind: TabInputKind.UnknownInput };
175
176
  }
176
177
  _generateTabId(editor, groupId) {
177
178
  let resourceString;
@@ -201,7 +202,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
201
202
  groupId,
202
203
  index: editorIndex,
203
204
  tabDto: tabInfo.tab,
204
- kind: 2
205
+ kind: TabModelOperationKind.TAB_UPDATE
205
206
  });
206
207
  }
207
208
  else {
@@ -235,7 +236,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
235
236
  groupId,
236
237
  index: editorIndex,
237
238
  tabDto: tabInfo.tab,
238
- kind: 2
239
+ kind: TabModelOperationKind.TAB_UPDATE
239
240
  });
240
241
  }));
241
242
  }
@@ -243,7 +244,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
243
244
  groupId,
244
245
  index: editorIndex,
245
246
  tabDto: tabObject,
246
- kind: 0
247
+ kind: TabModelOperationKind.TAB_OPEN
247
248
  });
248
249
  }
249
250
  _onDidTabClose(groupId, editorIndex) {
@@ -265,7 +266,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
265
266
  groupId,
266
267
  index: editorIndex,
267
268
  tabDto: removedTab[0],
268
- kind: 1
269
+ kind: TabModelOperationKind.TAB_CLOSE
269
270
  });
270
271
  }
271
272
  _onDidTabActiveChange(groupId, editorIndex) {
@@ -279,7 +280,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
279
280
  groupId,
280
281
  index: editorIndex,
281
282
  tabDto: activeTab,
282
- kind: 2
283
+ kind: TabModelOperationKind.TAB_UPDATE
283
284
  });
284
285
  }
285
286
  _onDidTabDirty(groupId, editorIndex, editor) {
@@ -295,7 +296,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
295
296
  groupId,
296
297
  index: editorIndex,
297
298
  tabDto: tabInfo.tab,
298
- kind: 2
299
+ kind: TabModelOperationKind.TAB_UPDATE
299
300
  });
300
301
  }
301
302
  _onDidTabPinChange(groupId, editorIndex, editor) {
@@ -313,7 +314,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
313
314
  groupId,
314
315
  index: editorIndex,
315
316
  tabDto: tab,
316
- kind: 2
317
+ kind: TabModelOperationKind.TAB_UPDATE
317
318
  });
318
319
  }
319
320
  _onDidTabPreviewChange(groupId, editorIndex, editor) {
@@ -328,7 +329,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
328
329
  }
329
330
  tab.isPreview = !group.isPinned(editorIndex);
330
331
  this._proxy.$acceptTabOperation({
331
- kind: 2 ,
332
+ kind: TabModelOperationKind.TAB_UPDATE,
332
333
  groupId,
333
334
  tabDto: tab,
334
335
  index: editorIndex
@@ -347,7 +348,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
347
348
  }
348
349
  tabs.splice(editorIndex, 0, removedTab[0]);
349
350
  this._proxy.$acceptTabOperation({
350
- kind: 3 ,
351
+ kind: TabModelOperationKind.TAB_MOVE,
351
352
  groupId,
352
353
  tabDto: removedTab[0],
353
354
  index: editorIndex,
@@ -389,7 +390,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
389
390
  const event = changeEvent.event;
390
391
  const groupId = changeEvent.groupId;
391
392
  switch (event.kind) {
392
- case 0 :
393
+ case GroupModelChangeKind.GROUP_ACTIVE:
393
394
  if (groupId === this._editorGroupsService.activeGroup.id) {
394
395
  this._onDidGroupActivate();
395
396
  break;
@@ -397,44 +398,44 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
397
398
  else {
398
399
  return;
399
400
  }
400
- case 9 :
401
+ case GroupModelChangeKind.EDITOR_LABEL:
401
402
  if (event.editor !== undefined && event.editorIndex !== undefined) {
402
403
  this._onDidTabLabelChange(groupId, event.editor, event.editorIndex);
403
404
  break;
404
405
  }
405
- case 5 :
406
+ case GroupModelChangeKind.EDITOR_OPEN:
406
407
  if (event.editor !== undefined && event.editorIndex !== undefined) {
407
408
  this._onDidTabOpen(groupId, event.editor, event.editorIndex);
408
409
  break;
409
410
  }
410
- case 6 :
411
+ case GroupModelChangeKind.EDITOR_CLOSE:
411
412
  if (event.editorIndex !== undefined) {
412
413
  this._onDidTabClose(groupId, event.editorIndex);
413
414
  break;
414
415
  }
415
- case 8 :
416
+ case GroupModelChangeKind.EDITOR_ACTIVE:
416
417
  if (event.editorIndex !== undefined) {
417
418
  this._onDidTabActiveChange(groupId, event.editorIndex);
418
419
  break;
419
420
  }
420
- case 14 :
421
+ case GroupModelChangeKind.EDITOR_DIRTY:
421
422
  if (event.editorIndex !== undefined && event.editor !== undefined) {
422
423
  this._onDidTabDirty(groupId, event.editorIndex, event.editor);
423
424
  break;
424
425
  }
425
- case 13 :
426
+ case GroupModelChangeKind.EDITOR_STICKY:
426
427
  if (event.editorIndex !== undefined && event.editor !== undefined) {
427
428
  this._onDidTabPinChange(groupId, event.editorIndex, event.editor);
428
429
  break;
429
430
  }
430
- case 11 :
431
+ case GroupModelChangeKind.EDITOR_PIN:
431
432
  if (event.editorIndex !== undefined && event.editor !== undefined) {
432
433
  this._onDidTabPreviewChange(groupId, event.editorIndex, event.editor);
433
434
  break;
434
435
  }
435
- case 12 :
436
+ case GroupModelChangeKind.EDITOR_TRANSIENT:
436
437
  break;
437
- case 7 :
438
+ case GroupModelChangeKind.EDITOR_MOVE:
438
439
  if (isGroupEditorMoveEvent(event) && event.editor && event.editorIndex !== undefined && event.oldEditorIndex !== undefined) {
439
440
  this._onDidTabMove(groupId, event.editorIndex, event.oldEditorIndex, event.editor);
440
441
  break;
@@ -456,7 +457,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
456
457
  return;
457
458
  }
458
459
  if (this._groupLookup.get(groupId) === undefined) {
459
- let direction = 3 ;
460
+ let direction = GroupDirection.RIGHT;
460
461
  if (viewColumn === SIDE_GROUP) {
461
462
  direction = preferredSideBySideGroupDirection(this._configurationService);
462
463
  }
@@ -0,0 +1,60 @@
1
+ import { UriComponents } from "vscode/vscode/vs/base/common/uri";
2
+ import { ICodeEditorService } from "vscode/vscode/vs/editor/browser/services/codeEditorService";
3
+ import { IRange } from "vscode/vscode/vs/editor/common/core/range";
4
+ import { ISelection } from "vscode/vscode/vs/editor/common/core/selection";
5
+ import { IDecorationOptions, IDecorationRenderOptions } from "vscode/vscode/vs/editor/common/editorCommon";
6
+ import { ISingleEditOperation } from "vscode/vscode/vs/editor/common/core/editOperation";
7
+ import { MainThreadTextEditor } from "./mainThreadEditor.js";
8
+ import { IApplyEditsOptions, ITextDocumentShowOptions, ITextEditorConfigurationUpdate, IUndoStopOptions, MainThreadTextEditorsShape, TextEditorRevealType } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
9
+ import { EditorGroupColumn } from "@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common/vscode/vs/workbench/services/editor/common/editorGroupColumn";
10
+ import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
11
+ import { IEditorGroupsService } from "vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
12
+ import { ExtensionIdentifier } from "vscode/vscode/vs/platform/extensions/common/extensions";
13
+ import { IChange } from "vscode/vscode/vs/editor/common/diff/legacyLinesDiffComputer";
14
+ import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
15
+ import { IEditorControl } from "vscode/vscode/vs/workbench/common/editor";
16
+ import { ICodeEditor } from "vscode/vscode/vs/editor/browser/editorBrowser";
17
+ import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
18
+ import { IDirtyDiffModelService } from "vscode/vscode/vs/workbench/contrib/scm/browser/diff.service";
19
+ import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
20
+ export interface IMainThreadEditorLocator {
21
+ getEditor(id: string): MainThreadTextEditor | undefined;
22
+ findTextEditorIdFor(editorControl: IEditorControl): string | undefined;
23
+ getIdOfCodeEditor(codeEditor: ICodeEditor): string | undefined;
24
+ }
25
+ export declare class MainThreadTextEditors implements MainThreadTextEditorsShape {
26
+ private readonly _editorLocator;
27
+ private readonly _codeEditorService;
28
+ private readonly _editorService;
29
+ private readonly _editorGroupService;
30
+ private readonly _configurationService;
31
+ private readonly _dirtyDiffModelService;
32
+ private readonly _uriIdentityService;
33
+ private static INSTANCE_COUNT;
34
+ private readonly _instanceId;
35
+ private readonly _proxy;
36
+ private readonly _toDispose;
37
+ private _textEditorsListenersMap;
38
+ private _editorPositionData;
39
+ private _registeredDecorationTypes;
40
+ constructor(_editorLocator: IMainThreadEditorLocator, extHostContext: IExtHostContext, _codeEditorService: ICodeEditorService, _editorService: IEditorService, _editorGroupService: IEditorGroupsService, _configurationService: IConfigurationService, _dirtyDiffModelService: IDirtyDiffModelService, _uriIdentityService: IUriIdentityService);
41
+ dispose(): void;
42
+ handleTextEditorAdded(textEditor: MainThreadTextEditor): void;
43
+ handleTextEditorRemoved(id: string): void;
44
+ private _updateActiveAndVisibleTextEditors;
45
+ private _getTextEditorPositionData;
46
+ private _getTextEditorDiffInformation;
47
+ $tryShowTextDocument(resource: UriComponents, options: ITextDocumentShowOptions): Promise<string | undefined>;
48
+ $tryShowEditor(id: string, position?: EditorGroupColumn): Promise<void>;
49
+ $tryHideEditor(id: string): Promise<void>;
50
+ $trySetSelections(id: string, selections: ISelection[]): Promise<void>;
51
+ $trySetDecorations(id: string, key: string, ranges: IDecorationOptions[]): Promise<void>;
52
+ $trySetDecorationsFast(id: string, key: string, ranges: number[]): Promise<void>;
53
+ $tryRevealRange(id: string, range: IRange, revealType: TextEditorRevealType): Promise<void>;
54
+ $trySetOptions(id: string, options: ITextEditorConfigurationUpdate): Promise<void>;
55
+ $tryApplyEdits(id: string, modelVersionId: number, edits: ISingleEditOperation[], opts: IApplyEditsOptions): Promise<boolean>;
56
+ $tryInsertSnippet(id: string, modelVersionId: number, template: string, ranges: readonly IRange[], opts: IUndoStopOptions): Promise<boolean>;
57
+ $registerTextEditorDecorationType(extensionId: ExtensionIdentifier, key: string, options: IDecorationRenderOptions): void;
58
+ $removeTextEditorDecorationType(key: string): void;
59
+ $getDiffInformation(id: string): Promise<IChange[]>;
60
+ }
@@ -1,30 +1,42 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { illegalArgument } from 'vscode/vscode/vs/base/common/errors';
3
4
  import { DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
4
5
  import { equals } from 'vscode/vscode/vs/base/common/objects';
5
6
  import { URI } from 'vscode/vscode/vs/base/common/uri';
6
7
  import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
7
8
  import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
8
- import { EditorActivation, EditorResolution } from 'vscode/vscode/vs/platform/editor/common/editor';
9
+ import { isTextEditorDiffInformationEqual, EditorActivation, EditorResolution } from 'vscode/vscode/vs/platform/editor/common/editor';
9
10
  import { ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
10
- import { editorGroupToColumn, columnToEditorGroup } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupColumn';
11
+ import { editorGroupToColumn, columnToEditorGroup } from '@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common/vscode/vs/workbench/services/editor/common/editorGroupColumn';
11
12
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
12
13
  import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
13
14
  import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/common/environment.service';
14
15
  import { IWorkingCopyService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
15
16
  import { getCodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
16
17
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
18
+ import { IDirtyDiffModelService } from 'vscode/vscode/vs/workbench/contrib/scm/browser/diff.service';
19
+ import { equals as equals$1 } from 'vscode/vscode/vs/base/common/arrays';
20
+ import { Event } from 'vscode/vscode/vs/base/common/event';
21
+ import { autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
22
+ import { derived, derivedOpts } from 'vscode/vscode/vs/base/common/observableInternal/derived';
23
+ import 'vscode/vscode/vs/base/common/cancellation';
24
+ import { constObservable, observableFromEvent } from 'vscode/vscode/vs/base/common/observableInternal/utils';
25
+ import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
26
+ import { isITextModel } from 'vscode/vscode/vs/editor/common/model';
17
27
 
18
28
  var MainThreadTextEditors_1;
19
29
  let MainThreadTextEditors = class MainThreadTextEditors {
20
30
  static { MainThreadTextEditors_1 = this; }
21
31
  static { this.INSTANCE_COUNT = 0; }
22
- constructor(_editorLocator, extHostContext, _codeEditorService, _editorService, _editorGroupService, _configurationService) {
32
+ constructor(_editorLocator, extHostContext, _codeEditorService, _editorService, _editorGroupService, _configurationService, _dirtyDiffModelService, _uriIdentityService) {
23
33
  this._editorLocator = _editorLocator;
24
34
  this._codeEditorService = _codeEditorService;
25
35
  this._editorService = _editorService;
26
36
  this._editorGroupService = _editorGroupService;
27
37
  this._configurationService = _configurationService;
38
+ this._dirtyDiffModelService = _dirtyDiffModelService;
39
+ this._uriIdentityService = _uriIdentityService;
28
40
  this._toDispose = ( new DisposableStore());
29
41
  this._instanceId = String(++MainThreadTextEditors_1.INSTANCE_COUNT);
30
42
  this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostEditors));
@@ -52,6 +64,11 @@ let MainThreadTextEditors = class MainThreadTextEditors {
52
64
  toDispose.push(textEditor.onPropertiesChanged((data) => {
53
65
  this._proxy.$acceptEditorPropertiesChanged(id, data);
54
66
  }));
67
+ const diffInformationObs = this._getTextEditorDiffInformation(textEditor);
68
+ toDispose.push(autorun(reader => {
69
+ const diffInformation = diffInformationObs.read(reader);
70
+ this._proxy.$acceptEditorDiffInformation(id, diffInformation);
71
+ }));
55
72
  this._textEditorsListenersMap[id] = toDispose;
56
73
  }
57
74
  handleTextEditorRemoved(id) {
@@ -75,6 +92,79 @@ let MainThreadTextEditors = class MainThreadTextEditors {
75
92
  }
76
93
  return result;
77
94
  }
95
+ _getTextEditorDiffInformation(textEditor) {
96
+ const codeEditor = textEditor.getCodeEditor();
97
+ if (!codeEditor) {
98
+ return constObservable(undefined);
99
+ }
100
+ const diffEditors = this._codeEditorService.listDiffEditors();
101
+ const [diffEditor] = diffEditors.filter(d => d.getOriginalEditor().getId() === codeEditor.getId() ||
102
+ d.getModifiedEditor().getId() === codeEditor.getId());
103
+ const editorModelObs = diffEditor
104
+ ? observableFromEvent(this, diffEditor.onDidChangeModel, () => diffEditor.getModel())
105
+ : observableFromEvent(this, codeEditor.onDidChangeModel, () => codeEditor.getModel());
106
+ const editorChangesObs = derived(reader => {
107
+ const editorModel = editorModelObs.read(reader);
108
+ if (!editorModel) {
109
+ return constObservable(undefined);
110
+ }
111
+ const editorModelUri = isITextModel(editorModel)
112
+ ? editorModel.uri
113
+ : editorModel.modified.uri;
114
+ if (isITextModel(editorModel)) {
115
+ const dirtyDiffModel = this._dirtyDiffModelService.getDirtyDiffModel(editorModelUri);
116
+ if (!dirtyDiffModel) {
117
+ return constObservable(undefined);
118
+ }
119
+ return observableFromEvent(this, dirtyDiffModel.onDidChange, () => {
120
+ return dirtyDiffModel.getQuickDiffResults();
121
+ });
122
+ }
123
+ const diffAlgorithm = this._configurationService.getValue('diffEditor.diffAlgorithm');
124
+ const dirtyDiffModel = this._dirtyDiffModelService.getDiffModel(editorModelUri, diffAlgorithm);
125
+ if (!dirtyDiffModel) {
126
+ return constObservable(undefined);
127
+ }
128
+ return observableFromEvent(Event.any(dirtyDiffModel.onDidChange, diffEditor.onDidUpdateDiff), () => {
129
+ const dirtyDiffInformation = dirtyDiffModel.getQuickDiffResults();
130
+ const diffChanges = diffEditor.getDiffComputationResult()?.changes2 ?? [];
131
+ const diffInformation = [{
132
+ original: editorModel.original.uri,
133
+ modified: editorModel.modified.uri,
134
+ changes: ( diffChanges.map(change => change))
135
+ }];
136
+ return [...dirtyDiffInformation, ...diffInformation];
137
+ });
138
+ });
139
+ return derivedOpts({
140
+ owner: this,
141
+ equalsFn: (diff1, diff2) => equals$1(diff1, diff2, (a, b) => isTextEditorDiffInformationEqual(this._uriIdentityService, a, b))
142
+ }, reader => {
143
+ const editorModel = editorModelObs.read(reader);
144
+ const editorChanges = editorChangesObs.read(reader).read(reader);
145
+ if (!editorModel || !editorChanges) {
146
+ return undefined;
147
+ }
148
+ const documentVersion = isITextModel(editorModel)
149
+ ? editorModel.getVersionId()
150
+ : editorModel.modified.getVersionId();
151
+ return ( editorChanges.map(change => {
152
+ const changes = ( change.changes
153
+ .map(change => [
154
+ change.original.startLineNumber,
155
+ change.original.endLineNumberExclusive,
156
+ change.modified.startLineNumber,
157
+ change.modified.endLineNumberExclusive
158
+ ]));
159
+ return {
160
+ documentVersion,
161
+ original: change.original,
162
+ modified: change.modified,
163
+ changes
164
+ };
165
+ }));
166
+ });
167
+ }
78
168
  async $tryShowTextDocument(resource, options) {
79
169
  const uri = URI.revive(resource);
80
170
  const editorOptions = {
@@ -211,7 +301,9 @@ MainThreadTextEditors = MainThreadTextEditors_1 = ( __decorate([
211
301
  ( __param(2, ICodeEditorService)),
212
302
  ( __param(3, IEditorService)),
213
303
  ( __param(4, IEditorGroupsService)),
214
- ( __param(5, IConfigurationService))
304
+ ( __param(5, IConfigurationService)),
305
+ ( __param(6, IDirtyDiffModelService)),
306
+ ( __param(7, IUriIdentityService))
215
307
  ], MainThreadTextEditors));
216
308
  CommandsRegistry.registerCommand('_workbench.revertAllDirty', async function (accessor) {
217
309
  const environmentService = accessor.get(IEnvironmentService);
@@ -0,0 +1,34 @@
1
+ import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
2
+ import { Event } from "vscode/vscode/vs/base/common/event";
3
+ import { IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
4
+ import { MainThreadEmbeddingsShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
5
+ import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
6
+ interface IEmbeddingsProvider {
7
+ provideEmbeddings(input: string[], token: CancellationToken): Promise<{
8
+ values: number[];
9
+ }[]>;
10
+ }
11
+ declare const IEmbeddingsService: import("vscode/vscode/vs/platform/instantiation/common/instantiation").ServiceIdentifier<IEmbeddingsService>;
12
+ interface IEmbeddingsService {
13
+ _serviceBrand: undefined;
14
+ readonly onDidChange: Event<void>;
15
+ allProviders: Iterable<string>;
16
+ registerProvider(id: string, provider: IEmbeddingsProvider): IDisposable;
17
+ computeEmbeddings(id: string, input: string[], token: CancellationToken): Promise<{
18
+ values: number[];
19
+ }[]>;
20
+ }
21
+ export declare class MainThreadEmbeddings implements MainThreadEmbeddingsShape {
22
+ private readonly embeddingsService;
23
+ private readonly _store;
24
+ private readonly _providers;
25
+ private readonly _proxy;
26
+ constructor(context: IExtHostContext, embeddingsService: IEmbeddingsService);
27
+ dispose(): void;
28
+ $registerEmbeddingProvider(handle: number, identifier: string): void;
29
+ $unregisterEmbeddingProvider(handle: number): void;
30
+ $computeEmbeddings(embeddingsModel: string, input: string[], token: CancellationToken): Promise<{
31
+ values: number[];
32
+ }[]>;
33
+ }
34
+ export {};
@@ -1,7 +1,8 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
3
4
  import { DisposableStore, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
4
- import { registerSingleton } from 'vscode/vscode/vs/platform/instantiation/common/extensions';
5
+ import { registerSingleton, InstantiationType } from 'vscode/vscode/vs/platform/instantiation/common/extensions';
5
6
  import { createDecorator } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
6
7
  import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
7
8
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
@@ -36,7 +37,7 @@ class EmbeddingsService {
36
37
  }
37
38
  }
38
39
  }
39
- registerSingleton(IEmbeddingsService, EmbeddingsService, 1 );
40
+ registerSingleton(IEmbeddingsService, EmbeddingsService, InstantiationType.Delayed);
40
41
  let MainThreadEmbeddings = class MainThreadEmbeddings {
41
42
  constructor(context, embeddingsService) {
42
43
  this.embeddingsService = embeddingsService;
@@ -0,0 +1,6 @@
1
+ import { SerializedError } from "vscode/vscode/vs/base/common/errors";
2
+ import { MainThreadErrorsShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
3
+ export declare class MainThreadErrors implements MainThreadErrorsShape {
4
+ dispose(): void;
5
+ $onUnexpectedError(err: any | SerializedError): void;
6
+ }
@@ -1,4 +1,5 @@
1
- import { __decorate } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate } from 'vscode/external/tslib/tslib.es6';
2
3
  import { transformErrorFromSerialization, onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
3
4
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
4
5
  import { MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
@@ -0,0 +1,42 @@
1
+ import { SerializedError } from "vscode/vscode/vs/base/common/errors";
2
+ import { UriComponents } from "vscode/vscode/vs/base/common/uri";
3
+ import { ICommandService } from "vscode/vscode/vs/platform/commands/common/commands.service";
4
+ import { ExtensionIdentifier } from "vscode/vscode/vs/platform/extensions/common/extensions";
5
+ import { INotificationService } from "vscode/vscode/vs/platform/notification/common/notification.service";
6
+ import { MainThreadExtensionServiceShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
7
+ import { IExtensionsWorkbenchService } from "vscode/vscode/vs/workbench/contrib/extensions/common/extensions.service";
8
+ import { IWorkbenchEnvironmentService } from "vscode/vscode/vs/workbench/services/environment/common/environmentService.service";
9
+ import { IWorkbenchExtensionEnablementService } from "vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service";
10
+ import { ExtensionActivationReason, MissingExtensionDependency } from "vscode/vscode/vs/workbench/services/extensions/common/extensions";
11
+ import { IExtensionService } from "vscode/vscode/vs/workbench/services/extensions/common/extensions.service";
12
+ import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
13
+ import { IHostService } from "vscode/vscode/vs/workbench/services/host/browser/host.service";
14
+ import { ITimerService } from "vscode/vscode/vs/workbench/services/timer/browser/timerService.service";
15
+ export declare class MainThreadExtensionService implements MainThreadExtensionServiceShape {
16
+ private readonly _extensionService;
17
+ private readonly _notificationService;
18
+ private readonly _extensionsWorkbenchService;
19
+ private readonly _hostService;
20
+ private readonly _extensionEnablementService;
21
+ private readonly _timerService;
22
+ private readonly _commandService;
23
+ protected readonly _environmentService: IWorkbenchEnvironmentService;
24
+ private readonly _extensionHostKind;
25
+ private readonly _internalExtensionService;
26
+ constructor(extHostContext: IExtHostContext, _extensionService: IExtensionService, _notificationService: INotificationService, _extensionsWorkbenchService: IExtensionsWorkbenchService, _hostService: IHostService, _extensionEnablementService: IWorkbenchExtensionEnablementService, _timerService: ITimerService, _commandService: ICommandService, _environmentService: IWorkbenchEnvironmentService);
27
+ dispose(): void;
28
+ $getExtension(extensionId: string): Promise<Readonly<import("vscode/vscode/vs/platform/extensions/common/extensions").IRelaxedExtensionDescription> | undefined>;
29
+ $activateExtension(extensionId: ExtensionIdentifier, reason: ExtensionActivationReason): Promise<void>;
30
+ $onWillActivateExtension(extensionId: ExtensionIdentifier): Promise<void>;
31
+ $onDidActivateExtension(extensionId: ExtensionIdentifier, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number, activationReason: ExtensionActivationReason): void;
32
+ $onExtensionRuntimeError(extensionId: ExtensionIdentifier, data: SerializedError): void;
33
+ $onExtensionActivationError(extensionId: ExtensionIdentifier, data: SerializedError, missingExtensionDependency: MissingExtensionDependency | null): Promise<void>;
34
+ private _handleMissingInstalledDependency;
35
+ private _handleMissingNotInstalledDependency;
36
+ $setPerformanceMarks(marks: PerformanceMark[]): Promise<void>;
37
+ $asBrowserUri(uri: UriComponents): Promise<UriComponents>;
38
+ $getAllStaticBrowserUris(): Promise<[
39
+ UriComponents,
40
+ UriComponents
41
+ ][]>;
42
+ }