@codingame/monaco-vscode-api 21.5.1 → 22.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 (450) hide show
  1. package/README.md +0 -5
  2. package/missing-services.js +68 -78
  3. package/package.json +8 -8
  4. package/services.d.ts +4 -4
  5. package/services.js +5 -4
  6. package/vscode/product.json.js +1 -1
  7. package/vscode/src/vs/base/browser/dom.js +6 -3
  8. package/vscode/src/vs/base/browser/domSanitize.d.ts +8 -0
  9. package/vscode/src/vs/base/browser/domSanitize.js +49 -27
  10. package/vscode/src/vs/base/browser/domStylesheets.js +5 -1
  11. package/vscode/src/vs/base/browser/markdownRenderer.js +7 -5
  12. package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  13. package/vscode/src/vs/base/browser/ui/contextview/contextview.js +2 -2
  14. package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +1 -1
  15. package/vscode/src/vs/base/browser/ui/menu/menu.js +1 -0
  16. package/vscode/src/vs/base/browser/ui/progressbar/progressbar.d.ts +1 -1
  17. package/vscode/src/vs/base/common/async.js +6 -0
  18. package/vscode/src/vs/base/common/cancellation.d.ts +21 -0
  19. package/vscode/src/vs/base/common/cancellation.js +42 -1
  20. package/vscode/src/vs/base/common/codicons.d.ts +3 -0
  21. package/vscode/src/vs/base/common/codiconsLibrary.d.ts +3 -0
  22. package/vscode/src/vs/base/common/codiconsLibrary.js +3 -0
  23. package/vscode/src/vs/base/common/decorators/cancelPreviousCalls.d.ts +84 -0
  24. package/vscode/src/vs/base/common/decorators.d.ts +1 -1
  25. package/vscode/src/vs/base/common/htmlContent.d.ts +2 -0
  26. package/vscode/src/vs/base/common/htmlContent.js +9 -6
  27. package/vscode/src/vs/base/common/lifecycle.js +21 -7
  28. package/vscode/src/vs/base/common/numbers.d.ts +0 -45
  29. package/vscode/src/vs/base/common/oauth.d.ts +33 -0
  30. package/vscode/src/vs/base/common/oauth.js +79 -3
  31. package/vscode/src/vs/base/common/observableInternal/base.d.ts +4 -0
  32. package/vscode/src/vs/base/common/observableInternal/index.js +3 -0
  33. package/vscode/src/vs/base/common/observableInternal/logging/debugGetDependencyGraph.d.ts +4 -0
  34. package/vscode/src/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +98 -0
  35. package/vscode/src/vs/base/common/observableInternal/observables/baseObservable.d.ts +4 -0
  36. package/vscode/src/vs/base/common/observableInternal/observables/baseObservable.js +8 -1
  37. package/vscode/src/vs/base/common/observableInternal/observables/derivedImpl.d.ts +1 -0
  38. package/vscode/src/vs/base/common/observableInternal/observables/derivedImpl.js +10 -0
  39. package/vscode/src/vs/base/common/observableInternal/observables/observableFromEvent.d.ts +4 -0
  40. package/vscode/src/vs/base/common/observableInternal/observables/observableFromEvent.js +3 -0
  41. package/vscode/src/vs/base/common/observableInternal/reactions/autorunImpl.d.ts +1 -0
  42. package/vscode/src/vs/base/common/observableInternal/reactions/autorunImpl.js +9 -0
  43. package/vscode/src/vs/base/common/product.d.ts +7 -1
  44. package/vscode/src/vs/base/common/strings.d.ts +0 -1
  45. package/vscode/src/vs/base/common/strings.js +9 -4
  46. package/vscode/src/vs/base/common/uriIpc.js +24 -1
  47. package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js +26 -16
  48. package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderContentSimple.js +3 -3
  49. package/vscode/src/vs/editor/browser/services/hoverService/hover.css +1 -1
  50. package/vscode/src/vs/editor/browser/widget/diffEditor/commands.d.ts +3 -1
  51. package/vscode/src/vs/editor/browser/widget/diffEditor/commands.js +12 -1
  52. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +8 -8
  53. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +4 -4
  54. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.d.ts +1 -0
  55. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +26 -1
  56. package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
  57. package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +1 -1
  58. package/vscode/src/vs/editor/common/config/editorOptions.d.ts +93 -85
  59. package/vscode/src/vs/editor/common/config/editorOptions.js +386 -351
  60. package/vscode/src/vs/editor/common/core/editorColorRegistry.js +71 -71
  61. package/vscode/src/vs/editor/common/core/ranges/lineRange.d.ts +3 -3
  62. package/vscode/src/vs/editor/common/editorContextKeys.js +46 -46
  63. package/vscode/src/vs/editor/common/languages/modesRegistry.js +1 -1
  64. package/vscode/src/vs/editor/common/languages.d.ts +5 -1
  65. package/vscode/src/vs/editor/common/languages.js +56 -56
  66. package/vscode/src/vs/editor/common/model/editStack.js +1 -1
  67. package/vscode/src/vs/editor/common/standalone/standaloneEnums.d.ts +86 -85
  68. package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +86 -85
  69. package/vscode/src/vs/editor/common/standaloneStrings.js +47 -47
  70. package/vscode/src/vs/editor/common/textModelEditSource.d.ts +1 -0
  71. package/vscode/src/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  72. package/vscode/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +9 -7
  73. package/vscode/src/vs/editor/common/viewModel/screenReaderSimpleModel.d.ts +1 -0
  74. package/vscode/src/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  75. package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  76. package/vscode/src/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  77. package/vscode/src/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  78. package/vscode/src/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
  79. package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  80. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  81. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  82. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  83. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  84. package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  85. package/vscode/src/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  86. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  87. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  88. package/vscode/src/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
  89. package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  90. package/vscode/src/vs/editor/contrib/comment/browser/comment.js +6 -6
  91. package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
  92. package/vscode/src/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  93. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  94. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
  95. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  96. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  97. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  98. package/vscode/src/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  99. package/vscode/src/vs/editor/contrib/find/browser/findController.js +16 -16
  100. package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +26 -26
  101. package/vscode/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.contribution.d.ts +1 -0
  102. package/vscode/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.contribution.js +8 -0
  103. package/vscode/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +44 -0
  104. package/vscode/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.d.ts +10 -0
  105. package/vscode/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.js +81 -0
  106. package/vscode/src/vs/editor/contrib/folding/browser/folding.js +21 -20
  107. package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  108. package/vscode/src/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  109. package/vscode/src/vs/editor/contrib/format/browser/format.js +3 -0
  110. package/vscode/src/vs/editor/contrib/format/browser/formatActions.js +2 -2
  111. package/vscode/src/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  112. package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  113. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  114. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.d.ts +4 -1
  115. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +20 -11
  116. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  117. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
  118. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  119. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  120. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  121. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  122. package/vscode/src/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  123. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.js +2 -1
  124. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +3 -3
  125. package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +2 -2
  126. package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  127. package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  128. package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
  129. package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  130. package/vscode/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  131. package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  132. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHints.js +2 -7
  133. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  134. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +19 -19
  135. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
  136. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +18 -13
  137. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  138. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  139. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.d.ts +3 -1
  140. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +14 -6
  141. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.d.ts +7 -1
  142. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +154 -5
  143. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.d.ts +1 -0
  144. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +3 -0
  145. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.d.ts +7 -3
  146. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +18 -3
  147. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/telemetry.d.ts +45 -0
  148. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/telemetry.js +7 -0
  149. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +16 -15
  150. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +5 -2
  151. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
  152. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +2 -2
  153. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +24 -21
  154. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +13 -4
  155. package/vscode/src/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  156. package/vscode/src/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  157. package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.d.ts +2 -1
  158. package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +36 -35
  159. package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  160. package/vscode/src/vs/editor/contrib/links/browser/links.js +11 -11
  161. package/vscode/src/vs/editor/contrib/message/browser/messageController.js +1 -1
  162. package/vscode/src/vs/editor/contrib/middleScroll/browser/middleScrollController.js +3 -3
  163. package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  164. package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  165. package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  166. package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  167. package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  168. package/vscode/src/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  169. package/vscode/src/vs/editor/contrib/rename/browser/rename.js +11 -11
  170. package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +6 -6
  171. package/vscode/src/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  172. package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.d.ts +3 -0
  173. package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +13 -4
  174. package/vscode/src/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  175. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  176. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +12 -19
  177. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +10 -1
  178. package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  179. package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
  180. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +18 -18
  181. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
  182. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  183. package/vscode/src/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  184. package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  185. package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  186. package/vscode/src/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  187. package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  188. package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +26 -26
  189. package/vscode/src/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  190. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  191. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  192. package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
  193. package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +1 -1
  194. package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +0 -1
  195. package/vscode/src/vs/editor/standalone/browser/standaloneThemeService.js +1 -0
  196. package/vscode/src/vs/platform/accessibility/browser/accessibleView.d.ts +1 -1
  197. package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  198. package/vscode/src/vs/platform/action/common/actionCommonCategories.js +6 -6
  199. package/vscode/src/vs/platform/actionWidget/browser/actionList.js +9 -6
  200. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.css +13 -14
  201. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  202. package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  203. package/vscode/src/vs/platform/actions/browser/toolbar.d.ts +1 -1
  204. package/vscode/src/vs/platform/actions/browser/toolbar.js +5 -5
  205. package/vscode/src/vs/platform/actions/common/actions.d.ts +2 -0
  206. package/vscode/src/vs/platform/actions/common/actions.js +2 -0
  207. package/vscode/src/vs/platform/actions/common/menuResetAction.js +1 -1
  208. package/vscode/src/vs/platform/actions/common/menuService.js +2 -2
  209. package/vscode/src/vs/platform/assignment/common/assignment.d.ts +6 -1
  210. package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +2 -2
  211. package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +10 -10
  212. package/vscode/src/vs/platform/contextkey/browser/contextKeyService.d.ts +2 -0
  213. package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +32 -3
  214. package/vscode/src/vs/platform/contextkey/common/contextkey.js +11 -11
  215. package/vscode/src/vs/platform/contextkey/common/contextkeys.d.ts +0 -1
  216. package/vscode/src/vs/platform/contextkey/common/contextkeys.js +10 -11
  217. package/vscode/src/vs/platform/contextkey/common/scanner.js +5 -5
  218. package/vscode/src/vs/platform/dataChannel/browser/forwardingTelemetryService.d.ts +32 -0
  219. package/vscode/src/vs/platform/dataChannel/browser/forwardingTelemetryService.js +86 -0
  220. package/vscode/src/vs/platform/dialogs/common/dialogs.service.d.ts +1 -1
  221. package/vscode/src/vs/platform/dnd/browser/dnd.js +1 -1
  222. package/vscode/src/vs/platform/environment/common/argv.d.ts +1 -0
  223. package/vscode/src/vs/platform/environment/common/environment.service.d.ts +0 -1
  224. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +19 -19
  225. package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +1 -1
  226. package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +7 -7
  227. package/vscode/src/vs/platform/extensionManagement/common/implicitActivationEvents.d.ts +1 -3
  228. package/vscode/src/vs/platform/extensionManagement/common/implicitActivationEvents.js +1 -1
  229. package/vscode/src/vs/platform/extensions/common/extensionValidator.js +20 -20
  230. package/vscode/src/vs/platform/extensions/common/extensions.d.ts +2 -1
  231. package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.d.ts +4 -3
  232. package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +4 -3
  233. package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.js +2 -2
  234. package/vscode/src/vs/platform/files/common/files.js +6 -6
  235. package/vscode/src/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  236. package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  237. package/vscode/src/vs/platform/list/browser/listService.js +27 -27
  238. package/vscode/src/vs/platform/log/common/log.js +6 -6
  239. package/vscode/src/vs/platform/markers/common/markerService.js +2 -2
  240. package/vscode/src/vs/platform/markers/common/markers.js +6 -6
  241. package/vscode/src/vs/platform/mcp/common/mcpGalleryManifest.d.ts +10 -2
  242. package/vscode/src/vs/platform/mcp/common/mcpGalleryManifest.js +10 -2
  243. package/vscode/src/vs/platform/mcp/common/mcpManagement.service.d.ts +3 -3
  244. package/vscode/src/vs/platform/notification/common/notification.js +3 -3
  245. package/vscode/src/vs/platform/product/common/product.js +3 -3
  246. package/vscode/src/vs/platform/quickinput/browser/quickInput.d.ts +1 -0
  247. package/vscode/src/vs/platform/quickinput/browser/quickInput.js +23 -15
  248. package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +47 -13
  249. package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +10 -61
  250. package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +1 -1
  251. package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  252. package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  253. package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeController.d.ts +6 -0
  254. package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeController.js +10 -0
  255. package/vscode/src/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +10 -5
  256. package/vscode/src/vs/platform/quickinput/browser/tree/quickTree.js +4 -1
  257. package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +10 -1
  258. package/vscode/src/vs/platform/request/common/request.js +34 -18
  259. package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -1
  260. package/vscode/src/vs/platform/terminal/common/terminal.d.ts +2 -3
  261. package/vscode/src/vs/platform/terminal/common/terminal.js +6 -7
  262. package/vscode/src/vs/platform/theme/common/colorUtils.js +2 -2
  263. package/vscode/src/vs/platform/theme/common/colors/baseColors.js +17 -17
  264. package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +8 -8
  265. package/vscode/src/vs/platform/theme/common/colors/editorColors.js +95 -95
  266. package/vscode/src/vs/platform/theme/common/colors/inputColors.js +47 -47
  267. package/vscode/src/vs/platform/theme/common/colors/listColors.js +36 -36
  268. package/vscode/src/vs/platform/theme/common/colors/menuColors.js +7 -7
  269. package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +11 -11
  270. package/vscode/src/vs/platform/theme/common/colors/miscColors.js +15 -15
  271. package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  272. package/vscode/src/vs/platform/theme/common/colors/searchColors.js +3 -3
  273. package/vscode/src/vs/platform/theme/common/iconRegistry.js +6 -6
  274. package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  275. package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
  276. package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +5 -5
  277. package/vscode/src/vs/platform/workspace/common/workspace.js +1 -1
  278. package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +11 -10
  279. package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +25 -24
  280. package/vscode/src/vs/workbench/api/common/extHostAuthentication.d.ts +4 -4
  281. package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +10 -18
  282. package/vscode/src/vs/workbench/api/common/extHostChatAgents2.d.ts +5 -0
  283. package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +16 -4
  284. package/vscode/src/vs/workbench/api/common/extHostChatSessions.d.ts +1 -3
  285. package/vscode/src/vs/workbench/api/common/extHostChatSessions.js +9 -5
  286. package/vscode/src/vs/workbench/api/common/extHostCustomEditors.d.ts +1 -1
  287. package/vscode/src/vs/workbench/api/common/extHostDebugService.js +0 -3
  288. package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +1 -1
  289. package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
  290. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +2 -2
  291. package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +9 -4
  292. package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +7 -2
  293. package/vscode/src/vs/workbench/api/common/extHostLogService.js +1 -1
  294. package/vscode/src/vs/workbench/api/common/extHostMcp.d.ts +97 -9
  295. package/vscode/src/vs/workbench/api/common/extHostMcp.js +66 -62
  296. package/vscode/src/vs/workbench/api/common/extHostNotebook.d.ts +1 -1
  297. package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
  298. package/vscode/src/vs/workbench/api/common/extHostSCM.d.ts +2 -0
  299. package/vscode/src/vs/workbench/api/common/extHostSCM.js +22 -0
  300. package/vscode/src/vs/workbench/api/common/extHostSecrets.d.ts +0 -1
  301. package/vscode/src/vs/workbench/api/common/extHostSecrets.js +0 -3
  302. package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +2 -2
  303. package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -1
  304. package/vscode/src/vs/workbench/api/common/extHostTerminalService.d.ts +2 -2
  305. package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +8 -8
  306. package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +53 -3
  307. package/vscode/src/vs/workbench/api/common/extHostTunnelService.d.ts +2 -0
  308. package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +5 -2
  309. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.d.ts +6 -2
  310. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +60 -9
  311. package/vscode/src/vs/workbench/api/common/extHostTypes.d.ts +18 -14
  312. package/vscode/src/vs/workbench/api/common/extHostTypes.js +7 -7
  313. package/vscode/src/vs/workbench/api/common/extHostWebviewPanels.d.ts +1 -1
  314. package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +1 -1
  315. package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +12 -12
  316. package/vscode/src/vs/workbench/browser/actions/developerActions.js +262 -31
  317. package/vscode/src/vs/workbench/browser/actions/textInputActions.js +6 -6
  318. package/vscode/src/vs/workbench/browser/contextkeys.d.ts +5 -7
  319. package/vscode/src/vs/workbench/browser/contextkeys.js +15 -43
  320. package/vscode/src/vs/workbench/common/configuration.js +9 -9
  321. package/vscode/src/vs/workbench/common/contextkeys.js +73 -73
  322. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +1 -1
  323. package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +1 -1
  324. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +1 -1
  325. package/vscode/src/vs/workbench/common/editor/textEditorModel.js +1 -1
  326. package/vscode/src/vs/workbench/common/editor.js +4 -4
  327. package/vscode/src/vs/workbench/common/theme.js +167 -167
  328. package/vscode/src/vs/workbench/common/views.js +4 -4
  329. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.d.ts +3 -2
  330. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +175 -158
  331. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +12 -12
  332. package/vscode/src/vs/workbench/contrib/chat/browser/chat.service.d.ts +2 -1
  333. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.service.d.ts +1 -1
  334. package/vscode/src/vs/workbench/contrib/chat/browser/chatContextPickService.service.d.ts +1 -1
  335. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.d.ts +1 -0
  336. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +15 -9
  337. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.d.ts +7 -0
  338. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +61 -66
  339. package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.d.ts +2 -1
  340. package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.js +2 -2
  341. package/vscode/src/vs/workbench/contrib/chat/common/chatLayoutService.service.d.ts +1 -2
  342. package/vscode/src/vs/workbench/contrib/chat/common/chatService.d.ts +24 -8
  343. package/vscode/src/vs/workbench/contrib/chat/common/chatService.service.d.ts +8 -1
  344. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.d.ts +6 -2
  345. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionsService.service.d.ts +0 -2
  346. package/vscode/src/vs/workbench/contrib/chat/common/chatVariableEntries.d.ts +28 -3
  347. package/vscode/src/vs/workbench/contrib/chat/common/chatVariableEntries.js +35 -6
  348. package/vscode/src/vs/workbench/contrib/chat/common/constants.d.ts +16 -6
  349. package/vscode/src/vs/workbench/contrib/chat/common/constants.js +11 -8
  350. package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.d.ts +9 -2
  351. package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.js +4 -4
  352. package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.service.d.ts +10 -3
  353. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.d.ts +8 -4
  354. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +50 -42
  355. package/vscode/src/vs/workbench/contrib/chat/common/modelPicker/modelPickerWidget.js +1 -1
  356. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service.d.ts +23 -8
  357. package/vscode/src/vs/workbench/contrib/chat/common/tools/manageTodoListTool.d.ts +4 -3
  358. package/vscode/src/vs/workbench/contrib/chat/common/tools/manageTodoListTool.js +29 -29
  359. package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.js +4 -3
  360. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +13 -13
  361. package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
  362. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +5 -5
  363. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
  364. package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
  365. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +7 -6
  366. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
  367. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +4 -4
  368. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
  369. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -2
  370. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
  371. package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
  372. package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +11 -11
  373. package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
  374. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +65 -65
  375. package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/commands.js +2 -2
  376. package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/configurationSchema.js +4 -4
  377. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.d.ts +3 -1
  378. package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -1
  379. package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +4 -4
  380. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
  381. package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
  382. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
  383. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
  384. package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
  385. package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
  386. package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
  387. package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
  388. package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistryTypes.d.ts +6 -1
  389. package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.d.ts +33 -0
  390. package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +16 -5
  391. package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.service.d.ts +2 -2
  392. package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocol.d.ts +217 -60
  393. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service.d.ts +1 -1
  394. package/vscode/src/vs/workbench/contrib/scm/common/history.d.ts +2 -0
  395. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
  396. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
  397. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
  398. package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
  399. package/vscode/src/vs/workbench/contrib/tasks/common/constants.js +1 -1
  400. package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +7 -7
  401. package/vscode/src/vs/workbench/contrib/tasks/common/taskService.service.d.ts +1 -1
  402. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.d.ts +16 -3
  403. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +18 -6
  404. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.d.ts +42 -8
  405. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.js +2 -1
  406. package/vscode/src/vs/workbench/contrib/testing/common/constants.d.ts +1 -0
  407. package/vscode/src/vs/workbench/contrib/testing/common/constants.js +12 -11
  408. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
  409. package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.js +2 -2
  410. package/vscode/src/vs/workbench/services/activity/common/activity.service.d.ts +1 -1
  411. package/vscode/src/vs/workbench/services/authentication/common/authentication.d.ts +4 -4
  412. package/vscode/src/vs/workbench/services/authentication/common/authentication.js +2 -2
  413. package/vscode/src/vs/workbench/services/authentication/common/authentication.service.d.ts +6 -6
  414. package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.d.ts +286 -0
  415. package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.js +861 -0
  416. package/vscode/src/vs/workbench/{contrib → services}/chat/common/chatEntitlementService.service.d.ts +8 -2
  417. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
  418. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
  419. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +87 -87
  420. package/vscode/src/vs/workbench/services/language/common/languageService.js +30 -30
  421. package/vscode/src/vs/workbench/services/lifecycle/common/lifecycle.service.d.ts +1 -0
  422. package/vscode/src/vs/workbench/services/lifecycle/common/lifecycleService.d.ts +1 -0
  423. package/vscode/src/vs/workbench/services/lifecycle/common/lifecycleService.js +4 -1
  424. package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
  425. package/vscode/src/vs/workbench/services/preferences/common/preferences.service.d.ts +1 -1
  426. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
  427. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
  428. package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
  429. package/vscode/src/vs/workbench/services/textfile/common/encoding.js +1 -1
  430. package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +22 -22
  431. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
  432. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +13 -13
  433. package/vscode-dts/vscode.d.ts +92 -47
  434. package/vscode-dts/vscode.proposed.authenticationChallenges.d.ts +7 -80
  435. package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +14 -1
  436. package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +12 -0
  437. package/vscode-dts/vscode.proposed.chatProvider.d.ts +19 -0
  438. package/vscode-dts/vscode.proposed.chatSessionsProvider.d.ts +19 -11
  439. package/vscode-dts/vscode.proposed.d.ts +1 -1
  440. package/vscode-dts/{vscode.proposed.secretStorageKeys.d.ts → vscode.proposed.devDeviceId.d.ts} +3 -4
  441. package/vscode-dts/vscode.proposed.languageModelCapabilities.d.ts +5 -0
  442. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +2 -0
  443. package/vscode-dts/vscode.proposed.terminalCompletionProvider.d.ts +70 -16
  444. package/vscode/src/vs/workbench/contrib/chat/common/chatLayoutService.d.ts +0 -8
  445. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/frontMatterCodec/tokens/index.d.ts +0 -5
  446. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/codecs/base/simpleCodec/tokens/tokens.d.ts +0 -20
  447. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/types.d.ts +0 -55
  448. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/types.d.ts +0 -91
  449. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +0 -125
  450. /package/vscode/src/vs/workbench/{contrib → services}/chat/common/chatEntitlementService.service.js +0 -0
