@codingame/monaco-vscode-api 10.1.0 → 10.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/README.md +27 -0
  2. package/package.json +8 -15
  3. package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +1 -1
  4. package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -1
  5. package/vscode/src/vs/base/browser/ui/splitview/paneview.js +1 -1
  6. package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +1 -1
  7. package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +9 -9
  8. package/vscode/src/vs/base/common/date.js +61 -61
  9. package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +1 -1
  10. package/vscode/src/vs/editor/browser/controller/editContext/screenReaderUtils.js +4 -4
  11. package/vscode/src/vs/editor/browser/gpu/viewGpuContext.js +1 -1
  12. package/vscode/src/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
  13. package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.js +1 -1
  14. package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +2 -2
  15. package/vscode/src/vs/editor/browser/widget/diffEditor/commands.js +12 -12
  16. package/vscode/src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +14 -14
  17. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
  18. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +5 -5
  19. package/vscode/src/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +7 -7
  20. package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +4 -4
  21. package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
  22. package/vscode/src/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
  23. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
  24. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +2 -2
  25. package/vscode/src/vs/editor/common/config/editorConfigurationSchema.js +51 -51
  26. package/vscode/src/vs/editor/common/core/editorColorRegistry.js +71 -71
  27. package/vscode/src/vs/editor/common/model/editStack.js +1 -1
  28. package/vscode/src/vs/editor/common/standaloneStrings.js +32 -32
  29. package/vscode/src/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  30. package/vscode/src/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  31. package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  32. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionCommands.js +28 -28
  33. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  34. package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  35. package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
  36. package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  37. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +7 -7
  38. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  39. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  40. package/vscode/src/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  41. package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +27 -27
  42. package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  43. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  44. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  45. package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +2 -2
  46. package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +23 -23
  47. package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
  48. package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  49. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  50. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +14 -14
  51. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +1 -1
  52. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  53. package/vscode/src/vs/editor/contrib/message/browser/messageController.js +1 -1
  54. package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  55. package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +17 -17
  56. package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +5 -5
  57. package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  58. package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +6 -6
  59. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  60. package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  61. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +16 -16
  62. package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  63. package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  64. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  65. package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +49 -49
  66. package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  67. package/vscode/src/vs/platform/actions/browser/toolbar.js +2 -2
  68. package/vscode/src/vs/platform/actions/common/menuResetAction.js +1 -1
  69. package/vscode/src/vs/platform/actions/common/menuService.js +2 -2
  70. package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  71. package/vscode/src/vs/platform/contextkey/common/contextkey.js +11 -11
  72. package/vscode/src/vs/platform/contextkey/common/contextkeys.js +9 -9
  73. package/vscode/src/vs/platform/dialogs/common/dialogs.js +9 -9
  74. package/vscode/src/vs/platform/dnd/browser/dnd.js +1 -1
  75. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -2
  76. package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  77. package/vscode/src/vs/platform/list/browser/listService.js +27 -27
  78. package/vscode/src/vs/platform/markers/common/markers.js +3 -3
  79. package/vscode/src/vs/platform/quickinput/browser/quickInput.js +8 -8
  80. package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +6 -6
  81. package/vscode/src/vs/platform/request/common/request.js +14 -14
  82. package/vscode/src/vs/platform/theme/common/colors/baseColors.js +17 -17
  83. package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +8 -8
  84. package/vscode/src/vs/platform/theme/common/iconRegistry.js +5 -5
  85. package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +42 -42
  86. package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  87. package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +5 -5
  88. package/vscode/src/vs/platform/workspace/common/workspace.js +1 -1
  89. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +129 -129
  90. package/vscode/src/vs/workbench/browser/actions/windowActions.js +25 -25
  91. package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +21 -21
  92. package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +4 -4
  93. package/vscode/src/vs/workbench/browser/editor.js +2 -2
  94. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +41 -41
  95. package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +16 -16
  96. package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +2 -2
  97. package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +15 -15
  98. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsActions.js +17 -17
  99. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsAlerts.js +3 -3
  100. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.js +6 -6
  101. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +9 -9
  102. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsList.js +6 -6
  103. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsStatus.js +13 -13
  104. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +2 -2
  105. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +18 -18
  106. package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +2 -2
  107. package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +1 -1
  108. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +4 -4
  109. package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +6 -6
  110. package/vscode/src/vs/workbench/browser/quickaccess.js +1 -1
  111. package/vscode/src/vs/workbench/browser/workbench.contribution.js +217 -217
  112. package/vscode/src/vs/workbench/common/contextkeys.js +70 -70
  113. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +1 -1
  114. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +1 -1
  115. package/vscode/src/vs/workbench/common/views.js +4 -4
  116. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +131 -131
  117. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +17 -18
  118. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.js +5 -0
  119. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +7 -6
  120. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +8 -7
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +1 -1
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.js +9 -9
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +2 -2
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.js +8 -8
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.js +1 -1
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.js +1 -1
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.js +2 -2
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js +8 -8
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.js +2 -2
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolInvocationPart.js +1 -1
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.js +1 -1
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatDragAndDrop.js +3 -3
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditingService.js +13 -12
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +2 -2
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +1 -1
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatImagePaste.js +1 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.js +5 -5
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +12 -12
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +12 -12
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +3 -4
  141. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +15 -15
  142. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +4 -3
  143. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariablesConstant.js +2 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.js +1 -1
  145. package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +6 -6
  146. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +21 -21
  147. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +3 -3
  148. package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
  149. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +10 -10
  150. package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +2 -2
  151. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +6 -6
  152. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
  153. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
  154. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +4 -4
  155. package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
  156. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +5 -5
  157. package/vscode/src/vs/workbench/contrib/comments/browser/commentsModel.js +1 -1
  158. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +9 -9
  159. package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +13 -13
  160. package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +10 -10
  161. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +29 -29
  162. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +65 -65
  163. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +2 -2
  164. package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +12 -12
  165. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +34 -34
  166. package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +57 -57
  167. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +3 -3
  168. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +6 -6
  169. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +1 -1
  170. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +2 -2
  171. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +1 -1
  172. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +173 -173
  173. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +24 -24
  174. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.js +5 -5
  175. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +2 -2
  176. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +3 -3
  177. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +18 -18
  178. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +14 -14
  179. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +84 -84
  180. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
  181. package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +33 -33
  182. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +2 -2
  183. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +1 -1
  184. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +8 -8
  185. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +7 -7
  186. package/vscode/src/vs/workbench/contrib/files/common/files.js +14 -14
  187. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +19 -19
  188. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +6 -6
  189. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
  190. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +41 -41
  191. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +1 -1
  192. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +29 -29
  193. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +8 -8
  194. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +2 -2
  195. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +1 -1
  196. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +6 -6
  197. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +3 -3
  198. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
  199. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +3 -3
  200. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +5 -5
  201. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +2 -2
  202. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +4 -4
  203. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +3 -3
  204. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
  205. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
  206. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
  207. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +3 -3
  208. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +4 -4
  209. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +8 -8
  210. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +24 -24
  211. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +28 -28
  212. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +4 -4
  213. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +2 -2
  214. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +1 -1
  215. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +3 -3
  216. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +2 -2
  217. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +2 -2
  218. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +4 -4
  219. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +1 -1
  220. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +15 -15
  221. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +2 -2
  222. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +2 -2
  223. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesIcons.js +12 -12
  224. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +10 -10
  225. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.js +50 -50
  226. package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +2 -2
  227. package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +23 -23
  228. package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +5 -1
  229. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +10 -10
  230. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +2 -2
  231. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
  232. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
  233. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
  234. package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
  235. package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
  236. package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +5 -5
  237. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +4 -4
  238. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +7 -7
  239. package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +16 -16
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatControllerHolder.js +5 -0
  241. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
  242. package/vscode/src/vs/workbench/contrib/url/browser/trustedDomains.js +6 -6
  243. package/vscode/src/vs/workbench/contrib/webview/browser/webview.contribution.js +3 -3
  244. package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +2 -2
  245. package/vscode/src/vs/workbench/services/activity/common/activity.js +4 -4
  246. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +3 -3
  247. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +5 -5
  248. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
  249. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.js +1 -1
  250. package/vscode/src/vs/workbench/services/language/common/languageService.js +28 -28
  251. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +2 -2
  252. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +7 -7
  253. package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +2 -2
  254. package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +9 -9
  255. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +3 -3
  256. package/vscode/src/vs/workbench/services/themes/common/colorThemeData.js +8 -8
  257. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +3 -3
  258. package/vscode/src/vs/workbench/services/views/browser/viewsService.js +7 -7
  259. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +17 -17
  260. package/vscode/src/vs/base/common/processes.js +0 -25
  261. package/vscode/src/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +0 -41
  262. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel.js +0 -345
  263. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/terminalCommand.js +0 -296
  264. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +0 -761
  265. package/vscode/src/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +0 -29
  266. package/vscode/src/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +0 -22
  267. package/vscode/src/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +0 -48
  268. package/vscode/src/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +0 -94
  269. package/vscode/src/vs/platform/terminal/common/environmentVariable.js +0 -7
  270. package/vscode/src/vs/platform/terminal/common/environmentVariableCollection.js +0 -196
  271. package/vscode/src/vs/platform/terminal/common/terminalEnvironment.js +0 -40
  272. package/vscode/src/vs/platform/terminal/common/terminalProfiles.js +0 -107
  273. package/vscode/src/vs/platform/terminal/common/terminalRecorder.js +0 -67
  274. package/vscode/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +0 -346
  275. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +0 -167
  276. package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +0 -119
  277. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +0 -1770
  278. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +0 -40
  279. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalExtensions.js +0 -25
  280. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIconPicker.js +0 -72
  281. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +0 -16
  282. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +0 -2218
  283. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +0 -628
  284. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalQuickAccess.js +0 -143
  285. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.js +0 -61
  286. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick.js +0 -315
  287. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalStatusList.js +0 -121
  288. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalUri.js +0 -39
  289. package/vscode/src/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +0 -36
  290. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +0 -498
  291. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +0 -123
  292. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +0 -55
  293. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +0 -571
  294. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +0 -732
  295. package/vscode/src/vs/workbench/contrib/terminal/common/history.js +0 -378
  296. package/vscode/src/vs/workbench/contrib/terminal/common/terminalClipboard.js +0 -80
  297. package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.js +0 -282
  298. package/vscode/src/vs/workbench/contrib/terminal/common/terminalStrings.js +0 -36
  299. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css.js +0 -4
  300. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +0 -46
  301. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +0 -303
  302. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +0 -203
  303. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/media/stickyScroll.css.js +0 -4
  304. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.js +0 -22
  305. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollContribution.js +0 -97
  306. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.js +0 -372
