@codingame/monaco-vscode-api 3.2.2 → 4.0.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 (773) hide show
  1. package/README.md +22 -17
  2. package/api.js +4 -7
  3. package/debugProtocol.d.ts +14 -39
  4. package/extensions.d.ts +7 -1
  5. package/missing-services.js +122 -38
  6. package/monaco.d.ts +1 -1
  7. package/monaco.js +11 -1
  8. package/override/vs/platform/dialogs/common/dialogs.js +1 -0
  9. package/package.json +8 -8
  10. package/service-override/tools/editor.js +82 -3
  11. package/service-override/tools/views.d.ts +2 -1
  12. package/service-override/tools/views.js +5 -1
  13. package/services.js +7 -6
  14. package/vscode/src/vs/base/browser/dom.js +1 -7
  15. package/vscode/src/vs/base/browser/fonts.js +3 -0
  16. package/vscode/src/vs/base/browser/keyboardEvent.js +1 -1
  17. package/vscode/src/vs/base/browser/markdownRenderer.js +4 -4
  18. package/vscode/src/vs/base/browser/touch.js +13 -2
  19. package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.d.ts +1 -1
  20. package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +5 -6
  21. package/vscode/src/vs/base/browser/ui/actionbar/actionbar.d.ts +1 -1
  22. package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +2 -2
  23. package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.d.ts +1 -0
  24. package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.js +4 -2
  25. package/vscode/src/vs/base/browser/ui/button/button.js +16 -9
  26. package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +1 -1
  27. package/vscode/src/vs/base/browser/ui/contextview/contextview.d.ts +1 -0
  28. package/vscode/src/vs/base/browser/ui/contextview/contextview.js +1 -1
  29. package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +4 -4
  30. package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +3 -3
  31. package/vscode/src/vs/base/browser/ui/findinput/findInput.js +5 -0
  32. package/vscode/src/vs/base/browser/ui/findinput/findInputToggles.js +4 -0
  33. package/vscode/src/vs/base/browser/ui/findinput/replaceInput.js +3 -1
  34. package/vscode/src/vs/base/browser/ui/grid/gridview.js +1 -0
  35. package/vscode/src/vs/base/browser/ui/highlightedlabel/highlightedLabel.js +14 -3
  36. package/vscode/src/vs/base/browser/ui/{iconLabel/iconHoverDelegate.d.ts → hover/hoverDelegate.d.ts} +3 -6
  37. package/vscode/src/vs/base/browser/ui/hover/{hoverDelegate.js → hoverDelegateFactory.js} +5 -5
  38. package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +1 -1
  39. package/vscode/src/vs/base/browser/ui/{iconLabel/iconLabelHover.d.ts → hover/updatableHoverWidget.d.ts} +6 -1
  40. package/vscode/src/vs/base/browser/ui/{iconLabel/iconLabelHover.js → hover/updatableHoverWidget.js} +27 -7
  41. package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +10 -9
  42. package/vscode/src/vs/base/browser/ui/iconLabel/simpleIconLabel.js +11 -1
  43. package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +19 -1
  44. package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +8 -7
  45. package/vscode/src/vs/base/browser/ui/list/listView.js +4 -1
  46. package/vscode/src/vs/base/browser/ui/list/listWidget.js +27 -10
  47. package/vscode/src/vs/base/browser/ui/menu/menu.js +15 -9
  48. package/vscode/src/vs/base/browser/ui/menu/menubar.js +15 -8
  49. package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.js +18 -2
  50. package/vscode/src/vs/base/browser/ui/selectBox/selectBox.js +1 -0
  51. package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +14 -7
  52. package/vscode/src/vs/base/browser/ui/table/tableWidget.js +6 -4
  53. package/vscode/src/vs/base/browser/ui/toggle/toggle.js +7 -6
  54. package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +2 -2
  55. package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +55 -10
  56. package/vscode/src/vs/base/browser/ui/tree/indexTreeModel.js +4 -1
  57. package/vscode/src/vs/base/browser/window.d.ts +5 -0
  58. package/vscode/src/vs/base/browser/window.js +1 -2
  59. package/vscode/src/vs/base/common/arrays.js +20 -1
  60. package/vscode/src/vs/base/common/cache.js +3 -2
  61. package/vscode/src/vs/base/common/codicons.d.ts +62 -38
  62. package/vscode/src/vs/base/common/codicons.js +19 -571
  63. package/vscode/src/vs/base/common/codiconsLibrary.js +570 -0
  64. package/vscode/src/vs/base/common/codiconsUtil.js +17 -0
  65. package/vscode/src/vs/base/common/event.js +4 -1
  66. package/vscode/src/vs/base/common/glob.js +1 -0
  67. package/vscode/src/vs/base/common/hierarchicalKind.d.ts +13 -0
  68. package/vscode/src/vs/base/common/hierarchicalKind.js +21 -0
  69. package/vscode/src/vs/base/common/labels.js +2 -2
  70. package/vscode/src/vs/base/common/network.js +14 -5
  71. package/vscode/src/vs/base/common/observableInternal/promise.js +1 -0
  72. package/vscode/src/vs/base/common/observableInternal/utils.js +35 -14
  73. package/vscode/src/vs/base/common/platform.js +1 -1
  74. package/vscode/src/vs/base/common/product.d.ts +7 -1
  75. package/vscode/src/vs/base/common/severity.js +2 -1
  76. package/vscode/src/vs/base/common/strings.js +16 -4
  77. package/vscode/src/vs/base/parts/ipc/common/ipc.js +4 -0
  78. package/vscode/src/vs/editor/browser/controller/mouseHandler.js +5 -5
  79. package/vscode/src/vs/editor/browser/controller/mouseTarget.js +55 -43
  80. package/vscode/src/vs/editor/browser/controller/textAreaHandler.js +5 -5
  81. package/vscode/src/vs/editor/browser/coreCommands.js +13 -13
  82. package/vscode/src/vs/editor/browser/editorDom.js +11 -1
  83. package/vscode/src/vs/editor/browser/editorExtensions.js +1 -1
  84. package/vscode/src/vs/editor/browser/services/editorWorkerService.js +10 -2
  85. package/vscode/src/vs/editor/browser/services/hoverService/hoverService.d.ts +31 -0
  86. package/vscode/src/vs/editor/browser/services/{hoverService.js → hoverService/hoverService.js} +38 -27
  87. package/vscode/src/vs/editor/browser/{widget/hoverWidget → services/hoverService}/hoverWidget.js +13 -14
  88. package/vscode/src/vs/editor/browser/view/viewLayer.js +4 -4
  89. package/vscode/src/vs/editor/browser/view/viewOverlays.js +12 -23
  90. package/vscode/src/vs/editor/browser/view.js +5 -5
  91. package/vscode/src/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -1
  92. package/vscode/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +3 -3
  93. package/vscode/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css.js +1 -1
  94. package/vscode/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +4 -6
  95. package/vscode/src/vs/editor/browser/viewParts/decorations/decorations.css.js +1 -1
  96. package/vscode/src/vs/editor/browser/viewParts/decorations/decorations.js +8 -14
  97. package/vscode/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +2 -2
  98. package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +2 -2
  99. package/vscode/src/vs/editor/browser/viewParts/indentGuides/indentGuides.css.js +1 -1
  100. package/vscode/src/vs/editor/browser/viewParts/indentGuides/indentGuides.js +3 -6
  101. package/vscode/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css.js +1 -1
  102. package/vscode/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +5 -1
  103. package/vscode/src/vs/editor/browser/viewParts/lines/viewLine.js +4 -4
  104. package/vscode/src/vs/editor/browser/viewParts/lines/viewLines.css.js +1 -1
  105. package/vscode/src/vs/editor/browser/viewParts/lines/viewLines.js +5 -5
  106. package/vscode/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -2
  107. package/vscode/src/vs/editor/browser/viewParts/margin/margin.js +2 -2
  108. package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.js +142 -27
  109. package/vscode/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +2 -2
  110. package/vscode/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +34 -16
  111. package/vscode/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +3 -3
  112. package/vscode/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +1 -1
  113. package/vscode/src/vs/editor/browser/viewParts/selections/selections.js +23 -20
  114. package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursor.js +25 -3
  115. package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursors.js +21 -13
  116. package/vscode/src/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
  117. package/vscode/src/vs/editor/browser/viewParts/whitespace/whitespace.js +2 -2
  118. package/vscode/src/vs/editor/browser/widget/{codeEditorContributions.js → codeEditor/codeEditorContributions.js} +3 -3
  119. package/vscode/src/vs/editor/browser/widget/{codeEditorWidget.js → codeEditor/codeEditorWidget.js} +81 -70
  120. package/vscode/src/vs/editor/browser/widget/codeEditor/editor.css.js +4 -0
  121. package/vscode/src/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget.js +44 -0
  122. package/vscode/src/vs/editor/browser/widget/diffEditor/commands.js +281 -0
  123. package/vscode/src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +7 -5
  124. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorDecorations.js +4 -1
  125. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +15 -9
  126. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorSash.js +2 -0
  127. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +9 -8
  128. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +1 -1
  129. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +33 -246
  130. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +22 -7
  131. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +5 -5
  132. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +71 -41
  133. package/vscode/src/vs/editor/browser/widget/diffEditor/embeddedDiffEditorWidget.js +36 -0
  134. package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +227 -0
  135. package/vscode/src/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +22 -19
  136. package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +5 -4
  137. package/vscode/src/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +15 -4
  138. package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +13 -5
  139. package/vscode/src/vs/editor/browser/widget/diffEditor/registrations.contribution.js +11 -1
  140. package/vscode/src/vs/editor/browser/widget/diffEditor/style.css.js +1 -1
  141. package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +104 -0
  142. package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +8 -15
  143. package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/colors.js +14 -4
  144. package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/diffEditorItemTemplate.js +6 -5
  145. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/model.js +14 -0
  146. package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/multiDiffEditorViewModel.js +5 -2
  147. package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/multiDiffEditorWidget.js +5 -3
  148. package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/multiDiffEditorWidgetImpl.js +9 -10
  149. package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/style.css.js +1 -1
  150. package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/utils.js +2 -1
  151. package/vscode/src/vs/editor/common/commands/trimTrailingWhitespaceCommand.js +14 -3
  152. package/vscode/src/vs/editor/common/config/diffEditor.js +1 -0
  153. package/vscode/src/vs/editor/common/config/editorConfigurationSchema.js +10 -1
  154. package/vscode/src/vs/editor/common/config/editorOptions.d.ts +23 -0
  155. package/vscode/src/vs/editor/common/config/editorOptions.js +115 -33
  156. package/vscode/src/vs/editor/common/core/editorColorRegistry.js +32 -2
  157. package/vscode/src/vs/editor/common/core/lineRange.d.ts +1 -0
  158. package/vscode/src/vs/editor/common/core/lineRange.js +12 -0
  159. package/vscode/src/vs/editor/common/core/positionToOffset.js +43 -0
  160. package/vscode/src/vs/editor/common/core/textEdit.js +169 -0
  161. package/vscode/src/vs/editor/common/core/textLength.js +110 -0
  162. package/vscode/src/vs/editor/common/core/wordCharacterClassifier.d.ts +14 -2
  163. package/vscode/src/vs/editor/common/core/wordCharacterClassifier.js +66 -10
  164. package/vscode/src/vs/editor/common/core/wordHelper.js +1 -0
  165. package/vscode/src/vs/editor/common/cursor/cursor.js +17 -4
  166. package/vscode/src/vs/editor/common/cursor/cursorTypeOperations.js +1 -1
  167. package/vscode/src/vs/editor/common/cursor/cursorWordOperations.js +22 -3
  168. package/vscode/src/vs/editor/common/cursorCommon.js +7 -5
  169. package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +7 -4
  170. package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.js +1 -1
  171. package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +2 -0
  172. package/vscode/src/vs/editor/common/diff/rangeMapping.js +10 -0
  173. package/vscode/src/vs/editor/common/editorContextKeys.js +25 -0
  174. package/vscode/src/vs/editor/common/languages.d.ts +43 -11
  175. package/vscode/src/vs/editor/common/languages.js +15 -1
  176. package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.js +1 -1
  177. package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +3 -58
  178. package/vscode/src/vs/editor/common/model/textModel.js +2 -0
  179. package/vscode/src/vs/editor/common/model/textModelSearch.js +1 -1
  180. package/vscode/src/vs/editor/common/model/textModelText.js +17 -0
  181. package/vscode/src/vs/editor/common/model/textModelTokens.js +4 -0
  182. package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +10 -0
  183. package/vscode/src/vs/editor/common/model.d.ts +17 -2
  184. package/vscode/src/vs/editor/common/model.js +1 -6
  185. package/vscode/src/vs/editor/common/services/editorSimpleWorker.js +8 -0
  186. package/vscode/src/vs/editor/common/services/editorWorker.d.ts +2 -0
  187. package/vscode/src/vs/editor/common/services/findSectionHeaders.d.ts +28 -0
  188. package/vscode/src/vs/editor/common/services/findSectionHeaders.js +71 -0
  189. package/vscode/src/vs/editor/common/services/markerDecorationsService.js +15 -5
  190. package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +32 -20
  191. package/vscode/src/vs/editor/common/viewLayout/linesLayout.js +2 -1
  192. package/vscode/src/vs/editor/common/viewLayout/viewLayout.js +5 -5
  193. package/vscode/src/vs/editor/common/viewLayout/viewLinesViewportData.js +1 -0
  194. package/vscode/src/vs/editor/common/viewModel/modelLineProjection.js +1 -1
  195. package/vscode/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +2 -2
  196. package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +10 -7
  197. package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +11 -1
  198. package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +6 -5
  199. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionCommands.js +5 -4
  200. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +25 -3
  201. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionKeybindingResolver.js +3 -2
  202. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +3 -2
  203. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +13 -2
  204. package/vscode/src/vs/editor/contrib/codeAction/common/types.js +18 -33
  205. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorContributions.js +1 -1
  206. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorDetector.js +3 -3
  207. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +1 -1
  208. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +11 -1
  209. package/vscode/src/vs/editor/contrib/comment/browser/comment.js +1 -1
  210. package/vscode/src/vs/editor/contrib/comment/browser/lineCommentCommand.js +9 -9
  211. package/vscode/src/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +5 -3
  212. package/vscode/src/vs/editor/contrib/documentSymbols/browser/outlineModel.js +1 -1
  213. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +40 -20
  214. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +83 -47
  215. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +40 -31
  216. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js +16 -1
  217. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +8 -8
  218. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/edit.js +5 -3
  219. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +7 -6
  220. package/vscode/src/vs/editor/contrib/find/browser/findDecorations.js +14 -4
  221. package/vscode/src/vs/editor/contrib/find/browser/findModel.js +6 -6
  222. package/vscode/src/vs/editor/contrib/find/browser/findOptionsWidget.js +16 -1
  223. package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +23 -3
  224. package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +12 -3
  225. package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +11 -1
  226. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +3 -3
  227. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +5 -3
  228. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +1 -1
  229. package/vscode/src/vs/editor/contrib/hover/browser/hover.js +12 -2
  230. package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +3 -91
  231. package/vscode/src/vs/editor/contrib/indentation/common/indentation.js +92 -0
  232. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +14 -4
  233. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/commands.js +4 -0
  234. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostText.js +18 -19
  235. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js +5 -4
  236. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +4 -2
  237. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys.js +4 -1
  238. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +6 -5
  239. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +5 -4
  240. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +28 -19
  241. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js +7 -4
  242. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/provideInlineCompletions.js +1 -1
  243. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/singleTextEdit.js +64 -72
  244. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider.js +11 -5
  245. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +5 -85
  246. package/vscode/src/vs/editor/contrib/inlineEdit/browser/commands.js +2 -2
  247. package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +6 -4
  248. package/vscode/src/vs/editor/contrib/inlineEdit/browser/hoverParticipant.js +4 -1
  249. package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +28 -17
  250. package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js +5 -4
  251. package/vscode/src/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  252. package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +53 -6
  253. package/vscode/src/vs/editor/contrib/linesOperations/browser/moveLinesCommand.js +1 -1
  254. package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +11 -1
  255. package/vscode/src/vs/editor/contrib/links/browser/links.js +2 -2
  256. package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js +7 -7
  257. package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +11 -1
  258. package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +12 -2
  259. package/vscode/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +1 -1
  260. package/vscode/src/vs/editor/contrib/rename/browser/rename.js +27 -33
  261. package/vscode/src/vs/editor/contrib/rename/browser/{renameInputField.js → renameWidget.js} +282 -194
  262. package/vscode/src/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +154 -0
  263. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +60 -61
  264. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +23 -14
  265. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -1
  266. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +12 -2
  267. package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +11 -1
  268. package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +1 -1
  269. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +16 -6
  270. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +2 -2
  271. package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +12 -12
  272. package/vscode/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.js +2 -2
  273. package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +1 -1
  274. package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.js +2 -2
  275. package/vscode/src/vs/editor/standalone/browser/standaloneLayoutService.js +1 -1
  276. package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +12 -12
  277. package/vscode/src/vs/editor/standalone/browser/standaloneThemeService.js +11 -1
  278. package/vscode/src/vs/editor/standalone/common/themes.js +11 -1
  279. package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.d.ts +16 -9
  280. package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +42 -18
  281. package/vscode/src/vs/platform/actionWidget/browser/actionList.js +16 -5
  282. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +11 -1
  283. package/vscode/src/vs/platform/actions/browser/buttonbar.js +13 -5
  284. package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +3 -1
  285. package/vscode/src/vs/platform/actions/browser/floatingMenu.js +11 -1
  286. package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +11 -1
  287. package/vscode/src/vs/platform/actions/common/actions.d.ts +7 -0
  288. package/vscode/src/vs/platform/actions/common/actions.js +7 -0
  289. package/vscode/src/vs/platform/contextview/browser/contextView.d.ts +1 -0
  290. package/vscode/src/vs/platform/contextview/browser/contextViewService.js +12 -15
  291. package/vscode/src/vs/platform/dialogs/common/dialogs.js +4 -2
  292. package/vscode/src/vs/platform/editor/common/editor.d.ts +12 -0
  293. package/vscode/src/vs/platform/environment/common/environmentService.js +6 -0
  294. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +19 -7
  295. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +7 -1
  296. package/vscode/src/vs/platform/extensionManagement/common/extensionsProfileScannerService.js +333 -0
  297. package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +901 -0
  298. package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +3 -4
  299. package/vscode/src/vs/platform/extensions/common/extensionValidator.js +16 -16
  300. package/vscode/src/vs/platform/extensions/common/extensions.js +5 -1
  301. package/vscode/src/vs/platform/files/common/files.d.ts +1 -11
  302. package/vscode/src/vs/platform/files/common/files.js +2 -0
  303. package/vscode/src/vs/platform/files/common/watcher.js +2 -0
  304. package/vscode/src/vs/platform/hover/browser/hover.d.ts +1 -1
  305. package/vscode/src/vs/platform/hover/browser/hover.js +21 -6
  306. package/vscode/src/vs/platform/keyboardLayout/common/keyboardLayout.js +1 -0
  307. package/vscode/src/vs/platform/languagePacks/common/languagePacks.js +5 -0
  308. package/vscode/src/vs/platform/layout/browser/layoutService.d.ts +8 -6
  309. package/vscode/src/vs/platform/log/browser/log.js +1 -0
  310. package/vscode/src/vs/platform/log/common/log.js +13 -1
  311. package/vscode/src/vs/platform/markers/common/markerService.js +1 -1
  312. package/vscode/src/vs/platform/markers/common/markers.js +9 -9
  313. package/vscode/src/vs/platform/opener/browser/link.js +16 -4
  314. package/vscode/src/vs/platform/policy/common/policy.js +2 -0
  315. package/vscode/src/vs/platform/product/common/product.js +2 -1
  316. package/vscode/src/vs/platform/quickinput/browser/media/quickInput.css.js +1 -1
  317. package/vscode/src/vs/platform/quickinput/browser/pickerQuickAccess.js +36 -33
  318. package/vscode/src/vs/platform/quickinput/browser/quickAccess.js +5 -0
  319. package/vscode/src/vs/platform/quickinput/browser/quickInput.js +38 -9
  320. package/vscode/src/vs/platform/quickinput/browser/quickInputBox.js +7 -4
  321. package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +22 -12
  322. package/vscode/src/vs/platform/quickinput/browser/quickInputService.js +13 -5
  323. package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +1348 -0
  324. package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  325. package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +14 -0
  326. package/vscode/src/vs/platform/remote/common/remoteAgentConnection.js +2 -2
  327. package/vscode/src/vs/platform/remote/common/remoteHosts.js +1 -4
  328. package/vscode/src/vs/platform/secrets/common/secrets.js +5 -0
  329. package/vscode/src/vs/platform/severityIcon/browser/severityIcon.js +5 -5
  330. package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +2 -0
  331. package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +1 -1
  332. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +3 -9
  333. package/vscode/src/vs/platform/terminal/common/terminal.d.ts +6 -1
  334. package/vscode/src/vs/platform/terminal/common/terminal.js +1 -0
  335. package/vscode/src/vs/platform/terminal/common/terminalEnvironment.js +4 -1
  336. package/vscode/src/vs/platform/theme/browser/defaultStyles.js +11 -1
  337. package/vscode/src/vs/platform/theme/common/colorUtils.js +187 -0
  338. package/vscode/src/vs/platform/theme/common/colors/baseColors.js +89 -0
  339. package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +46 -0
  340. package/vscode/src/vs/platform/theme/common/colors/editorColors.js +469 -0
  341. package/vscode/src/vs/platform/theme/common/colors/inputColors.js +196 -0
  342. package/vscode/src/vs/platform/theme/common/colors/listColors.js +166 -0
  343. package/vscode/src/vs/platform/theme/common/colors/menuColors.js +41 -0
  344. package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +61 -0
  345. package/vscode/src/vs/platform/theme/common/colors/miscColors.js +45 -0
  346. package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +51 -0
  347. package/vscode/src/vs/platform/theme/common/colors/searchColors.js +19 -0
  348. package/vscode/src/vs/platform/theme/common/iconRegistry.js +2 -1
  349. package/vscode/src/vs/platform/theme/common/themeService.d.ts +1 -1
  350. package/vscode/src/vs/platform/tunnel/common/tunnel.js +2 -0
  351. package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +2 -2
  352. package/vscode/src/vs/platform/update/common/update.js +1 -1
  353. package/vscode/src/vs/platform/uriIdentity/common/uriIdentityService.js +1 -0
  354. package/vscode/src/vs/platform/userDataProfile/common/userDataProfileIpc.js +2 -0
  355. package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +69 -32
  356. package/vscode/src/vs/workbench/api/common/extHost.common.services.js +6 -0
  357. package/vscode/src/vs/workbench/api/common/extHost.protocol.js +3 -1
  358. package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +12 -5
  359. package/vscode/src/vs/workbench/api/common/extHostChat.js +0 -8
  360. package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +58 -88
  361. package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +8 -4
  362. package/vscode/src/vs/workbench/api/common/extHostComments.js +49 -13
  363. package/vscode/src/vs/workbench/api/common/extHostDebugService.js +16 -17
  364. package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +3 -1
  365. package/vscode/src/vs/workbench/api/common/extHostExtensionActivator.js +1 -1
  366. package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +17 -4
  367. package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +1 -1
  368. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +57 -40
  369. package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +305 -0
  370. package/vscode/src/vs/workbench/api/common/extHostLanguages.js +2 -2
  371. package/vscode/src/vs/workbench/api/common/extHostNotebookDocument.js +1 -1
  372. package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +26 -6
  373. package/vscode/src/vs/workbench/api/common/extHostQuickOpen.js +9 -9
  374. package/vscode/src/vs/workbench/api/common/extHostSCM.js +1 -1
  375. package/vscode/src/vs/workbench/api/common/extHostSearch.js +34 -3
  376. package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +1 -1
  377. package/vscode/src/vs/workbench/api/common/extHostTask.js +1 -0
  378. package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +32 -18
  379. package/vscode/src/vs/workbench/api/common/extHostTerminalShellIntegration.js +214 -0
  380. package/vscode/src/vs/workbench/api/common/extHostTesting.js +85 -98
  381. package/vscode/src/vs/workbench/api/common/extHostTimeline.js +1 -0
  382. package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +5 -2
  383. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +119 -70
  384. package/vscode/src/vs/workbench/api/common/extHostTypes.js +90 -28
  385. package/vscode/src/vs/workbench/browser/actions/developerActions.js +4 -4
  386. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +2 -2
  387. package/vscode/src/vs/workbench/browser/actions/windowActions.js +3 -3
  388. package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +3 -3
  389. package/vscode/src/vs/workbench/browser/codeeditor.js +1 -1
  390. package/vscode/src/vs/workbench/browser/composite.d.ts +3 -5
  391. package/vscode/src/vs/workbench/browser/composite.js +2 -10
  392. package/vscode/src/vs/workbench/browser/editor.js +2 -2
  393. package/vscode/src/vs/workbench/browser/labels.js +2 -1
  394. package/vscode/src/vs/workbench/browser/media/part.css.js +1 -1
  395. package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
  396. package/vscode/src/vs/workbench/browser/part.d.ts +25 -3
  397. package/vscode/src/vs/workbench/browser/part.js +84 -9
  398. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +67 -10
  399. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +2 -2
  400. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +92 -14
  401. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +1 -1
  402. package/vscode/src/vs/workbench/browser/parts/compositeBar.js +5 -4
  403. package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +13 -3
  404. package/vscode/src/vs/workbench/browser/parts/compositePart.js +13 -5
  405. package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +12 -0
  406. package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +10 -10
  407. package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +3 -3
  408. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +8 -7
  409. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +16 -8
  410. package/vscode/src/vs/workbench/browser/parts/editor/diffEditorCommands.js +217 -0
  411. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +14 -16
  412. package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +2 -2
  413. package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +8 -7
  414. package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +4 -202
  415. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +1 -1
  416. package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +11 -1
  417. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +92 -23
  418. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +15 -3
  419. package/vscode/src/vs/workbench/browser/parts/editor/editorPane.d.ts +7 -8
  420. package/vscode/src/vs/workbench/browser/parts/editor/editorPane.js +7 -6
  421. package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +12 -32
  422. package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +11 -1
  423. package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +1 -0
  424. package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +27 -28
  425. package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +19 -20
  426. package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +12 -2
  427. package/vscode/src/vs/workbench/browser/parts/editor/editorWithViewState.js +14 -17
  428. package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +11 -1
  429. package/vscode/src/vs/workbench/browser/parts/editor/multiRowEditorTabsControl.js +12 -12
  430. package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +16 -16
  431. package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +3 -3
  432. package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +17 -17
  433. package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +36 -13
  434. package/vscode/src/vs/workbench/browser/parts/editor/textResourceEditor.js +22 -22
  435. package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +29 -21
  436. package/vscode/src/vs/workbench/browser/parts/media/compositepart.css.js +1 -1
  437. package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +1 -1
  438. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.js +13 -2
  439. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +11 -1
  440. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +16 -16
  441. package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +1 -0
  442. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +122 -33
  443. package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +14 -3
  444. package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +15 -2
  445. package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +1 -1
  446. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +37 -0
  447. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +36 -18
  448. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +7 -4
  449. package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +6 -4
  450. package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +2 -3
  451. package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +1 -1
  452. package/vscode/src/vs/workbench/browser/parts/views/treeView.js +3 -3
  453. package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +13 -3
  454. package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +6 -0
  455. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +28 -11
  456. package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +19 -15
  457. package/vscode/src/vs/workbench/browser/quickaccess.js +42 -15
  458. package/vscode/src/vs/workbench/browser/style.js +52 -3
  459. package/vscode/src/vs/workbench/browser/web.api.d.ts +6 -0
  460. package/vscode/src/vs/workbench/browser/window.js +28 -20
  461. package/vscode/src/vs/workbench/browser/workbench.contribution.js +83 -9
  462. package/vscode/src/vs/workbench/common/component.js +0 -1
  463. package/vscode/src/vs/workbench/common/contextkeys.js +4 -4
  464. package/vscode/src/vs/workbench/common/editor/editorGroupModel.js +59 -5
  465. package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +10 -0
  466. package/vscode/src/vs/workbench/common/editor/editorInput.js +3 -0
  467. package/vscode/src/vs/workbench/common/editor/filteredEditorGroupModel.js +1 -0
  468. package/vscode/src/vs/workbench/common/editor/resourceEditorInput.d.ts +3 -1
  469. package/vscode/src/vs/workbench/common/editor/resourceEditorInput.js +7 -3
  470. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +3 -3
  471. package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.d.ts +2 -1
  472. package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.js +9 -6
  473. package/vscode/src/vs/workbench/common/editor.d.ts +33 -13
  474. package/vscode/src/vs/workbench/common/editor.js +6 -7
  475. package/vscode/src/vs/workbench/common/theme.js +45 -5
  476. package/vscode/src/vs/workbench/common/views.d.ts +1 -0
  477. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +59 -184
  478. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +1 -0
  479. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +140 -13
  480. package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +1 -1
  481. package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.js +1 -0
  482. package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalDebuggerContribution.js +4 -2
  483. package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalLineFeatureContribution.js +35 -36
  484. package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/commands.js +1 -1
  485. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +1 -1
  486. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +4 -5
  487. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +21 -12
  488. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +70 -32
  489. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +4 -1
  490. package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +4 -1
  491. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.js +118 -0
  492. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +11 -6
  493. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +154 -61
  494. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +186 -224
  495. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +6 -75
  496. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +158 -49
  497. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +84 -175
  498. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +38 -5
  499. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
  500. package/vscode/src/vs/workbench/contrib/chat/common/annotations.js +105 -0
  501. package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +137 -43
  502. package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +44 -0
  503. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +17 -1
  504. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +82 -34
  505. package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +17 -3
  506. package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +20 -22
  507. package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +68 -9
  508. package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +115 -0
  509. package/vscode/src/vs/workbench/contrib/chat/common/{chatProvider.js → languageModels.js} +9 -9
  510. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +5 -4
  511. package/vscode/src/vs/workbench/contrib/codeActions/browser/documentationContribution.js +2 -1
  512. package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +5 -5
  513. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +33 -7
  514. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +11 -1
  515. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +3 -3
  516. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +9 -6
  517. package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +13 -3
  518. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +1 -1
  519. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +2 -2
  520. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +1 -1
  521. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +1 -1
  522. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +6 -6
  523. package/vscode/src/vs/workbench/contrib/codeEditor/{browser → common}/languageConfigurationExtensionPoint.js +79 -74
  524. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +11 -1
  525. package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +11 -1
  526. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +25 -18
  527. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +14 -2
  528. package/vscode/src/vs/workbench/contrib/comments/browser/commentService.js +80 -52
  529. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +12 -2
  530. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +33 -13
  531. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +129 -57
  532. package/vscode/src/vs/workbench/contrib/comments/browser/commentsModel.js +15 -15
  533. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +145 -20
  534. package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +61 -95
  535. package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +2 -2
  536. package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +1 -1
  537. package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +2 -2
  538. package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +4 -3
  539. package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +18 -11
  540. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +6 -0
  541. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInput.js +62 -4
  542. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +6 -4
  543. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +34 -5
  544. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +48 -29
  545. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +216 -23
  546. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +11 -1
  547. package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +12 -2
  548. package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +6 -1
  549. package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +23 -5
  550. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +24 -1
  551. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.d.ts +15 -1
  552. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +30 -6
  553. package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +2 -2
  554. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +106 -37
  555. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +1 -1
  556. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +1 -0
  557. package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +8 -11
  558. package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +5 -3
  559. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +23 -24
  560. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +17 -12
  561. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +3 -3
  562. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +9 -9
  563. package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.save.js +1 -1
  564. package/vscode/src/vs/workbench/contrib/files/browser/files.configuration.contribution.js +10 -0
  565. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +11 -1
  566. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +11 -1
  567. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +1 -3
  568. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +1 -1
  569. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +15 -6
  570. package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +4 -8
  571. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +674 -0
  572. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.js +154 -0
  573. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +316 -344
  574. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatFileCreationWidget.js +223 -0
  575. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +8 -25
  576. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +427 -0
  577. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +45 -160
  578. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +358 -702
  579. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +165 -0
  580. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css.js +4 -0
  581. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css.js +4 -0
  582. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +1 -1
  583. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +16 -27
  584. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +19 -4
  585. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +9 -9
  586. package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +1 -1
  587. package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +2 -2
  588. package/vscode/src/vs/workbench/contrib/logs/common/defaultLogLevels.js +17 -2
  589. package/vscode/src/vs/workbench/contrib/logs/common/logsActions.js +236 -0
  590. package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +2 -2
  591. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +9 -4
  592. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +8 -6
  593. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +8 -0
  594. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +5 -5
  595. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +5 -5
  596. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +2 -0
  597. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +4 -2
  598. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +11 -1
  599. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +5 -3
  600. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +5 -3
  601. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +6 -4
  602. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +5 -4
  603. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +7 -5
  604. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +6 -4
  605. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +2 -2
  606. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +23 -19
  607. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +4 -1
  608. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +5 -3
  609. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/icons.contribution.js +9 -0
  610. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +303 -0
  611. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +655 -0
  612. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnostics.js +101 -0
  613. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +56 -1
  614. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +11 -1
  615. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +11 -4
  616. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +29 -0
  617. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +888 -0
  618. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +2 -1
  619. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +1 -1
  620. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css.js +1 -1
  621. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css.js +1 -1
  622. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css.js +1 -1
  623. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css.js +1 -1
  624. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +88 -0
  625. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +60 -46
  626. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +42 -52
  627. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +18 -7
  628. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +1 -1
  629. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +28 -1
  630. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +2 -2
  631. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +11 -7
  632. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +2 -1
  633. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +48 -4
  634. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +1 -1
  635. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +3 -1
  636. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +13 -2
  637. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +57 -10
  638. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +11 -4
  639. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +161 -15
  640. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +4 -2
  641. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +21 -2
  642. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +1 -1
  643. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +5 -0
  644. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +14 -4
  645. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +14 -8
  646. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +3 -0
  647. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +25 -64
  648. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +27 -22
  649. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +1 -1
  650. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +4 -4
  651. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +2 -2
  652. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +8 -1
  653. package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +3 -1
  654. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +7 -14
  655. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +4 -4
  656. package/vscode/src/vs/workbench/contrib/outline/browser/outline.js +10 -0
  657. package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +16 -4
  658. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +17 -4
  659. package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +11 -1
  660. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +26 -8
  661. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +16 -6
  662. package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +11 -1
  663. package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +18 -8
  664. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +235 -0
  665. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +182 -69
  666. package/vscode/src/vs/workbench/contrib/search/common/constants.js +2 -0
  667. package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +203 -1
  668. package/vscode/src/vs/workbench/contrib/tags/browser/workspaceTagsService.js +3 -0
  669. package/vscode/src/vs/workbench/contrib/tags/common/workspaceTags.js +2 -0
  670. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +11 -3
  671. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +2 -2
  672. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +58 -8
  673. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +3 -1
  674. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +1 -0
  675. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +12 -1
  676. package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +11 -1
  677. package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +53 -57
  678. package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +11 -26
  679. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +6 -3
  680. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +12 -12
  681. package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +8 -0
  682. package/vscode/src/vs/workbench/contrib/timeline/common/timeline.js +2 -0
  683. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +1 -1
  684. package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +30 -7
  685. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +12 -2
  686. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +50 -41
  687. package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +4 -5
  688. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +20 -22
  689. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.js +4 -1
  690. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +1 -0
  691. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +3 -3
  692. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +1 -1
  693. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +2 -0
  694. package/vscode/src/vs/workbench/services/assignment/common/assignmentService.js +6 -0
  695. package/vscode/src/vs/workbench/services/authentication/browser/authenticationAccessService.js +69 -0
  696. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +69 -811
  697. package/vscode/src/vs/workbench/services/authentication/browser/authenticationUsageService.js +50 -0
  698. package/vscode/src/vs/workbench/services/authentication/common/authentication.js +2 -1
  699. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +50 -25
  700. package/vscode/src/vs/workbench/services/banner/browser/bannerService.d.ts +1 -1
  701. package/vscode/src/vs/workbench/services/editor/browser/codeEditorService.js +1 -0
  702. package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +1 -0
  703. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +21 -17
  704. package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.d.ts +12 -0
  705. package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.js +144 -0
  706. package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +10 -6
  707. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.d.ts +3 -3
  708. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.d.ts +16 -4
  709. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.js +12 -1
  710. package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +46 -121
  711. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +5 -2
  712. package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +6 -3
  713. package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +9 -1
  714. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +4 -4
  715. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.d.ts +2 -1
  716. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +8 -1
  717. package/vscode/src/vs/workbench/services/history/browser/historyService.js +44 -36
  718. package/vscode/src/vs/workbench/services/history/common/history.d.ts +0 -5
  719. package/vscode/src/vs/workbench/services/language/common/languageService.js +4 -3
  720. package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +2 -1
  721. package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +2 -1
  722. package/vscode/src/vs/workbench/services/lifecycle/common/lifecycleService.js +8 -6
  723. package/vscode/src/vs/workbench/services/output/common/output.js +4 -1
  724. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +2 -2
  725. package/vscode/src/vs/workbench/services/search/common/search.js +1 -0
  726. package/vscode/src/vs/workbench/services/search/common/textSearchManager.js +15 -5
  727. package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +6 -1
  728. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +1 -1
  729. package/vscode/src/vs/workbench/services/textfile/common/textfiles.d.ts +1 -1
  730. package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +11 -1
  731. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +5 -3
  732. package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.js +1 -1
  733. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +1 -0
  734. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +7 -7
  735. package/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts +261 -0
  736. package/vscode-dts/vscode.proposed.authLearnMore.d.ts +16 -0
  737. package/vscode-dts/vscode.proposed.chatParticipant.d.ts +49 -78
  738. package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +13 -16
  739. package/vscode-dts/vscode.proposed.chatProvider.d.ts +1 -1
  740. package/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts +32 -0
  741. package/vscode-dts/vscode.proposed.commentingRangeHint.d.ts +16 -0
  742. package/vscode-dts/vscode.proposed.contribCommentsViewThreadMenus.d.ts +6 -0
  743. package/vscode-dts/vscode.proposed.contribDiffEditorGutterToolBarMenus.d.ts +6 -0
  744. package/vscode-dts/vscode.proposed.debugFocus.d.ts +15 -23
  745. package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +10 -0
  746. package/vscode-dts/vscode.proposed.documentPaste.d.ts +115 -30
  747. package/vscode-dts/vscode.proposed.dropMetadata.d.ts +19 -14
  748. package/vscode-dts/vscode.proposed.fileComments.d.ts +2 -4
  749. package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +18 -0
  750. package/vscode-dts/vscode.proposed.interactive.d.ts +0 -16
  751. package/vscode-dts/vscode.proposed.languageModels.d.ts +115 -53
  752. package/vscode-dts/vscode.proposed.notebookCellExecution.d.ts +44 -0
  753. package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +3 -0
  754. package/vscode-dts/vscode.proposed.tabInputMultiDiff.d.ts +22 -0
  755. package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +2 -0
  756. package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +207 -0
  757. package/vscode/src/vs/editor/browser/services/hoverService.d.ts +0 -30
  758. package/vscode/src/vs/editor/browser/widget/embeddedCodeEditorWidget.js +0 -74
  759. package/vscode/src/vs/editor/browser/widget/media/editor.css.js +0 -4
  760. package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +0 -881
  761. package/vscode/src/vs/platform/theme/common/colorRegistry.js +0 -1316
  762. package/vscode/src/vs/workbench/api/common/extHostChatProvider.js +0 -253
  763. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.css.js +0 -4
  764. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +0 -74
  765. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +0 -4
  766. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +0 -424
  767. package/vscode-dts/vscode.proposed.testCoverage.d.ts +0 -222
  768. /package/vscode/src/vs/base/browser/ui/hover/{hover.css.js → hoverWidget.css.js} +0 -0
  769. /package/vscode/src/vs/editor/browser/{widget/hoverWidget → services/hoverService}/hover.css.js +0 -0
  770. /package/vscode/src/vs/editor/browser/widget/{multiDiffEditorWidget → multiDiffEditor}/objectPool.js +0 -0
  771. /package/vscode/src/vs/editor/contrib/indentation/{browser → common}/indentUtils.js +0 -0
  772. /package/vscode/src/vs/editor/contrib/rename/browser/{renameInputField.css.js → renameWidget.css.js} +0 -0
  773. /package/vscode/src/vs/platform/theme/common/{colorRegistry.d.ts → colorUtils.d.ts} +0 -0