@@ -3,24 +3,24 @@ import { RawContextKey } from '../../../../../platform/contextkey/common/context
3
3
  import { localize } from '../../../../../nls.js';
4
4
 
5
5
  class InlineCompletionContextKeys {
6
- static { this.inlineSuggestionVisible = ( new RawContextKey('inlineSuggestionVisible', false, ( localize(1278, "Whether an inline suggestion is visible")))); }
7
- static { this.inlineSuggestionHasIndentation = ( new RawContextKey('inlineSuggestionHasIndentation', false, ( localize(1279, "Whether the inline suggestion starts with whitespace")))); }
6
+ static { this.inlineSuggestionVisible = ( new RawContextKey('inlineSuggestionVisible', false, ( localize(1281, "Whether an inline suggestion is visible")))); }
7
+ static { this.inlineSuggestionHasIndentation = ( new RawContextKey('inlineSuggestionHasIndentation', false, ( localize(1282, "Whether the inline suggestion starts with whitespace")))); }
8
8
  static { this.inlineSuggestionHasIndentationLessThanTabSize = ( new RawContextKey('inlineSuggestionHasIndentationLessThanTabSize', true, ( localize(
9
- 1280,
9
+ 1283,
10
10
  "Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"
11
11
  )))); }
12
12
  static { this.suppressSuggestions = ( new RawContextKey('inlineSuggestionSuppressSuggestions', undefined, ( localize(
13
- 1281,
13
+ 1284,
14
14
  "Whether suggestions should be suppressed for the current suggestion"
15
15
  )))); }
16
- static { this.cursorBeforeGhostText = ( new RawContextKey('cursorBeforeGhostText', false, ( localize(1282, "Whether the cursor is at ghost text")))); }
17
- static { this.cursorInIndentation = ( new RawContextKey('cursorInIndentation', false, ( localize(1283, "Whether the cursor is in indentation")))); }
18
- static { this.hasSelection = ( new RawContextKey('editor.hasSelection', false, ( localize(1284, "Whether the editor has a selection")))); }
19
- static { this.cursorAtInlineEdit = ( new RawContextKey('cursorAtInlineEdit', false, ( localize(1285, "Whether the cursor is at an inline edit")))); }
20
- static { this.inlineEditVisible = ( new RawContextKey('inlineEditIsVisible', false, ( localize(1286, "Whether an inline edit is visible")))); }
21
- static { this.tabShouldJumpToInlineEdit = ( new RawContextKey('tabShouldJumpToInlineEdit', false, ( localize(1287, "Whether tab should jump to an inline edit.")))); }
22
- static { this.tabShouldAcceptInlineEdit = ( new RawContextKey('tabShouldAcceptInlineEdit', false, ( localize(1288, "Whether tab should accept the inline edit.")))); }
23
- static { this.inInlineEditsPreviewEditor = ( new RawContextKey('inInlineEditsPreviewEditor', true, ( localize(1289, "Whether the current code editor is showing an inline edits preview")))); }
16
+ static { this.cursorBeforeGhostText = ( new RawContextKey('cursorBeforeGhostText', false, ( localize(1285, "Whether the cursor is at ghost text")))); }
17
+ static { this.cursorInIndentation = ( new RawContextKey('cursorInIndentation', false, ( localize(1286, "Whether the cursor is in indentation")))); }
18
+ static { this.hasSelection = ( new RawContextKey('editor.hasSelection', false, ( localize(1287, "Whether the editor has a selection")))); }
19
+ static { this.cursorAtInlineEdit = ( new RawContextKey('cursorAtInlineEdit', false, ( localize(1288, "Whether the cursor is at an inline edit")))); }
20
+ static { this.inlineEditVisible = ( new RawContextKey('inlineEditIsVisible', false, ( localize(1289, "Whether an inline edit is visible")))); }
21
+ static { this.tabShouldJumpToInlineEdit = ( new RawContextKey('tabShouldJumpToInlineEdit', false, ( localize(1290, "Whether tab should jump to an inline edit.")))); }
22
+ static { this.tabShouldAcceptInlineEdit = ( new RawContextKey('tabShouldAcceptInlineEdit', false, ( localize(1291, "Whether tab should accept the inline edit.")))); }
23
+ static { this.inInlineEditsPreviewEditor = ( new RawContextKey('inInlineEditsPreviewEditor', true, ( localize(1292, "Whether the current code editor is showing an inline edits preview")))); }
24
24
  }
