@codingame/monaco-vscode-api 1.79.1 → 1.79.2-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 (463) hide show
  1. package/README.md +11 -2
  2. package/dist/api.js +10 -8
  3. package/dist/composite.d.ts +65 -0
  4. package/dist/configurationRegistry.d.ts +212 -0
  5. package/dist/contextkey.d.ts +1 -1
  6. package/dist/default-extensions/json.js +1 -0
  7. package/dist/default-extensions/theme-defaults.js +2 -2
  8. package/dist/editorBrowser.d.ts +272 -3
  9. package/dist/event.d.ts +6 -1
  10. package/dist/{extension-tools-0c4c1ad7.js → extension-tools-3c2bf0a4.js} +698 -507
  11. package/dist/extensions.d.ts +3 -2
  12. package/dist/extensions.d2.ts +6 -17
  13. package/dist/extensionsRegistry.d.ts +15 -9
  14. package/dist/files.d.ts +71 -7
  15. package/dist/jsonSchema.d.ts +1 -1
  16. package/dist/keybinding.d.ts +2 -2
  17. package/dist/languageFeatures.d.ts +703 -61
  18. package/dist/monaco.d.ts +5 -4
  19. package/dist/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +2 -0
  20. package/dist/override/vs/workbench/contrib/notebook/browser/notebookEditor.js +2 -0
  21. package/dist/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2 -0
  22. package/dist/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -1
  23. package/dist/platform.d.ts +11 -0
  24. package/dist/rollup-extension-directory-plugin.js +1 -1
  25. package/dist/rollup-vsix-plugin.js +1 -1
  26. package/dist/service-override/configuration.d.ts +5 -206
  27. package/dist/service-override/files.d.ts +2 -2
  28. package/dist/service-override/files.js +1 -1
  29. package/dist/service-override/markers.d.ts +7 -0
  30. package/dist/service-override/markers.js +6 -0
  31. package/dist/service-override/output.d.ts +7 -0
  32. package/dist/service-override/output.js +22 -0
  33. package/dist/service-override/preferences.js +7 -1
  34. package/dist/service-override/quickaccess.js +0 -9
  35. package/dist/service-override/search.d.ts +7 -0
  36. package/dist/service-override/search.js +19 -0
  37. package/dist/service-override/terminal.d.ts +607 -0
  38. package/dist/service-override/terminal.js +98 -0
  39. package/dist/service-override/tools/editor.js +1 -1
  40. package/dist/service-override/views.d.ts +561 -335
  41. package/dist/service-override/views.js +51 -11
  42. package/dist/services.d.ts +2627 -108
  43. package/dist/services.js +3 -0
  44. package/dist/severity.d.ts +16 -0
  45. package/dist/uri.d.ts +22 -11
  46. package/dist/views.d.ts +270 -0
  47. package/dist/vscode/vs/base/common/processes.js +24 -0
  48. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/decorations.js +20 -0
  49. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/delegatingEditorImpl.js +106 -0
  50. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorSash.js +59 -0
  51. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.contribution.js +41 -0
  52. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.js +369 -0
  53. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/diffModel.js +247 -0
  54. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/lineAlignment.js +179 -0
  55. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/overviewRulerPart.js +121 -0
  56. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/style.css.js +4 -0
  57. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/unchangedRanges.js +184 -0
  58. package/dist/vscode/vs/editor/browser/widget/diffEditorWidget2/utils.js +88 -0
  59. package/dist/vscode/vs/platform/extensionManagement/common/extensionManagement.js +38 -1
  60. package/dist/vscode/vs/platform/extensionManagement/common/extensionManagementUtil.js +5 -1
  61. package/dist/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +13 -5
  62. package/dist/vscode/vs/platform/files/common/fileService.js +43 -5
  63. package/dist/vscode/vs/platform/files/common/files.js +3 -1
  64. package/dist/vscode/vs/platform/languagePacks/common/languagePacks.js +4 -1
  65. package/dist/vscode/vs/platform/log/common/bufferLog.js +34 -0
  66. package/dist/vscode/vs/platform/log/common/fileLog.js +105 -0
  67. package/dist/vscode/vs/platform/quickinput/browser/quickPickPin.js +1 -1
  68. package/dist/vscode/vs/platform/remote/common/remoteAuthorityResolver.js +20 -1
  69. package/dist/vscode/vs/platform/request/browser/requestService.js +1 -1
  70. package/dist/vscode/vs/platform/request/common/request.js +3 -3
  71. package/dist/vscode/vs/platform/storage/common/storage.js +3 -0
  72. package/dist/vscode/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +39 -0
  73. package/dist/vscode/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +565 -0
  74. package/dist/vscode/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +27 -0
  75. package/dist/vscode/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +22 -0
  76. package/dist/vscode/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +46 -0
  77. package/dist/vscode/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +80 -0
  78. package/dist/vscode/vs/platform/terminal/common/environmentVariable.js +7 -0
  79. package/dist/vscode/vs/platform/terminal/common/environmentVariableCollection.js +196 -0
  80. package/dist/vscode/vs/platform/terminal/common/environmentVariableShared.js +23 -0
  81. package/dist/vscode/vs/platform/terminal/common/terminal.js +21 -1
  82. package/dist/vscode/vs/platform/terminal/common/terminalDataBuffering.js +45 -0
  83. package/dist/vscode/vs/platform/terminal/common/terminalEnvironment.js +37 -0
  84. package/dist/vscode/vs/platform/terminal/common/terminalPlatformConfiguration.js +622 -0
  85. package/dist/vscode/vs/platform/terminal/common/terminalProfiles.js +107 -0
  86. package/dist/vscode/vs/platform/terminal/common/terminalRecorder.js +66 -0
  87. package/dist/vscode/vs/platform/terminal/common/terminalStrings.js +16 -0
  88. package/dist/vscode/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +321 -0
  89. package/dist/vscode/vs/platform/userDataSync/common/settingsMerge.js +39 -1
  90. package/dist/vscode/vs/platform/userDataSync/common/userDataSync.js +19 -0
  91. package/dist/vscode/vs/platform/workspace/common/canonicalUri.js +3 -0
  92. package/dist/vscode/vs/platform/workspace/common/virtualWorkspace.js +4 -1
  93. package/dist/vscode/vs/platform/workspaces/common/workspaces.js +2 -2
  94. package/dist/vscode/vs/workbench/api/browser/mainThreadCommands.js +2 -3
  95. package/dist/vscode/vs/workbench/api/browser/mainThreadEditorTabs.js +473 -0
  96. package/dist/vscode/vs/workbench/api/browser/mainThreadLanguageFeatures.js +45 -38
  97. package/dist/vscode/vs/workbench/api/browser/mainThreadSearch.js +146 -0
  98. package/dist/vscode/vs/workbench/api/browser/mainThreadStatusBar.js +33 -52
  99. package/dist/vscode/vs/workbench/api/browser/mainThreadTerminalService.js +395 -0
  100. package/dist/vscode/vs/workbench/api/browser/mainThreadTheming.js +22 -0
  101. package/dist/vscode/vs/workbench/api/browser/mainThreadTreeViews.js +10 -5
  102. package/dist/vscode/vs/workbench/api/browser/mainThreadWindow.js +11 -4
  103. package/dist/vscode/vs/workbench/api/browser/mainThreadWorkspace.js +34 -11
  104. package/dist/vscode/vs/workbench/api/browser/statusBarExtensionPoint.js +81 -0
  105. package/dist/vscode/vs/workbench/api/common/extHost.protocol.js +7 -2
  106. package/dist/vscode/vs/workbench/api/common/extHostDebugService.js +4 -13
  107. package/dist/vscode/vs/workbench/api/common/extHostExtensionService.js +30 -15
  108. package/dist/vscode/vs/workbench/api/common/extHostFileSystemConsumer.js +20 -6
  109. package/dist/vscode/vs/workbench/api/common/extHostLanguageFeatures.js +41 -8
  110. package/dist/vscode/vs/workbench/api/common/extHostManagedSockets.js +3 -0
  111. package/dist/vscode/vs/workbench/api/common/extHostSearch.js +109 -0
  112. package/dist/vscode/vs/workbench/api/common/extHostStatusBar.js +33 -6
  113. package/dist/vscode/vs/workbench/api/common/extHostTerminalService.js +879 -1
  114. package/dist/vscode/vs/workbench/api/common/extHostTheming.js +38 -0
  115. package/dist/vscode/vs/workbench/api/common/extHostTreeViews.js +8 -5
  116. package/dist/vscode/vs/workbench/api/common/extHostTypeConverters.js +15 -17
  117. package/dist/vscode/vs/workbench/api/common/extHostTypes.js +117 -4
  118. package/dist/vscode/vs/workbench/api/common/extHostWindow.js +28 -6
  119. package/dist/vscode/vs/workbench/api/common/extHostWorkspace.js +28 -0
  120. package/dist/vscode/vs/workbench/api/common/shared/dataTransferCache.js +11 -14
  121. package/dist/vscode/vs/workbench/api/node/extHostTerminalService.js +22 -0
  122. package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +2 -1
  123. package/dist/vscode/vs/workbench/browser/actions/windowActions.js +2 -2
  124. package/dist/vscode/vs/workbench/browser/dnd.js +56 -2
  125. package/dist/vscode/vs/workbench/browser/parts/compositePart.js +1 -1
  126. package/dist/vscode/vs/workbench/browser/parts/dialogs/dialogHandler.js +2 -2
  127. package/dist/vscode/vs/workbench/browser/parts/editor/editor.contribution.js +1 -0
  128. package/dist/vscode/vs/workbench/browser/parts/editor/editor.js +1 -0
  129. package/dist/vscode/vs/workbench/browser/parts/editor/editorCommands.js +9 -10
  130. package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupView.js +15 -9
  131. package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupWatermark.js +13 -17
  132. package/dist/vscode/vs/workbench/browser/parts/editor/editorStatus.js +1 -1
  133. package/dist/vscode/vs/workbench/browser/parts/editor/editorsObserver.js +2 -2
  134. package/dist/vscode/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +1 -1
  135. package/dist/vscode/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +1 -1
  136. package/dist/vscode/vs/workbench/browser/parts/editor/noTabsTitleControl.js +3 -1
  137. package/dist/vscode/vs/workbench/browser/parts/editor/tabsTitleControl.js +60 -11
  138. package/dist/vscode/vs/workbench/browser/parts/editor/textDiffEditor.js +16 -10
  139. package/dist/vscode/vs/workbench/browser/parts/editor/textResourceEditor.js +1 -1
  140. package/dist/vscode/vs/workbench/browser/parts/statusbar/media/statusbarpart.css.js +1 -1
  141. package/dist/vscode/vs/workbench/browser/parts/views/checkbox.js +10 -0
  142. package/dist/vscode/vs/workbench/browser/parts/views/treeView.js +78 -14
  143. package/dist/vscode/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
  144. package/dist/vscode/vs/workbench/browser/workbench.contribution.js +65 -6
  145. package/dist/vscode/vs/workbench/common/configuration.js +8 -1
  146. package/dist/vscode/vs/workbench/common/contextkeys.js +9 -1
  147. package/dist/vscode/vs/workbench/common/editor/editorGroupModel.js +5 -1
  148. package/dist/vscode/vs/workbench/common/editor/resourceEditorInput.js +6 -3
  149. package/dist/vscode/vs/workbench/common/editor/textResourceEditorInput.js +9 -6
  150. package/dist/vscode/vs/workbench/common/editor.js +1 -5
  151. package/dist/vscode/vs/workbench/common/resources.js +111 -34
  152. package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +1 -1
  153. package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +1 -1
  154. package/dist/vscode/vs/workbench/contrib/chat/browser/chat.js +3 -0
  155. package/dist/vscode/vs/workbench/contrib/chat/common/chatService.js +3 -0
  156. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +6 -4
  157. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +4 -0
  158. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +250 -0
  159. package/dist/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput.js +290 -0
  160. package/dist/vscode/vs/workbench/contrib/customEditor/common/customEditor.js +3 -0
  161. package/dist/vscode/vs/workbench/contrib/debug/browser/debugActionViewItems.js +1 -0
  162. package/dist/vscode/vs/workbench/contrib/debug/browser/debugCommands.js +2 -1
  163. package/dist/vscode/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +20 -20
  164. package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorActions.js +5 -3
  165. package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorContribution.js +5 -2
  166. package/dist/vscode/vs/workbench/contrib/debug/browser/debugHover.js +33 -6
  167. package/dist/vscode/vs/workbench/contrib/debug/browser/debugSession.js +1 -1
  168. package/dist/vscode/vs/workbench/contrib/debug/browser/debugTaskRunner.js +1 -1
  169. package/dist/vscode/vs/workbench/contrib/debug/browser/repl.js +3 -3
  170. package/dist/vscode/vs/workbench/contrib/debug/common/debugModel.js +29 -17
  171. package/dist/vscode/vs/workbench/contrib/debug/common/debugStorage.js +11 -10
  172. package/dist/vscode/vs/workbench/contrib/debug/common/debugger.js +10 -6
  173. package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsActions.js +2514 -0
  174. package/dist/vscode/vs/workbench/contrib/extensions/browser/extensionsIcons.js +82 -0
  175. package/dist/vscode/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +4 -0
  176. package/dist/vscode/vs/workbench/contrib/extensions/common/extensions.js +6 -1
  177. package/dist/vscode/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +16 -0
  178. package/dist/vscode/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +2 -3
  179. package/dist/vscode/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +2 -0
  180. package/dist/vscode/vs/workbench/contrib/files/browser/explorerService.js +10 -6
  181. package/dist/vscode/vs/workbench/contrib/files/browser/explorerViewlet.js +3 -18
  182. package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.contribution.js +37 -2
  183. package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.js +65 -3
  184. package/dist/vscode/vs/workbench/contrib/files/browser/fileCommands.js +3 -3
  185. package/dist/vscode/vs/workbench/contrib/files/browser/fileConstants.js +3 -1
  186. package/dist/vscode/vs/workbench/contrib/files/browser/files.contribution.js +41 -6
  187. package/dist/vscode/vs/workbench/contrib/files/browser/files.js +1 -0
  188. package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerView.js +3 -3
  189. package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerViewer.js +6 -2
  190. package/dist/vscode/vs/workbench/contrib/files/common/explorerModel.js +16 -9
  191. package/dist/vscode/vs/workbench/contrib/files/common/files.js +1 -6
  192. package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveDocumentService.js +3 -0
  193. package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +200 -0
  194. package/dist/vscode/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +3 -0
  195. package/dist/vscode/vs/workbench/contrib/markers/browser/markers.contribution.js +586 -0
  196. package/dist/vscode/vs/workbench/contrib/markers/browser/markersFilterOptions.js +75 -0
  197. package/dist/vscode/vs/workbench/contrib/markers/browser/markersModel.js +201 -0
  198. package/dist/vscode/vs/workbench/contrib/markers/browser/markersTable.js +451 -0
  199. package/dist/vscode/vs/workbench/contrib/markers/browser/markersTreeViewer.js +670 -0
  200. package/dist/vscode/vs/workbench/contrib/markers/browser/markersView.js +857 -0
  201. package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.css.js +4 -0
  202. package/dist/vscode/vs/workbench/contrib/markers/browser/markersViewActions.js +132 -0
  203. package/dist/vscode/vs/workbench/contrib/markers/browser/media/markers.css.js +4 -0
  204. package/dist/vscode/vs/workbench/contrib/markers/browser/messages.js +171 -0
  205. package/dist/vscode/vs/workbench/contrib/markers/common/markers.js +15 -1
  206. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +135 -0
  207. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +421 -0
  208. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
  209. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +55 -0
  210. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
  211. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
  212. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +334 -0
  213. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +606 -0
  214. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
  215. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +36 -0
  216. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
  217. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
  218. package/dist/vscode/vs/workbench/contrib/mergeEditor/browser/utils.js +68 -0
  219. package/dist/vscode/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +2 -0
  220. package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
  221. package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
  222. package/dist/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +158 -0
  223. package/dist/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser.js +6 -1
  224. package/dist/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.js +3 -0
  225. package/dist/vscode/vs/workbench/contrib/notebook/common/notebookCommon.js +16 -1
  226. package/dist/vscode/vs/workbench/contrib/notebook/common/notebookService.js +3 -0
  227. package/dist/vscode/vs/workbench/contrib/output/browser/logViewer.js +64 -0
  228. package/dist/vscode/vs/workbench/contrib/output/browser/output.contribution.js +378 -0
  229. package/dist/vscode/vs/workbench/contrib/output/browser/outputServices.js +39 -3
  230. package/dist/vscode/vs/workbench/contrib/output/browser/outputView.js +220 -0
  231. package/dist/vscode/vs/workbench/contrib/output/common/outputChannelModel.js +12 -3
  232. package/dist/vscode/vs/workbench/contrib/output/common/outputLinkComputer.js +129 -0
  233. package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +270 -0
  234. package/dist/vscode/vs/workbench/contrib/preferences/browser/keybindingsEditor.js +1080 -0
  235. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindings.css.js +4 -0
  236. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/keybindingsEditor.css.js +4 -0
  237. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/preferences.css.js +4 -0
  238. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsEditor2.css.js +4 -0
  239. package/dist/vscode/vs/workbench/contrib/preferences/browser/media/settingsWidgets.css.js +4 -0
  240. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferences.contribution.js +1154 -0
  241. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesActions.js +94 -0
  242. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesEditor.js +47 -0
  243. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesIcons.js +37 -0
  244. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesRenderers.js +731 -0
  245. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesSearch.js +271 -0
  246. package/dist/vscode/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +479 -0
  247. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditor2.js +1465 -0
  248. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators.js +506 -0
  249. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsLayout.js +296 -0
  250. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsSearchMenu.js +79 -0
  251. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTree.js +1984 -0
  252. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +759 -0
  253. package/dist/vscode/vs/workbench/contrib/preferences/browser/settingsWidgets.js +1008 -0
  254. package/dist/vscode/vs/workbench/contrib/preferences/browser/tocTree.js +196 -0
  255. package/dist/vscode/vs/workbench/contrib/preferences/common/preferences.js +68 -0
  256. package/dist/vscode/vs/workbench/contrib/preferences/common/preferencesContribution.js +157 -0
  257. package/dist/vscode/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +67 -0
  258. package/dist/vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +16 -16
  259. package/dist/vscode/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +1 -2
  260. package/dist/vscode/vs/workbench/contrib/remote/browser/remoteExplorer.js +23 -2
  261. package/dist/vscode/vs/workbench/contrib/remote/browser/tunnelView.js +5 -5
  262. package/dist/vscode/vs/workbench/contrib/search/browser/media/searchview.css.js +4 -0
  263. package/dist/vscode/vs/workbench/contrib/search/browser/patternInputWidget.js +217 -0
  264. package/dist/vscode/vs/workbench/contrib/search/browser/replace.js +3 -0
  265. package/dist/vscode/vs/workbench/contrib/search/browser/replaceContributions.js +7 -0
  266. package/dist/vscode/vs/workbench/contrib/search/browser/replaceService.js +222 -0
  267. package/dist/vscode/vs/workbench/contrib/search/browser/search.contribution.js +54 -15
  268. package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsBase.js +17 -0
  269. package/dist/vscode/vs/workbench/contrib/search/browser/searchFindInput.js +41 -0
  270. package/dist/vscode/vs/workbench/contrib/search/browser/searchIcons.js +35 -0
  271. package/dist/vscode/vs/workbench/contrib/search/browser/searchMessage.js +58 -0
  272. package/dist/vscode/vs/workbench/contrib/search/browser/searchModel.js +1842 -0
  273. package/dist/vscode/vs/workbench/contrib/search/browser/searchNotebookHelpers.js +49 -0
  274. package/dist/vscode/vs/workbench/contrib/search/browser/searchResultsView.js +379 -0
  275. package/dist/vscode/vs/workbench/contrib/search/browser/searchView.js +1867 -0
  276. package/dist/vscode/vs/workbench/contrib/search/browser/searchWidget.js +628 -0
  277. package/dist/vscode/vs/workbench/contrib/search/common/constants.js +30 -1
  278. package/dist/vscode/vs/workbench/contrib/search/common/search.js +9 -1
  279. package/dist/vscode/vs/workbench/contrib/search/common/searchHistoryService.js +42 -0
  280. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
  281. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/media/searchEditor.css.js +4 -0
  282. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +477 -0
  283. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditor.js +697 -0
  284. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +188 -0
  285. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +295 -0
  286. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorModel.js +135 -0
  287. package/dist/vscode/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +268 -0
  288. package/dist/vscode/vs/workbench/contrib/snippets/browser/tabCompletion.js +2 -2
  289. package/dist/vscode/vs/workbench/contrib/tasks/common/taskService.js +16 -1
  290. package/dist/vscode/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +119 -0
  291. package/dist/vscode/vs/workbench/contrib/terminal/browser/media/scrollbar.css.js +4 -0
  292. package/dist/vscode/vs/workbench/contrib/terminal/browser/media/terminal.css.js +4 -0
  293. package/dist/vscode/vs/workbench/contrib/terminal/browser/media/widgets.css.js +4 -0
  294. package/dist/vscode/vs/workbench/contrib/terminal/browser/media/xterm.css.js +4 -0
  295. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.contribution.js +238 -0
  296. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
  297. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalActions.js +1930 -0
  298. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalCommands.js +22 -0
  299. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalConfigHelper.js +213 -0
  300. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +17 -0
  301. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditor.js +186 -0
  302. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +199 -0
  303. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalEditorService.js +239 -0
  304. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalExtensions.js +22 -0
  305. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroup.js +482 -0
  306. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalGroupService.js +372 -0
  307. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcon.js +60 -1
  308. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcons.js +37 -0
  309. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstance.js +2123 -0
  310. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalInstanceService.js +79 -0
  311. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMainContribution.js +82 -0
  312. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalMenus.js +850 -0
  313. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +142 -0
  314. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +618 -0
  315. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.js +278 -0
  316. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.js +417 -0
  317. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalProfileService.js +213 -0
  318. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalQuickAccess.js +144 -0
  319. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick.js +267 -0
  320. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalService.js +1063 -0
  321. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalStatusList.js +108 -0
  322. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabbedView.js +417 -0
  323. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTabsList.js +680 -0
  324. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalTooltip.js +72 -0
  325. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalUri.js +39 -0
  326. package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalView.js +535 -0
  327. package/dist/vscode/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +36 -0
  328. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +469 -0
  329. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +97 -0
  330. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +56 -0
  331. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +416 -0
  332. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +390 -0
  333. package/dist/vscode/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +587 -0
  334. package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariable.js +3 -0
  335. package/dist/vscode/vs/workbench/contrib/terminal/common/environmentVariableService.js +94 -0
  336. package/dist/vscode/vs/workbench/contrib/terminal/common/history.js +356 -0
  337. package/dist/vscode/vs/workbench/contrib/terminal/common/terminal.js +266 -0
  338. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +23 -16
  339. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalConfiguration.js +965 -0
  340. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalContextKey.js +157 -0
  341. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalEnvironment.js +272 -0
  342. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalExtensionPoints.js +27 -0
  343. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalStrings.js +86 -0
  344. package/dist/vscode/vs/workbench/contrib/terminal/electron-sandbox/terminalProfileResolverService.js +46 -0
  345. package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/links.js +3 -0
  346. package/dist/vscode/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkProviderService.js +26 -0
  347. package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFix.js +3 -0
  348. package/dist/vscode/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixService.js +143 -0
  349. package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +85 -0
  350. package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.js +52 -0
  351. package/dist/vscode/vs/workbench/services/actions/common/menusExtensionPoint.js +14 -6
  352. package/dist/vscode/vs/workbench/services/assignment/common/assignmentService.js +3 -0
  353. package/dist/vscode/vs/workbench/services/configuration/browser/configurationService.js +13 -13
  354. package/dist/vscode/vs/workbench/services/configuration/common/configuration.js +2 -1
  355. package/dist/vscode/vs/workbench/services/configuration/common/configurationEditing.js +2 -2
  356. package/dist/vscode/vs/workbench/services/configuration/common/jsonEditingService.js +2 -2
  357. package/dist/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.js +3 -2
  358. package/dist/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.js +4 -0
  359. package/dist/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.js +2 -0
  360. package/dist/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.js +3 -0
  361. package/dist/vscode/vs/workbench/services/extensions/common/extensions.js +14 -2
  362. package/dist/vscode/vs/workbench/services/extensions/common/extensionsApiProposals.js +10 -1
  363. package/dist/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +70 -3
  364. package/dist/vscode/vs/workbench/services/hover/browser/hoverService.js +1 -1
  365. package/dist/vscode/vs/workbench/services/hover/browser/hoverWidget.js +2 -1
  366. package/dist/vscode/vs/workbench/services/hover/browser/media/hover.css.js +1 -1
  367. package/dist/vscode/vs/workbench/services/keybinding/common/keybindingEditing.js +275 -0
  368. package/dist/vscode/vs/workbench/services/localization/common/locale.js +3 -0
  369. package/dist/vscode/vs/workbench/services/log/common/logConstants.js +2 -0
  370. package/dist/vscode/vs/workbench/services/output/common/output.js +4 -1
  371. package/dist/vscode/vs/workbench/services/preferences/common/preferences.js +22 -1
  372. package/dist/vscode/vs/workbench/services/preferences/common/preferencesModels.js +6 -0
  373. package/dist/vscode/vs/workbench/services/preferences/common/preferencesValidation.js +37 -1
  374. package/dist/vscode/vs/workbench/services/remote/common/remoteAgentService.js +69 -0
  375. package/dist/vscode/vs/workbench/services/remote/common/remoteExplorerService.js +66 -27
  376. package/dist/vscode/vs/workbench/services/search/common/fileSearchManager.js +265 -0
  377. package/dist/vscode/vs/workbench/services/search/common/queryBuilder.js +6 -0
  378. package/dist/vscode/vs/workbench/services/search/common/replace.js +203 -0
  379. package/dist/vscode/vs/workbench/services/search/common/search.js +227 -1
  380. package/dist/vscode/vs/workbench/services/search/common/searchExtTypes.js +6 -0
  381. package/dist/vscode/vs/workbench/services/search/common/searchHelpers.js +72 -0
  382. package/dist/vscode/vs/workbench/services/search/common/searchService.js +355 -0
  383. package/dist/vscode/vs/workbench/services/search/common/textSearchManager.js +309 -0
  384. package/dist/vscode/vs/workbench/services/suggest/browser/media/suggest.css.js +4 -0
  385. package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionItem.js +10 -0
  386. package/dist/vscode/vs/workbench/services/suggest/browser/simpleCompletionModel.js +98 -0
  387. package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +399 -0
  388. package/dist/vscode/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +83 -0
  389. package/dist/vscode/vs/workbench/services/terminal/common/embedderTerminalService.js +3 -0
  390. package/dist/vscode/vs/workbench/services/textfile/browser/textFileService.js +1 -1
  391. package/dist/vscode/vs/workbench/services/textfile/common/textFileEditorModel.js +10 -3
  392. package/dist/vscode/vs/workbench/services/themes/browser/fileIconThemeData.js +3 -3
  393. package/dist/vscode/vs/workbench/services/themes/browser/productIconThemeData.js +3 -3
  394. package/dist/vscode/vs/workbench/services/themes/common/colorThemeData.js +3 -3
  395. package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput.js +6 -4
  396. package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorModel.js +3 -0
  397. package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -0
  398. package/dist/vscode/vs/workbench/services/userActivity/common/userActivityRegistry.js +15 -0
  399. package/dist/vscode/vs/workbench/services/userActivity/common/userActivityService.js +37 -0
  400. package/dist/vscode/vs/workbench/services/userDataSync/common/userDataSync.js +7 -0
  401. package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.js +40 -0
  402. package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyService.js +12 -0
  403. package/dist/vscode/vs/workbench/services/workspaces/common/canonicalUriService.js +19 -0
  404. package/dist/vscode-default-extensions/css/syntaxes/css.tmLanguage.json.extensionResource.js +1 -1
  405. package/dist/vscode-default-extensions/json/package.json.js +1 -1
  406. package/dist/vscode-default-extensions/json/syntaxes/JSONC.tmLanguage.json.extensionResource.js +1 -1
  407. package/dist/vscode-default-extensions/json/syntaxes/JSONL.tmLanguage.json.extensionResource.js +2 -0
  408. package/dist/vscode-default-extensions/latex/syntaxes/Bibtex.tmLanguage.json.extensionResource.js +1 -1
  409. package/dist/vscode-default-extensions/latex/syntaxes/LaTeX.tmLanguage.json.extensionResource.js +1 -1
  410. package/dist/vscode-default-extensions/latex/syntaxes/TeX.tmLanguage.json.extensionResource.js +1 -1
  411. package/dist/vscode-default-extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.extensionResource.js +1 -1
  412. package/dist/vscode-default-extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.extensionResource.js +1 -1
  413. package/dist/vscode-default-extensions/lua/syntaxes/lua.tmLanguage.json.extensionResource.js +1 -1
  414. package/dist/vscode-default-extensions/perl/package.json.js +1 -1
  415. package/dist/vscode-default-extensions/php/snippets/php.code-snippets.extensionResource.js +1 -1
  416. package/dist/vscode-default-extensions/sql/language-configuration.json.extensionResource.js +1 -1
  417. package/dist/vscode-default-extensions/theme-abyss/themes/abyss-color-theme.json.extensionResource.js +1 -1
  418. package/dist/vscode-default-extensions/theme-defaults/package.json.js +1 -1
  419. package/dist/vscode-default-extensions/theme-defaults/themes/dark_modern.json.extensionResource.js +2 -0
  420. package/dist/vscode-default-extensions/theme-defaults/themes/dark_vs.json.extensionResource.js +1 -1
  421. package/dist/vscode-default-extensions/theme-defaults/themes/hc_black.json.extensionResource.js +1 -1
  422. package/dist/vscode-default-extensions/theme-defaults/themes/hc_light.json.extensionResource.js +1 -1
  423. package/dist/vscode-default-extensions/theme-defaults/themes/light_modern.json.extensionResource.js +2 -0
  424. package/dist/vscode-default-extensions/theme-defaults/themes/light_vs.json.extensionResource.js +1 -1
  425. package/dist/vscode-default-extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json.extensionResource.js +1 -1
  426. package/dist/vscode-default-extensions/theme-monokai/themes/monokai-color-theme.json.extensionResource.js +1 -1
  427. package/dist/vscode-default-extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json.extensionResource.js +1 -1
  428. package/dist/vscode-default-extensions/theme-quietlight/themes/quietlight-color-theme.json.extensionResource.js +1 -1
  429. package/dist/vscode-default-extensions/theme-red/themes/Red-color-theme.json.extensionResource.js +1 -1
  430. package/dist/vscode-default-extensions/theme-seti/icons/vs-seti-icon-theme.json.extensionResource.js +1 -1
  431. package/dist/vscode-default-extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json.extensionResource.js +1 -1
  432. package/dist/vscode-default-extensions/theme-solarized-light/themes/solarized-light-color-theme.json.extensionResource.js +1 -1
  433. package/dist/vscode-default-extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json.extensionResource.js +1 -1
  434. package/dist/vscode-default-extensions/vb/language-configuration.json.extensionResource.js +1 -1
  435. package/dist/vscode-services/env.js +4 -2
  436. package/dist/vscode-services/extHost.js +32 -48
  437. package/dist/vscode-services/missing-services.js +407 -29
  438. package/dist/vscode-services/window.js +59 -65
  439. package/dist/vscode-services/workspace.js +19 -5
  440. package/dist/workers/outputLinkComputer.worker.d.ts +2 -0
  441. package/dist/workers/outputLinkComputer.worker.js +3 -0
  442. package/dist/workspace.d.ts +1 -1
  443. package/monaco-editor-treemending.patch +1305 -1184
  444. package/package.json +65 -19
  445. package/dist/activity.d.ts +0 -2802
  446. package/dist/collections.d.ts +0 -7
  447. package/dist/colorRegistry.d.ts +0 -710
  448. package/dist/vscode/vs/platform/product/common/product.js +0 -48
  449. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionFollowups.js +0 -30
  450. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionInputPart.js +0 -196
  451. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionListRenderer.js +0 -622
  452. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionOptions.js +0 -77
  453. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionWidget.js +0 -311
  454. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/media/interactiveSession.css.js +0 -4
  455. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionContextKeys.js +0 -56
  456. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionModel.js +0 -305
  457. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionService.js +0 -13
  458. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionServiceImpl.js +0 -379
  459. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionViewModel.js +0 -207
  460. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWidgetHistoryService.js +0 -3
  461. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWordCounter.js +0 -25
  462. package/dist/vscode-default-extensions/theme-defaults/themes/dark_plus_experimental.json.extensionResource.js +0 -2
  463. package/dist/vscode-default-extensions/theme-defaults/themes/light_plus_experimental.json.extensionResource.js +0 -2