@@ -0,0 +1,888 @@
1
+ import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
2
+ import { getWindow, scheduleAtNextAnimationFrame, trackFocus, Dimension, WindowIntervalTimer } from '../../../../../../base/browser/dom.js';
3
+ import { disposableTimeout, createCancelablePromise, raceCancellationError, Queue } from '../../../../../../base/common/async.js';
4
+ import { CancellationTokenSource } from '../../../../../../base/common/cancellation.js';
5
+ import { Emitter, Event } from '../../../../../../base/common/event.js';
6
+ import { MarkdownString } from '../../../../../../base/common/htmlContent.js';
7
+ import { Disposable, DisposableStore, toDisposable } from '../../../../../../base/common/lifecycle.js';
8
+ import { LRUCache } from '../../../../../../base/common/map.js';
9
+ import { Schemas } from '../../../../../../base/common/network.js';
10
+ import { MovingAverage } from '../../../../../../base/common/numbers.js';
11
+ import { StopWatch } from '../../../../../../base/common/stopwatch.js';
12
+ import { assertType } from '../../../../../../base/common/types.js';
13
+ import { URI } from '../../../../../../base/common/uri.js';
14
+ import { generateUuid } from '../../../../../../base/common/uuid.js';
15
+ import { CodeEditorWidget } from '../../../../../../editor/browser/widget/codeEditor/codeEditorWidget.js';
16
+ import { Selection } from '../../../../../../editor/common/core/selection.js';
17
+ import { TextEdit } from '../../../../../../editor/common/languages.js';
18
+ import { ILanguageService } from '../../../../../../editor/common/languages/language.js';
19
+ import { IEditorWorkerService } from '../../../../../../editor/common/services/editorWorker.js';
20
+ import { IModelService } from '../../../../../../editor/common/services/model.js';
21
+ import { localizeWithPath } from '../../../../../../nls.js';
22
+ import { ICommandService } from '../../../../../../platform/commands/common/commands.js';
23
+ import { IContextKeyService } from '../../../../../../platform/contextkey/common/contextkey.js';
24
+ import { IInstantiationService } from '../../../../../../platform/instantiation/common/instantiation.js';
25
+ import { AsyncProgress } from '../../../../../../platform/progress/common/progress.js';
26
+ import { IStorageService } from '../../../../../../platform/storage/common/storage.js';
27
+ import { GeneratingPhrase } from '../../../../chat/browser/chat.js';
28
+ import { ChatAgentLocation } from '../../../../chat/common/chatAgents.js';
29
+ import { countWords } from '../../../../chat/common/chatWordCounter.js';
30
+ import { IInlineChatSavingService } from '../../../../inlineChat/browser/inlineChatSavingService.js';
31
+ import { SessionPrompt, ReplyResponse, SessionExchange, EmptyResponse, ErrorResponse } from '../../../../inlineChat/browser/inlineChatSession.js';
32
+ import { IInlineChatSessionService } from '../../../../inlineChat/browser/inlineChatSessionService.js';
33
+ import { InlineChatWidget } from '../../../../inlineChat/browser/inlineChatWidget.js';
34
+ import { performAsyncTextEdit, asProgressiveEdit } from '../../../../inlineChat/browser/utils.js';
35
+ import { CTX_INLINE_CHAT_LAST_RESPONSE_TYPE } from '../../../../inlineChat/common/inlineChat.js';
36
+ import { insertCell, runDeleteAction } from '../cellOperations.js';
37
+ import { CTX_NOTEBOOK_CHAT_HAS_ACTIVE_REQUEST, CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_NOTEBOOK_CHAT_USER_DID_EDIT, CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION, MENU_CELL_CHAT_INPUT, MENU_CELL_CHAT_WIDGET, MENU_CELL_CHAT_WIDGET_STATUS, MENU_CELL_CHAT_WIDGET_FEEDBACK } from './notebookChatContext.js';
38
+ import { registerNotebookContribution } from '../../notebookEditorExtensions.js';
39
+ import { CellKind } from '../../../common/notebookCommon.js';
40
+ import { NotebookExecutionType, INotebookExecutionStateService } from '../../../common/notebookExecutionStateService.js';
41
+ var NotebookChatController_1;
42
+ class NotebookChatWidget extends Disposable {
43
+ set afterModelPosition(afterModelPosition) {
44
+ this.notebookViewZone.afterModelPosition = afterModelPosition;
45
+ }
46
+ get afterModelPosition() {
47
+ return this.notebookViewZone.afterModelPosition;
48
+ }
49
+ set heightInPx(heightInPx) {
50
+ this.notebookViewZone.heightInPx = heightInPx;
51
+ }
52
+ get heightInPx() {
53
+ return this.notebookViewZone.heightInPx;
54
+ }
55
+ get editingCell() {
56
+ return this._editingCell;
57
+ }
58
+ constructor(_notebookEditor, id, notebookViewZone, domNode, widgetContainer, inlineChatWidget, parentEditor, _languageService) {
59
+ super();
60
+ this._notebookEditor = _notebookEditor;
61
+ this.id = id;
62
+ this.notebookViewZone = notebookViewZone;
63
+ this.domNode = domNode;
64
+ this.widgetContainer = widgetContainer;
65
+ this.inlineChatWidget = inlineChatWidget;
66
+ this.parentEditor = parentEditor;
67
+ this._languageService = _languageService;
68
+ this._editingCell = null;
69
+ this._register(inlineChatWidget.onDidChangeHeight(() => {
70
+ this.heightInPx = inlineChatWidget.contentHeight;
71
+ this._notebookEditor.changeViewZones(accessor => {
72
+ accessor.layoutZone(id);
73
+ });
74
+ this._layoutWidget(inlineChatWidget, widgetContainer);
75
+ }));
76
+ this._layoutWidget(inlineChatWidget, widgetContainer);
77
+ }
78
+ restoreEditingCell(initEditingCell) {
79
+ this._editingCell = initEditingCell;
80
+ const decorationIds = this._notebookEditor.deltaCellDecorations([], [{
81
+ handle: this._editingCell.handle,
82
+ options: { className: 'nb-chatGenerationHighlight', outputClassName: 'nb-chatGenerationHighlight' }
83
+ }]);
84
+ this._register(toDisposable(() => {
85
+ this._notebookEditor.deltaCellDecorations(decorationIds, []);
86
+ }));
87
+ }
88
+ hasFocus() {
89
+ return this.inlineChatWidget.hasFocus();
90
+ }
91
+ focus() {
92
+ this.updateNotebookEditorFocusNSelections();
93
+ this.inlineChatWidget.focus();
94
+ }
95
+ updateNotebookEditorFocusNSelections() {
96
+ this._notebookEditor.focusContainer(true);
97
+ this._notebookEditor.setFocus({ start: this.afterModelPosition, end: this.afterModelPosition });
98
+ this._notebookEditor.setSelections([{
99
+ start: this.afterModelPosition,
100
+ end: this.afterModelPosition
101
+ }]);
102
+ }
103
+ getEditingCell() {
104
+ return this._editingCell;
105
+ }
106
+ async getOrCreateEditingCell() {
107
+ if (this._editingCell) {
108
+ const codeEditor = this._notebookEditor.codeEditors.find(ce => ce[0] === this._editingCell)?.[1];
109
+ if (codeEditor?.hasModel()) {
110
+ return {
111
+ cell: this._editingCell,
112
+ editor: codeEditor
113
+ };
114
+ }
115
+ else {
116
+ return undefined;
117
+ }
118
+ }
119
+ if (!this._notebookEditor.hasModel()) {
120
+ return undefined;
121
+ }
122
+ const widgetHasFocus = this.inlineChatWidget.hasFocus();
123
+ this._editingCell = insertCell(this._languageService, this._notebookEditor, this.afterModelPosition, CellKind.Code, 'above');
124
+ if (!this._editingCell) {
125
+ return undefined;
126
+ }
127
+ await this._notebookEditor.revealFirstLineIfOutsideViewport(this._editingCell);
128
+ const decorationIds = this._notebookEditor.deltaCellDecorations([], [{
129
+ handle: this._editingCell.handle,
130
+ options: { className: 'nb-chatGenerationHighlight', outputClassName: 'nb-chatGenerationHighlight' }
131
+ }]);
132
+ this._register(toDisposable(() => {
133
+ this._notebookEditor.deltaCellDecorations(decorationIds, []);
134
+ }));
135
+ if (widgetHasFocus) {
136
+ this.focus();
137
+ }
138
+ const codeEditor = this._notebookEditor.codeEditors.find(ce => ce[0] === this._editingCell)?.[1];
139
+ if (codeEditor?.hasModel()) {
140
+ return {
141
+ cell: this._editingCell,
142
+ editor: codeEditor
143
+ };
144
+ }
145
+ return undefined;
146
+ }
147
+ async discardChange() {
148
+ if (this._notebookEditor.hasModel() && this._editingCell) {
149
+ runDeleteAction(this._notebookEditor, this._editingCell);
150
+ }
151
+ }
152
+ _layoutWidget(inlineChatWidget, widgetContainer) {
153
+ const layoutConfiguration = this._notebookEditor.notebookOptions.getLayoutConfiguration();
154
+ const rightMargin = layoutConfiguration.cellRightMargin;
155
+ const leftMargin = this._notebookEditor.notebookOptions.getCellEditorContainerLeftMargin();
156
+ const maxWidth = 640;
157
+ const width = Math.min(maxWidth, this._notebookEditor.getLayoutInfo().width - leftMargin - rightMargin);
158
+ inlineChatWidget.layout(( new Dimension(width, this.heightInPx)));
159
+ inlineChatWidget.domNode.style.width = `${width}px`;
160
+ widgetContainer.style.left = `${leftMargin}px`;
161
+ }
162
+ dispose() {
163
+ this._notebookEditor.changeViewZones(accessor => {
164
+ accessor.removeZone(this.id);
165
+ });
166
+ this.domNode.remove();
167
+ super.dispose();
168
+ }
169
+ }
170
+ class NotebookCellTextModelLikeId {
171
+ static str(k) {
172
+ return `${k.viewType}/${( k.uri.toString())}`;
173
+ }
174
+ static obj(s) {
175
+ const idx = s.indexOf('/');
176
+ return {
177
+ viewType: s.substring(0, idx),
178
+ uri: ( URI.parse(s.substring(idx + 1)))
179
+ };
180
+ }
181
+ }
182
+ let NotebookChatController = class NotebookChatController extends Disposable {
183
+ static { NotebookChatController_1 = this; }
184
+ static { this.id = 'workbench.notebook.chatController'; }
185
+ static { this.counter = 0; }
186
+ static get(editor) {
187
+ return editor.getContribution(NotebookChatController_1.id);
188
+ }
189
+ static { this._storageKey = 'inline-chat-history'; }
190
+ static { this._promptHistory = []; }
191
+ constructor(_notebookEditor, _instantiationService, _inlineChatSessionService, _contextKeyService, _commandService, _editorWorkerService, _inlineChatSavingService, _modelService, _languageService, _executionStateService, _storageService) {
192
+ super();
193
+ this._notebookEditor = _notebookEditor;
194
+ this._instantiationService = _instantiationService;
195
+ this._inlineChatSessionService = _inlineChatSessionService;
196
+ this._contextKeyService = _contextKeyService;
197
+ this._commandService = _commandService;
198
+ this._editorWorkerService = _editorWorkerService;
199
+ this._inlineChatSavingService = _inlineChatSavingService;
200
+ this._modelService = _modelService;
201
+ this._languageService = _languageService;
202
+ this._executionStateService = _executionStateService;
203
+ this._storageService = _storageService;
204
+ this._historyOffset = -1;
205
+ this._historyCandidate = '';
206
+ this._promptCache = ( new LRUCache(1000, 0.7));
207
+ this._onDidChangePromptCache = this._register(( new Emitter()));
208
+ this.onDidChangePromptCache = this._onDidChangePromptCache.event;
209
+ this._userEditingDisposables = this._register(( new DisposableStore()));
210
+ this._widgetDisposableStore = this._register(( new DisposableStore()));
211
+ this._ctxHasActiveRequest = CTX_NOTEBOOK_CHAT_HAS_ACTIVE_REQUEST.bindTo(this._contextKeyService);
212
+ this._ctxCellWidgetFocused = CTX_NOTEBOOK_CELL_CHAT_FOCUSED.bindTo(this._contextKeyService);
213
+ this._ctxLastResponseType = CTX_INLINE_CHAT_LAST_RESPONSE_TYPE.bindTo(this._contextKeyService);
214
+ this._ctxUserDidEdit = CTX_NOTEBOOK_CHAT_USER_DID_EDIT.bindTo(this._contextKeyService);
215
+ this._ctxOuterFocusPosition = CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.bindTo(this._contextKeyService);
216
+ this._registerFocusTracker();
217
+ NotebookChatController_1._promptHistory = JSON.parse(this._storageService.get(NotebookChatController_1._storageKey, 0 , '[]'));
218
+ this._historyUpdate = (prompt) => {
219
+ const idx = NotebookChatController_1._promptHistory.indexOf(prompt);
220
+ if (idx >= 0) {
221
+ NotebookChatController_1._promptHistory.splice(idx, 1);
222
+ }
223
+ NotebookChatController_1._promptHistory.unshift(prompt);
224
+ this._historyOffset = -1;
225
+ this._historyCandidate = '';
226
+ this._storageService.store(NotebookChatController_1._storageKey, JSON.stringify(NotebookChatController_1._promptHistory), 0 , 0 );
227
+ };
228
+ }
229
+ _registerFocusTracker() {
230
+ this._register(this._notebookEditor.onDidChangeFocus(() => {
231
+ if (!this._widget) {
232
+ this._ctxOuterFocusPosition.set('');
233
+ return;
234
+ }
235
+ const widgetIndex = this._widget.afterModelPosition;
236
+ const focus = this._notebookEditor.getFocus().start;
237
+ if (focus + 1 === widgetIndex) {
238
+ this._ctxOuterFocusPosition.set('above');
239
+ }
240
+ else if (focus === widgetIndex) {
241
+ this._ctxOuterFocusPosition.set('below');
242
+ }
243
+ else {
244
+ this._ctxOuterFocusPosition.set('');
245
+ }
246
+ }));
247
+ }
248
+ run(index, input, autoSend) {
249
+ if (this._widget) {
250
+ if (this._widget.afterModelPosition !== index) {
251
+ const window = getWindow(this._widget.domNode);
252
+ this._disposeWidget();
253
+ scheduleAtNextAnimationFrame(window, () => {
254
+ this._createWidget(index, input, autoSend, undefined);
255
+ });
256
+ }
257
+ return;
258
+ }
259
+ this._createWidget(index, input, autoSend, undefined);
260
+ }
261
+ restore(editingCell, input) {
262
+ if (!this._notebookEditor.hasModel()) {
263
+ return;
264
+ }
265
+ const index = this._notebookEditor.textModel.cells.indexOf(editingCell.model);
266
+ if (index < 0) {
267
+ return;
268
+ }
269
+ if (this._widget) {
270
+ if (this._widget.afterModelPosition !== index) {
271
+ this._disposeWidget();
272
+ const window = getWindow(this._widget.domNode);
273
+ scheduleAtNextAnimationFrame(window, () => {
274
+ this._createWidget(index, input, false, editingCell);
275
+ });
276
+ }
277
+ return;
278
+ }
279
+ this._createWidget(index, input, false, editingCell);
280
+ }
281
+ _disposeWidget() {
282
+ this._widget?.dispose();
283
+ this._widget = undefined;
284
+ this._widgetDisposableStore.clear();
285
+ this._historyOffset = -1;
286
+ this._historyCandidate = '';
287
+ }
288
+ _createWidget(index, input, autoSend, initEditingCell) {
289
+ if (!this._notebookEditor.hasModel()) {
290
+ return;
291
+ }
292
+ this._widgetDisposableStore.clear();
293
+ const viewZoneContainer = document.createElement('div');
294
+ viewZoneContainer.classList.add('monaco-editor');
295
+ const widgetContainer = document.createElement('div');
296
+ widgetContainer.style.position = 'absolute';
297
+ viewZoneContainer.appendChild(widgetContainer);
298
+ this._focusTracker = this._widgetDisposableStore.add(trackFocus(viewZoneContainer));
299
+ this._widgetDisposableStore.add(this._focusTracker.onDidFocus(() => {
300
+ this._updateNotebookEditorFocusNSelections();
301
+ }));
302
+ const fakeParentEditorElement = document.createElement('div');
303
+ const fakeParentEditor = this._widgetDisposableStore.add(this._instantiationService.createInstance(CodeEditorWidget, fakeParentEditorElement, {}, { isSimpleWidget: true }));
304
+ const inputBoxFragment = `notebook-chat-input-${NotebookChatController_1.counter++}`;
305
+ const notebookUri = this._notebookEditor.textModel.uri;
306
+ const inputUri = notebookUri.with({ scheme: Schemas.untitled, fragment: inputBoxFragment });
307
+ const result = this._modelService.createModel('', null, inputUri, false);
308
+ fakeParentEditor.setModel(result);
309
+ const inlineChatWidget = this._widgetDisposableStore.add(this._instantiationService.createInstance(InlineChatWidget, ChatAgentLocation.Notebook, {
310
+ telemetrySource: 'notebook-generate-cell',
311
+ inputMenuId: MENU_CELL_CHAT_INPUT,
312
+ widgetMenuId: MENU_CELL_CHAT_WIDGET,
313
+ statusMenuId: MENU_CELL_CHAT_WIDGET_STATUS,
314
+ feedbackMenuId: MENU_CELL_CHAT_WIDGET_FEEDBACK
315
+ }));
316
+ inlineChatWidget.placeholder = ( localizeWithPath(
317
+ 'vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController',
318
+ 'default.placeholder',
319
+ "Ask a question"
320
+ ));
321
+ inlineChatWidget.updateInfo(( localizeWithPath(
322
+ 'vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController',
323
+ 'welcome.1',
324
+ "AI-generated code may be incorrect"
325
+ )));
326
+ widgetContainer.appendChild(inlineChatWidget.domNode);
327
+ this._widgetDisposableStore.add(inlineChatWidget.onDidChangeInput(() => {
328
+ this._warmupRequestCts?.dispose(true);
329
+ this._warmupRequestCts = undefined;
330
+ }));
331
+ this._notebookEditor.changeViewZones(accessor => {
332
+ const notebookViewZone = {
333
+ afterModelPosition: index,
334
+ heightInPx: 80,
335
+ domNode: viewZoneContainer
336
+ };
337
+ const id = accessor.addZone(notebookViewZone);
338
+ this._scrollWidgetIntoView(index);
339
+ this._widget = ( new NotebookChatWidget(
340
+ this._notebookEditor,
341
+ id,
342
+ notebookViewZone,
343
+ viewZoneContainer,
344
+ widgetContainer,
345
+ inlineChatWidget,
346
+ fakeParentEditor,
347
+ this._languageService
348
+ ));
349
+ if (initEditingCell) {
350
+ this._widget.restoreEditingCell(initEditingCell);
351
+ this._updateUserEditingState();
352
+ }
353
+ this._ctxCellWidgetFocused.set(true);
354
+ disposableTimeout(() => {
355
+ this._focusWidget();
356
+ }, 0, this._store);
357
+ this._sessionCtor = createCancelablePromise(async (token) => {
358
+ if (fakeParentEditor.hasModel()) {
359
+ await this._startSession(fakeParentEditor, token);
360
+ this._warmupRequestCts = ( new CancellationTokenSource());
361
+ this._startInitialFolowups(fakeParentEditor, this._warmupRequestCts.token);
362
+ if (this._widget) {
363
+ this._widget.inlineChatWidget.placeholder = this._activeSession?.session.placeholder ?? ( localizeWithPath(
364
+ 'vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController',
365
+ 'default.placeholder',
366
+ "Ask a question"
367
+ ));
368
+ this._widget.inlineChatWidget.updateInfo(this._activeSession?.session.message ?? ( localizeWithPath(
369
+ 'vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController',
370
+ 'welcome.1',
371
+ "AI-generated code may be incorrect"
372
+ )));
373
+ this._widget.inlineChatWidget.updateSlashCommands(this._activeSession?.session.slashCommands ?? []);
374
+ this._focusWidget();
375
+ }
376
+ if (this._widget && input) {
377
+ this._widget.inlineChatWidget.value = input;
378
+ if (autoSend) {
379
+ this.acceptInput();
380
+ }
381
+ }
382
+ }
383
+ });
384
+ });
385
+ }
386
+ _scrollWidgetIntoView(index) {
387
+ if (index === 0 || this._notebookEditor.getLength() === 0) {
388
+ this._notebookEditor.revealOffsetInCenterIfOutsideViewport(0);
389
+ }
390
+ else {
391
+ const previousCell = this._notebookEditor.cellAt(Math.min(index - 1, this._notebookEditor.getLength() - 1));
392
+ if (previousCell) {
393
+ const cellTop = this._notebookEditor.getAbsoluteTopOfElement(previousCell);
394
+ const cellHeight = this._notebookEditor.getHeightOfElement(previousCell);
395
+ this._notebookEditor.revealOffsetInCenterIfOutsideViewport(cellTop + cellHeight + 48 );
396
+ }
397
+ }
398
+ }
399
+ _focusWidget() {
400
+ if (!this._widget) {
401
+ return;
402
+ }
403
+ this._updateNotebookEditorFocusNSelections();
404
+ this._widget.focus();
405
+ }
406
+ _updateNotebookEditorFocusNSelections() {
407
+ if (!this._widget) {
408
+ return;
409
+ }
410
+ this._widget.updateNotebookEditorFocusNSelections();
411
+ }
412
+ async acceptInput() {
413
+ assertType(this._widget);
414
+ await this._sessionCtor;
415
+ assertType(this._activeSession);
416
+ this._warmupRequestCts?.dispose(true);
417
+ this._warmupRequestCts = undefined;
418
+ this._activeSession.addInput(( new SessionPrompt(this._widget.inlineChatWidget.value, 0, true)));
419
+ assertType(this._activeSession.lastInput);
420
+ const value = this._activeSession.lastInput.value;
421
+ this._historyUpdate(value);
422
+ const editor = this._widget.parentEditor;
423
+ const model = editor.getModel();
424
+ if (!editor.hasModel() || !model) {
425
+ return;
426
+ }
427
+ if (this._widget.editingCell && this._widget.editingCell.textBuffer.getLength() > 0) {
428
+ const ref = await this._widget.editingCell.resolveTextModel();
429
+ ref.setValue('');
430
+ }
431
+ const editingCellIndex = this._widget.editingCell ? this._notebookEditor.getCellIndex(this._widget.editingCell) : undefined;
432
+ if (editingCellIndex !== undefined) {
433
+ this._notebookEditor.setSelections([{
434
+ start: editingCellIndex,
435
+ end: editingCellIndex + 1
436
+ }]);
437
+ }
438
+ else {
439
+ this._notebookEditor.setSelections([{
440
+ start: this._widget.afterModelPosition,
441
+ end: this._widget.afterModelPosition
442
+ }]);
443
+ }
444
+ this._ctxHasActiveRequest.set(true);
445
+ this._widget.inlineChatWidget.updateSlashCommands(this._activeSession.session.slashCommands ?? []);
446
+ this._widget?.inlineChatWidget.updateProgress(true);
447
+ const request = {
448
+ requestId: generateUuid(),
449
+ prompt: value,
450
+ attempt: this._activeSession.lastInput.attempt,
451
+ selection: { selectionStartLineNumber: 1, selectionStartColumn: 1, positionLineNumber: 1, positionColumn: 1 },
452
+ wholeRange: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 },
453
+ live: true,
454
+ previewDocument: model.uri,
455
+ withIntentDetection: true,
456
+ };
457
+ this._activeRequestCts?.cancel();
458
+ this._activeRequestCts = ( new CancellationTokenSource());
459
+ const progressEdits = [];
460
+ const progressiveEditsQueue = ( new Queue());
461
+ const progressiveEditsClock = StopWatch.create();
462
+ const progressiveEditsAvgDuration = ( new MovingAverage());
463
+ const progressiveEditsCts = ( new CancellationTokenSource(this._activeRequestCts.token));
464
+ let progressiveChatResponse;
465
+ const progress = ( new AsyncProgress(async (data) => {
466
+ if (this._activeRequestCts?.token.isCancellationRequested) {
467
+ return;
468
+ }
469
+ if (data.message) {
470
+ this._widget?.inlineChatWidget.updateToolbar(false);
471
+ this._widget?.inlineChatWidget.updateInfo(data.message);
472
+ }
473
+ if (data.edits?.length) {
474
+ if (!request.live) {
475
+ throw new Error('Progress in NOT supported in non-live mode');
476
+ }
477
+ progressEdits.push(data.edits);
478
+ progressiveEditsAvgDuration.update(progressiveEditsClock.elapsed());
479
+ progressiveEditsClock.reset();
480
+ progressiveEditsQueue.queue(async () => {
481
+ await this._makeChanges(data.edits, data.editsShouldBeInstant
482
+ ? undefined
483
+ : { duration: progressiveEditsAvgDuration.value, token: progressiveEditsCts.token });
484
+ });
485
+ }
486
+ if (data.markdownFragment) {
487
+ if (!progressiveChatResponse) {
488
+ const message = {
489
+ message: ( new MarkdownString(
490
+ data.markdownFragment,
491
+ { supportThemeIcons: true, supportHtml: true, isTrusted: false }
492
+ )),
493
+ providerId: this._activeSession.provider.label,
494
+ requestId: request.requestId,
495
+ };
496
+ progressiveChatResponse = this._widget?.inlineChatWidget.updateChatMessage(message, true);
497
+ }
498
+ else {
499
+ progressiveChatResponse.appendContent(data.markdownFragment);
500
+ }
501
+ }
502
+ }));
503
+ const task = this._activeSession.provider.provideResponse(this._activeSession.session, request, progress, this._activeRequestCts.token);
504
+ let response;
505
+ try {
506
+ this._widget?.inlineChatWidget.updateChatMessage(undefined);
507
+ this._widget?.inlineChatWidget.updateFollowUps(undefined);
508
+ this._widget?.inlineChatWidget.updateProgress(true);
509
+ this._widget?.inlineChatWidget.updateInfo(!this._activeSession.lastExchange ? GeneratingPhrase + '\u2026' : '');
510
+ this._ctxHasActiveRequest.set(true);
511
+ const reply = await raceCancellationError(Promise.resolve(task), this._activeRequestCts.token);
512
+ if (progressiveEditsQueue.size > 0) {
513
+ await Event.toPromise(progressiveEditsQueue.onDrained);
514
+ }
515
+ await progress.drain();
516
+ if (!reply) {
517
+ response = ( new EmptyResponse());
518
+ }
519
+ else {
520
+ const markdownContents = ( new MarkdownString('', { supportThemeIcons: true, supportHtml: true, isTrusted: false }));
521
+ const replyResponse = response = this._instantiationService.createInstance(ReplyResponse, reply, markdownContents, this._activeSession.textModelN.uri, this._activeSession.textModelN.getAlternativeVersionId(), progressEdits, request.requestId);
522
+ for (let i = progressEdits.length; i < replyResponse.allLocalEdits.length; i++) {
523
+ await this._makeChanges(replyResponse.allLocalEdits[i], undefined);
524
+ }
525
+ if (this._activeSession?.provider.provideFollowups) {
526
+ const followupCts = ( new CancellationTokenSource());
527
+ const followups = await this._activeSession.provider.provideFollowups(this._activeSession.session, replyResponse.raw, followupCts.token);
528
+ if (followups && this._widget) {
529
+ const widget = this._widget;
530
+ widget.inlineChatWidget.updateFollowUps(followups, async (followup) => {
531
+ if (followup.kind === 'reply') {
532
+ widget.inlineChatWidget.value = followup.message;
533
+ this.acceptInput();
534
+ }
535
+ else {
536
+ await this.acceptSession();
537
+ this._commandService.executeCommand(followup.commandId, ...(followup.args ?? []));
538
+ }
539
+ });
540
+ }
541
+ }
542
+ this._userEditingDisposables.clear();
543
+ const editingCell = this._widget.getEditingCell();
544
+ if (editingCell) {
545
+ this._userEditingDisposables.add(editingCell.model.onDidChangeContent(() => this._updateUserEditingState()));
546
+ this._userEditingDisposables.add(editingCell.model.onDidChangeLanguage(() => this._updateUserEditingState()));
547
+ this._userEditingDisposables.add(editingCell.model.onDidChangeMetadata(() => this._updateUserEditingState()));
548
+ this._userEditingDisposables.add(editingCell.model.onDidChangeInternalMetadata(() => this._updateUserEditingState()));
549
+ this._userEditingDisposables.add(editingCell.model.onDidChangeOutputs(() => this._updateUserEditingState()));
550
+ this._userEditingDisposables.add(this._executionStateService.onDidChangeExecution(e => {
551
+ if (e.type === NotebookExecutionType.cell && e.affectsCell(editingCell.uri)) {
552
+ this._updateUserEditingState();
553
+ }
554
+ }));
555
+ }
556
+ }
557
+ }
558
+ catch (e) {
559
+ response = ( new ErrorResponse(e));
560
+ }
561
+ finally {
562
+ this._ctxHasActiveRequest.set(false);
563
+ this._widget?.inlineChatWidget.updateProgress(false);
564
+ this._widget?.inlineChatWidget.updateInfo('');
565
+ this._widget?.inlineChatWidget.updateToolbar(true);
566
+ }
567
+ this._ctxHasActiveRequest.set(false);
568
+ this._widget?.inlineChatWidget.updateProgress(false);
569
+ this._widget?.inlineChatWidget.updateInfo('');
570
+ this._widget?.inlineChatWidget.updateToolbar(true);
571
+ this._activeSession?.addExchange(( new SessionExchange(this._activeSession.lastInput, response)));
572
+ this._ctxLastResponseType.set(response instanceof ReplyResponse ? response.raw.type : undefined);
573
+ }
574
+ async _startSession(editor, token) {
575
+ if (this._activeSession) {
576
+ this._inlineChatSessionService.releaseSession(this._activeSession);
577
+ }
578
+ const session = await this._inlineChatSessionService.createSession(editor, { editMode: "live" }, token);
579
+ if (!session) {
580
+ return;
581
+ }
582
+ this._activeSession = session;
583
+ this._strategy = ( new EditStrategy(session));
584
+ }
585
+ async _startInitialFolowups(editor, token) {
586
+ if (!this._activeSession || !this._activeSession.provider.provideFollowups) {
587
+ return;
588
+ }
589
+ const request = {
590
+ requestId: generateUuid(),
591
+ prompt: '',
592
+ attempt: 0,
593
+ selection: { selectionStartLineNumber: 1, selectionStartColumn: 1, positionLineNumber: 1, positionColumn: 1 },
594
+ wholeRange: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 },
595
+ live: true,
596
+ previewDocument: editor.getModel().uri,
597
+ withIntentDetection: true
598
+ };
599
+ const progress = ( new AsyncProgress(async (data) => { }));
600
+ const task = this._activeSession.provider.provideResponse(this._activeSession.session, request, progress, token);
601
+ const reply = await raceCancellationError(Promise.resolve(task), token);
602
+ if (token.isCancellationRequested) {
603
+ return;
604
+ }
605
+ if (!reply) {
606
+ return;
607
+ }
608
+ const markdownContents = ( new MarkdownString('', { supportThemeIcons: true, supportHtml: true, isTrusted: false }));
609
+ const response = this._instantiationService.createInstance(ReplyResponse, reply, markdownContents, this._activeSession.textModelN.uri, this._activeSession.textModelN.getAlternativeVersionId(), [], request.requestId);
610
+ const followups = await this._activeSession.provider.provideFollowups(this._activeSession.session, response.raw, token);
611
+ if (followups && this._widget) {
612
+ const widget = this._widget;
613
+ widget.inlineChatWidget.updateFollowUps(followups, async (followup) => {
614
+ if (followup.kind === 'reply') {
615
+ widget.inlineChatWidget.value = followup.message;
616
+ this.acceptInput();
617
+ }
618
+ else {
619
+ await this.acceptSession();
620
+ this._commandService.executeCommand(followup.commandId, ...(followup.args ?? []));
621
+ }
622
+ });
623
+ }
624
+ }
625
+ async _makeChanges(edits, opts) {
626
+ assertType(this._activeSession);
627
+ assertType(this._strategy);
628
+ assertType(this._widget);
629
+ const editingCell = await this._widget.getOrCreateEditingCell();
630
+ if (!editingCell) {
631
+ return;
632
+ }
633
+ const editor = editingCell.editor;
634
+ const moreMinimalEdits = await this._editorWorkerService.computeMoreMinimalEdits(editor.getModel().uri, edits);
635
+ if (moreMinimalEdits?.length === 0) {
636
+ return;
637
+ }
638
+ const actualEdits = !opts && moreMinimalEdits ? moreMinimalEdits : edits;
639
+ const editOperations = ( actualEdits.map(TextEdit.asEditOperation));
640
+ this._inlineChatSavingService.markChanged(this._activeSession);
641
+ try {
642
+ this._activeSession.wholeRange.trackEdits(editOperations);
643
+ if (opts) {
644
+ await this._strategy.makeProgressiveChanges(editor, editOperations, opts);
645
+ }
646
+ else {
647
+ await this._strategy.makeChanges(editor, editOperations);
648
+ }
649
+ }
650
+ finally {
651
+ }
652
+ }
653
+ _updateUserEditingState() {
654
+ this._ctxUserDidEdit.set(true);
655
+ }
656
+ async acceptSession() {
657
+ assertType(this._activeSession);
658
+ assertType(this._strategy);
659
+ const editor = this._widget?.parentEditor;
660
+ if (!editor?.hasModel()) {
661
+ return;
662
+ }
663
+ const editingCell = this._widget?.getEditingCell();
664
+ if (editingCell && this._notebookEditor.hasModel() && this._activeSession.lastInput) {
665
+ const cellId = NotebookCellTextModelLikeId.str({ uri: editingCell.uri, viewType: this._notebookEditor.textModel.viewType });
666
+ const prompt = this._activeSession.lastInput.value;
667
+ this._promptCache.set(cellId, prompt);
668
+ this._onDidChangePromptCache.fire({ cell: editingCell.uri });
669
+ }
670
+ try {
671
+ await this._strategy.apply(editor);
672
+ this._inlineChatSessionService.releaseSession(this._activeSession);
673
+ }
674
+ catch (_err) { }
675
+ this.dismiss(false);
676
+ }
677
+ async focusAbove() {
678
+ if (!this._widget) {
679
+ return;
680
+ }
681
+ const index = this._widget.afterModelPosition;
682
+ const prev = index - 1;
683
+ if (prev < 0) {
684
+ return;
685
+ }
686
+ const cell = this._notebookEditor.cellAt(prev);
687
+ if (!cell) {
688
+ return;
689
+ }
690
+ await this._notebookEditor.focusNotebookCell(cell, 'editor');
691
+ }
692
+ async focusNext() {
693
+ if (!this._widget) {
694
+ return;
695
+ }
696
+ const index = this._widget.afterModelPosition;
697
+ const cell = this._notebookEditor.cellAt(index);
698
+ if (!cell) {
699
+ return;
700
+ }
701
+ await this._notebookEditor.focusNotebookCell(cell, 'editor');
702
+ }
703
+ hasFocus() {
704
+ return this._widget?.hasFocus() ?? false;
705
+ }
706
+ focus() {
707
+ this._focusWidget();
708
+ }
709
+ focusNearestWidget(index, direction) {
710
+ switch (direction) {
711
+ case 'above':
712
+ if (this._widget?.afterModelPosition === index) {
713
+ this._focusWidget();
714
+ }
715
+ break;
716
+ case 'below':
717
+ if (this._widget?.afterModelPosition === index + 1) {
718
+ this._focusWidget();
719
+ }
720
+ break;
721
+ }
722
+ }
723
+ populateHistory(up) {
724
+ if (!this._widget) {
725
+ return;
726
+ }
727
+ const len = NotebookChatController_1._promptHistory.length;
728
+ if (len === 0) {
729
+ return;
730
+ }
731
+ if (this._historyOffset === -1) {
732
+ this._historyCandidate = this._widget.inlineChatWidget.value;
733
+ }
734
+ const newIdx = this._historyOffset + (up ? 1 : -1);
735
+ if (newIdx >= len) {
736
+ return;
737
+ }
738
+ let entry;
739
+ if (newIdx < 0) {
740
+ entry = this._historyCandidate;
741
+ this._historyOffset = -1;
742
+ }
743
+ else {
744
+ entry = NotebookChatController_1._promptHistory[newIdx];
745
+ this._historyOffset = newIdx;
746
+ }
747
+ this._widget.inlineChatWidget.value = entry;
748
+ this._widget.inlineChatWidget.selectAll();
749
+ }
750
+ async cancelCurrentRequest(discard) {
751
+ if (discard) {
752
+ this._strategy?.cancel();
753
+ }
754
+ this._activeRequestCts?.cancel();
755
+ }
756
+ getEditingCell() {
757
+ return this._widget?.getEditingCell();
758
+ }
759
+ discard() {
760
+ this._strategy?.cancel();
761
+ this._activeRequestCts?.cancel();
762
+ this._widget?.discardChange();
763
+ this.dismiss(true);
764
+ }
765
+ async feedbackLast(kind) {
766
+ if (this._activeSession?.lastExchange && this._activeSession.lastExchange.response instanceof ReplyResponse) {
767
+ this._activeSession.provider.handleInlineChatResponseFeedback?.(this._activeSession.session, this._activeSession.lastExchange.response.raw, kind);
768
+ this._widget?.inlineChatWidget.updateStatus('Thank you for your feedback!', { resetAfter: 1250 });
769
+ }
770
+ }
771
+ dismiss(discard) {
772
+ const widget = this._widget;
773
+ const widgetIndex = widget?.afterModelPosition;
774
+ const currentFocus = this._notebookEditor.getFocus();
775
+ const isWidgetFocused = currentFocus.start === widgetIndex && currentFocus.end === widgetIndex;
776
+ if (widget && isWidgetFocused) {
777
+ const editingCell = widget.getEditingCell();
778
+ const shouldFocusEditingCell = editingCell && !discard;
779
+ const shouldFocusTopCell = widgetIndex === 0 && this._notebookEditor.getLength() > 0;
780
+ const shouldFocusAboveCell = widgetIndex !== 0 && this._notebookEditor.cellAt(widgetIndex - 1);
781
+ if (shouldFocusEditingCell) {
782
+ this._notebookEditor.focusNotebookCell(editingCell, 'container');
783
+ }
784
+ else if (shouldFocusTopCell) {
785
+ this._notebookEditor.focusNotebookCell(this._notebookEditor.cellAt(0), 'container');
786
+ }
787
+ else if (shouldFocusAboveCell) {
788
+ this._notebookEditor.focusNotebookCell(this._notebookEditor.cellAt(widgetIndex - 1), 'container');
789
+ }
790
+ }
791
+ this._ctxCellWidgetFocused.set(false);
792
+ this._ctxUserDidEdit.set(false);
793
+ this._sessionCtor?.cancel();
794
+ this._sessionCtor = undefined;
795
+ this._widget?.dispose();
796
+ this._widget = undefined;
797
+ this._widgetDisposableStore.clear();
798
+ }
799
+ isCellGeneratedByChat(cell) {
800
+ if (!this._notebookEditor.hasModel()) {
801
+ return false;
802
+ }
803
+ const cellId = NotebookCellTextModelLikeId.str({ uri: cell.uri, viewType: this._notebookEditor.textModel.viewType });
804
+ return ( this._promptCache.has(cellId));
805
+ }
806
+ getPromptFromCache(cell) {
807
+ if (!this._notebookEditor.hasModel()) {
808
+ return undefined;
809
+ }
810
+ const cellId = NotebookCellTextModelLikeId.str({ uri: cell.uri, viewType: this._notebookEditor.textModel.viewType });
811
+ return this._promptCache.get(cellId);
812
+ }
813
+ dispose() {
814
+ this.dismiss(false);
815
+ super.dispose();
816
+ }
817
+ };
818
+ NotebookChatController = NotebookChatController_1 = ( __decorate([
819
+ ( __param(1, IInstantiationService)),
820
+ ( __param(2, IInlineChatSessionService)),
821
+ ( __param(3, IContextKeyService)),
822
+ ( __param(4, ICommandService)),
823
+ ( __param(5, IEditorWorkerService)),
824
+ ( __param(6, IInlineChatSavingService)),
825
+ ( __param(7, IModelService)),
826
+ ( __param(8, ILanguageService)),
827
+ ( __param(9, INotebookExecutionStateService)),
828
+ ( __param(10, IStorageService))
829
+ ], NotebookChatController));
830
+ class EditStrategy {
831
+ constructor(_session) {
832
+ this._session = _session;
833
+ this._editCount = 0;
834
+ }
835
+ async makeProgressiveChanges(editor, edits, opts) {
836
+ if (++this._editCount === 1) {
837
+ editor.pushUndoStop();
838
+ }
839
+ const durationInSec = opts.duration / 1000;
840
+ for (const edit of edits) {
841
+ const wordCount = countWords(edit.text ?? '');
842
+ const speed = wordCount / durationInSec;
843
+ await performAsyncTextEdit(editor.getModel(), asProgressiveEdit(( new WindowIntervalTimer()), edit, speed, opts.token));
844
+ }
845
+ }
846
+ async makeChanges(editor, edits) {
847
+ const cursorStateComputerAndInlineDiffCollection = (undoEdits) => {
848
+ let last = null;
849
+ for (const edit of undoEdits) {
850
+ last = !last || last.isBefore(edit.range.getEndPosition()) ? edit.range.getEndPosition() : last;
851
+ }
852
+ return last && [Selection.fromPositions(last)];
853
+ };
854
+ if (++this._editCount === 1) {
855
+ editor.pushUndoStop();
856
+ }
857
+ editor.executeEdits('inline-chat-live', edits, cursorStateComputerAndInlineDiffCollection);
858
+ }
859
+ async apply(editor) {
860
+ if (this._editCount > 0) {
861
+ editor.pushUndoStop();
862
+ }
863
+ if (!(this._session.lastExchange?.response instanceof ReplyResponse)) {
864
+ return;
865
+ }
866
+ const { untitledTextModel } = this._session.lastExchange.response;
867
+ if (untitledTextModel && !untitledTextModel.isDisposed() && untitledTextModel.isDirty()) {
868
+ await untitledTextModel.save({ reason: 1 });
869
+ }
870
+ }
871
+ async cancel() {
872
+ const { textModelN: modelN, textModelNAltVersion, textModelNSnapshotAltVersion } = this._session;
873
+ if (modelN.isDisposed()) {
874
+ return;
875
+ }
876
+ const targetAltVersion = textModelNSnapshotAltVersion ?? textModelNAltVersion;
877
+ while (targetAltVersion < modelN.getAlternativeVersionId() && modelN.canUndo()) {
878
+ modelN.undo();
879
+ }
880
+ }
881
+ createSnapshot() {
882
+ if (this._session && !this._session.textModel0.equalsTextBuffer(this._session.textModelN.getTextBuffer())) {
883
+ this._session.createSnapshot();
884
+ }
885
+ }
886
+ }
887
+ registerNotebookContribution(NotebookChatController.id, NotebookChatController);
888
+ export { EditStrategy, NotebookChatController };