25
25
 
26
26
  export { InlineCompletionContextKeys };
@@ -128,7 +128,7 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
128
128
  if (!state) {
129
129
  return;
130
130
  }
131
- if (!this._focusIsInEditorOrMenu.get()) {
131
+ if (!this._focusIsInEditorOrMenu.read(undefined)) {
132
132
  return;
133
133
  }
134
134
  const nextEditUri = state.kind === 'inlineEdit' ? state.nextEditUri : undefined;
@@ -137,7 +137,7 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
137
137
  continue;
138
138
  }
139
139
  else if (nextEditUri && isEqual(nextEditUri, ctrl.editor.getModel()?.uri)) {
140
- ctrl.model.get()?.trigger();
140
+ ctrl.model.read(undefined)?.trigger();
141
141
  }
142
142
  else {
143
143
  ctrl.reject();
@@ -155,9 +155,9 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
155
155
  if (ctrl === this) {
156
156
  continue;
157
157
  }
158
- const state = ctrl.model.get()?.state.get();
158
+ const state = ctrl.model.read(undefined)?.state.read(undefined);
159
159
  if (state?.kind === 'inlineEdit' && isEqual(state.nextEditUri, uri)) {
160
- ctrl.model.get()?.stop('automatic');
160
+ ctrl.model.read(undefined)?.stop('automatic');
161
161
  }
162
162
  }