@@ -0,0 +1,1465 @@
1
+ import { __decorate, __param } from '../../../../../../node_modules/tslib/tslib.es6.js';
2
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
3
+ import * as aria from 'monaco-editor/esm/vs/base/browser/ui/aria/aria.js';
4
+ import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
5
+ import { ActionBar } from 'monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js';
6
+ import { Button } from 'monaco-editor/esm/vs/base/browser/ui/button/button.js';
7
+ import { Action } from 'monaco-editor/esm/vs/base/common/actions.js';
8
+ import { Delayer, ThrottledDelayer, timeout, IntervalTimer } from 'monaco-editor/esm/vs/base/common/async.js';
9
+ import { CancellationToken, CancellationTokenSource } from 'monaco-editor/esm/vs/base/common/cancellation.js';
10
+ import { fromNow } from '../../../../base/common/date.js';
11
+ import { isCancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
12
+ import { Event, Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
13
+ import { Iterable } from 'monaco-editor/esm/vs/base/common/iterator.js';
14
+ import { DisposableStore, dispose, Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
15
+ import * as platform from 'monaco-editor/esm/vs/base/common/platform.js';
16
+ import { withUndefinedAsNull, withNullAsUndefined } from 'monaco-editor/esm/vs/base/common/types.js';
17
+ import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
18
+ import './media/settingsEditor2.css.js';
19
+ import { localize } from 'monaco-editor/esm/vs/nls.js';
20
+ import { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
21
+ import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
22
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
23
+ import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
24
+ import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
25
+ import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
26
+ import { asCssVariable, badgeBackground, badgeForeground, contrastBorder, editorForeground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
27
+ import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
28
+ import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
29
+ import { IUserDataSyncEnablementService, IUserDataSyncService } from '../../../../platform/userDataSync/common/userDataSync.js';
30
+ import { EditorPane } from '../../../browser/parts/editor/editorPane.js';
31
+ import { SuggestEnabledInput } from '../../codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js';
32
+ import { SettingsTargetsWidget } from './preferencesWidgets.js';
33
+ import { getCommonlyUsedData, tocData } from './settingsLayout.js';
34
+ import { AbstractSettingRenderer, SettingTreeRenderers, SettingsTree, resolveSettingsTree, createTocTreeForExtensionSettings, resolveConfiguredUntrustedSettings } from './settingsTree.js';
35
+ import { SettingsTreeSettingElement, parseQuery, SettingsTreeModel, SearchResultModel, SettingsTreeGroupElement } from './settingsTreeModels.js';
36
+ import { TOCTreeModel, TOCTree, createTOCIterator } from './tocTree.js';
37
+ import { MODIFIED_SETTING_TAG, REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG, WORKSPACE_TRUST_SETTING_TAG, ID_SETTING_TAG, EXTENSION_SETTING_TAG, FEATURE_SETTING_TAG, POLICY_SETTING_TAG, CONTEXT_SETTINGS_EDITOR, CONTEXT_SETTINGS_SEARCH_FOCUS, CONTEXT_TOC_ROW_FOCUS, CONTEXT_SETTINGS_ROW_FOCUS, LANGUAGE_SETTING_TAG, SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, SETTINGS_EDITOR_COMMAND_SUGGEST_FILTERS, getExperimentalExtensionToggleData, IPreferencesSearchService } from '../common/preferences.js';
38
+ import { settingsTextInputBorder, settingsHeaderBorder, settingsSashBorder } from '../common/settingsEditorColorRegistry.js';
39
+ import { IEditorGroupsService } from '../../../services/editor/common/editorGroupsService.js';
40
+ import { SettingValueType, validateSettingsEditorOptions, SettingMatchType, IPreferencesService } from '../../../services/preferences/common/preferences.js';
41
+ import { Settings2EditorModel, nullRange } from '../../../services/preferences/common/preferencesModels.js';
42
+ import { IUserDataSyncWorkbenchService } from '../../../services/userDataSync/common/userDataSync.js';
43
+ import { preferencesClearInputIcon, preferencesFilterIcon } from './preferencesIcons.js';
44
+ import { IWorkspaceTrustManagementService } from 'monaco-editor/esm/vs/platform/workspace/common/workspaceTrust.js';
45
+ import { IWorkbenchConfigurationService } from '../../../services/configuration/common/configuration.js';
46
+ import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
47
+ import { IExtensionService } from '../../../services/extensions/common/extensions.js';
48
+ import { SplitView, Sizing } from 'monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js';
49
+ import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
50
+ import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
51
+ import { SettingsSearchFilterDropdownMenuActionViewItem } from './settingsSearchMenu.js';
52
+ import { IExtensionManagementService, IExtensionGalleryService } from '../../../../platform/extensionManagement/common/extensionManagement.js';
53
+ import { Extensions } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
54
+ import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
55
+ import { defaultButtonStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
56
+ import { IWorkbenchAssignmentService } from '../../../services/assignment/common/assignmentService.js';
57
+ import { IProductService } from 'monaco-editor/esm/vs/platform/product/common/productService.js';
58
+ import { IEnvironmentService } from 'monaco-editor/esm/vs/platform/environment/common/environment.js';
59
+ function createGroupIterator(group) {
60
+ return ( Iterable.map(group.children, g => {
61
+ return {
62
+ element: g,
63
+ children: g instanceof SettingsTreeGroupElement ?
64
+ createGroupIterator(g) :
65
+ undefined
66
+ };
67
+ }));
68
+ }
69
+ const $ = dom.$;
70
+ const searchBoxLabel = ( localize('SearchSettings.AriaLabel', "Search settings"));
71
+ const SETTINGS_EDITOR_STATE_KEY = 'settingsEditorState';
72
+ let SettingsEditor2 = class SettingsEditor2 extends EditorPane {
73
+ static shouldSettingUpdateFast(type) {
74
+ if (Array.isArray(type)) {
75
+ return false;
76
+ }
77
+ return type === SettingValueType.Enum ||
78
+ type === SettingValueType.Array ||
79
+ type === SettingValueType.BooleanObject ||
80
+ type === SettingValueType.Object ||
81
+ type === SettingValueType.Complex ||
82
+ type === SettingValueType.Boolean ||
83
+ type === SettingValueType.Exclude ||
84
+ type === SettingValueType.Include;
85
+ }
86
+ constructor(telemetryService, configurationService, textResourceConfigurationService, themeService, preferencesService, instantiationService, preferencesSearchService, logService, contextKeyService, storageService, editorGroupService, userDataSyncWorkbenchService, userDataSyncEnablementService, workspaceTrustManagementService, extensionService, languageService, extensionManagementService, workbenchAssignmentService, productService, environmentService, extensionGalleryService) {
87
+ super(SettingsEditor2.ID, telemetryService, themeService, storageService);
88
+ this.configurationService = configurationService;
89
+ this.preferencesService = preferencesService;
90
+ this.instantiationService = instantiationService;
91
+ this.preferencesSearchService = preferencesSearchService;
92
+ this.logService = logService;
93
+ this.storageService = storageService;
94
+ this.editorGroupService = editorGroupService;
95
+ this.userDataSyncWorkbenchService = userDataSyncWorkbenchService;
96
+ this.userDataSyncEnablementService = userDataSyncEnablementService;
97
+ this.workspaceTrustManagementService = workspaceTrustManagementService;
98
+ this.extensionService = extensionService;
99
+ this.languageService = languageService;
100
+ this.workbenchAssignmentService = workbenchAssignmentService;
101
+ this.productService = productService;
102
+ this.environmentService = environmentService;
103
+ this.extensionGalleryService = extensionGalleryService;
104
+ this.searchInProgress = null;
105
+ this.pendingSettingUpdate = null;
106
+ this._searchResultModel = null;
107
+ this.searchResultLabel = null;
108
+ this.lastSyncedLabel = null;
109
+ this._currentFocusContext = 0 ;
110
+ this.hasWarnedMissingSettings = false;
111
+ this.tocFocusedElement = null;
112
+ this.treeFocusedElement = null;
113
+ this.settingsTreeScrollTop = 0;
114
+ this.installedExtensionIds = [];
115
+ this.delayedFilterLogging = ( new Delayer(1000));
116
+ this.localSearchDelayer = ( new Delayer(300));
117
+ this.remoteSearchThrottle = ( new ThrottledDelayer(200));
118
+ this.viewState = { settingsTarget: 3 };
119
+ this.settingFastUpdateDelayer = ( new Delayer(SettingsEditor2.SETTING_UPDATE_FAST_DEBOUNCE));
120
+ this.settingSlowUpdateDelayer = ( new Delayer(SettingsEditor2.SETTING_UPDATE_SLOW_DEBOUNCE));
121
+ this.searchInputDelayer = ( new Delayer(SettingsEditor2.SEARCH_DEBOUNCE));
122
+ this.updatedConfigSchemaDelayer = ( new Delayer(SettingsEditor2.CONFIG_SCHEMA_UPDATE_DELAYER));
123
+ this.inSettingsEditorContextKey = CONTEXT_SETTINGS_EDITOR.bindTo(contextKeyService);
124
+ this.searchFocusContextKey = CONTEXT_SETTINGS_SEARCH_FOCUS.bindTo(contextKeyService);
125
+ this.tocRowFocused = CONTEXT_TOC_ROW_FOCUS.bindTo(contextKeyService);
126
+ this.settingRowFocused = CONTEXT_SETTINGS_ROW_FOCUS.bindTo(contextKeyService);
127
+ this.scheduledRefreshes = ( new Map());
128
+ this.editorMemento = this.getEditorMemento(editorGroupService, textResourceConfigurationService, SETTINGS_EDITOR_STATE_KEY);
129
+ this._register(configurationService.onDidChangeConfiguration(e => {
130
+ if (e.source !== 7 ) {
131
+ this.onConfigUpdate(e.affectedKeys);
132
+ }
133
+ }));
134
+ this._register(workspaceTrustManagementService.onDidChangeTrust(() => {
135
+ this.searchResultModel?.updateWorkspaceTrust(workspaceTrustManagementService.isWorkspaceTrusted());
136
+ if (this.settingsTreeModel) {
137
+ this.settingsTreeModel.updateWorkspaceTrust(workspaceTrustManagementService.isWorkspaceTrusted());
138
+ this.renderTree();
139
+ }
140
+ }));
141
+ this._register(configurationService.onDidChangeRestrictedSettings(e => {
142
+ if (e.default.length && this.currentSettingsModel) {
143
+ this.updateElementsByKey(( new Set(e.default)));
144
+ }
145
+ }));
146
+ this.modelDisposables = this._register(( new DisposableStore()));
147
+ if (!SettingsEditor2.SUGGESTIONS.includes(`@${LANGUAGE_SETTING_TAG}`)) {
148
+ SettingsEditor2.SUGGESTIONS.push(`@${LANGUAGE_SETTING_TAG}`);
149
+ }
150
+ extensionManagementService.getInstalled().then(extensions => {
151
+ this.installedExtensionIds = ( extensions
152
+ .filter(ext => ext.manifest && ext.manifest.contributes && ext.manifest.contributes.configuration)
153
+ .map(ext => ext.identifier.id));
154
+ });
155
+ }
156
+ get minimumWidth() { return SettingsEditor2.EDITOR_MIN_WIDTH; }
157
+ get maximumWidth() { return Number.POSITIVE_INFINITY; }
158
+ get minimumHeight() { return 180; }
159
+ set minimumWidth(value) { }
160
+ set maximumWidth(value) { }
161
+ get currentSettingsModel() {
162
+ return this.searchResultModel || this.settingsTreeModel;
163
+ }
164
+ get searchResultModel() {
165
+ return this._searchResultModel;
166
+ }
167
+ set searchResultModel(value) {
168
+ this._searchResultModel = value;
169
+ this.rootElement.classList.toggle('search-mode', !!this._searchResultModel);
170
+ }
171
+ get focusedSettingDOMElement() {
172
+ const focused = this.settingsTree.getFocus()[0];
173
+ if (!(focused instanceof SettingsTreeSettingElement)) {
174
+ return;
175
+ }
176
+ return this.settingRenderers.getDOMElementsForSettingKey(this.settingsTree.getHTMLElement(), focused.setting.key)[0];
177
+ }
178
+ get currentFocusContext() {
179
+ return this._currentFocusContext;
180
+ }
181
+ createEditor(parent) {
182
+ parent.setAttribute('tabindex', '-1');
183
+ this.rootElement = dom.append(parent, $('.settings-editor', { tabindex: '-1' }));
184
+ this.createHeader(this.rootElement);
185
+ this.createBody(this.rootElement);
186
+ this.addCtrlAInterceptor(this.rootElement);
187
+ this.updateStyles();
188
+ }
189
+ async setInput(input, options, context, token) {
190
+ this.inSettingsEditorContextKey.set(true);
191
+ await super.setInput(input, options, context, token);
192
+ await timeout(0);
193
+ if (!this.input) {
194
+ return;
195
+ }
196
+ const model = await this.input.resolve(options);
197
+ if (token.isCancellationRequested || !(model instanceof Settings2EditorModel)) {
198
+ return;
199
+ }
200
+ this.modelDisposables.clear();
201
+ this.modelDisposables.add(model.onDidChangeGroups(() => {
202
+ this.updatedConfigSchemaDelayer.trigger(() => {
203
+ this.onConfigUpdate(undefined, false, true);
204
+ });
205
+ }));
206
+ this.defaultSettingsEditorModel = model;
207
+ options = options || validateSettingsEditorOptions({});
208
+ if (!this.viewState.settingsTarget || !this.settingsTargetsWidget.settingsTarget) {
209
+ const optionsHasViewStateTarget = options.viewState && options.viewState.settingsTarget;
210
+ if (!options.target && !optionsHasViewStateTarget) {
211
+ options.target = 3 ;
212
+ }
213
+ }
214
+ this._setOptions(options);
215
+ this.onConfigUpdate(undefined, true).then(() => {
216
+ this._register(input.onWillDispose(() => {
217
+ this.searchWidget.setValue('');
218
+ }));
219
+ this.updateTreeScrollSync();
220
+ });
221
+ }
222
+ restoreCachedState() {
223
+ const cachedState = this.group && this.input && this.editorMemento.loadEditorState(this.group, this.input);
224
+ if (cachedState && typeof cachedState.target === 'object') {
225
+ cachedState.target = URI.revive(cachedState.target);
226
+ }
227
+ if (cachedState) {
228
+ const settingsTarget = cachedState.target;
229
+ this.settingsTargetsWidget.settingsTarget = settingsTarget;
230
+ this.viewState.settingsTarget = settingsTarget;
231
+ this.searchWidget.setValue(cachedState.searchQuery);
232
+ }
233
+ if (this.input) {
234
+ this.editorMemento.clearEditorState(this.input, this.group);
235
+ }
236
+ return withUndefinedAsNull(cachedState);
237
+ }
238
+ getViewState() {
239
+ return this.viewState;
240
+ }
241
+ setOptions(options) {
242
+ super.setOptions(options);
243
+ if (options) {
244
+ this._setOptions(options);
245
+ }
246
+ }
247
+ _setOptions(options) {
248
+ if (options.focusSearch && !platform.isIOS) {
249
+ this.focusSearch();
250
+ }
251
+ const recoveredViewState = options.viewState ?
252
+ options.viewState : undefined;
253
+ const query = recoveredViewState?.query ?? options.query;
254
+ if (query !== undefined) {
255
+ this.searchWidget.setValue(query);
256
+ this.viewState.query = query;
257
+ }
258
+ const target = options.folderUri ?? recoveredViewState?.settingsTarget ?? options.target;
259
+ if (target) {
260
+ this.settingsTargetsWidget.settingsTarget = target;
261
+ this.viewState.settingsTarget = target;
262
+ }
263
+ }
264
+ clearInput() {
265
+ this.inSettingsEditorContextKey.set(false);
266
+ super.clearInput();
267
+ }
268
+ layout(dimension) {
269
+ this.dimension = dimension;
270
+ if (!this.isVisible()) {
271
+ return;
272
+ }
273
+ this.layoutSplitView(dimension);
274
+ const innerWidth = Math.min(this.headerContainer.clientWidth, dimension.width) - 24 * 2;
275
+ const monacoWidth = innerWidth - 10 - this.countElement.clientWidth - this.controlsElement.clientWidth - 12;
276
+ this.searchWidget.layout(new dom.Dimension(monacoWidth, 20));
277
+ this.rootElement.classList.toggle('narrow-width', dimension.width < SettingsEditor2.NARROW_TOTAL_WIDTH);
278
+ }
279
+ focus() {
280
+ if (this._currentFocusContext === 0 ) {
281
+ if (!platform.isIOS) {
282
+ this.focusSearch();
283
+ }
284
+ }
285
+ else if (this._currentFocusContext === 3 ) {
286
+ const element = this.focusedSettingDOMElement;
287
+ if (element) {
288
+ const control = element.querySelector(AbstractSettingRenderer.CONTROL_SELECTOR);
289
+ if (control) {
290
+ control.focus();
291
+ return;
292
+ }
293
+ }
294
+ }
295
+ else if (this._currentFocusContext === 2 ) {
296
+ this.settingsTree.domFocus();
297
+ }
298
+ else if (this._currentFocusContext === 1 ) {
299
+ this.tocTree.domFocus();
300
+ }
301
+ }
302
+ setEditorVisible(visible, group) {
303
+ super.setEditorVisible(visible, group);
304
+ if (!visible) {
305
+ setTimeout(() => {
306
+ this.searchWidget.onHide();
307
+ }, 0);
308
+ }
309
+ }
310
+ focusSettings(focusSettingInput = false) {
311
+ const focused = this.settingsTree.getFocus();
312
+ if (!focused.length) {
313
+ this.settingsTree.focusFirst();
314
+ }
315
+ this.settingsTree.domFocus();
316
+ if (focusSettingInput) {
317
+ const controlInFocusedRow = this.settingsTree.getHTMLElement().querySelector(`.focused ${AbstractSettingRenderer.CONTROL_SELECTOR}`);
318
+ if (controlInFocusedRow) {
319
+ controlInFocusedRow.focus();
320
+ }
321
+ }
322
+ }
323
+ focusTOC() {
324
+ this.tocTree.domFocus();
325
+ }
326
+ showContextMenu() {
327
+ const focused = this.settingsTree.getFocus()[0];
328
+ const rowElement = this.focusedSettingDOMElement;
329
+ if (rowElement && focused instanceof SettingsTreeSettingElement) {
330
+ this.settingRenderers.showContextMenu(focused, rowElement);
331
+ }
332
+ }
333
+ focusSearch(filter, selectAll = true) {
334
+ if (filter && this.searchWidget) {
335
+ this.searchWidget.setValue(filter);
336
+ }
337
+ this.searchWidget.focus(selectAll);
338
+ }
339
+ clearSearchResults() {
340
+ this.searchWidget.setValue('');
341
+ this.focusSearch();
342
+ }
343
+ clearSearchFilters() {
344
+ const query = this.searchWidget.getValue();
345
+ const splitQuery = query.split(' ').filter(word => {
346
+ return word.length && !( SettingsEditor2.SUGGESTIONS.some(suggestion => word.startsWith(suggestion)));
347
+ });
348
+ this.searchWidget.setValue(splitQuery.join(' '));
349
+ }
350
+ updateInputAriaLabel() {
351
+ let label = searchBoxLabel;
352
+ if (this.searchResultLabel) {
353
+ label += `. ${this.searchResultLabel}`;
354
+ }
355
+ if (this.lastSyncedLabel) {
356
+ label += `. ${this.lastSyncedLabel}`;
357
+ }
358
+ this.searchWidget.updateAriaLabel(label);
359
+ }
360
+ createHeader(parent) {
361
+ this.headerContainer = dom.append(parent, $('.settings-header'));
362
+ const searchContainer = dom.append(this.headerContainer, $('.search-container'));
363
+ const clearInputAction = ( new Action(SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, ( localize('clearInput', "Clear Settings Search Input")), ThemeIcon.asClassName(preferencesClearInputIcon), false, async () => this.clearSearchResults()));
364
+ const filterAction = ( new Action(SETTINGS_EDITOR_COMMAND_SUGGEST_FILTERS, ( localize('filterInput', "Filter Settings")), ThemeIcon.asClassName(preferencesFilterIcon)));
365
+ this.searchWidget = this._register(this.instantiationService.createInstance(SuggestEnabledInput, `${SettingsEditor2.ID}.searchbox`, searchContainer, {
366
+ triggerCharacters: ['@', ':'],
367
+ provideResults: (query) => {
368
+ const queryParts = query.split(/\s/g);
369
+ if (queryParts[queryParts.length - 1].startsWith(`@${LANGUAGE_SETTING_TAG}`)) {
370
+ const sortedLanguages = ( this.languageService.getRegisteredLanguageIds().map(languageId => {
371
+ return `@${LANGUAGE_SETTING_TAG}${languageId} `;
372
+ })).sort();
373
+ return sortedLanguages.filter(langFilter => !query.includes(langFilter));
374
+ }
375
+ else if (queryParts[queryParts.length - 1].startsWith(`@${EXTENSION_SETTING_TAG}`)) {
376
+ const installedExtensionsTags = ( this.installedExtensionIds.map(extensionId => {
377
+ return `@${EXTENSION_SETTING_TAG}${extensionId} `;
378
+ })).sort();
379
+ return installedExtensionsTags.filter(extFilter => !query.includes(extFilter));
380
+ }
381
+ else if (queryParts[queryParts.length - 1].startsWith('@')) {
382
+ return ( SettingsEditor2.SUGGESTIONS.filter(tag => !query.includes(tag)).map(tag => tag.endsWith(':') ? tag : tag + ' '));
383
+ }
384
+ return [];
385
+ }
386
+ }, searchBoxLabel, 'settingseditor:searchinput' + SettingsEditor2.NUM_INSTANCES++, {
387
+ placeholderText: searchBoxLabel,
388
+ focusContextKey: this.searchFocusContextKey,
389
+ styleOverrides: {
390
+ inputBorder: settingsTextInputBorder
391
+ }
392
+ }));
393
+ this._register(this.searchWidget.onDidFocus(() => {
394
+ this._currentFocusContext = 0 ;
395
+ }));
396
+ this.countElement = dom.append(searchContainer, dom.$('.settings-count-widget.monaco-count-badge.long'));
397
+ this.countElement.style.backgroundColor = asCssVariable(badgeBackground);
398
+ this.countElement.style.color = asCssVariable(badgeForeground);
399
+ this.countElement.style.border = `1px solid ${asCssVariable(contrastBorder)}`;
400
+ this._register(this.searchWidget.onInputDidChange(() => {
401
+ const searchVal = this.searchWidget.getValue();
402
+ clearInputAction.enabled = !!searchVal;
403
+ this.searchInputDelayer.trigger(() => this.onSearchInputChanged());
404
+ }));
405
+ const headerControlsContainer = dom.append(this.headerContainer, $('.settings-header-controls'));
406
+ headerControlsContainer.style.borderColor = asCssVariable(settingsHeaderBorder);
407
+ const targetWidgetContainer = dom.append(headerControlsContainer, $('.settings-target-container'));
408
+ this.settingsTargetsWidget = this._register(this.instantiationService.createInstance(SettingsTargetsWidget, targetWidgetContainer, { enableRemoteSettings: true }));
409
+ this.settingsTargetsWidget.settingsTarget = 3 ;
410
+ this.settingsTargetsWidget.onDidTargetChange(target => this.onDidSettingsTargetChange(target));
411
+ this._register(dom.addDisposableListener(targetWidgetContainer, dom.EventType.KEY_DOWN, e => {
412
+ const event = ( new StandardKeyboardEvent(e));
413
+ if (event.keyCode === 18 ) {
414
+ this.focusSettings();
415
+ }
416
+ }));
417
+ if (this.userDataSyncWorkbenchService.enabled && this.userDataSyncEnablementService.canToggleEnablement()) {
418
+ const syncControls = this._register(this.instantiationService.createInstance(SyncControls, headerControlsContainer));
419
+ this._register(syncControls.onDidChangeLastSyncedLabel(lastSyncedLabel => {
420
+ this.lastSyncedLabel = lastSyncedLabel;
421
+ this.updateInputAriaLabel();
422
+ }));
423
+ }
424
+ this.controlsElement = dom.append(searchContainer, dom.$('.settings-clear-widget'));
425
+ const actionBar = this._register(( new ActionBar(this.controlsElement, {
426
+ animated: false,
427
+ actionViewItemProvider: (action) => {
428
+ if (action.id === filterAction.id) {
429
+ return this.instantiationService.createInstance(SettingsSearchFilterDropdownMenuActionViewItem, action, this.actionRunner, this.searchWidget);
430
+ }
431
+ return undefined;
432
+ }
433
+ })));
434
+ actionBar.push([clearInputAction, filterAction], { label: false, icon: true });
435
+ }
436
+ onDidSettingsTargetChange(target) {
437
+ this.viewState.settingsTarget = target;
438
+ this.onConfigUpdate(undefined, true);
439
+ }
440
+ onDidClickSetting(evt, recursed) {
441
+ const targetElement = this.currentSettingsModel.getElementsByName(evt.targetKey)?.[0];
442
+ let revealFailed = false;
443
+ if (targetElement) {
444
+ let sourceTop = 0.5;
445
+ try {
446
+ const _sourceTop = this.settingsTree.getRelativeTop(evt.source);
447
+ if (_sourceTop !== null) {
448
+ sourceTop = _sourceTop;
449
+ }
450
+ }
451
+ catch {
452
+ }
453
+ if (this.viewState.filterToCategory && evt.source.displayCategory !== targetElement.displayCategory) {
454
+ this.tocTree.setFocus([]);
455
+ }
456
+ try {
457
+ this.settingsTree.reveal(targetElement, sourceTop);
458
+ }
459
+ catch (_) {
460
+ revealFailed = true;
461
+ }
462
+ if (!revealFailed) {
463
+ setTimeout(() => {
464
+ this.settingsTree.setFocus([targetElement]);
465
+ }, 50);
466
+ const domElements = this.settingRenderers.getDOMElementsForSettingKey(this.settingsTree.getHTMLElement(), evt.targetKey);
467
+ if (domElements && domElements[0]) {
468
+ const control = domElements[0].querySelector(AbstractSettingRenderer.CONTROL_SELECTOR);
469
+ if (control) {
470
+ control.focus();
471
+ }
472
+ }
473
+ }
474
+ }
475
+ if (!recursed && (!targetElement || revealFailed)) {
476
+ const p = this.triggerSearch('');
477
+ p.then(() => {
478
+ this.searchWidget.setValue('');
479
+ this.onDidClickSetting(evt, true);
480
+ });
481
+ }
482
+ }
483
+ switchToApplicationSettingsFile() {
484
+ const query = parseQuery(this.searchWidget.getValue()).query;
485
+ return this.openSettingsFile({ query }, true);
486
+ }
487
+ switchToSettingsFile() {
488
+ const query = parseQuery(this.searchWidget.getValue()).query;
489
+ return this.openSettingsFile({ query });
490
+ }
491
+ async openSettingsFile(options, forceOpenApplicationSettings) {
492
+ const currentSettingsTarget = this.settingsTargetsWidget.settingsTarget;
493
+ const openOptions = { jsonEditor: true, ...options };
494
+ if (currentSettingsTarget === 3 ) {
495
+ if (options?.revealSetting) {
496
+ const configurationProperties = ( Registry.as(Extensions.Configuration)).getConfigurationProperties();
497
+ const configurationScope = configurationProperties[options?.revealSetting.key]?.scope;
498
+ if (configurationScope === 1 ) {
499
+ return this.preferencesService.openApplicationSettings(openOptions);
500
+ }
501
+ }
502
+ if (forceOpenApplicationSettings) {
503
+ return this.preferencesService.openApplicationSettings(openOptions);
504
+ }
505
+ return this.preferencesService.openUserSettings(openOptions);
506
+ }
507
+ else if (currentSettingsTarget === 4 ) {
508
+ return this.preferencesService.openRemoteSettings(openOptions);
509
+ }
510
+ else if (currentSettingsTarget === 5 ) {
511
+ return this.preferencesService.openWorkspaceSettings(openOptions);
512
+ }
513
+ else if (URI.isUri(currentSettingsTarget)) {
514
+ return this.preferencesService.openFolderSettings({ folderUri: currentSettingsTarget, ...openOptions });
515
+ }
516
+ return undefined;
517
+ }
518
+ createBody(parent) {
519
+ this.bodyContainer = dom.append(parent, $('.settings-body'));
520
+ this.noResultsMessage = dom.append(this.bodyContainer, $('.no-results-message'));
521
+ this.noResultsMessage.innerText = ( localize('noResults', "No Settings Found"));
522
+ this.clearFilterLinkContainer = $('span.clear-search-filters');
523
+ this.clearFilterLinkContainer.textContent = ' - ';
524
+ const clearFilterLink = dom.append(this.clearFilterLinkContainer, $('a.pointer.prominent', { tabindex: 0 }, ( localize('clearSearchFilters', 'Clear Filters'))));
525
+ this._register(dom.addDisposableListener(clearFilterLink, dom.EventType.CLICK, (e) => {
526
+ dom.EventHelper.stop(e, false);
527
+ this.clearSearchFilters();
528
+ }));
529
+ dom.append(this.noResultsMessage, this.clearFilterLinkContainer);
530
+ this.noResultsMessage.style.color = asCssVariable(editorForeground);
531
+ this.tocTreeContainer = $('.settings-toc-container');
532
+ this.settingsTreeContainer = $('.settings-tree-container');
533
+ this.createTOC(this.tocTreeContainer);
534
+ this.createSettingsTree(this.settingsTreeContainer);
535
+ this.splitView = ( new SplitView(this.bodyContainer, {
536
+ orientation: 1 ,
537
+ proportionalLayout: true
538
+ }));
539
+ const startingWidth = this.storageService.getNumber('settingsEditor2.splitViewWidth', 0 , SettingsEditor2.TOC_RESET_WIDTH);
540
+ this.splitView.addView({
541
+ onDidChange: Event.None,
542
+ element: this.tocTreeContainer,
543
+ minimumSize: SettingsEditor2.TOC_MIN_WIDTH,
544
+ maximumSize: Number.POSITIVE_INFINITY,
545
+ layout: (width, _, height) => {
546
+ this.tocTreeContainer.style.width = `${width}px`;
547
+ this.tocTree.layout(height, width);
548
+ }
549
+ }, startingWidth, undefined, true);
550
+ this.splitView.addView({
551
+ onDidChange: Event.None,
552
+ element: this.settingsTreeContainer,
553
+ minimumSize: SettingsEditor2.EDITOR_MIN_WIDTH,
554
+ maximumSize: Number.POSITIVE_INFINITY,
555
+ layout: (width, _, height) => {
556
+ this.settingsTreeContainer.style.width = `${width}px`;
557
+ this.settingsTree.layout(height, width);
558
+ }
559
+ }, Sizing.Distribute, undefined, true);
560
+ this._register(this.splitView.onDidSashReset(() => {
561
+ const totalSize = this.splitView.getViewSize(0) + this.splitView.getViewSize(1);
562
+ this.splitView.resizeView(0, SettingsEditor2.TOC_RESET_WIDTH);
563
+ this.splitView.resizeView(1, totalSize - SettingsEditor2.TOC_RESET_WIDTH);
564
+ }));
565
+ this._register(this.splitView.onDidSashChange(() => {
566
+ const width = this.splitView.getViewSize(0);
567
+ this.storageService.store('settingsEditor2.splitViewWidth', width, 0 , 0 );
568
+ }));
569
+ const borderColor = this.theme.getColor(settingsSashBorder);
570
+ this.splitView.style({ separatorBorder: borderColor });
571
+ }
572
+ addCtrlAInterceptor(container) {
573
+ this._register(dom.addStandardDisposableListener(container, dom.EventType.KEY_DOWN, (e) => {
574
+ if (e.keyCode === 31 &&
575
+ (platform.isMacintosh ? e.metaKey : e.ctrlKey) &&
576
+ e.target.tagName !== 'TEXTAREA' &&
577
+ e.target.tagName !== 'INPUT') {
578
+ e.browserEvent.stopPropagation();
579
+ e.browserEvent.preventDefault();
580
+ }
581
+ }));
582
+ }
583
+ createTOC(container) {
584
+ this.tocTreeModel = this.instantiationService.createInstance(TOCTreeModel, this.viewState);
585
+ this.tocTree = this._register(this.instantiationService.createInstance(TOCTree, dom.append(container, $('.settings-toc-wrapper', {
586
+ 'role': 'navigation',
587
+ 'aria-label': ( localize('settings', "Settings")),
588
+ })), this.viewState));
589
+ this._register(this.tocTree.onDidFocus(() => {
590
+ this._currentFocusContext = 1 ;
591
+ }));
592
+ this._register(this.tocTree.onDidChangeFocus(e => {
593
+ const element = withUndefinedAsNull(e.elements?.[0]);
594
+ if (this.tocFocusedElement === element) {
595
+ return;
596
+ }
597
+ this.tocFocusedElement = element;
598
+ this.tocTree.setSelection(element ? [element] : []);
599
+ if (this.searchResultModel) {
600
+ if (this.viewState.filterToCategory !== element) {
601
+ this.viewState.filterToCategory = withNullAsUndefined(element);
602
+ this.renderTree(undefined, true);
603
+ this.settingsTree.scrollTop = 0;
604
+ }
605
+ }
606
+ else if (element && (!e.browserEvent || !e.browserEvent.fromScroll)) {
607
+ this.settingsTree.reveal(element, 0);
608
+ this.settingsTree.setFocus([element]);
609
+ }
610
+ }));
611
+ this._register(this.tocTree.onDidFocus(() => {
612
+ this.tocRowFocused.set(true);
613
+ }));
614
+ this._register(this.tocTree.onDidBlur(() => {
615
+ this.tocRowFocused.set(false);
616
+ }));
617
+ }
618
+ applyFilter(filter) {
619
+ if (this.searchWidget && !this.searchWidget.getValue().includes(filter)) {
620
+ const newQuery = `${filter} ${this.searchWidget.getValue().trimStart()}`;
621
+ this.focusSearch(newQuery, false);
622
+ }
623
+ }
624
+ removeLanguageFilters() {
625
+ if (this.searchWidget && this.searchWidget.getValue().includes(`@${LANGUAGE_SETTING_TAG}`)) {
626
+ const query = this.searchWidget.getValue().split(' ');
627
+ const newQuery = query.filter(word => !word.startsWith(`@${LANGUAGE_SETTING_TAG}`)).join(' ');
628
+ this.focusSearch(newQuery, false);
629
+ }
630
+ }
631
+ createSettingsTree(container) {
632
+ this.settingRenderers = this.instantiationService.createInstance(SettingTreeRenderers);
633
+ this._register(this.settingRenderers.onDidChangeSetting(e => this.onDidChangeSetting(e.key, e.value, e.type, e.manualReset, e.scope)));
634
+ this._register(this.settingRenderers.onDidOpenSettings(settingKey => {
635
+ this.openSettingsFile({ revealSetting: { key: settingKey, edit: true } });
636
+ }));
637
+ this._register(this.settingRenderers.onDidClickSettingLink(settingName => this.onDidClickSetting(settingName)));
638
+ this._register(this.settingRenderers.onDidFocusSetting(element => {
639
+ this.settingsTree.setFocus([element]);
640
+ this._currentFocusContext = 3 ;
641
+ this.settingRowFocused.set(false);
642
+ }));
643
+ this._register(this.settingRenderers.onDidChangeSettingHeight((params) => {
644
+ const { element, height } = params;
645
+ try {
646
+ this.settingsTree.updateElementHeight(element, height);
647
+ }
648
+ catch (e) {
649
+ }
650
+ }));
651
+ this._register(this.settingRenderers.onApplyFilter((filter) => this.applyFilter(filter)));
652
+ this._register(this.settingRenderers.onDidClickOverrideElement((element) => {
653
+ this.removeLanguageFilters();
654
+ if (element.language) {
655
+ this.applyFilter(`@${LANGUAGE_SETTING_TAG}${element.language}`);
656
+ }
657
+ if (element.scope === 'workspace') {
658
+ this.settingsTargetsWidget.updateTarget(5 );
659
+ }
660
+ else if (element.scope === 'user') {
661
+ this.settingsTargetsWidget.updateTarget(3 );
662
+ }
663
+ else if (element.scope === 'remote') {
664
+ this.settingsTargetsWidget.updateTarget(4 );
665
+ }
666
+ this.applyFilter(`@${ID_SETTING_TAG}${element.settingKey}`);
667
+ }));
668
+ this.settingsTree = this._register(this.instantiationService.createInstance(SettingsTree, container, this.viewState, this.settingRenderers.allRenderers));
669
+ this._register(this.settingsTree.onDidScroll(() => {
670
+ if (this.settingsTree.scrollTop === this.settingsTreeScrollTop) {
671
+ return;
672
+ }
673
+ this.settingsTreeScrollTop = this.settingsTree.scrollTop;
674
+ setTimeout(() => {
675
+ this.updateTreeScrollSync();
676
+ }, 0);
677
+ }));
678
+ this._register(this.settingsTree.onDidFocus(() => {
679
+ const classList = document.activeElement?.classList;
680
+ if (classList && classList.contains('monaco-list') && classList.contains('settings-editor-tree')) {
681
+ this._currentFocusContext = 2 ;
682
+ this.settingRowFocused.set(true);
683
+ this.treeFocusedElement ??= withUndefinedAsNull(this.settingsTree.firstVisibleElement);
684
+ if (this.treeFocusedElement) {
685
+ this.treeFocusedElement.tabbable = true;
686
+ }
687
+ }
688
+ }));
689
+ this._register(this.settingsTree.onDidBlur(() => {
690
+ this.settingRowFocused.set(false);
691
+ this.treeFocusedElement = null;
692
+ }));
693
+ this._register(this.settingsTree.onDidChangeFocus(e => {
694
+ const element = e.elements[0];
695
+ if (this.treeFocusedElement === element) {
696
+ return;
697
+ }
698
+ if (this.treeFocusedElement) {
699
+ this.treeFocusedElement.tabbable = false;
700
+ }
701
+ this.treeFocusedElement = element;
702
+ if (this.treeFocusedElement) {
703
+ this.treeFocusedElement.tabbable = true;
704
+ }
705
+ this.settingsTree.setSelection(element ? [element] : []);
706
+ }));
707
+ }
708
+ onDidChangeSetting(key, value, type, manualReset, scope) {
709
+ const parsedQuery = parseQuery(this.searchWidget.getValue());
710
+ const languageFilter = parsedQuery.languageFilter;
711
+ if (manualReset || (this.pendingSettingUpdate && this.pendingSettingUpdate.key !== key)) {
712
+ this.updateChangedSetting(key, value, manualReset, languageFilter, scope);
713
+ }
714
+ this.pendingSettingUpdate = { key, value, languageFilter };
715
+ if (SettingsEditor2.shouldSettingUpdateFast(type)) {
716
+ this.settingFastUpdateDelayer.trigger(() => this.updateChangedSetting(key, value, manualReset, languageFilter, scope));
717
+ }
718
+ else {
719
+ this.settingSlowUpdateDelayer.trigger(() => this.updateChangedSetting(key, value, manualReset, languageFilter, scope));
720
+ }
721
+ }
722
+ updateTreeScrollSync() {
723
+ this.settingRenderers.cancelSuggesters();
724
+ if (this.searchResultModel) {
725
+ return;
726
+ }
727
+ if (!this.tocTreeModel) {
728
+ return;
729
+ }
730
+ const elementToSync = this.settingsTree.firstVisibleElement;
731
+ const element = elementToSync instanceof SettingsTreeSettingElement ? elementToSync.parent :
732
+ elementToSync instanceof SettingsTreeGroupElement ? elementToSync :
733
+ null;
734
+ let nodeExists = true;
735
+ try {
736
+ this.tocTree.getNode(element);
737
+ }
738
+ catch (e) {
739
+ nodeExists = false;
740
+ }
741
+ if (!nodeExists) {
742
+ return;
743
+ }
744
+ if (element && this.tocTree.getSelection()[0] !== element) {
745
+ const ancestors = this.getAncestors(element);
746
+ ancestors.forEach(e => this.tocTree.expand(e));
747
+ this.tocTree.reveal(element);
748
+ const elementTop = this.tocTree.getRelativeTop(element);
749
+ if (typeof elementTop !== 'number') {
750
+ return;
751
+ }
752
+ this.tocTree.collapseAll();
753
+ ancestors.forEach(e => this.tocTree.expand(e));
754
+ if (elementTop < 0 || elementTop > 1) {
755
+ this.tocTree.reveal(element);
756
+ }
757
+ else {
758
+ this.tocTree.reveal(element, elementTop);
759
+ }
760
+ this.tocTree.expand(element);
761
+ this.tocTree.setSelection([element]);
762
+ const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
763
+ fakeKeyboardEvent.fromScroll = true;
764
+ this.tocTree.setFocus([element], fakeKeyboardEvent);
765
+ }
766
+ }
767
+ getAncestors(element) {
768
+ const ancestors = [];
769
+ while (element.parent) {
770
+ if (element.parent.id !== 'root') {
771
+ ancestors.push(element.parent);
772
+ }
773
+ element = element.parent;
774
+ }
775
+ return ancestors.reverse();
776
+ }
777
+ updateChangedSetting(key, value, manualReset, languageFilter, scope) {
778
+ const settingsTarget = this.settingsTargetsWidget.settingsTarget;
779
+ const resource = URI.isUri(settingsTarget) ? settingsTarget : undefined;
780
+ const configurationTarget = (resource ? 6 : settingsTarget) ?? 3 ;
781
+ const overrides = { resource, overrideIdentifiers: languageFilter ? [languageFilter] : undefined };
782
+ const configurationTargetIsWorkspace = configurationTarget === 5 || configurationTarget === 6 ;
783
+ const userPassedInManualReset = configurationTargetIsWorkspace || !!languageFilter;
784
+ const isManualReset = userPassedInManualReset ? manualReset : value === undefined;
785
+ const inspected = this.configurationService.inspect(key, overrides);
786
+ if (!userPassedInManualReset && inspected.defaultValue === value) {
787
+ value = undefined;
788
+ }
789
+ return this.configurationService.updateValue(key, value, overrides, configurationTarget, { handleDirtyFile: 'save' })
790
+ .then(() => {
791
+ const query = this.searchWidget.getValue();
792
+ if (query.includes(`@${MODIFIED_SETTING_TAG}`)) {
793
+ this.refreshTOCTree();
794
+ }
795
+ this.renderTree(key, isManualReset);
796
+ const reportModifiedProps = {
797
+ key,
798
+ query,
799
+ searchResults: this.searchResultModel && this.searchResultModel.getUniqueResults(),
800
+ rawResults: this.searchResultModel && this.searchResultModel.getRawResults(),
801
+ showConfiguredOnly: !!this.viewState.tagFilters && ( this.viewState.tagFilters.has(MODIFIED_SETTING_TAG)),
802
+ isReset: typeof value === 'undefined',
803
+ settingsTarget: this.settingsTargetsWidget.settingsTarget
804
+ };
805
+ return this.reportModifiedSetting(reportModifiedProps);
806
+ });
807
+ }
808
+ reportModifiedSetting(props) {
809
+ this.pendingSettingUpdate = null;
810
+ let groupId = undefined;
811
+ let nlpIndex = undefined;
812
+ let displayIndex = undefined;
813
+ if (props.searchResults) {
814
+ const remoteResult = props.searchResults[1 ];
815
+ const localResult = props.searchResults[0 ];
816
+ const localIndex = localResult.filterMatches.findIndex(m => m.setting.key === props.key);
817
+ groupId = localIndex >= 0 ?
818
+ 'local' :
819
+ 'remote';
820
+ displayIndex = localIndex >= 0 ?
821
+ localIndex :
822
+ remoteResult && (remoteResult.filterMatches.findIndex(m => m.setting.key === props.key) + localResult.filterMatches.length);
823
+ if (this.searchResultModel) {
824
+ const rawResults = this.searchResultModel.getRawResults();
825
+ if (rawResults[1 ]) {
826
+ const _nlpIndex = rawResults[1 ].filterMatches.findIndex(m => m.setting.key === props.key);
827
+ nlpIndex = _nlpIndex >= 0 ? _nlpIndex : undefined;
828
+ }
829
+ }
830
+ }
831
+ const reportedTarget = props.settingsTarget === 3 ? 'user' :
832
+ props.settingsTarget === 4 ? 'user_remote' :
833
+ props.settingsTarget === 5 ? 'workspace' :
834
+ 'folder';
835
+ const data = {
836
+ key: props.key,
837
+ groupId,
838
+ nlpIndex,
839
+ displayIndex,
840
+ showConfiguredOnly: props.showConfiguredOnly,
841
+ isReset: props.isReset,
842
+ target: reportedTarget
843
+ };
844
+ this.telemetryService.publicLog2('settingsEditor.settingModified', data);
845
+ }
846
+ onSearchModeToggled() {
847
+ this.rootElement.classList.remove('no-toc-search');
848
+ if (this.configurationService.getValue('workbench.settings.settingsSearchTocBehavior') === 'hide') {
849
+ this.rootElement.classList.toggle('no-toc-search', !!this.searchResultModel);
850
+ }
851
+ }
852
+ scheduleRefresh(element, key = '') {
853
+ if (key && ( this.scheduledRefreshes.has(key))) {
854
+ return;
855
+ }
856
+ if (!key) {
857
+ dispose(( this.scheduledRefreshes.values()));
858
+ this.scheduledRefreshes.clear();
859
+ }
860
+ const scheduledRefreshTracker = dom.trackFocus(element);
861
+ this.scheduledRefreshes.set(key, scheduledRefreshTracker);
862
+ scheduledRefreshTracker.onDidBlur(() => {
863
+ scheduledRefreshTracker.dispose();
864
+ this.scheduledRefreshes.delete(key);
865
+ this.onConfigUpdate(( new Set([key])));
866
+ });
867
+ }
868
+ addOrRemoveManageExtensionSetting(setting, extension, groups) {
869
+ const matchingGroups = groups.filter(g => {
870
+ const lowerCaseId = g.extensionInfo?.id.toLowerCase();
871
+ return (lowerCaseId === setting.stableExtensionId.toLowerCase() ||
872
+ lowerCaseId === setting.prereleaseExtensionId.toLowerCase());
873
+ });
874
+ const extensionId = setting.displayExtensionId;
875
+ if (!matchingGroups.length) {
876
+ const newGroup = {
877
+ sections: [{
878
+ settings: [setting],
879
+ }],
880
+ id: extensionId,
881
+ title: setting.extensionGroupTitle,
882
+ titleRange: nullRange,
883
+ range: nullRange,
884
+ extensionInfo: {
885
+ id: extensionId,
886
+ displayName: extension?.displayName,
887
+ }
888
+ };
889
+ groups.push(newGroup);
890
+ return newGroup;
891
+ }
892
+ else if (matchingGroups.length >= 2) {
893
+ const matchingGroupIndex = matchingGroups.findIndex(group => group.sections.length === 1 && group.sections[0].settings.length === 1 && group.sections[0].settings[0].displayExtensionId);
894
+ if (matchingGroupIndex !== -1) {
895
+ groups.splice(matchingGroupIndex, 1);
896
+ }
897
+ }
898
+ return undefined;
899
+ }
900
+ async onConfigUpdate(keys, forceRefresh = false, schemaChange = false) {
901
+ if (keys && this.settingsTreeModel) {
902
+ return this.updateElementsByKey(keys);
903
+ }
904
+ if (!this.defaultSettingsEditorModel) {
905
+ return;
906
+ }
907
+ const groups = this.defaultSettingsEditorModel.settingsGroups.slice(1);
908
+ const coreSettings = groups.filter(g => !g.extensionInfo);
909
+ const settingsResult = resolveSettingsTree(tocData, coreSettings, this.logService);
910
+ const resolvedSettingsRoot = settingsResult.tree;
911
+ if (settingsResult.leftoverSettings.size && !this.hasWarnedMissingSettings) {
912
+ const settingKeyList = [];
913
+ settingsResult.leftoverSettings.forEach(s => {
914
+ settingKeyList.push(s.key);
915
+ });
916
+ this.logService.warn(`SettingsEditor2: Settings not included in settingsLayout.ts: ${settingKeyList.join(', ')}`);
917
+ this.hasWarnedMissingSettings = true;
918
+ }
919
+ const additionalGroups = [];
920
+ const toggleData = await getExperimentalExtensionToggleData(this.workbenchAssignmentService, this.environmentService, this.productService);
921
+ if (toggleData && groups.filter(g => g.extensionInfo).length) {
922
+ for (const key in toggleData.settingsEditorRecommendedExtensions) {
923
+ const prerelease = toggleData.settingsEditorRecommendedExtensions[key].onSettingsEditorOpen.prerelease;
924
+ const extensionId = (typeof prerelease === 'string' && this.productService.quality !== 'stable') ? prerelease : key;
925
+ const [extension] = await this.extensionGalleryService.getExtensions([{ id: extensionId }], CancellationToken.None);
926
+ if (!extension) {
927
+ continue;
928
+ }
929
+ let groupTitle;
930
+ const manifest = await this.extensionGalleryService.getManifest(extension, CancellationToken.None);
931
+ const contributesConfiguration = manifest?.contributes?.configuration;
932
+ if (!Array.isArray(contributesConfiguration)) {
933
+ groupTitle = contributesConfiguration?.title;
934
+ }
935
+ else if (contributesConfiguration.length === 1) {
936
+ groupTitle = contributesConfiguration[0].title;
937
+ }
938
+ const extensionName = extension?.displayName ?? extension?.name ?? extensionId;
939
+ const settingKey = `${key}.manageExtension`;
940
+ const setting = {
941
+ range: nullRange,
942
+ key: settingKey,
943
+ keyRange: nullRange,
944
+ value: null,
945
+ valueRange: nullRange,
946
+ description: [extension?.description || ''],
947
+ descriptionIsMarkdown: false,
948
+ descriptionRanges: [],
949
+ title: extensionName,
950
+ scope: 3 ,
951
+ type: 'null',
952
+ displayExtensionId: extensionId,
953
+ stableExtensionId: key,
954
+ prereleaseExtensionId: typeof prerelease === 'string' ? prerelease : key,
955
+ extensionGroupTitle: groupTitle ?? extensionName
956
+ };
957
+ const additionalGroup = this.addOrRemoveManageExtensionSetting(setting, extension, groups);
958
+ if (additionalGroup) {
959
+ additionalGroups.push(additionalGroup);
960
+ }
961
+ }
962
+ }
963
+ resolvedSettingsRoot.children.push(await createTocTreeForExtensionSettings(this.extensionService, groups.filter(g => g.extensionInfo)));
964
+ const commonlyUsedDataToUse = await getCommonlyUsedData(this.workbenchAssignmentService, this.environmentService, this.productService);
965
+ const commonlyUsed = resolveSettingsTree(commonlyUsedDataToUse, groups, this.logService);
966
+ resolvedSettingsRoot.children.unshift(commonlyUsed.tree);
967
+ if (toggleData) {
968
+ this.defaultSettingsEditorModel.setAdditionalGroups(additionalGroups);
969
+ }
970
+ if (!this.workspaceTrustManagementService.isWorkspaceTrusted() && ((this.viewState.settingsTarget instanceof URI || this.viewState.settingsTarget === 5) )) {
971
+ const configuredUntrustedWorkspaceSettings = resolveConfiguredUntrustedSettings(groups, this.viewState.settingsTarget, this.viewState.languageFilter, this.configurationService);
972
+ if (configuredUntrustedWorkspaceSettings.length) {
973
+ resolvedSettingsRoot.children.unshift({
974
+ id: 'workspaceTrust',
975
+ label: ( localize('settings require trust', "Workspace Trust")),
976
+ settings: configuredUntrustedWorkspaceSettings
977
+ });
978
+ }
979
+ }
980
+ this.searchResultModel?.updateChildren();
981
+ if (this.settingsTreeModel) {
982
+ this.settingsTreeModel.update(resolvedSettingsRoot);
983
+ if (schemaChange && !!this.searchResultModel) {
984
+ return await this.onSearchInputChanged();
985
+ }
986
+ this.refreshTOCTree();
987
+ this.renderTree(undefined, forceRefresh);
988
+ }
989
+ else {
990
+ this.settingsTreeModel = this.instantiationService.createInstance(SettingsTreeModel, this.viewState, this.workspaceTrustManagementService.isWorkspaceTrusted());
991
+ this.settingsTreeModel.update(resolvedSettingsRoot);
992
+ this.tocTreeModel.settingsTreeRoot = this.settingsTreeModel.root;
993
+ const cachedState = !this.viewState.query ? this.restoreCachedState() : undefined;
994
+ if (cachedState?.searchQuery || this.searchWidget.getValue()) {
995
+ await this.onSearchInputChanged();
996
+ }
997
+ else {
998
+ this.refreshTOCTree();
999
+ this.refreshTree();
1000
+ this.tocTree.collapseAll();
1001
+ }
1002
+ }
1003
+ }
1004
+ updateElementsByKey(keys) {
1005
+ if (keys.size) {
1006
+ if (this.searchResultModel) {
1007
+ keys.forEach(key => this.searchResultModel.updateElementsByName(key));
1008
+ }
1009
+ if (this.settingsTreeModel) {
1010
+ keys.forEach(key => this.settingsTreeModel.updateElementsByName(key));
1011
+ }
1012
+ keys.forEach(key => this.renderTree(key));
1013
+ }
1014
+ else {
1015
+ return this.renderTree();
1016
+ }
1017
+ }
1018
+ getActiveControlInSettingsTree() {
1019
+ return (document.activeElement && dom.isAncestor(document.activeElement, this.settingsTree.getHTMLElement())) ?
1020
+ document.activeElement :
1021
+ null;
1022
+ }
1023
+ renderTree(key, force = false) {
1024
+ if (!force && key && ( this.scheduledRefreshes.has(key))) {
1025
+ this.updateModifiedLabelForKey(key);
1026
+ return;
1027
+ }
1028
+ if (this.contextViewFocused()) {
1029
+ const element = document.querySelector('.context-view');
1030
+ if (element) {
1031
+ this.scheduleRefresh(element, key);
1032
+ }
1033
+ return;
1034
+ }
1035
+ const activeElement = this.getActiveControlInSettingsTree();
1036
+ const focusedSetting = activeElement && this.settingRenderers.getSettingDOMElementForDOMElement(activeElement);
1037
+ if (focusedSetting && !force) {
1038
+ if (key) {
1039
+ const focusedKey = focusedSetting.getAttribute(AbstractSettingRenderer.SETTING_KEY_ATTR);
1040
+ if (focusedKey === key &&
1041
+ (focusedSetting.parentElement && !focusedSetting.parentElement.classList.contains('setting-item-list'))) {
1042
+ this.updateModifiedLabelForKey(key);
1043
+ this.scheduleRefresh(focusedSetting, key);
1044
+ return;
1045
+ }
1046
+ }
1047
+ else {
1048
+ this.scheduleRefresh(focusedSetting);
1049
+ return;
1050
+ }
1051
+ }
1052
+ this.renderResultCountMessages();
1053
+ if (key) {
1054
+ const elements = this.currentSettingsModel.getElementsByName(key);
1055
+ if (elements && elements.length) {
1056
+ this.refreshTree();
1057
+ }
1058
+ else {
1059
+ return;
1060
+ }
1061
+ }
1062
+ else {
1063
+ this.refreshTree();
1064
+ }
1065
+ return;
1066
+ }
1067
+ contextViewFocused() {
1068
+ return !!dom.findParentWithClass(document.activeElement, 'context-view');
1069
+ }
1070
+ refreshTree() {
1071
+ if (this.isVisible()) {
1072
+ this.settingsTree.setChildren(null, createGroupIterator(this.currentSettingsModel.root));
1073
+ }
1074
+ }
1075
+ refreshTOCTree() {
1076
+ if (this.isVisible()) {
1077
+ this.tocTreeModel.update();
1078
+ this.tocTree.setChildren(null, createTOCIterator(this.tocTreeModel));
1079
+ }
1080
+ }
1081
+ updateModifiedLabelForKey(key) {
1082
+ const dataElements = this.currentSettingsModel.getElementsByName(key);
1083
+ const isModified = dataElements && dataElements[0] && dataElements[0].isConfigured;
1084
+ const elements = this.settingRenderers.getDOMElementsForSettingKey(this.settingsTree.getHTMLElement(), key);
1085
+ if (elements && elements[0]) {
1086
+ elements[0].classList.toggle('is-configured', !!isModified);
1087
+ }
1088
+ }
1089
+ async onSearchInputChanged() {
1090
+ if (!this.currentSettingsModel) {
1091
+ return;
1092
+ }
1093
+ const query = this.searchWidget.getValue().trim();
1094
+ this.viewState.query = query;
1095
+ this.delayedFilterLogging.cancel();
1096
+ await this.triggerSearch(query.replace(/\u203A/g, ' '));
1097
+ if (query && this.searchResultModel) {
1098
+ this.delayedFilterLogging.trigger(() => this.reportFilteringUsed(this.searchResultModel.getUniqueResults()));
1099
+ }
1100
+ }
1101
+ parseSettingFromJSON(query) {
1102
+ const match = query.match(/"([a-zA-Z.]+)": /);
1103
+ return match && match[1];
1104
+ }
1105
+ triggerSearch(query) {
1106
+ this.viewState.tagFilters = ( new Set());
1107
+ this.viewState.extensionFilters = ( new Set());
1108
+ this.viewState.featureFilters = ( new Set());
1109
+ this.viewState.idFilters = ( new Set());
1110
+ this.viewState.languageFilter = undefined;
1111
+ if (query) {
1112
+ const parsedQuery = parseQuery(query);
1113
+ query = parsedQuery.query;
1114
+ parsedQuery.tags.forEach(tag => this.viewState.tagFilters.add(tag));
1115
+ parsedQuery.extensionFilters.forEach(extensionId => this.viewState.extensionFilters.add(extensionId));
1116
+ parsedQuery.featureFilters.forEach(feature => this.viewState.featureFilters.add(feature));
1117
+ parsedQuery.idFilters.forEach(id => this.viewState.idFilters.add(id));
1118
+ this.viewState.languageFilter = parsedQuery.languageFilter;
1119
+ }
1120
+ this.settingsTargetsWidget.updateLanguageFilterIndicators(this.viewState.languageFilter);
1121
+ if (query && query !== '@') {
1122
+ query = this.parseSettingFromJSON(query) || query;
1123
+ return this.triggerFilterPreferences(query);
1124
+ }
1125
+ else {
1126
+ if (this.viewState.tagFilters.size || this.viewState.extensionFilters.size || this.viewState.featureFilters.size || this.viewState.idFilters.size || this.viewState.languageFilter) {
1127
+ this.searchResultModel = this.createFilterModel();
1128
+ }
1129
+ else {
1130
+ this.searchResultModel = null;
1131
+ }
1132
+ this.localSearchDelayer.cancel();
1133
+ this.remoteSearchThrottle.cancel();
1134
+ if (this.searchInProgress) {
1135
+ this.searchInProgress.cancel();
1136
+ this.searchInProgress.dispose();
1137
+ this.searchInProgress = null;
1138
+ }
1139
+ this.tocTree.setFocus([]);
1140
+ this.viewState.filterToCategory = undefined;
1141
+ this.tocTreeModel.currentSearchModel = this.searchResultModel;
1142
+ this.onSearchModeToggled();
1143
+ if (this.searchResultModel) {
1144
+ this.tocTree.setSelection([]);
1145
+ this.tocTree.expandAll();
1146
+ this.refreshTOCTree();
1147
+ this.renderResultCountMessages();
1148
+ this.refreshTree();
1149
+ }
1150
+ else {
1151
+ this.tocTree.collapseAll();
1152
+ this.refreshTOCTree();
1153
+ this.renderResultCountMessages();
1154
+ this.refreshTree();
1155
+ }
1156
+ }
1157
+ return Promise.resolve();
1158
+ }
1159
+ createFilterModel() {
1160
+ const filterModel = this.instantiationService.createInstance(SearchResultModel, this.viewState, this.workspaceTrustManagementService.isWorkspaceTrusted());
1161
+ const fullResult = {
1162
+ filterMatches: []
1163
+ };
1164
+ for (const g of this.defaultSettingsEditorModel.settingsGroups.slice(1)) {
1165
+ for (const sect of g.sections) {
1166
+ for (const setting of sect.settings) {
1167
+ fullResult.filterMatches.push({ setting, matches: [], matchType: SettingMatchType.None, score: 0 });
1168
+ }
1169
+ }
1170
+ }
1171
+ filterModel.setResult(0, fullResult);
1172
+ return filterModel;
1173
+ }
1174
+ reportFilteringUsed(results) {
1175
+ const nlpResult = results[1 ];
1176
+ const nlpMetadata = nlpResult?.metadata;
1177
+ const duration = {
1178
+ nlpResult: nlpMetadata?.duration
1179
+ };
1180
+ const counts = {};
1181
+ const filterResult = results[0 ];
1182
+ if (filterResult) {
1183
+ counts['filterResult'] = filterResult.filterMatches.length;
1184
+ }
1185
+ if (nlpResult) {
1186
+ counts['nlpResult'] = nlpResult.filterMatches.length;
1187
+ }
1188
+ const requestCount = nlpMetadata?.requestCount;
1189
+ const data = {
1190
+ 'durations.nlpResult': duration.nlpResult,
1191
+ 'counts.nlpResult': counts['nlpResult'],
1192
+ 'counts.filterResult': counts['filterResult'],
1193
+ requestCount
1194
+ };
1195
+ this.telemetryService.publicLog2('settingsEditor.filter', data);
1196
+ }
1197
+ triggerFilterPreferences(query) {
1198
+ if (this.searchInProgress) {
1199
+ this.searchInProgress.cancel();
1200
+ this.searchInProgress = null;
1201
+ }
1202
+ const searchInProgress = this.searchInProgress = ( new CancellationTokenSource());
1203
+ return this.localSearchDelayer.trigger(() => {
1204
+ if (searchInProgress && !searchInProgress.token.isCancellationRequested) {
1205
+ return this.localFilterPreferences(query).then(result => {
1206
+ if (result && !result.exactMatch) {
1207
+ this.remoteSearchThrottle.trigger(() => {
1208
+ return searchInProgress && !searchInProgress.token.isCancellationRequested ?
1209
+ this.remoteSearchPreferences(query, this.searchInProgress.token) :
1210
+ Promise.resolve();
1211
+ });
1212
+ }
1213
+ });
1214
+ }
1215
+ else {
1216
+ return Promise.resolve();
1217
+ }
1218
+ });
1219
+ }
1220
+ localFilterPreferences(query, token) {
1221
+ const localSearchProvider = this.preferencesSearchService.getLocalSearchProvider(query);
1222
+ return this.filterOrSearchPreferences(query, 0 , localSearchProvider, token);
1223
+ }
1224
+ remoteSearchPreferences(query, token) {
1225
+ const remoteSearchProvider = this.preferencesSearchService.getRemoteSearchProvider(query);
1226
+ const newExtSearchProvider = this.preferencesSearchService.getRemoteSearchProvider(query, true);
1227
+ return Promise.all([
1228
+ this.filterOrSearchPreferences(query, 1 , remoteSearchProvider, token),
1229
+ this.filterOrSearchPreferences(query, 2 , newExtSearchProvider, token)
1230
+ ]).then(() => { });
1231
+ }
1232
+ filterOrSearchPreferences(query, type, searchProvider, token) {
1233
+ return this._filterOrSearchPreferencesModel(query, this.defaultSettingsEditorModel, searchProvider, token).then(result => {
1234
+ if (token && token.isCancellationRequested) {
1235
+ return null;
1236
+ }
1237
+ if (!this.searchResultModel) {
1238
+ this.searchResultModel = this.instantiationService.createInstance(SearchResultModel, this.viewState, this.workspaceTrustManagementService.isWorkspaceTrusted());
1239
+ this.searchResultModel.setResult(type, result);
1240
+ this.tocTreeModel.currentSearchModel = this.searchResultModel;
1241
+ this.onSearchModeToggled();
1242
+ }
1243
+ else {
1244
+ this.searchResultModel.setResult(type, result);
1245
+ this.tocTreeModel.update();
1246
+ }
1247
+ if (type === 0 ) {
1248
+ this.tocTree.setFocus([]);
1249
+ this.viewState.filterToCategory = undefined;
1250
+ this.tocTree.expandAll();
1251
+ }
1252
+ this.settingsTree.scrollTop = 0;
1253
+ this.refreshTOCTree();
1254
+ this.renderTree(undefined, true);
1255
+ return result;
1256
+ });
1257
+ }
1258
+ renderResultCountMessages() {
1259
+ if (!this.currentSettingsModel) {
1260
+ return;
1261
+ }
1262
+ this.clearFilterLinkContainer.style.display = this.viewState.tagFilters && this.viewState.tagFilters.size > 0
1263
+ ? 'initial'
1264
+ : 'none';
1265
+ if (!this.searchResultModel) {
1266
+ if (this.countElement.style.display !== 'none') {
1267
+ this.searchResultLabel = null;
1268
+ this.updateInputAriaLabel();
1269
+ this.countElement.style.display = 'none';
1270
+ this.layout(this.dimension);
1271
+ }
1272
+ this.rootElement.classList.remove('no-results');
1273
+ this.splitView.el.style.visibility = 'visible';
1274
+ return;
1275
+ }
1276
+ else {
1277
+ const count = this.searchResultModel.getUniqueResultsCount();
1278
+ let resultString;
1279
+ switch (count) {
1280
+ case 0:
1281
+ resultString = ( localize('noResults', "No Settings Found"));
1282
+ break;
1283
+ case 1:
1284
+ resultString = ( localize('oneResult', "1 Setting Found"));
1285
+ break;
1286
+ default: resultString = ( localize('moreThanOneResult', "{0} Settings Found", count));
1287
+ }
1288
+ this.searchResultLabel = resultString;
1289
+ this.updateInputAriaLabel();
1290
+ this.countElement.innerText = resultString;
1291
+ aria.status(resultString);
1292
+ if (this.countElement.style.display !== 'block') {
1293
+ this.countElement.style.display = 'block';
1294
+ this.layout(this.dimension);
1295
+ }
1296
+ this.rootElement.classList.toggle('no-results', count === 0);
1297
+ this.splitView.el.style.visibility = count === 0 ? 'hidden' : 'visible';
1298
+ }
1299
+ }
1300
+ _filterOrSearchPreferencesModel(filter, model, provider, token) {
1301
+ const searchP = provider ? provider.searchModel(model, token) : Promise.resolve(null);
1302
+ return searchP
1303
+ .then(undefined, err => {
1304
+ if (isCancellationError(err)) {
1305
+ return Promise.reject(err);
1306
+ }
1307
+ else {
1308
+ return null;
1309
+ }
1310
+ });
1311
+ }
1312
+ layoutSplitView(dimension) {
1313
+ const listHeight = dimension.height - ((72 + 11 + 14) );
1314
+ this.splitView.el.style.height = `${listHeight}px`;
1315
+ this.splitView.layout(this.bodyContainer.clientWidth, listHeight);
1316
+ const firstViewWasVisible = this.splitView.isViewVisible(0);
1317
+ const firstViewVisible = this.bodyContainer.clientWidth >= SettingsEditor2.NARROW_TOTAL_WIDTH;
1318
+ this.splitView.setViewVisible(0, firstViewVisible);
1319
+ if (!firstViewWasVisible && firstViewVisible && this.bodyContainer.clientWidth >= SettingsEditor2.EDITOR_MIN_WIDTH + SettingsEditor2.TOC_RESET_WIDTH) {
1320
+ this.splitView.resizeView(0, SettingsEditor2.TOC_RESET_WIDTH);
1321
+ }
1322
+ this.splitView.style({
1323
+ separatorBorder: firstViewVisible ? this.theme.getColor(settingsSashBorder) : Color.transparent
1324
+ });
1325
+ }
1326
+ saveState() {
1327
+ if (this.isVisible()) {
1328
+ const searchQuery = this.searchWidget.getValue().trim();
1329
+ const target = this.settingsTargetsWidget.settingsTarget;
1330
+ if (this.group && this.input) {
1331
+ this.editorMemento.saveEditorState(this.group, this.input, { searchQuery, target });
1332
+ }
1333
+ }
1334
+ else if (this.group && this.input) {
1335
+ this.editorMemento.clearEditorState(this.input, this.group);
1336
+ }
1337
+ super.saveState();
1338
+ }
1339
+ };
1340
+ SettingsEditor2.ID = 'workbench.editor.settings2';
1341
+ SettingsEditor2.NUM_INSTANCES = 0;
1342
+ SettingsEditor2.SEARCH_DEBOUNCE = 200;
1343
+ SettingsEditor2.SETTING_UPDATE_FAST_DEBOUNCE = 200;
1344
+ SettingsEditor2.SETTING_UPDATE_SLOW_DEBOUNCE = 1000;
1345
+ SettingsEditor2.CONFIG_SCHEMA_UPDATE_DELAYER = 500;
1346
+ SettingsEditor2.TOC_MIN_WIDTH = 100;
1347
+ SettingsEditor2.TOC_RESET_WIDTH = 200;
1348
+ SettingsEditor2.EDITOR_MIN_WIDTH = 500;
1349
+ SettingsEditor2.NARROW_TOTAL_WIDTH = SettingsEditor2.TOC_RESET_WIDTH + SettingsEditor2.EDITOR_MIN_WIDTH;
1350
+ SettingsEditor2.SUGGESTIONS = [
1351
+ `@${MODIFIED_SETTING_TAG}`,
1352
+ '@tag:notebookLayout',
1353
+ '@tag:notebookOutputLayout',
1354
+ `@tag:${REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG}`,
1355
+ `@tag:${WORKSPACE_TRUST_SETTING_TAG}`,
1356
+ '@tag:sync',
1357
+ '@tag:usesOnlineServices',
1358
+ '@tag:telemetry',
1359
+ '@tag:accessibility',
1360
+ `@${ID_SETTING_TAG}`,
1361
+ `@${EXTENSION_SETTING_TAG}`,
1362
+ `@${FEATURE_SETTING_TAG}scm`,
1363
+ `@${FEATURE_SETTING_TAG}explorer`,
1364
+ `@${FEATURE_SETTING_TAG}search`,
1365
+ `@${FEATURE_SETTING_TAG}debug`,
1366
+ `@${FEATURE_SETTING_TAG}extensions`,
1367
+ `@${FEATURE_SETTING_TAG}terminal`,
1368
+ `@${FEATURE_SETTING_TAG}task`,
1369
+ `@${FEATURE_SETTING_TAG}problems`,
1370
+ `@${FEATURE_SETTING_TAG}output`,
1371
+ `@${FEATURE_SETTING_TAG}comments`,
1372
+ `@${FEATURE_SETTING_TAG}remote`,
1373
+ `@${FEATURE_SETTING_TAG}timeline`,
1374
+ `@${FEATURE_SETTING_TAG}notebook`,
1375
+ `@${POLICY_SETTING_TAG}`
1376
+ ];
1377
+ SettingsEditor2 = ( __decorate([
1378
+ ( __param(0, ITelemetryService)),
1379
+ ( __param(1, IWorkbenchConfigurationService)),
1380
+ ( __param(2, ITextResourceConfigurationService)),
1381
+ ( __param(3, IThemeService)),
1382
+ ( __param(4, IPreferencesService)),
1383
+ ( __param(5, IInstantiationService)),
1384
+ ( __param(6, IPreferencesSearchService)),
1385
+ ( __param(7, ILogService)),
1386
+ ( __param(8, IContextKeyService)),
1387
+ ( __param(9, IStorageService)),
1388
+ ( __param(10, IEditorGroupsService)),
1389
+ ( __param(11, IUserDataSyncWorkbenchService)),
1390
+ ( __param(12, IUserDataSyncEnablementService)),
1391
+ ( __param(13, IWorkspaceTrustManagementService)),
1392
+ ( __param(14, IExtensionService)),
1393
+ ( __param(15, ILanguageService)),
1394
+ ( __param(16, IExtensionManagementService)),
1395
+ ( __param(17, IWorkbenchAssignmentService)),
1396
+ ( __param(18, IProductService)),
1397
+ ( __param(19, IEnvironmentService)),
1398
+ ( __param(20, IExtensionGalleryService))
1399
+ ], SettingsEditor2));
1400
+ let SyncControls = class SyncControls extends Disposable {
1401
+ constructor(container, commandService, userDataSyncService, userDataSyncEnablementService) {
1402
+ super();
1403
+ this.commandService = commandService;
1404
+ this.userDataSyncService = userDataSyncService;
1405
+ this.userDataSyncEnablementService = userDataSyncEnablementService;
1406
+ this._onDidChangeLastSyncedLabel = this._register(( new Emitter()));
1407
+ this.onDidChangeLastSyncedLabel = this._onDidChangeLastSyncedLabel.event;
1408
+ const headerRightControlsContainer = dom.append(container, $('.settings-right-controls'));
1409
+ const turnOnSyncButtonContainer = dom.append(headerRightControlsContainer, $('.turn-on-sync'));
1410
+ this.turnOnSyncButton = this._register(( new Button(turnOnSyncButtonContainer, { title: true, ...defaultButtonStyles })));
1411
+ this.lastSyncedLabel = dom.append(headerRightControlsContainer, $('.last-synced-label'));
1412
+ dom.hide(this.lastSyncedLabel);
1413
+ this.turnOnSyncButton.enabled = true;
1414
+ this.turnOnSyncButton.label = ( localize('turnOnSyncButton', "Turn on Settings Sync"));
1415
+ dom.hide(this.turnOnSyncButton.element);
1416
+ this._register(this.turnOnSyncButton.onDidClick(async () => {
1417
+ await this.commandService.executeCommand('workbench.userDataSync.actions.turnOn');
1418
+ }));
1419
+ this.updateLastSyncedTime();
1420
+ this._register(this.userDataSyncService.onDidChangeLastSyncTime(() => {
1421
+ this.updateLastSyncedTime();
1422
+ }));
1423
+ const updateLastSyncedTimer = this._register(( new IntervalTimer()));
1424
+ updateLastSyncedTimer.cancelAndSet(() => this.updateLastSyncedTime(), 60 * 1000);
1425
+ this.update();
1426
+ this._register(this.userDataSyncService.onDidChangeStatus(() => {
1427
+ this.update();
1428
+ }));
1429
+ this._register(this.userDataSyncEnablementService.onDidChangeEnablement(() => {
1430
+ this.update();
1431
+ }));
1432
+ }
1433
+ updateLastSyncedTime() {
1434
+ const last = this.userDataSyncService.lastSyncTime;
1435
+ let label;
1436
+ if (typeof last === 'number') {
1437
+ const d = fromNow(last, true, undefined, true);
1438
+ label = ( localize('lastSyncedLabel', "Last synced: {0}", d));
1439
+ }
1440
+ else {
1441
+ label = '';
1442
+ }
1443
+ this.lastSyncedLabel.textContent = label;
1444
+ this._onDidChangeLastSyncedLabel.fire(label);
1445
+ }
1446
+ update() {
1447
+ if (this.userDataSyncService.status === "uninitialized" ) {
1448
+ return;
1449
+ }
1450
+ if (this.userDataSyncEnablementService.isEnabled() || this.userDataSyncService.status !== "idle" ) {
1451
+ dom.show(this.lastSyncedLabel);
1452
+ dom.hide(this.turnOnSyncButton.element);
1453
+ }
1454
+ else {
1455
+ dom.hide(this.lastSyncedLabel);
1456
+ dom.show(this.turnOnSyncButton.element);
1457
+ }
1458
+ }
1459
+ };
1460
+ SyncControls = ( __decorate([
1461
+ ( __param(1, ICommandService)),
1462
+ ( __param(2, IUserDataSyncService)),
1463
+ ( __param(3, IUserDataSyncEnablementService))
1464
+ ], SyncControls));
1465
+ export { SettingsEditor2, createGroupIterator };