@@ -17,11 +17,11 @@ const PROFILE_URL_AUTHORITY_PREFIX = 'profile-';
17
17
  function isProfileURL(uri) {
18
18
  return uri.authority === PROFILE_URL_AUTHORITY || ( (new RegExp(`^${PROFILE_URL_AUTHORITY_PREFIX}`))).test(uri.authority);
19
19
  }
20
- const defaultUserDataProfileIcon = registerIcon('defaultProfile-icon', Codicon.settings, ( localize(2113, 'Icon for Default Profile.')));
21
- const PROFILES_TITLE = ( localize2(2114, 'Profiles'));
20
+ const defaultUserDataProfileIcon = registerIcon('defaultProfile-icon', Codicon.settings, ( localize(2703, 'Icon for Default Profile.')));
21
+ const PROFILES_TITLE = ( localize2(2704, 'Profiles'));
22
22
  const PROFILES_CATEGORY = { ...PROFILES_TITLE };
23
23
  const PROFILE_EXTENSION = 'code-profile';
24
- const PROFILE_FILTER = [{ name: ( localize(2115, "Profile")), extensions: [PROFILE_EXTENSION] }];
24
+ const PROFILE_FILTER = [{ name: ( localize(2705, "Profile")), extensions: [PROFILE_EXTENSION] }];
25
25
  const PROFILES_ENABLEMENT_CONTEXT = ( (new RawContextKey('profiles.enabled', true)));