163
163
  }));
@@ -206,14 +206,14 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
206
206
  }));
207
207
  this._register(autorun(reader => {
208
208
  const isFocused = this._focusIsInEditorOrMenu.read(reader);
209
- const model = this.model.get();
209
+ const model = this.model.read(undefined);
210
210
  if (isFocused) {
211
- const state = model?.state?.get();
211
+ const state = model?.state.read(undefined);
212
212
  if (!state || state.kind !== 'inlineEdit' || !state.nextEditUri) {
213
213
  transaction(tx => {
214
214
  for (const ctrl of InlineCompletionsController_1._instances) {
215
215
  if (ctrl !== this) {
216
- ctrl.model.get()?.stop('automatic', tx);
216
+ ctrl.model.read(undefined)?.stop('automatic', tx);
217
217
  }
218
218
  }
219
219
  });
@@ -229,7 +229,7 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
229
229
  if (!model) {
230
230
  return;
231
231
  }
232
- if (model.state.get()?.inlineCompletion?.isFromExplicitRequest && model.inlineEditAvailable.get()) {
232
+ if (model.state.read(undefined)?.inlineCompletion?.isFromExplicitRequest && model.inlineEditAvailable.read(undefined)) {
233
233
  return;
234
234
  }
235
235
  transaction(tx => {
@@ -263,15 +263,20 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
263
263
  currentInlineCompletionBySemanticId.read(reader);
264
264
  return {};
265
265
  }), async (_value, _, _deltas, store) => {
266
- const model = this.model.get();
267
- const state = model?.state.get();
266
+ let model = this.model.get();
267
+ let state = model?.state.get();
268
268
  if (!state || !model) {
269
269
  return;
270
270
  }
271
- const lineText = state.kind === 'ghostText' ? model.textModel.getLineContent(state.primaryGhostText.lineNumber) : '';
272
271
  await timeout(50, cancelOnDispose(store));
273
272
  await waitForState(this._suggestWidgetAdapter.selectedItem, isUndefined, () => false, cancelOnDispose(store));
274
- await this._accessibilitySignalService.playSignal(state.kind === 'ghostText' ? AccessibilitySignal.inlineSuggestion : AccessibilitySignal.nextEditSuggestion);
273
+ model = this.model.get();
274
+ state = model?.state.get();
275
+ if (!state || !model) {
276
+ return;
277
+ }
278
+ const lineText = state.kind === 'ghostText' ? model.textModel.getLineContent(state.primaryGhostText.lineNumber) : '';
279
+ this._accessibilitySignalService.playSignal(state.kind === 'ghostText' ? AccessibilitySignal.inlineSuggestion : AccessibilitySignal.nextEditSuggestion);
275
280
  if (this.editor.getOption(EditorOption.screenReaderAnnounceInlineSuggestion)) {
276
281
  if (state.kind === 'ghostText') {
277
282
  this._provideScreenReaderUpdate(state.primaryGhostText.renderForScreenReader(lineText));
@@ -340,7 +345,7 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
340
345
  let hint;
341
346
  if (!accessibleViewShowing && accessibleViewKeybinding && this.editor.getOption(EditorOption.inlineCompletionsAccessibilityVerbose)) {
342
347
  hint = ( localize(
343
- 1290,
348
+ 1293,
344
349
  "Inspect this in the accessible view ({0})",
345
350
  accessibleViewKeybinding.getAriaLabel()
346
351
  ));
@@ -130,7 +130,7 @@ let InlineCompletionsHoverParticipant = class InlineCompletionsHoverParticipant
130
130
  return ( new RenderedHoverParts([renderedHoverPart]));
131
131
  }
132
132
  getAccessibleContent(hoverPart) {
133
- return localize(1291, 'There are inline completions here');
133
+ return localize(1294, 'There are inline completions here');
134
134
  }
135
135
  renderScreenReaderText(context, part) {
136
136
  const disposables = ( new DisposableStore());
@@ -139,7 +139,7 @@ let InlineCompletionsHoverParticipant = class InlineCompletionsHoverParticipant
139
139
  const hoverContentsElement = append(markdownHoverElement, $$1('div.hover-contents', { ['aria-live']: 'assertive' }));
140
140
  const renderer = ( new MarkdownRenderer({ editor: this._editor }, this._languageService, this._openerService));
141
141
  const render = (code) => {
142
- const inlineSuggestionAvailable = ( localize(1292, "Suggestion:"));
142
+ const inlineSuggestionAvailable = ( localize(1295, "Suggestion:"));
143
143
  const renderedContents = disposables.add(renderer.render(( new MarkdownString()).appendText(inlineSuggestionAvailable).appendCodeblock('text', code), {
144
144
  asyncRenderCallback: () => {
145
145
  hoverContentsElement.className = 'hover-contents code-hover-contents';
@@ -97,8 +97,8 @@ let InlineCompletionsHintsWidget = class InlineCompletionsHintsWidget extends Di
97
97
  InlineCompletionsHintsWidget = ( __decorate([
98
98
  ( __param(2, IInstantiationService))
99
99
  ], InlineCompletionsHintsWidget));
100
- const inlineSuggestionHintsNextIcon = registerIcon('inline-suggestion-hints-next', Codicon.chevronRight, ( localize(1293, 'Icon for show next parameter hint.')));
101
- const inlineSuggestionHintsPreviousIcon = registerIcon('inline-suggestion-hints-previous', Codicon.chevronLeft, ( localize(1294, 'Icon for show previous parameter hint.')));
100
+ const inlineSuggestionHintsNextIcon = registerIcon('inline-suggestion-hints-next', Codicon.chevronRight, ( localize(1296, 'Icon for show next parameter hint.')));
101
+ const inlineSuggestionHintsPreviousIcon = registerIcon('inline-suggestion-hints-previous', Codicon.chevronLeft, ( localize(1297, 'Icon for show previous parameter hint.')));
102
102
  let InlineSuggestionHintsContentWidget = class InlineSuggestionHintsContentWidget extends Disposable {
103
103
  static { InlineSuggestionHintsContentWidget_1 = this; }
104
104
  static { this.hot = createHotClass(InlineSuggestionHintsContentWidget_1); }
@@ -116,7 +116,7 @@ let InlineSuggestionHintsContentWidget = class InlineSuggestionHintsContentWidge
116
116
  const kb = this.keybindingService.lookupKeybinding(commandId, this._contextKeyService);
117
117
  let tooltip = label;
118
118
  if (kb) {
119
- tooltip = ( localize(1295, '{0} ({1})', label, kb.getLabel()));
119
+ tooltip = ( localize(1298, '{0} ({1})', label, kb.getLabel()));
120
120
  }
121
121
  action.tooltip = tooltip;
122
122
  return action;
@@ -164,9 +164,9 @@ let InlineSuggestionHintsContentWidget = class InlineSuggestionHintsContentWidge
164
164
  this._warningMessageNode.element,
165
165
  h('div@toolBar'),
166
166
  ]);
167
- this.previousAction = this._register(this.createCommandAction(showPreviousInlineSuggestionActionId, ( localize(1296, 'Previous')), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon)));
167
+ this.previousAction = this._register(this.createCommandAction(showPreviousInlineSuggestionActionId, ( localize(1299, 'Previous')), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon)));
168
168
  this.availableSuggestionCountAction = this._register(( new Action('inlineSuggestionHints.availableSuggestionCount', '', undefined, false)));
169
- this.nextAction = this._register(this.createCommandAction(showNextInlineSuggestionActionId, ( localize(1297, 'Next')), ThemeIcon.asClassName(inlineSuggestionHintsNextIcon)));
169
+ this.nextAction = this._register(this.createCommandAction(showNextInlineSuggestionActionId, ( localize(1300, 'Next')), ThemeIcon.asClassName(inlineSuggestionHintsNextIcon)));
170
170
  this.inlineCompletionsActionsMenus = this._register(this._menuService.createMenu(MenuId.InlineCompletionsActions, this._contextKeyService));
171
171
  this.clearAvailableSuggestionCountLabelDebounced = this._register(( new RunOnceScheduler(() => {
172
172
  this.availableSuggestionCountAction.label = '';
@@ -60,6 +60,8 @@ export declare class InlineCompletionsModel extends Disposable {
60
60
  private readonly _triggerCommandOnProviderChange;
61
61
  private readonly _minShowDelay;
62
62
  private readonly _showOnSuggestConflict;
63
+ private readonly _suppressInSnippetMode;
64
+ private readonly _isInSnippetMode;
63
65
  constructor(textModel: ITextModel, _selectedSuggestItem: IObservable<SuggestItemInfo | undefined>, _textModelVersionId: IObservableWithChange<number | null, IModelContentChangedEvent | undefined>, _positions: IObservable<readonly Position[]>, _debounceValue: IFeatureDebounceInformation, _enabled: IObservable<boolean>, _editor: ICodeEditor, _instantiationService: IInstantiationService, _commandService: ICommandService, _languageConfigurationService: ILanguageConfigurationService, _accessibilityService: IAccessibilityService, _languageFeaturesService: ILanguageFeaturesService, _codeEditorService: ICodeEditorService, _inlineCompletionsService: IInlineCompletionsService);
64
66
  private _lastShownInlineCompletionInfo;
65
67
  private _lastAcceptedInlineCompletionInfo;
@@ -104,7 +106,7 @@ export declare class InlineCompletionsModel extends Disposable {
104
106
  cursorAtInlineEdit: IObservable<boolean>;
105
107
  nextEditUri: URI | undefined;
106
108
  } | undefined>;
107
- readonly status: IObservableWithChange<"loading" | "ghostText" | "inlineEdit" | "noSuggestion", void>;
109
+ readonly status: IObservableWithChange<"loading" | "ghostText" | "noSuggestion" | "inlineEdit", void>;
108
110
  readonly inlineCompletionState: IObservableWithChange<{
109
111
  kind: "ghostText";
110
112
  edits: readonly TextReplacement[];
@@ -46,10 +46,10 @@ import { derived, derivedHandleChanges, derivedOpts } from '../../../../../base/
46
46
  import { transaction, subtransaction } from '../../../../../base/common/observableInternal/transaction.js';
47
47
  import { observableValue } from '../../../../../base/common/observableInternal/observables/observableValue.js';
48
48
  import { observableSignal } from '../../../../../base/common/observableInternal/observables/observableSignal.js';
49
+ import { constObservable } from '../../../../../base/common/observableInternal/observables/constObservable.js';
49
50
  import { recomputeInitiallyAndOnChange, mapObservableArrayCached } from '../../../../../base/common/observableInternal/utils/utils.js';
50
51
  import { autorun } from '../../../../../base/common/observableInternal/reactions/autorun.js';
51
52
  import { observableFromEvent } from '../../../../../base/common/observableInternal/observables/observableFromEvent.js';
52
- import { constObservable } from '../../../../../base/common/observableInternal/observables/constObservable.js';
53
53
 
54
54
  let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
55
55
  get isAcceptingPartially() { return this._isAcceptingPartially; }
@@ -178,9 +178,9 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
178
178
  return undefined;
179
179
  }
180
180
  this._textModelVersionId.read(reader);
181
- const suggestWidgetInlineCompletions = this._source.suggestWidgetInlineCompletions.get();
181
+ const suggestWidgetInlineCompletions = this._source.suggestWidgetInlineCompletions.read(undefined);
182
182
  let suggestItem = this._selectedSuggestItem.read(reader);
183
- if (this._shouldShowOnSuggestConflict.get()) {
183
+ if (this._shouldShowOnSuggestConflict.read(undefined)) {
184
184
  suggestItem = undefined;
185
185
  }
186
186
  if (suggestWidgetInlineCompletions && !suggestItem) {
@@ -213,6 +213,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
213
213
  reason,
214
214
  typingInterval: typingInterval.averageInterval,
215
215
  typingIntervalCharacterCount: typingInterval.characterCount,
216
+ availableProviders: [],
216
217
  };
217
218
  let context = {
218
219
  triggerKind: changeSummary.inlineCompletionTriggerKind,
@@ -220,7 +221,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
220
221
  includeInlineCompletions: !changeSummary.onlyRequestInlineEdits,
221
222
  includeInlineEdits: this._inlineEditsEnabled.read(reader),
222
223
  requestIssuedDateTime: requestInfo.startTime,
223
- earliestShownDateTime: requestInfo.startTime + (changeSummary.inlineCompletionTriggerKind === InlineCompletionTriggerKind.Explicit || this.inAcceptFlow.get() ? 0 : this._minShowDelay.get()),
224
+ earliestShownDateTime: requestInfo.startTime + (changeSummary.inlineCompletionTriggerKind === InlineCompletionTriggerKind.Explicit || this.inAcceptFlow.read(undefined) ? 0 : this._minShowDelay.read(undefined)),
224
225
  };
225
226
  if (context.triggerKind === InlineCompletionTriggerKind.Automatic && changeSummary.textChange) {
226
227
  if (this.textModel.getAlternativeVersionId() === this._lastShownInlineCompletionInfo?.alternateTextModelVersionId) {
@@ -231,16 +232,17 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
231
232
  };
232
233
  }
233
234
  }
234
- const itemToPreserveCandidate = this.selectedInlineCompletion.get() ?? this._inlineCompletionItems.get()?.inlineEdit;
235
+ const itemToPreserveCandidate = this.selectedInlineCompletion.read(undefined) ?? this._inlineCompletionItems.read(undefined)?.inlineEdit;
235
236
  const itemToPreserve = changeSummary.preserveCurrentCompletion || itemToPreserveCandidate?.forwardStable
236
237
  ? itemToPreserveCandidate : undefined;
237
238
  const userJumpedToActiveCompletion = ( this._jumpedToId.map(
238
- jumpedTo => !!jumpedTo && jumpedTo === this._inlineCompletionItems.get()?.inlineEdit?.semanticId
239
+ jumpedTo => !!jumpedTo && jumpedTo === this._inlineCompletionItems.read(undefined)?.inlineEdit?.semanticId
239
240
  ));
240
241
  const providers = changeSummary.provider
241
242
  ? { providers: [changeSummary.provider], label: 'single:' + changeSummary.provider.providerId?.toString() }
242
243
  : { providers: this._languageFeaturesService.inlineCompletionsProvider.all(this.textModel), label: undefined };
243
244
  const availableProviders = this.getAvailableProviders(providers.providers);
245
+ requestInfo.availableProviders = ( availableProviders.map(p => p.providerId)).filter(isDefined);
244
246
  return this._source.fetch(availableProviders, providers.label, context, itemToPreserve?.identity, changeSummary.shouldDebounce, userJumpedToActiveCompletion, requestInfo);
245
247
  });
246
248
  this._inlineCompletionItems = derivedOpts({ owner: this }, reader => {
@@ -334,6 +336,9 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
334
336
  }
335
337
  }, (reader) => {
336
338
  const model = this.textModel;
339
+ if (this._suppressInSnippetMode.read(reader) && this._isInSnippetMode.read(reader)) {
340
+ return undefined;
341
+ }
337
342
  const item = this._inlineCompletionItems.read(reader);
338
343
  const inlineEditResult = item?.inlineEdit;
339
344
  if (inlineEditResult) {
@@ -543,6 +548,9 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
543
548
  this._triggerCommandOnProviderChange = ( inlineSuggest.map(s => s.triggerCommandOnProviderChange));
544
549
  this._minShowDelay = ( inlineSuggest.map(s => s.minShowDelay));
545
550
  this._showOnSuggestConflict = ( inlineSuggest.map(s => s.experimental.showOnSuggestConflict));
551
+ this._suppressInSnippetMode = ( inlineSuggest.map(s => s.suppressInSnippetMode));
552
+ const snippetController = SnippetController2.get(this._editor);
553
+ this._isInSnippetMode = snippetController?.isInSnippetObservable ?? constObservable(false);
546
554
  this._typing = this._register(( new TypingInterval(this.textModel)));
547
555
  this._register(this._inlineCompletionsService.onDidChangeIsSnoozing((isSnoozing) => {
548
556
  if (isSnoozing) {
@@ -1,6 +1,7 @@
1
1
  import { Disposable } from "../../../../../base/common/lifecycle.js";
2
2
  import { IObservable, IObservableWithChange, ITransaction } from "../../../../../base/common/observable.js";
3
3
  import { IConfigurationService } from "../../../../../platform/configuration/common/configuration.service.js";
4
+ import { IContextKeyService } from "../../../../../platform/contextkey/common/contextkey.service.js";
4
5
  import { IInstantiationService } from "../../../../../platform/instantiation/common/instantiation.js";
5
6
  import { ILogService } from "../../../../../platform/log/common/log.service.js";
6
7
  import { StringEdit } from "../../../../common/core/edits/stringEdit.js";
@@ -21,14 +22,18 @@ export declare class InlineCompletionsSource extends Disposable {
21
22
  private readonly _logService;
22
23
  private readonly _configurationService;
23
24
  private readonly _instantiationService;
25
+ private readonly _contextKeyService;
24
26
  private static _requestId;
25
27
  private readonly _updateOperation;
26
28
  private readonly _loggingEnabled;
29
+ private readonly _sendRequestData;
27
30
  private readonly _structuredFetchLogger;
28
31
  private readonly _state;
29
32
  readonly inlineCompletions: IObservable<InlineCompletionsState>;
30
33
  readonly suggestWidgetInlineCompletions: IObservable<InlineCompletionsState>;
31
- constructor(_textModel: ITextModel, _versionId: IObservableWithChange<number | null, IModelContentChangedEvent | undefined>, _debounceValue: IFeatureDebounceInformation, _cursorPosition: IObservable<Position>, _languageConfigurationService: ILanguageConfigurationService, _logService: ILogService, _configurationService: IConfigurationService, _instantiationService: IInstantiationService);
34
+ private _completionsEnabled;
35
+ constructor(_textModel: ITextModel, _versionId: IObservableWithChange<number | null, IModelContentChangedEvent | undefined>, _debounceValue: IFeatureDebounceInformation, _cursorPosition: IObservable<Position>, _languageConfigurationService: ILanguageConfigurationService, _logService: ILogService, _configurationService: IConfigurationService, _instantiationService: IInstantiationService, _contextKeyService: IContextKeyService);
36
+ private _updateCompletionsEnablement;
32
37
  readonly clearOperationOnTextModelChange: IObservableWithChange<undefined, void>;
33
38
  private _log;
34
39
  private readonly _loadingCount;
@@ -36,6 +41,7 @@ export declare class InlineCompletionsSource extends Disposable {
36
41
  fetch(providers: InlineCompletionsProvider[], providersLabel: string | undefined, context: InlineCompletionContextWithoutUuid, activeInlineCompletion: InlineSuggestionIdentity | undefined, withDebounce: boolean, userJumpedToActiveCompletion: IObservable<boolean>, requestInfo: InlineSuggestRequestInfo): Promise<boolean>;
37
42
  clear(tx: ITransaction): void;
38
43
  seedInlineCompletionsWithSuggestWidget(): void;
44
+ private sendInlineCompletionsRequestTelemetry;
39
45
  clearSuggestWidgetInlineCompletions(tx: ITransaction): void;
40
46
  cancelUpdate(): void;
41
47
  }
@@ -2,21 +2,26 @@
2
2
  import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
3
3
  import { compareUndefinedSmallest, numberComparator, compareBy, booleanComparator } from '../../../../../base/common/arrays.js';
4
4
  import { findLastMax } from '../../../../../base/common/arraysFind.js';
5
+ import { RunOnceScheduler } from '../../../../../base/common/async.js';
5
6
  import { CancellationTokenSource } from '../../../../../base/common/cancellation.js';
6
7
  import { equalsIfDefined, itemEquals } from '../../../../../base/common/equals.js';
7
8
  import { Disposable, MutableDisposable, DisposableStore, toDisposable } from '../../../../../base/common/lifecycle.js';
8
9
  import '../../../../../base/common/observableInternal/index.js';
9
10
  import { observableReducerSettable } from '../../../../../base/common/observableInternal/experimental/reducer.js';
10
- import { isDefined } from '../../../../../base/common/types.js';
11
+ import { isDefined, isObject } from '../../../../../base/common/types.js';
11
12
  import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.service.js';
13
+ import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.service.js';
14
+ import { isCopilotLikeExtension, forwardToChannelIf, DataChannelForwardingTelemetryService } from '../../../../../platform/dataChannel/browser/forwardingTelemetryService.js';
12
15
  import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';
13
16
  import { ILogService } from '../../../../../platform/log/common/log.service.js';
14
17
  import { observableConfigValue } from '../../../../../platform/observable/common/platformObservableUtils.js';
18
+ import product from '../../../../../platform/product/common/product.js';
15
19
  import { StringEdit } from '../../../../common/core/edits/stringEdit.js';
16
20
  import { InlineCompletionTriggerKind, InlineCompletionEndOfLifeReasonKind } from '../../../../common/languages.js';
17
21
  import { ILanguageConfigurationService } from '../../../../common/languages/languageConfigurationRegistry.service.js';
18
22
  import { offsetEditFromContentChanges } from '../../../../common/model/textModelStringEdit.js';
19
23
  import { StructuredLogger, formatRecordableLogEntry } from '../structuredLogger.js';
24
+ import { sendInlineCompletionsEndOfLifeTelemetry } from '../telemetry.js';
20
25
  import { wait } from '../utils.js';
21
26
  import { InlineSuggestionItem } from './inlineSuggestionItem.js';
22
27
  import { provideInlineCompletions, runWhenCancelled } from './provideInlineCompletions.js';
@@ -29,7 +34,7 @@ var InlineCompletionsSource_1;
29
34
  let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
30
35
  static { InlineCompletionsSource_1 = this; }
31
36
  static { this._requestId = 0; }
32
- constructor(_textModel, _versionId, _debounceValue, _cursorPosition, _languageConfigurationService, _logService, _configurationService, _instantiationService) {
37
+ constructor(_textModel, _versionId, _debounceValue, _cursorPosition, _languageConfigurationService, _logService, _configurationService, _instantiationService, _contextKeyService) {
33
38
  super();
34
39
  this._textModel = _textModel;
35
40
  this._versionId = _versionId;
@@ -39,6 +44,7 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
39
44
  this._logService = _logService;
40
45
  this._configurationService = _configurationService;
41
46
  this._instantiationService = _instantiationService;
47
+ this._contextKeyService = _contextKeyService;
42
48
  this._updateOperation = this._register(( new MutableDisposable()));
43
49
  this._state = observableReducerSettable(this, {
44
50
  initial: () => ({
@@ -71,6 +77,7 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
71
77
  });
72
78
  this.inlineCompletions = ( this._state.map(this, v => v.inlineCompletions));
73
79
  this.suggestWidgetInlineCompletions = ( this._state.map(this, v => v.suggestWidgetInlineCompletions));
80
+ this._completionsEnabled = undefined;
74
81
  this.clearOperationOnTextModelChange = derived(this, reader => {
75
82
  this._versionId.read(reader);
76
83
  this._updateOperation.clear();
@@ -79,8 +86,27 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
79
86
  this._loadingCount = observableValue(this, 0);
80
87
  this.loading = ( this._loadingCount.map(this, v => v > 0));
81
88
  this._loggingEnabled = observableConfigValue('editor.inlineSuggest.logFetch', false, this._configurationService).recomputeInitiallyAndOnChange(this._store);
89
+ this._sendRequestData = observableConfigValue('editor.inlineSuggest.emptyResponseInformation', true, this._configurationService).recomputeInitiallyAndOnChange(this._store);
82
90
  this._structuredFetchLogger = this._register(this._instantiationService.createInstance(StructuredLogger.cast(), 'editor.inlineSuggest.logFetch.commandId'));
83
91
  this.clearOperationOnTextModelChange.recomputeInitiallyAndOnChange(this._store);
92
+ const enablementSetting = product.defaultChatAgent?.completionsEnablementSetting ?? undefined;
93
+ if (enablementSetting) {
94
+ this._updateCompletionsEnablement(enablementSetting);
95
+ this._register(this._configurationService.onDidChangeConfiguration(e => {
96
+ if (e.affectsConfiguration(enablementSetting)) {
97
+ this._updateCompletionsEnablement(enablementSetting);
98
+ }
99
+ }));
100
+ }
101
+ }
102
+ _updateCompletionsEnablement(enalementSetting) {
103
+ const result = this._configurationService.getValue(enalementSetting);
104
+ if (!isObject(result)) {
105
+ this._completionsEnabled = undefined;
106
+ }
107
+ else {
108
+ this._completionsEnabled = result;
109
+ }
84
110
  }
85
111
  _log(entry) {
86
112
  if (this._loggingEnabled.get()) {
@@ -102,8 +128,19 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
102
128
  this._updateOperation.clear();
103
129
  const source = ( new CancellationTokenSource());
104
130
  const promise = (async () => {
105
- this._loadingCount.set(this._loadingCount.get() + 1, undefined);
106
131
  const store = ( new DisposableStore());
132
+ this._loadingCount.set(this._loadingCount.get() + 1, undefined);
133
+ let didDecrease = false;
134
+ const decreaseLoadingCount = () => {
135
+ if (!didDecrease) {
136
+ didDecrease = true;
137
+ this._loadingCount.set(this._loadingCount.get() - 1, undefined);
138
+ }
139
+ };
140
+ const loadingReset = store.add(( new RunOnceScheduler(() => decreaseLoadingCount(), 10 * 1000)));
141
+ loadingReset.schedule();
142
+ const inlineSuggestionsProviders = providers.filter(p => p.providerId);
143
+ const requestResponseInfo = ( new RequestResponseData(context, requestInfo, inlineSuggestionsProviders));
107
144
  try {
108
145
  const recommendedDebounceValue = this._debounceValue.get(this._textModel);
109
146
  const debounceValue = findLastMax(( providers.map(p => p.debounceDelayMs)), compareUndefinedSmallest(numberComparator)) ?? recommendedDebounceValue;
@@ -112,6 +149,7 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
112
149
  await wait(debounceValue, source.token);
113
150
  }
114
151
  if (source.token.isCancellationRequested || this._store.isDisposed || this._textModel.getVersionId() !== request.versionId) {
152
+ requestResponseInfo.setNoSuggestionReasonIfNotSet('canceled:beforeFetch');
115
153
  return false;
116
154
  }
117
155
  const requestId = InlineCompletionsSource_1._requestId++;
@@ -131,6 +169,7 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
131
169
  const providerResult = provideInlineCompletions(providers, this._cursorPosition.get(), this._textModel, context, requestInfo, this._languageConfigurationService);
132
170
  runWhenCancelled(source.token, () => providerResult.cancelAndDispose({ kind: 'tokenCancellation' }));
133
171
  let shouldStopEarly = false;
172
+ let producedSuggestion = false;
134
173
  const suggestions = [];
135
174
  for await (const list of providerResult.lists) {
136
175
  if (!list) {
@@ -139,10 +178,13 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
139
178
  list.addRef();
140
179
  store.add(toDisposable(() => list.removeRef(list.inlineSuggestionsData.length === 0 ? { kind: 'empty' } : { kind: 'notTaken' })));
141
180
  for (const item of list.inlineSuggestionsData) {
181
+ producedSuggestion = true;
142
182
  if (!context.includeInlineEdits && (item.isInlineEdit || item.showInlineEditMenu)) {
183
+ item.setNotShownReason('notInlineEditRequested');
143
184
  continue;
144
185
  }
145
186
  if (!context.includeInlineCompletions && !(item.isInlineEdit || item.showInlineEditMenu)) {
187
+ item.setNotShownReason('notInlineCompletionRequested');
146
188
  continue;
147
189
  }
148
190
  const i = InlineSuggestionItem.create(item, this._textModel);
@@ -172,12 +214,34 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
172
214
  })));
173
215
  this._log({ sourceId: 'InlineCompletions.fetch', kind: 'end', requestId, durationMs: (Date.now() - startTime.getTime()), error, result, time: Date.now(), didAllProvidersReturn });
174
216
  }
217
+ requestResponseInfo.setRequestUuid(providerResult.contextWithUuid.requestUuid);
218
+ if (producedSuggestion) {
219
+ requestResponseInfo.setHasProducedSuggestion();
220
+ if (suggestions.length > 0 && source.token.isCancellationRequested) {
221
+ suggestions.forEach(s => s.setNotShownReasonIfNotSet('canceled:whileAwaitingOtherProviders'));
222
+ }
223
+ }
224
+ else {
225
+ if (source.token.isCancellationRequested) {
226
+ requestResponseInfo.setNoSuggestionReasonIfNotSet('canceled:whileFetching');
227
+ }
228
+ else {
229
+ const completionsQuotaExceeded = this._contextKeyService.getContextKeyValue('completionsQuotaExceeded');
230
+ requestResponseInfo.setNoSuggestionReasonIfNotSet(completionsQuotaExceeded ? 'completionsQuotaExceeded' : 'noSuggestion');
231
+ }
232
+ }
175
233
  const remainingTimeToWait = context.earliestShownDateTime - Date.now();
176
234
  if (remainingTimeToWait > 0) {
177
235
  await wait(remainingTimeToWait, source.token);
178
236
  }
179
237
  if (source.token.isCancellationRequested || this._store.isDisposed || this._textModel.getVersionId() !== request.versionId
180
238
  || userJumpedToActiveCompletion.get() ) {
239
+ const notShownReason = source.token.isCancellationRequested ? 'canceled:afterMinShowDelay' :
240
+ this._store.isDisposed ? 'canceled:disposed' :
241
+ this._textModel.getVersionId() !== request.versionId ? 'canceled:documentChanged' :
242
+ userJumpedToActiveCompletion.get() ? 'canceled:userJumped' :
243
+ 'unknown';
244
+ suggestions.forEach(s => s.setNotShownReasonIfNotSet(notShownReason));
181
245
  return false;
182
246
  }
183
247
  const endTime = ( new Date());
@@ -203,8 +267,9 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
203
267
  });
204
268
  }
205
269
  finally {
206
- this._loadingCount.set(this._loadingCount.get() - 1, undefined);
207
270
  store.dispose();
271
+ decreaseLoadingCount();
272
+ this.sendInlineCompletionsRequestTelemetry(requestResponseInfo);
208
273
  }
209
274
  return true;
210
275
  })();
@@ -242,6 +307,63 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
242
307
  this.clearSuggestWidgetInlineCompletions(tx);
243
308
  });
244
309
  }
310
+ sendInlineCompletionsRequestTelemetry(requestResponseInfo) {
311
+ if (!this._sendRequestData.get() && !this._contextKeyService.getContextKeyValue('isRunningUnificationExperiment')) {
312
+ return;
313
+ }
314
+ if (requestResponseInfo.requestUuid === undefined || requestResponseInfo.hasProducedSuggestion) {
315
+ return;
316
+ }
317
+ if (!isCompletionsEnabled(this._completionsEnabled, this._textModel.getLanguageId())) {
318
+ return;
319
+ }
320
+ if (!( requestResponseInfo.providers.some(p => isCopilotLikeExtension(p.providerId?.extensionId)))) {
321
+ return;
322
+ }
323
+ const emptyEndOfLifeEvent = {
324
+ id: requestResponseInfo.requestUuid,
325
+ opportunityId: requestResponseInfo.requestUuid,
326
+ noSuggestionReason: requestResponseInfo.noSuggestionReason ?? 'unknown',
327
+ extensionId: 'vscode-core',
328
+ extensionVersion: '0.0.0',
329
+ groupId: 'empty',
330
+ shown: false,
331
+ editorType: requestResponseInfo.requestInfo.editorType,
332
+ requestReason: requestResponseInfo.requestInfo.reason,
333
+ typingInterval: requestResponseInfo.requestInfo.typingInterval,
334
+ typingIntervalCharacterCount: requestResponseInfo.requestInfo.typingIntervalCharacterCount,
335
+ languageId: requestResponseInfo.requestInfo.languageId,
336
+ selectedSuggestionInfo: !!requestResponseInfo.context.selectedSuggestionInfo,
337
+ availableProviders: ( requestResponseInfo.providers.map(p => p.providerId?.toString())).filter(isDefined).join(','),
338
+ ...forwardToChannelIf(( requestResponseInfo.providers.some(p => isCopilotLikeExtension(p.providerId?.extensionId)))),
339
+ timeUntilProviderRequest: undefined,
340
+ timeUntilProviderResponse: undefined,
341
+ viewKind: undefined,
342
+ preceeded: undefined,
343
+ error: undefined,
344
+ superseded: undefined,
345
+ reason: undefined,
346
+ correlationId: undefined,
347
+ shownDuration: undefined,
348
+ shownDurationUncollapsed: undefined,
349
+ timeUntilShown: undefined,
350
+ partiallyAccepted: undefined,
351
+ partiallyAcceptedCountSinceOriginal: undefined,
352
+ partiallyAcceptedRatioSinceOriginal: undefined,
353
+ partiallyAcceptedCharactersSinceOriginal: undefined,
354
+ cursorColumnDistance: undefined,
355
+ cursorLineDistance: undefined,
356
+ lineCountOriginal: undefined,
357
+ lineCountModified: undefined,
358
+ characterCountOriginal: undefined,
359
+ characterCountModified: undefined,
360
+ disjointReplacements: undefined,
361
+ sameShapeReplacements: undefined,
362
+ notShownReason: undefined,
363
+ };
364
+ const dataChannel = this._instantiationService.createInstance(DataChannelForwardingTelemetryService);
365
+ sendInlineCompletionsEndOfLifeTelemetry(dataChannel, emptyEndOfLifeEvent);
366
+ }
245
367
  clearSuggestWidgetInlineCompletions(tx) {
246
368
  if (this._updateOperation.value?.request.context.selectedSuggestionInfo) {
247
369
  this._updateOperation.clear();
@@ -255,7 +377,8 @@ InlineCompletionsSource = InlineCompletionsSource_1 = ( __decorate([
255
377
  ( __param(4, ILanguageConfigurationService)),
256
378
  ( __param(5, ILogService)),
257
379
  ( __param(6, IConfigurationService)),
258
- ( __param(7, IInstantiationService))
380
+ ( __param(7, IInstantiationService)),
381
+ ( __param(8, IContextKeyService))
259
382
  ], InlineCompletionsSource));
260
383
  class UpdateRequest {
261
384
  constructor(position, context, versionId, providers) {
@@ -276,9 +399,35 @@ class UpdateRequest {
276
399
  return this.context.triggerKind === InlineCompletionTriggerKind.Explicit;
277
400
  }
278
401
  }
402
+ class RequestResponseData {
403
+ constructor(context, requestInfo, providers) {
404
+ this.context = context;
405
+ this.requestInfo = requestInfo;
406
+ this.providers = providers;
407
+ this.hasProducedSuggestion = false;
408
+ }
409
+ setRequestUuid(uuid) {
410
+ this.requestUuid = uuid;
411
+ }
412
+ setNoSuggestionReasonIfNotSet(type) {
413
+ this.noSuggestionReason ??= type;
414
+ }
415
+ setHasProducedSuggestion() {
416
+ this.hasProducedSuggestion = true;
417
+ }
418
+ }
279
419
  function isSubset(set1, set2) {
280
420
  return [...set1].every(item => ( set2.has(item)));
281
421
  }
422
+ function isCompletionsEnabled(completionsEnablementObject, modeId = '*') {
423
+ if (completionsEnablementObject === undefined) {
424
+ return false;
425
+ }
426
+ if (typeof completionsEnablementObject[modeId] !== 'undefined') {
427
+ return Boolean(completionsEnablementObject[modeId]);
428
+ }
429
+ return Boolean(completionsEnablementObject['*']);
430
+ }
282
431
  class UpdateOperation {
283
432
  constructor(request, cancellationTokenSource, promise) {
284
433
  this.request = request;
@@ -56,6 +56,7 @@ declare abstract class InlineSuggestionItemBase {
56
56
  setEndOfLifeReason(reason: InlineCompletionEndOfLifeReason): void;
57
57
  reportInlineEditError(reason: string): void;
58
58
  setIsPreceeded(item: InlineSuggestionItem): void;
59
+ setNotShownReasonIfNotSet(reason: string): void;
59
60
  /**
60
61
  * Avoid using this method. Instead introduce getters for the needed properties.
61
62
  */
@@ -82,6 +82,9 @@ class InlineSuggestionItemBase {
82
82
  setIsPreceeded(item) {
83
83
  this._data.setIsPreceeded(item.partialAccepts);
84
84
  }
85
+ setNotShownReasonIfNotSet(reason) {
86
+ this._data.setNotShownReason(reason);
87
+ }
85
88
  getSourceCompletion() {
86
89
  return this._sourceInlineCompletion;
87
90
  }