26
26
  const CURRENT_PROFILE_CONTEXT = ( (new RawContextKey('currentProfile', '')));
27
27
  const IS_CURRENT_PROFILE_TRANSIENT_CONTEXT = ( (new RawContextKey('isCurrentProfileTransient', false)));
@@ -224,7 +224,7 @@ let ViewsService = class ViewsService extends Disposable {
224
224
  }
225
225
  getFocusedViewName() {
226
226
  const viewId = this.contextKeyService.getContextKeyValue(FocusedViewContext.key) ?? '';
227
- const textEditorFocused = this.editorService.activeTextEditorControl?.hasTextFocus() ? ( localize(4222, "Text Editor")) : undefined;
227
+ const textEditorFocused = this.editorService.activeTextEditorControl?.hasTextFocus() ? ( localize(4223, "Text Editor")) : undefined;
228
228
  return this.viewDescriptorService.getViewDescriptorById(( (viewId.toString())))?.name?.value ?? textEditorFocused ?? '';
229
229
  }
230
230
  async openView(id, focus) {
@@ -325,10 +325,10 @@ let ViewsService = class ViewsService extends Disposable {
325
325
  const localizedTitle = typeof title === 'string' ? title : title.value;
326
326
  const originalTitle = typeof title === 'string' ? title : title.original;
327
327
  if (viewContainerLocation === 0 ) {
328
- return { value: ( localize(4223, "Show {0}", localizedTitle)), original: `Show ${originalTitle}` };
328
+ return { value: ( localize(4224, "Show {0}", localizedTitle)), original: `Show ${originalTitle}` };
329
329
  }
330
330
  else {
331
- return { value: ( localize(4224, "Toggle {0}", localizedTitle)), original: `Toggle ${originalTitle}` };
331
+ return { value: ( localize(4225, "Toggle {0}", localizedTitle)), original: `Toggle ${originalTitle}` };
332
332
  }
333
333
  },
334
334
  category: Categories.View,
@@ -396,10 +396,10 @@ let ViewsService = class ViewsService extends Disposable {
396
396
  const localizedTitle = typeof title === 'string' ? title : title.value;
397
397
  const originalTitle = typeof title === 'string' ? title : title.original;
398
398
  if (viewContainerLocation === 0 ) {
399
- return { value: ( localize(4223, "Show {0}", localizedTitle)), original: `Show ${originalTitle}` };
399
+ return { value: ( localize(4224, "Show {0}", localizedTitle)), original: `Show ${originalTitle}` };
400
400
  }
401
401
  else {
402
- return { value: ( localize(4224, "Toggle {0}", localizedTitle)), original: `Toggle ${originalTitle}` };
402
+ return { value: ( localize(4225, "Toggle {0}", localizedTitle)), original: `Toggle ${originalTitle}` };
403
403
  }
404
404
  },
405
405
  category: Categories.View,
@@ -450,7 +450,7 @@ let ViewsService = class ViewsService extends Disposable {
450
450
  registerFocusViewAction(viewDescriptor, category) {
451
451
  return registerAction2(class FocusViewAction extends Action2 {
452
452
  constructor() {
453
- const title = ( localize2(4225, "Focus on {0} View", viewDescriptor.name.value));
453
+ const title = ( localize2(4226, "Focus on {0} View", viewDescriptor.name.value));
454
454
  super({
455
455
  id: viewDescriptor.focusCommand ? viewDescriptor.focusCommand.id : `${viewDescriptor.id}.focus`,
456
456
  title,
@@ -498,7 +498,7 @@ let ViewsService = class ViewsService extends Disposable {
498
498
  constructor() {
499
499
  super({
500
500
  id: `${viewDescriptor.id}.resetViewLocation`,
501
- title: ( localize2(4226, "Reset Location")),
501
+ title: ( localize2(4227, "Reset Location")),
502
502
  menu: [{
503
503
  id: MenuId.ViewTitleContext,
504
504
  when: ( (ContextKeyExpr.or( (ContextKeyExpr.and(
@@ -390,7 +390,7 @@ let StoredFileWorkingCopy = class StoredFileWorkingCopy extends ResourceWorkingC
390
390
  }
391
391
  const saveCancellation = ( (new CancellationTokenSource()));
392
392
  return this.progressService.withProgress({
393
- title: ( localize(11589, "Saving '{0}'", this.name)),
393
+ title: ( localize(11599, "Saving '{0}'", this.name)),
394
394
  location: 10 ,
395
395
  cancellable: true,
396
396
  delay: this.isDirty() ? 3000 : 5000
@@ -437,7 +437,7 @@ let StoredFileWorkingCopy = class StoredFileWorkingCopy extends ResourceWorkingC
437
437
  }
438
438
  versionId = this.versionId;
439
439
  this.inErrorMode = false;
440
- progress.report({ message: ( localize(11590, "Writing into file...")) });
440
+ progress.report({ message: ( localize(11600, "Writing into file...")) });
441
441
  this.trace(`doSave(${versionId}) - before write()`);
442
442
  const lastResolvedFileStat = assertIsDefined(this.lastResolvedFileStat);
443
443
  const resolvedFileWorkingCopy = this;
@@ -514,12 +514,12 @@ let StoredFileWorkingCopy = class StoredFileWorkingCopy extends ResourceWorkingC
514
514
  let message;
515
515
  if (fileOperationError.fileOperationResult === 3 ) {
516
516
  message = ( localize(
517
- 11591,
517
+ 11601,
518
518
  "Failed to save '{0}': The content of the file is newer. Do you want to overwrite the file with your changes?",
519
519
  this.name
520
520
  ));
521
- primaryActions.push(toAction({ id: 'fileWorkingCopy.overwrite', label: ( localize(11592, "Overwrite")), run: () => this.save({ ...options, ignoreModifiedSince: true, reason: 1 }) }));
522
- primaryActions.push(toAction({ id: 'fileWorkingCopy.revert', label: ( localize(11593, "Revert")), run: () => this.revert() }));
521
+ primaryActions.push(toAction({ id: 'fileWorkingCopy.overwrite', label: ( localize(11602, "Overwrite")), run: () => this.save({ ...options, ignoreModifiedSince: true, reason: 1 }) }));
522
+ primaryActions.push(toAction({ id: 'fileWorkingCopy.revert', label: ( localize(11603, "Revert")), run: () => this.revert() }));
523
523
  }
524
524
  else {
525
525
  const isWriteLocked = fileOperationError.fileOperationResult === 5 ;
@@ -533,22 +533,22 @@ let StoredFileWorkingCopy = class StoredFileWorkingCopy extends ResourceWorkingC
533
533
  primaryActions.push(toAction({
534
534
  id: 'fileWorkingCopy.saveElevated',
535
535
  label: triedToUnlock ?
536
- isWindows ? ( localize(11594, "Overwrite as Admin...")) : ( localize(11595, "Overwrite as Sudo...")) :
537
- isWindows ? ( localize(11596, "Retry as Admin...")) : ( localize(11597, "Retry as Sudo...")),
536
+ isWindows ? ( localize(11604, "Overwrite as Admin...")) : ( localize(11605, "Overwrite as Sudo...")) :
537
+ isWindows ? ( localize(11606, "Retry as Admin...")) : ( localize(11607, "Retry as Sudo...")),
538
538
  run: () => {
539
539
  this.save({ ...options, writeElevated: true, writeUnlock: triedToUnlock, reason: 1 });
540
540
  }
541
541
  }));
542
542
  }
543
543
  else if (isWriteLocked) {
544
- primaryActions.push(toAction({ id: 'fileWorkingCopy.unlock', label: ( localize(11592, "Overwrite")), run: () => this.save({ ...options, writeUnlock: true, reason: 1 }) }));
544
+ primaryActions.push(toAction({ id: 'fileWorkingCopy.unlock', label: ( localize(11602, "Overwrite")), run: () => this.save({ ...options, writeUnlock: true, reason: 1 }) }));
545
545
  }
546
546
  else {
547
- primaryActions.push(toAction({ id: 'fileWorkingCopy.retry', label: ( localize(11598, "Retry")), run: () => this.save({ ...options, reason: 1 }) }));
547
+ primaryActions.push(toAction({ id: 'fileWorkingCopy.retry', label: ( localize(11608, "Retry")), run: () => this.save({ ...options, reason: 1 }) }));
548
548
  }
549
549
  primaryActions.push(toAction({
550
550
  id: 'fileWorkingCopy.saveAs',
551
- label: ( localize(11599, "Save As...")),
551
+ label: ( localize(11609, "Save As...")),
552
552
  run: async () => {
553
553
  const editor = this.workingCopyEditorService.findEditor(this);
554
554
  if (editor) {
@@ -559,24 +559,24 @@ let StoredFileWorkingCopy = class StoredFileWorkingCopy extends ResourceWorkingC
559
559
  }
560
560
  }
561
561
  }));
562
- primaryActions.push(toAction({ id: 'fileWorkingCopy.revert', label: ( localize(11593, "Revert")), run: () => this.revert() }));
562
+ primaryActions.push(toAction({ id: 'fileWorkingCopy.revert', label: ( localize(11603, "Revert")), run: () => this.revert() }));
563
563
  if (isWriteLocked) {
564
564
  if (triedToUnlock && canSaveElevated) {
565
565
  message = isWindows ?
566
566
  ( localize(
567
- 11600,
567
+ 11610,
568
568
  "Failed to save '{0}': File is read-only. Select 'Overwrite as Admin' to retry as administrator.",
569
569
  this.name
570
570
  )) :
571
571
  ( localize(
572
- 11601,
572
+ 11611,
573
573
  "Failed to save '{0}': File is read-only. Select 'Overwrite as Sudo' to retry as superuser.",
574
574
  this.name
575
575
  ));
576
576
  }
577
577
  else {
578
578
  message = ( localize(
579
- 11602,
579
+ 11612,
580
580
  "Failed to save '{0}': File is read-only. Select 'Overwrite' to attempt to make it writeable.",
581
581
  this.name
582
582
  ));
@@ -585,19 +585,19 @@ let StoredFileWorkingCopy = class StoredFileWorkingCopy extends ResourceWorkingC
585
585
  else if (canSaveElevated && isPermissionDenied) {
586
586
  message = isWindows ?
587
587
  ( localize(
588
- 11603,
588
+ 11613,
589
589
  "Failed to save '{0}': Insufficient permissions. Select 'Retry as Admin' to retry as administrator.",
590
590
  this.name
591
591
  )) :
592
592
  ( localize(
593
- 11604,
593
+ 11614,
594
594
  "Failed to save '{0}': Insufficient permissions. Select 'Retry as Sudo' to retry as superuser.",
595
595
  this.name
596
596
  ));
597
597
  }
598
598
  else {
599
599
  message = ( localize(
600
- 11605,
600
+ 11615,
601
601
  "Failed to save '{0}': {1}",
602
602
  this.name,
603
603
  toErrorMessage(error, false)
@@ -1,25 +0,0 @@
1
- import './platform.js';
2
- function sanitizeProcessEnvironment(env, ...preserve) {
3
- const set = preserve.reduce((set, key) => {
4
- set[key] = true;
5
- return set;
6
- }, {});
7
- const keysToRemove = [
8
- /^ELECTRON_.+$/,
9
- /^VSCODE_(?!(PORTABLE|SHELL_LOGIN|ENV_REPLACE|ENV_APPEND|ENV_PREPEND)).+$/,
10
- /^SNAP(|_.*)$/,
11
- /^GDK_PIXBUF_.+$/,
12
- ];
13
- const envKeys = ( Object.keys(env));
14
- envKeys
15
- .filter(key => !set[key])
16
- .forEach(envKey => {
17
- for (let i = 0; i < keysToRemove.length; i++) {
18
- if (envKey.search(keysToRemove[i]) !== -1) {
19
- delete env[envKey];
20
- break;
21
- }
22
- }
23
- });
24
- }
25
- export { sanitizeProcessEnvironment };
@@ -1,41 +0,0 @@
1
- import { Emitter } from '../../../../base/common/event.js';
2
- import { Disposable } from '../../../../base/common/lifecycle.js';
3
- class BufferMarkCapability extends Disposable {
4
- constructor(_terminal) {
5
- super();
6
- this._terminal = _terminal;
7
- this.type = 4 ;
8
- this._idToMarkerMap = ( new Map());
9
- this._anonymousMarkers = ( new Map());
10
- this._onMarkAdded = this._register(( new Emitter()));
11
- this.onMarkAdded = this._onMarkAdded.event;
12
- }
13
- *markers() {
14
- for (const m of ( this._idToMarkerMap.values())) {
15
- yield m;
16
- }
17
- for (const m of ( this._anonymousMarkers.values())) {
18
- yield m;
19
- }
20
- }
21
- addMark(properties) {
22
- const marker = properties?.marker || this._terminal.registerMarker();
23
- const id = properties?.id;
24
- if (!marker) {
25
- return;
26
- }
27
- if (id) {
28
- this._idToMarkerMap.set(id, marker);
29
- marker.onDispose(() => this._idToMarkerMap.delete(id));
30
- }
31
- else {
32
- this._anonymousMarkers.set(marker.id, marker);
33
- marker.onDispose(() => this._anonymousMarkers.delete(marker.id));
34
- }
35
- this._onMarkAdded.fire({ marker, id, hidden: properties?.hidden, hoverMessage: properties?.hoverMessage });
36
- }
37
- getMark(id) {
38
- return this._idToMarkerMap.get(id);
39
- }
40
- }
41
- export { BufferMarkCapability };
@@ -1,345 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
2
- import { Emitter, Event } from '../../../../../base/common/event.js';
3
- import { Disposable } from '../../../../../base/common/lifecycle.js';
4
- import { LogLevel } from '../../../../log/common/log.js';
5
- import { ILogService } from '../../../../log/common/log.service.js';
6
- import { throttle } from '../../../../../base/common/decorators.js';
7
- let PromptInputModel = class PromptInputModel extends Disposable {
8
- get value() { return this._value; }
9
- get prefix() { return this._value.substring(0, this._cursorIndex); }
10
- get suffix() { return this._value.substring(this._cursorIndex, this._ghostTextIndex === -1 ? undefined : this._ghostTextIndex); }
11
- get cursorIndex() { return this._cursorIndex; }
12
- get ghostTextIndex() { return this._ghostTextIndex; }
13
- constructor(_xterm, onCommandStart, onCommandExecuted, _logService) {
14
- super();
15
- this._xterm = _xterm;
16
- this._logService = _logService;
17
- this._state = 0 ;
18
- this._commandStartX = 0;
19
- this._lastUserInput = '';
20
- this._value = '';
21
- this._cursorIndex = 0;
22
- this._ghostTextIndex = -1;
23
- this._onDidStartInput = this._register(( new Emitter()));
24
- this.onDidStartInput = this._onDidStartInput.event;
25
- this._onDidChangeInput = this._register(( new Emitter()));
26
- this.onDidChangeInput = this._onDidChangeInput.event;
27
- this._onDidFinishInput = this._register(( new Emitter()));
28
- this.onDidFinishInput = this._onDidFinishInput.event;
29
- this._onDidInterrupt = this._register(( new Emitter()));
30
- this.onDidInterrupt = this._onDidInterrupt.event;
31
- this._register(Event.any(this._xterm.onCursorMove, this._xterm.onData, this._xterm.onWriteParsed)(() => this._sync()));
32
- this._register(this._xterm.onData(e => this._handleUserInput(e)));
33
- this._register(onCommandStart(e => this._handleCommandStart(e)));
34
- this._register(onCommandExecuted(() => this._handleCommandExecuted()));
35
- this._register(this.onDidStartInput(() => this._logCombinedStringIfTrace('PromptInputModel#onDidStartInput')));
36
- this._register(this.onDidChangeInput(() => this._logCombinedStringIfTrace('PromptInputModel#onDidChangeInput')));
37
- this._register(this.onDidFinishInput(() => this._logCombinedStringIfTrace('PromptInputModel#onDidFinishInput')));
38
- this._register(this.onDidInterrupt(() => this._logCombinedStringIfTrace('PromptInputModel#onDidInterrupt')));
39
- }
40
- _logCombinedStringIfTrace(message) {
41
- if (this._logService.getLevel() === LogLevel.Trace) {
42
- this._logService.trace(message, this.getCombinedString());
43
- }
44
- }
45
- setContinuationPrompt(value) {
46
- this._continuationPrompt = value;
47
- this._sync();
48
- }
49
- setLastPromptLine(value) {
50
- this._lastPromptLine = value;
51
- this._sync();
52
- }
53
- setConfidentCommandLine(value) {
54
- if (this._value !== value) {
55
- this._value = value;
56
- this._cursorIndex = -1;
57
- this._ghostTextIndex = -1;
58
- this._onDidChangeInput.fire(this._createStateObject());
59
- }
60
- }
61
- getCombinedString() {
62
- const value = this._value.replaceAll('\n', '\u23CE');
63
- if (this._cursorIndex === -1) {
64
- return value;
65
- }
66
- let result = `${value.substring(0, this.cursorIndex)}|`;
67
- if (this.ghostTextIndex !== -1) {
68
- result += `${value.substring(this.cursorIndex, this.ghostTextIndex)}[`;
69
- result += `${value.substring(this.ghostTextIndex)}]`;
70
- }
71
- else {
72
- result += value.substring(this.cursorIndex);
73
- }
74
- return result;
75
- }
76
- serialize() {
77
- return {
78
- modelState: this._createStateObject(),
79
- commandStartX: this._commandStartX,
80
- lastPromptLine: this._lastPromptLine,
81
- continuationPrompt: this._continuationPrompt,
82
- lastUserInput: this._lastUserInput
83
- };
84
- }
85
- deserialize(serialized) {
86
- this._value = serialized.modelState.value;
87
- this._cursorIndex = serialized.modelState.cursorIndex;
88
- this._ghostTextIndex = serialized.modelState.ghostTextIndex;
89
- this._commandStartX = serialized.commandStartX;
90
- this._lastPromptLine = serialized.lastPromptLine;
91
- this._continuationPrompt = serialized.continuationPrompt;
92
- this._lastUserInput = serialized.lastUserInput;
93
- }
94
- _handleCommandStart(command) {
95
- if (this._state === 1 ) {
96
- return;
97
- }
98
- this._state = 1 ;
99
- this._commandStartMarker = command.marker;
100
- this._commandStartX = this._xterm.buffer.active.cursorX;
101
- this._value = '';
102
- this._cursorIndex = 0;
103
- this._onDidStartInput.fire(this._createStateObject());
104
- this._onDidChangeInput.fire(this._createStateObject());
105
- if (this._lastPromptLine) {
106
- if (this._commandStartX !== this._lastPromptLine.length) {
107
- const line = this._xterm.buffer.active.getLine(this._commandStartMarker.line);
108
- if (line?.translateToString(true).startsWith(this._lastPromptLine)) {
109
- this._commandStartX = this._lastPromptLine.length;
110
- this._sync();
111
- }
112
- }
113
- }
114
- }
115
- _handleCommandExecuted() {
116
- if (this._state === 2 ) {
117
- return;
118
- }
119
- this._cursorIndex = -1;
120
- if (this._ghostTextIndex !== -1) {
121
- this._value = this._value.substring(0, this._ghostTextIndex);
122
- this._ghostTextIndex = -1;
123
- }
124
- const event = this._createStateObject();
125
- if (this._lastUserInput === '\u0003') {
126
- this._lastUserInput = '';
127
- this._onDidInterrupt.fire(event);
128
- }
129
- this._state = 2 ;
130
- this._onDidFinishInput.fire(event);
131
- this._onDidChangeInput.fire(event);
132
- }
133
- _sync() {
134
- try {
135
- this._doSync();
136
- }
137
- catch (e) {
138
- this._logService.error('Error while syncing prompt input model', e);
139
- }
140
- }
141
- _doSync() {
142
- if (this._state !== 1 ) {
143
- return;
144
- }
145
- const commandStartY = this._commandStartMarker?.line;
146
- if (commandStartY === undefined) {
147
- return;
148
- }
149
- const buffer = this._xterm.buffer.active;
150
- let line = buffer.getLine(commandStartY);
151
- const commandLine = line?.translateToString(true, this._commandStartX);
152
- if (!line || commandLine === undefined) {
153
- this._logService.trace(`PromptInputModel#_sync: no line`);
154
- return;
155
- }
156
- const absoluteCursorY = buffer.baseY + buffer.cursorY;
157
- let value = commandLine;
158
- let ghostTextIndex = -1;
159
- let cursorIndex;
160
- if (absoluteCursorY === commandStartY) {
161
- cursorIndex = this._getRelativeCursorIndex(this._commandStartX, buffer, line);
162
- }
163
- else {
164
- cursorIndex = commandLine.trimEnd().length;
165
- }
166
- if (absoluteCursorY === commandStartY && buffer.cursorX > 1) {
167
- ghostTextIndex = this._scanForGhostText(buffer, line, cursorIndex);
168
- }
169
- for (let y = commandStartY + 1; y <= absoluteCursorY; y++) {
170
- line = buffer.getLine(y);
171
- const lineText = line?.translateToString(true);
172
- if (lineText && line) {
173
- if (line.isWrapped) {
174
- value += lineText;
175
- const relativeCursorIndex = this._getRelativeCursorIndex(0, buffer, line);
176
- if (absoluteCursorY === y) {
177
- cursorIndex += relativeCursorIndex;
178
- }
179
- else {
180
- cursorIndex += lineText.length;
181
- }
182
- }
183
- else if (this._continuationPrompt === undefined || this._lineContainsContinuationPrompt(lineText)) {
184
- const trimmedLineText = this._trimContinuationPrompt(lineText);
185
- value += `\n${trimmedLineText}`;
186
- if (absoluteCursorY === y) {
187
- const continuationCellWidth = this._getContinuationPromptCellWidth(line, lineText);
188
- const relativeCursorIndex = this._getRelativeCursorIndex(continuationCellWidth, buffer, line);
189
- cursorIndex += relativeCursorIndex + 1;
190
- }
191
- else {
192
- cursorIndex += trimmedLineText.length + 1;
193
- }
194
- }
195
- else {
196
- break;
197
- }
198
- }
199
- }
200
- for (let y = absoluteCursorY + 1; y < buffer.baseY + this._xterm.rows; y++) {
201
- line = buffer.getLine(y);
202
- const lineText = line?.translateToString(true);
203
- if (lineText && line) {
204
- if (this._continuationPrompt === undefined || this._lineContainsContinuationPrompt(lineText)) {
205
- value += `\n${this._trimContinuationPrompt(lineText)}`;
206
- }
207
- else {
208
- break;
209
- }
210
- }
211
- else {
212
- break;
213
- }
214
- }
215
- if (this._logService.getLevel() === LogLevel.Trace) {
216
- this._logService.trace(`PromptInputModel#_sync: ${this.getCombinedString()}`);
217
- }
218
- {
219
- let trailingWhitespace = this._value.length - this._value.trimEnd().length;
220
- if (this._lastUserInput === '\x7F') {
221
- this._lastUserInput = '';
222
- if (cursorIndex === this._cursorIndex - 1) {
223
- if (this._value.trimEnd().length > value.trimEnd().length && value.trimEnd().length <= cursorIndex) {
224
- trailingWhitespace = Math.max((this._value.length - 1) - value.trimEnd().length, 0);
225
- }
226
- else {
227
- trailingWhitespace = Math.max(trailingWhitespace - 1, 0);
228
- }
229
- }
230
- }
231
- if (this._lastUserInput === '\x1b[3~') {
232
- this._lastUserInput = '';
233
- if (cursorIndex === this._cursorIndex) {
234
- trailingWhitespace = Math.max(trailingWhitespace - 1, 0);
235
- }
236
- }
237
- const valueLines = value.split('\n');
238
- const isMultiLine = valueLines.length > 1;
239
- const valueEndTrimmed = value.trimEnd();
240
- if (!isMultiLine) {
241
- if (valueEndTrimmed.length < value.length) {
242
- if (this._lastUserInput === ' ') {
243
- this._lastUserInput = '';
244
- if (cursorIndex > valueEndTrimmed.length && cursorIndex > this._cursorIndex) {
245
- trailingWhitespace++;
246
- }
247
- }
248
- trailingWhitespace = Math.max(cursorIndex - valueEndTrimmed.length, trailingWhitespace, 0);
249
- }
250
- const charBeforeCursor = cursorIndex === 0 ? '' : value[cursorIndex - 1];
251
- if (trailingWhitespace > 0 && cursorIndex === this._cursorIndex + 1 && this._lastUserInput !== '' && charBeforeCursor !== ' ') {
252
- trailingWhitespace = this._value.length - this._cursorIndex;
253
- }
254
- }
255
- if (isMultiLine) {
256
- valueLines[valueLines.length - 1] = valueLines.at(-1)?.trimEnd() ?? '';
257
- const continuationOffset = (valueLines.length - 1) * (this._continuationPrompt?.length ?? 0);
258
- trailingWhitespace = Math.max(0, cursorIndex - value.length - continuationOffset);
259
- }
260
- value = ( valueLines.map(e => e.trimEnd())).join('\n') + ' '.repeat(trailingWhitespace);
261
- }
262
- if (this._value !== value || this._cursorIndex !== cursorIndex || this._ghostTextIndex !== ghostTextIndex) {
263
- this._value = value;
264
- this._cursorIndex = cursorIndex;
265
- this._ghostTextIndex = ghostTextIndex;
266
- this._onDidChangeInput.fire(this._createStateObject());
267
- }
268
- }
269
- _handleUserInput(e) {
270
- this._lastUserInput = e;
271
- }
272
- _scanForGhostText(buffer, line, cursorIndex) {
273
- let ghostTextIndex = -1;
274
- let proceedWithGhostTextCheck = false;
275
- let x = buffer.cursorX;
276
- while (x > 0) {
277
- const cell = line.getCell(--x);
278
- if (!cell) {
279
- break;
280
- }
281
- if (cell.getChars().trim().length > 0) {
282
- proceedWithGhostTextCheck = !this._isCellStyledLikeGhostText(cell);
283
- break;
284
- }
285
- }
286
- if (proceedWithGhostTextCheck) {
287
- let potentialGhostIndexOffset = 0;
288
- let x = buffer.cursorX;
289
- while (x < line.length) {
290
- const cell = line.getCell(x++);
291
- if (!cell || cell.getCode() === 0) {
292
- break;
293
- }
294
- if (this._isCellStyledLikeGhostText(cell)) {
295
- ghostTextIndex = cursorIndex + potentialGhostIndexOffset;
296
- break;
297
- }
298
- potentialGhostIndexOffset += cell.getChars().length;
299
- }
300
- }
301
- return ghostTextIndex;
302
- }
303
- _trimContinuationPrompt(lineText) {
304
- if (this._lineContainsContinuationPrompt(lineText)) {
305
- lineText = lineText.substring(this._continuationPrompt.length);
306
- }
307
- return lineText;
308
- }
309
- _lineContainsContinuationPrompt(lineText) {
310
- return !!(this._continuationPrompt && lineText.startsWith(this._continuationPrompt));
311
- }
312
- _getContinuationPromptCellWidth(line, lineText) {
313
- if (!this._continuationPrompt || !lineText.startsWith(this._continuationPrompt)) {
314
- return 0;
315
- }
316
- let buffer = '';
317
- let x = 0;
318
- while (buffer !== this._continuationPrompt) {
319
- buffer += line.getCell(x++).getChars();
320
- }
321
- return x;
322
- }
323
- _getRelativeCursorIndex(startCellX, buffer, line) {
324
- return line?.translateToString(true, startCellX, buffer.cursorX).length ?? 0;
325
- }
326
- _isCellStyledLikeGhostText(cell) {
327
- return !!(cell.isItalic() || cell.isDim());
328
- }
329
- _createStateObject() {
330
- return ( Object.freeze({
331
- value: this._value,
332
- prefix: this.prefix,
333
- suffix: this.suffix,
334
- cursorIndex: this._cursorIndex,
335
- ghostTextIndex: this._ghostTextIndex
336
- }));
337
- }
338
- };
339
- PromptInputModel.__decorator = ( __decorate([
340
- throttle(0)
341
- ], PromptInputModel.prototype, "_sync", null));
342
- PromptInputModel = ( __decorate([
343
- ( __param(3, ILogService))
344
- ], PromptInputModel));
345
- export { PromptInputModel };