monaco-editor-core 0.55.0-dev-20251008 → 0.55.0-dev-20251009

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 (124) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.de.js +2 -2
  3. package/esm/nls.messages.es.js +2 -2
  4. package/esm/nls.messages.fr.js +2 -2
  5. package/esm/nls.messages.it.js +2 -2
  6. package/esm/nls.messages.ja.js +2 -2
  7. package/esm/nls.messages.js +1 -1
  8. package/esm/nls.messages.json +1 -1
  9. package/esm/nls.messages.ko.js +2 -2
  10. package/esm/nls.messages.ru.js +2 -2
  11. package/esm/nls.messages.zh-cn.js +2 -2
  12. package/esm/nls.messages.zh-tw.js +2 -2
  13. package/esm/nls.metadata.json +3 -1
  14. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  15. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  16. package/esm/vs/base/browser/ui/toolbar/toolbar.js +4 -1
  17. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  18. package/esm/vs/base/common/codiconsLibrary.js +9 -1
  19. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  20. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +5 -8
  21. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
  22. package/esm/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js +36 -31
  23. package/esm/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js.map +1 -1
  24. package/esm/vs/editor/common/core/text/abstractText.js +5 -1
  25. package/esm/vs/editor/common/core/text/abstractText.js.map +1 -1
  26. package/esm/vs/editor/common/model/tokens/treeSitter/tokenStore.js +2 -1
  27. package/esm/vs/editor/common/model/tokens/treeSitter/tokenStore.js.map +1 -1
  28. package/esm/vs/editor/contrib/find/browser/findController.js +54 -61
  29. package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
  30. package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js +5 -8
  31. package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
  32. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +18 -23
  33. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
  34. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  35. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +10 -12
  36. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js.map +1 -1
  37. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +9 -13
  38. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js.map +1 -1
  39. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +8 -1
  40. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  41. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
  42. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  43. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  44. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  45. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
  46. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  47. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  48. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  49. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  50. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  51. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +10 -12
  52. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
  53. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  54. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  55. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +5 -5
  56. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  57. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  58. package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
  59. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  60. package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
  61. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  62. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  63. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  64. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  65. package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  66. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
  67. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +18 -24
  68. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
  69. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +15 -18
  70. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
  71. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  72. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  73. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  74. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  75. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  76. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +7 -6
  77. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js.map +1 -1
  78. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -32
  79. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  80. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  81. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  82. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  83. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
  84. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  85. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  86. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  87. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  88. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  89. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  90. package/esm/vs/platform/actions/common/menuService.js +2 -2
  91. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  92. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  93. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  94. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  95. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  96. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  97. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  98. package/esm/vs/platform/list/browser/listService.js +27 -27
  99. package/esm/vs/platform/markers/common/markerService.js +2 -2
  100. package/esm/vs/platform/markers/common/markers.js +6 -6
  101. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +7 -7
  102. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  103. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  104. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  105. package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
  106. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  107. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  108. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  109. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  110. package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
  111. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  112. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  113. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  114. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  115. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  116. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  117. package/esm/vs/platform/theme/common/colors/miscColors.js +15 -15
  118. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  119. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  120. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  121. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  122. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  123. package/package.json +2 -2
  124. package/version.txt +1 -1
@@ -39,7 +39,7 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
39
39
  this.options.canAcceptInBackground = true;
40
40
  }
41
41
  provideWithoutTextEditor(picker) {
42
- this.provideLabelPick(picker, localize(1330, "To go to a symbol, first open a text editor with symbol information."));
42
+ this.provideLabelPick(picker, localize(1331, "To go to a symbol, first open a text editor with symbol information."));
43
43
  return Disposable.None;
44
44
  }
45
45
  provideWithTextEditor(context, picker, token, runOptions) {
@@ -60,7 +60,7 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
60
60
  doProvideWithoutEditorSymbols(context, model, picker, token) {
61
61
  const disposables = new DisposableStore();
62
62
  // Generic pick for not having any symbol information
63
- this.provideLabelPick(picker, localize(1331, "The active text editor does not provide symbol information."));
63
+ this.provideLabelPick(picker, localize(1332, "The active text editor does not provide symbol information."));
64
64
  // Wait for changes to the registry and see if eventually
65
65
  // we do get symbols. This can happen if the picker is opened
66
66
  // very early after the model has loaded but before the
@@ -146,10 +146,10 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
146
146
  }
147
147
  else {
148
148
  if (query.original.length > 0) {
149
- this.provideLabelPick(picker, localize(1332, "No matching editor symbols"));
149
+ this.provideLabelPick(picker, localize(1333, "No matching editor symbols"));
150
150
  }
151
151
  else {
152
- this.provideLabelPick(picker, localize(1333, "No editor symbols"));
152
+ this.provideLabelPick(picker, localize(1334, "No editor symbols"));
153
153
  }
154
154
  }
155
155
  }
@@ -196,7 +196,7 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
196
196
  if (openSideBySideDirection) {
197
197
  buttons = [{
198
198
  iconClass: openSideBySideDirection === 'right' ? ThemeIcon.asClassName(Codicon.splitHorizontal) : ThemeIcon.asClassName(Codicon.splitVertical),
199
- tooltip: openSideBySideDirection === 'right' ? localize(1334, "Open to the Side") : localize(1335, "Open to the Bottom")
199
+ tooltip: openSideBySideDirection === 'right' ? localize(1335, "Open to the Side") : localize(1336, "Open to the Bottom")
200
200
  }];
201
201
  }
202
202
  const filteredSymbolPicks = [];
@@ -312,7 +312,7 @@ let AbstractGotoSymbolQuickAccessProvider = class AbstractGotoSymbolQuickAccessP
312
312
  }
313
313
  else if (sortedFilteredSymbolPicks.length > 0) {
314
314
  symbolPicks = [
315
- { label: localize(1336, "symbols ({0})", filteredSymbolPicks.length), type: 'separator' },
315
+ { label: localize(1337, "symbols ({0})", filteredSymbolPicks.length), type: 'separator' },
316
316
  ...sortedFilteredSymbolPicks
317
317
  ];
318
318
  }
@@ -362,33 +362,33 @@ AbstractGotoSymbolQuickAccessProvider = AbstractGotoSymbolQuickAccessProvider_1
362
362
  ], AbstractGotoSymbolQuickAccessProvider);
363
363
  export { AbstractGotoSymbolQuickAccessProvider };
364
364
  // #region NLS Helpers
365
- const FALLBACK_NLS_SYMBOL_KIND = localize(1337, "properties ({0})");
365
+ const FALLBACK_NLS_SYMBOL_KIND = localize(1338, "properties ({0})");
366
366
  const NLS_SYMBOL_KIND_CACHE = {
367
- [5 /* SymbolKind.Method */]: localize(1338, "methods ({0})"),
368
- [11 /* SymbolKind.Function */]: localize(1339, "functions ({0})"),
369
- [8 /* SymbolKind.Constructor */]: localize(1340, "constructors ({0})"),
370
- [12 /* SymbolKind.Variable */]: localize(1341, "variables ({0})"),
371
- [4 /* SymbolKind.Class */]: localize(1342, "classes ({0})"),
372
- [22 /* SymbolKind.Struct */]: localize(1343, "structs ({0})"),
373
- [23 /* SymbolKind.Event */]: localize(1344, "events ({0})"),
374
- [24 /* SymbolKind.Operator */]: localize(1345, "operators ({0})"),
375
- [10 /* SymbolKind.Interface */]: localize(1346, "interfaces ({0})"),
376
- [2 /* SymbolKind.Namespace */]: localize(1347, "namespaces ({0})"),
377
- [3 /* SymbolKind.Package */]: localize(1348, "packages ({0})"),
378
- [25 /* SymbolKind.TypeParameter */]: localize(1349, "type parameters ({0})"),
379
- [1 /* SymbolKind.Module */]: localize(1350, "modules ({0})"),
380
- [6 /* SymbolKind.Property */]: localize(1351, "properties ({0})"),
381
- [9 /* SymbolKind.Enum */]: localize(1352, "enumerations ({0})"),
382
- [21 /* SymbolKind.EnumMember */]: localize(1353, "enumeration members ({0})"),
383
- [14 /* SymbolKind.String */]: localize(1354, "strings ({0})"),
384
- [0 /* SymbolKind.File */]: localize(1355, "files ({0})"),
385
- [17 /* SymbolKind.Array */]: localize(1356, "arrays ({0})"),
386
- [15 /* SymbolKind.Number */]: localize(1357, "numbers ({0})"),
387
- [16 /* SymbolKind.Boolean */]: localize(1358, "booleans ({0})"),
388
- [18 /* SymbolKind.Object */]: localize(1359, "objects ({0})"),
389
- [19 /* SymbolKind.Key */]: localize(1360, "keys ({0})"),
390
- [7 /* SymbolKind.Field */]: localize(1361, "fields ({0})"),
391
- [13 /* SymbolKind.Constant */]: localize(1362, "constants ({0})")
367
+ [5 /* SymbolKind.Method */]: localize(1339, "methods ({0})"),
368
+ [11 /* SymbolKind.Function */]: localize(1340, "functions ({0})"),
369
+ [8 /* SymbolKind.Constructor */]: localize(1341, "constructors ({0})"),
370
+ [12 /* SymbolKind.Variable */]: localize(1342, "variables ({0})"),
371
+ [4 /* SymbolKind.Class */]: localize(1343, "classes ({0})"),
372
+ [22 /* SymbolKind.Struct */]: localize(1344, "structs ({0})"),
373
+ [23 /* SymbolKind.Event */]: localize(1345, "events ({0})"),
374
+ [24 /* SymbolKind.Operator */]: localize(1346, "operators ({0})"),
375
+ [10 /* SymbolKind.Interface */]: localize(1347, "interfaces ({0})"),
376
+ [2 /* SymbolKind.Namespace */]: localize(1348, "namespaces ({0})"),
377
+ [3 /* SymbolKind.Package */]: localize(1349, "packages ({0})"),
378
+ [25 /* SymbolKind.TypeParameter */]: localize(1350, "type parameters ({0})"),
379
+ [1 /* SymbolKind.Module */]: localize(1351, "modules ({0})"),
380
+ [6 /* SymbolKind.Property */]: localize(1352, "properties ({0})"),
381
+ [9 /* SymbolKind.Enum */]: localize(1353, "enumerations ({0})"),
382
+ [21 /* SymbolKind.EnumMember */]: localize(1354, "enumeration members ({0})"),
383
+ [14 /* SymbolKind.String */]: localize(1355, "strings ({0})"),
384
+ [0 /* SymbolKind.File */]: localize(1356, "files ({0})"),
385
+ [17 /* SymbolKind.Array */]: localize(1357, "arrays ({0})"),
386
+ [15 /* SymbolKind.Number */]: localize(1358, "numbers ({0})"),
387
+ [16 /* SymbolKind.Boolean */]: localize(1359, "booleans ({0})"),
388
+ [18 /* SymbolKind.Object */]: localize(1360, "objects ({0})"),
389
+ [19 /* SymbolKind.Key */]: localize(1361, "keys ({0})"),
390
+ [7 /* SymbolKind.Field */]: localize(1362, "fields ({0})"),
391
+ [13 /* SymbolKind.Constant */]: localize(1363, "constants ({0})")
392
392
  };
393
393
  //#endregion
394
394
  //# sourceMappingURL=gotoSymbolQuickAccess.js.map
@@ -20,10 +20,10 @@ export class ReadOnlyMessageController extends Disposable {
20
20
  let message = this.editor.getOptions().get(105 /* EditorOption.readOnlyMessage */);
21
21
  if (!message) {
22
22
  if (this.editor.isSimpleWidget) {
23
- message = new MarkdownString(nls.localize(1363, "Cannot edit in read-only input"));
23
+ message = new MarkdownString(nls.localize(1364, "Cannot edit in read-only input"));
24
24
  }
25
25
  else {
26
- message = new MarkdownString(nls.localize(1364, "Cannot edit in read-only editor"));
26
+ message = new MarkdownString(nls.localize(1365, "Cannot edit in read-only editor"));
27
27
  }
28
28
  }
29
29
  messageController.showMessage(message, this.editor.getPosition());
@@ -99,7 +99,7 @@ class RenameSkeleton {
99
99
  }
100
100
  const result = await provider.provideRenameEdits(this.model, this.position, newName, token);
101
101
  if (!result) {
102
- return this._provideRenameEdits(newName, i + 1, rejects.concat(nls.localize(1365, "No result.")), token);
102
+ return this._provideRenameEdits(newName, i + 1, rejects.concat(nls.localize(1366, "No result.")), token);
103
103
  }
104
104
  else if (result.rejectReason) {
105
105
  return this._provideRenameEdits(newName, i + 1, rejects.concat(result.rejectReason), token);
@@ -172,7 +172,7 @@ let RenameController = class RenameController {
172
172
  else {
173
173
  trace('resolve rename location failed', e instanceof Error ? e : JSON.stringify(e, null, '\t'));
174
174
  if (typeof e === 'string' || isMarkdownString(e)) {
175
- MessageController.get(this.editor)?.showMessage(e || nls.localize(1366, "An unknown error occurred while resolving rename location"), position);
175
+ MessageController.get(this.editor)?.showMessage(e || nls.localize(1367, "An unknown error occurred while resolving rename location"), position);
176
176
  }
177
177
  }
178
178
  return undefined;
@@ -240,24 +240,24 @@ let RenameController = class RenameController {
240
240
  this._bulkEditService.apply(renameResult, {
241
241
  editor: this.editor,
242
242
  showPreview: inputFieldResult.wantsPreview,
243
- label: nls.localize(1367, "Renaming '{0}' to '{1}'", loc?.text, inputFieldResult.newName),
243
+ label: nls.localize(1368, "Renaming '{0}' to '{1}'", loc?.text, inputFieldResult.newName),
244
244
  code: 'undoredo.rename',
245
- quotableLabel: nls.localize(1368, "Renaming {0} to {1}", loc?.text, inputFieldResult.newName),
245
+ quotableLabel: nls.localize(1369, "Renaming {0} to {1}", loc?.text, inputFieldResult.newName),
246
246
  respectAutoSaveConfig: true,
247
247
  reason: EditSources.rename(),
248
248
  }).then(result => {
249
249
  trace('edits applied');
250
250
  if (result.ariaSummary) {
251
- alert(nls.localize(1369, "Successfully renamed '{0}' to '{1}'. Summary: {2}", loc.text, inputFieldResult.newName, result.ariaSummary));
251
+ alert(nls.localize(1370, "Successfully renamed '{0}' to '{1}'. Summary: {2}", loc.text, inputFieldResult.newName, result.ariaSummary));
252
252
  }
253
253
  }).catch(err => {
254
254
  trace(`error when applying edits ${JSON.stringify(err, null, '\t')}`);
255
- this._notificationService.error(nls.localize(1370, "Rename failed to apply edits"));
255
+ this._notificationService.error(nls.localize(1371, "Rename failed to apply edits"));
256
256
  this._logService.error(err);
257
257
  });
258
258
  }, err => {
259
259
  trace('error when providing rename edits', JSON.stringify(err, null, '\t'));
260
- this._notificationService.error(nls.localize(1371, "Rename failed to compute edits"));
260
+ this._notificationService.error(nls.localize(1372, "Rename failed to compute edits"));
261
261
  this._logService.error(err);
262
262
  }).finally(() => {
263
263
  cts2.dispose();
@@ -293,7 +293,7 @@ export class RenameAction extends EditorAction {
293
293
  constructor() {
294
294
  super({
295
295
  id: 'editor.action.rename',
296
- label: nls.localize2(1373, "Rename Symbol"),
296
+ label: nls.localize2(1374, "Rename Symbol"),
297
297
  precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasRenameProvider),
298
298
  kbOpts: {
299
299
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -373,7 +373,7 @@ registerAction2(class FocusNextRenameSuggestion extends Action2 {
373
373
  super({
374
374
  id: 'focusNextRenameSuggestion',
375
375
  title: {
376
- ...nls.localize2(1374, "Focus Next Rename Suggestion"),
376
+ ...nls.localize2(1375, "Focus Next Rename Suggestion"),
377
377
  },
378
378
  precondition: CONTEXT_RENAME_INPUT_VISIBLE,
379
379
  keybinding: [
@@ -401,7 +401,7 @@ registerAction2(class FocusPreviousRenameSuggestion extends Action2 {
401
401
  super({
402
402
  id: 'focusPreviousRenameSuggestion',
403
403
  title: {
404
- ...nls.localize2(1375, "Focus Previous Rename Suggestion"),
404
+ ...nls.localize2(1376, "Focus Previous Rename Suggestion"),
405
405
  },
406
406
  precondition: CONTEXT_RENAME_INPUT_VISIBLE,
407
407
  keybinding: [
@@ -446,7 +446,7 @@ Registry.as(Extensions.Configuration).registerConfiguration({
446
446
  properties: {
447
447
  'editor.rename.enablePreview': {
448
448
  scope: 6 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */,
449
- description: nls.localize(1372, "Enable/disable the ability to preview changes before renaming"),
449
+ description: nls.localize(1373, "Enable/disable the ability to preview changes before renaming"),
450
450
  default: true,
451
451
  type: 'boolean'
452
452
  }
@@ -39,8 +39,8 @@ import { editorWidgetBackground, inputBackground, inputBorder, inputForeground,
39
39
  import { IThemeService } from '../../../../platform/theme/common/themeService.js';
40
40
  /** for debugging */
41
41
  const _sticky = false;
42
- export const CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey('renameInputVisible', false, nls.localize(1376, "Whether the rename input widget is visible"));
43
- export const CONTEXT_RENAME_INPUT_FOCUSED = new RawContextKey('renameInputFocused', false, nls.localize(1377, "Whether the rename input widget is focused"));
42
+ export const CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey('renameInputVisible', false, nls.localize(1377, "Whether the rename input widget is visible"));
43
+ export const CONTEXT_RENAME_INPUT_FOCUSED = new RawContextKey('renameInputFocused', false, nls.localize(1378, "Whether the rename input widget is focused"));
44
44
  let RenameWidget = class RenameWidget {
45
45
  constructor(_editor, _acceptKeybindings, _themeService, _keybindingService, contextKeyService, _logService) {
46
46
  this._editor = _editor;
@@ -163,7 +163,7 @@ let RenameWidget = class RenameWidget {
163
163
  }
164
164
  beforeRender() {
165
165
  const [accept, preview] = this._acceptKeybindings;
166
- this._label.innerText = nls.localize(1378, "{0} to Rename, {1} to Preview", this._keybindingService.lookupKeybinding(accept)?.getLabel(), this._keybindingService.lookupKeybinding(preview)?.getLabel());
166
+ this._label.innerText = nls.localize(1379, "{0} to Rename, {1} to Preview", this._keybindingService.lookupKeybinding(accept)?.getLabel(), this._keybindingService.lookupKeybinding(preview)?.getLabel());
167
167
  this._domNode.style.minWidth = `200px`; // to prevent from widening when candidates come in
168
168
  return null;
169
169
  }
@@ -477,7 +477,7 @@ class RenameCandidateListView {
477
477
  // adjust list container layout
478
478
  this._listContainer.style.height = `${height}px`;
479
479
  this._listContainer.style.width = `${width}px`;
480
- aria.status(nls.localize(1379, "Received {0} rename suggestions", candidates.length));
480
+ aria.status(nls.localize(1380, "Received {0} rename suggestions", candidates.length));
481
481
  }
482
482
  clearCandidates() {
483
483
  this._listContainer.style.height = '0px';
@@ -619,13 +619,13 @@ class InputWithButton {
619
619
  this._inputNode.className = 'rename-input';
620
620
  this._inputNode.type = 'text';
621
621
  this._inputNode.style.border = 'none';
622
- this._inputNode.setAttribute('aria-label', nls.localize(1380, "Rename input. Type new name and press Enter to commit."));
622
+ this._inputNode.setAttribute('aria-label', nls.localize(1381, "Rename input. Type new name and press Enter to commit."));
623
623
  this._domNode.appendChild(this._inputNode);
624
624
  this._buttonNode = document.createElement('div');
625
625
  this._buttonNode.className = 'rename-suggestions-button';
626
626
  this._buttonNode.setAttribute('tabindex', '0');
627
- this._buttonGenHoverText = nls.localize(1381, "Generate new name suggestions");
628
- this._buttonCancelHoverText = nls.localize(1382, "Cancel");
627
+ this._buttonGenHoverText = nls.localize(1382, "Generate New Name Suggestions");
628
+ this._buttonCancelHoverText = nls.localize(1383, "Cancel");
629
629
  this._buttonHoverContent = this._buttonGenHoverText;
630
630
  this._disposables.add(getBaseLayerHoverDelegate().setupDelayedHover(this._buttonNode, () => ({
631
631
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AAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC5C,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACjD,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEvC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAEM,QAAQ,CAAC,KAAoB;QACnC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAEO,WAAW,CAAC,KAAoB;QACvC,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAC3E,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IAC/D,CAAC;IAEO,YAAY,CAAC,KAAoB;QACxC,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC;IAC7C,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,EAAE,UAAU,EAA0B;QACjE,MAAM,WAAW,GAAG,UAAU,GAAG,mBAAmB,CAAC,QAAQ,GAAG,CAAC,CAAC,0BAA0B,CAAC;QAC7F,OAAO,EAAE,WAAW,EAAE,CAAC;IACxB,CAAC;IAEM,OAAO;IACd,CAAC","file":"renameWidget.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport * as aria from '../../../../base/browser/ui/aria/aria.js';\nimport { getBaseLayerHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegate2.js';\nimport { renderIcon } from '../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { IListRenderer, IListVirtualDelegate } from '../../../../base/browser/ui/list/list.js';\nimport { List } from '../../../../base/browser/ui/list/listWidget.js';\nimport * as arrays from '../../../../base/common/arrays.js';\nimport { DeferredPromise, raceCancellation } from '../../../../base/common/async.js';\nimport { CancellationToken, CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { Codicon } from '../../../../base/common/codicons.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { StopWatch } from '../../../../base/common/stopwatch.js';\nimport { assertType, isDefined } from '../../../../base/common/types.js';\nimport './renameWidget.css';\nimport * as domFontInfo from '../../../browser/config/domFontInfo.js';\nimport { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { FontInfo } from '../../../common/config/fontInfo.js';\nimport { IDimension } from '../../../common/core/2d/dimension.js';\nimport { Position } from '../../../common/core/position.js';\nimport { IRange, Range } from '../../../common/core/range.js';\nimport { ScrollType } from '../../../common/editorCommon.js';\nimport { NewSymbolName, NewSymbolNameTag, NewSymbolNameTriggerKind, ProviderResult } from '../../../common/languages.js';\nimport * as nls from '../../../../nls.js';\nimport { IContextKey, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { ILogService } from '../../../../platform/log/common/log.js';\nimport { getListStyles } from '../../../../platform/theme/browser/defaultStyles.js';\nimport {\n\teditorWidgetBackground,\n\tinputBackground,\n\tinputBorder,\n\tinputForeground,\n\tquickInputListFocusBackground,\n\tquickInputListFocusForeground,\n\twidgetBorder,\n\twidgetShadow } from '../../../../platform/theme/common/colorRegistry.js';\nimport { IColorTheme, IThemeService } from '../../../../platform/theme/common/themeService.js';\n\n/** for debugging */\nconst _sticky = false\n\t// || Boolean(\"true\") // done \"weirdly\" so that a lint warning prevents you from pushing this\n\t;\n\n\nexport const CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey<boolean>('renameInputVisible', false, nls.localize('renameInputVisible', \"Whether the rename input widget is visible\"));\nexport const CONTEXT_RENAME_INPUT_FOCUSED = new RawContextKey<boolean>('renameInputFocused', false, nls.localize('renameInputFocused', \"Whether the rename input widget is focused\"));\n\n/**\n * \"Source\" of the new name:\n * - 'inputField' - user entered the new name\n * - 'renameSuggestion' - user picked from rename suggestions\n * - 'userEditedRenameSuggestion' - user _likely_ edited a rename suggestion (\"likely\" because when input started being edited, a rename suggestion had focus)\n */\nexport type NewNameSource =\n\t| { k: 'inputField' }\n\t| { k: 'renameSuggestion' }\n\t| { k: 'userEditedRenameSuggestion' };\n\n/**\n * Various statistics regarding rename input field\n */\nexport type RenameWidgetStats = {\n\tnRenameSuggestions: number;\n\tsource: NewNameSource;\n\ttimeBeforeFirstInputFieldEdit: number | undefined;\n\tnRenameSuggestionsInvocations: number;\n\thadAutomaticRenameSuggestionsInvocation: boolean;\n};\n\nexport type RenameWidgetResult = {\n\t/**\n\t * The new name to be used\n\t */\n\tnewName: string;\n\twantsPreview?: boolean;\n\tstats: RenameWidgetStats;\n};\n\ninterface IRenameWidget {\n}\n\nexport class RenameWidget implements IRenameWidget, IContentWidget, IDisposable {\n\n\t// implement IContentWidget\n\treadonly allowEditorOverflow: boolean = true;\n\n\t// UI state\n\n\tprivate _domNode?: HTMLElement;\n\tprivate _inputWithButton: InputWithButton;\n\tprivate _renameCandidateListView?: RenameCandidateListView;\n\tprivate _label?: HTMLDivElement;\n\n\tprivate _nPxAvailableAbove?: number;\n\tprivate _nPxAvailableBelow?: number;\n\n\t// Model state\n\n\tprivate _position?: Position;\n\tprivate _currentName?: string;\n\t/** Is true if input field got changes when a rename candidate was focused; otherwise, false */\n\tprivate _isEditingRenameCandidate: boolean;\n\n\tprivate readonly _candidates: Set<string>;\n\n\tprivate _visible?: boolean;\n\n\t/** must be reset at session start */\n\tprivate _beforeFirstInputFieldEditSW: StopWatch;\n\n\t/**\n\t * Milliseconds before user edits the input field for the first time\n\t * @remarks must be set once per session\n\t */\n\tprivate _timeBeforeFirstInputFieldEdit: number | undefined;\n\n\tprivate _nRenameSuggestionsInvocations: number;\n\n\tprivate _hadAutomaticRenameSuggestionsInvocation: boolean;\n\n\tprivate _renameCandidateProvidersCts: CancellationTokenSource | undefined;\n\tprivate _renameCts: CancellationTokenSource | undefined;\n\n\tprivate readonly _visibleContextKey: IContextKey<boolean>;\n\tprivate readonly _disposables = new DisposableStore();\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _acceptKeybindings: [string, string],\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@ILogService private readonly _logService: ILogService,\n\t) {\n\t\tthis._visibleContextKey = CONTEXT_RENAME_INPUT_VISIBLE.bindTo(contextKeyService);\n\n\t\tthis._isEditingRenameCandidate = false;\n\n\t\tthis._nRenameSuggestionsInvocations = 0;\n\n\t\tthis._hadAutomaticRenameSuggestionsInvocation = false;\n\n\t\tthis._candidates = new Set();\n\n\t\tthis._beforeFirstInputFieldEditSW = new StopWatch();\n\n\t\tthis._inputWithButton = new InputWithButton();\n\t\tthis._disposables.add(this._inputWithButton);\n\n\t\tthis._editor.addContentWidget(this);\n\n\t\tthis._disposables.add(this._editor.onDidChangeConfiguration(e => {\n\t\t\tif (e.hasChanged(EditorOption.fontInfo)) {\n\t\t\t\tthis._updateFont();\n\t\t\t}\n\t\t}));\n\n\t\tthis._disposables.add(_themeService.onDidColorThemeChange(this._updateStyles, this));\n\t}\n\n\tdispose(): void {\n\t\tthis._disposables.dispose();\n\t\tthis._editor.removeContentWidget(this);\n\t}\n\n\tgetId(): string {\n\t\treturn '__renameInputWidget';\n\t}\n\n\tgetDomNode(): HTMLElement {\n\t\tif (!this._domNode) {\n\t\t\tthis._domNode = document.createElement('div');\n\t\t\tthis._domNode.className = 'monaco-editor rename-box';\n\n\t\t\tthis._domNode.appendChild(this._inputWithButton.domNode);\n\n\t\t\tthis._renameCandidateListView = this._disposables.add(\n\t\t\t\tnew RenameCandidateListView(this._domNode, {\n\t\t\t\t\tfontInfo: this._editor.getOption(EditorOption.fontInfo),\n\t\t\t\t\tonFocusChange: (newSymbolName: string) => {\n\t\t\t\t\t\tthis._inputWithButton.input.value = newSymbolName;\n\t\t\t\t\t\tthis._isEditingRenameCandidate = false; // @ulugbekna: reset\n\t\t\t\t\t},\n\t\t\t\t\tonSelectionChange: () => {\n\t\t\t\t\t\tthis._isEditingRenameCandidate = false; // @ulugbekna: because user picked a rename suggestion\n\t\t\t\t\t\tthis.acceptInput(false); // we don't allow preview with mouse click for now\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tthis._disposables.add(\n\t\t\t\tthis._inputWithButton.onDidInputChange(() => {\n\t\t\t\t\tif (this._renameCandidateListView?.focusedCandidate !== undefined) {\n\t\t\t\t\t\tthis._isEditingRenameCandidate = true;\n\t\t\t\t\t}\n\t\t\t\t\tthis._timeBeforeFirstInputFieldEdit ??= this._beforeFirstInputFieldEditSW.elapsed();\n\t\t\t\t\tif (this._renameCandidateProvidersCts?.token.isCancellationRequested === false) {\n\t\t\t\t\t\tthis._renameCandidateProvidersCts.cancel();\n\t\t\t\t\t}\n\t\t\t\t\tthis._renameCandidateListView?.clearFocus();\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tthis._label = document.createElement('div');\n\t\t\tthis._label.className = 'rename-label';\n\t\t\tthis._domNode.appendChild(this._label);\n\n\t\t\tthis._updateFont();\n\t\t\tthis._updateStyles(this._themeService.getColorTheme());\n\t\t}\n\t\treturn this._domNode;\n\t}\n\n\tprivate _updateStyles(theme: IColorTheme): void {\n\t\tif (!this._domNode) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst widgetShadowColor = theme.getColor(widgetShadow);\n\t\tconst widgetBorderColor = theme.getColor(widgetBorder);\n\t\tthis._domNode.style.backgroundColor = String(theme.getColor(editorWidgetBackground) ?? '');\n\t\tthis._domNode.style.boxShadow = widgetShadowColor ? ` 0 0 8px 2px ${widgetShadowColor}` : '';\n\t\tthis._domNode.style.border = widgetBorderColor ? `1px solid ${widgetBorderColor}` : '';\n\t\tthis._domNode.style.color = String(theme.getColor(inputForeground) ?? '');\n\n\t\tconst border = theme.getColor(inputBorder);\n\n\t\tthis._inputWithButton.domNode.style.backgroundColor = String(theme.getColor(inputBackground) ?? '');\n\t\tthis._inputWithButton.input.style.backgroundColor = String(theme.getColor(inputBackground) ?? '');\n\t\tthis._inputWithButton.domNode.style.borderWidth = border ? '1px' : '0px';\n\t\tthis._inputWithButton.domNode.style.borderStyle = border ? 'solid' : 'none';\n\t\tthis._inputWithButton.domNode.style.borderColor = border?.toString() ?? 'none';\n\t}\n\n\tprivate _updateFont(): void {\n\t\tif (this._domNode === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tassertType(this._label !== undefined, 'RenameWidget#_updateFont: _label must not be undefined given _domNode is defined');\n\n\t\tthis._editor.applyFontInfo(this._inputWithButton.input);\n\n\t\tconst fontInfo = this._editor.getOption(EditorOption.fontInfo);\n\t\tthis._label.style.fontSize = `${this._computeLabelFontSize(fontInfo.fontSize)}px`;\n\t}\n\n\tprivate _computeLabelFontSize(editorFontSize: number) {\n\t\treturn editorFontSize * 0.8;\n\t}\n\n\tgetPosition(): IContentWidgetPosition | null {\n\t\tif (!this._visible) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!this._editor.hasModel() || // @ulugbekna: shouldn't happen\n\t\t\t!this._editor.getDomNode() // @ulugbekna: can happen during tests based on suggestWidget's similar predicate check\n\t\t) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst bodyBox = dom.getClientArea(this.getDomNode().ownerDocument.body);\n\t\tconst editorBox = dom.getDomNodePagePosition(this._editor.getDomNode());\n\n\t\tconst cursorBoxTop = this._getTopForPosition();\n\n\t\tthis._nPxAvailableAbove = cursorBoxTop + editorBox.top;\n\t\tthis._nPxAvailableBelow = bodyBox.height - this._nPxAvailableAbove;\n\n\t\tconst lineHeight = this._editor.getOption(EditorOption.lineHeight);\n\t\tconst { totalHeight: candidateViewHeight } = RenameCandidateView.getLayoutInfo({ lineHeight });\n\n\t\tconst positionPreference = this._nPxAvailableBelow > candidateViewHeight * 6 /* approximate # of candidates to fit in (inclusive of rename input box & rename label) */\n\t\t\t? [ContentWidgetPositionPreference.BELOW, ContentWidgetPositionPreference.ABOVE]\n\t\t\t: [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW];\n\n\t\treturn {\n\t\t\tposition: this._position!,\n\t\t\tpreference: positionPreference,\n\t\t};\n\t}\n\n\tbeforeRender(): IDimension | null {\n\t\tconst [accept, preview] = this._acceptKeybindings;\n\t\tthis._label!.innerText = nls.localize({ key: 'label', comment: ['placeholders are keybindings, e.g \"F2 to Rename, Shift+F2 to Preview\"'] }, \"{0} to Rename, {1} to Preview\", this._keybindingService.lookupKeybinding(accept)?.getLabel(), this._keybindingService.lookupKeybinding(preview)?.getLabel());\n\n\t\tthis._domNode!.style.minWidth = `200px`; // to prevent from widening when candidates come in\n\n\t\treturn null;\n\t}\n\n\tafterRender(position: ContentWidgetPositionPreference | null): void {\n\t\t// FIXME@ulugbekna: commenting trace log out until we start unmounting the widget from editor properly - https://github.com/microsoft/vscode/issues/226975\n\t\t// this._trace('invoking afterRender, position: ', position ? 'not null' : 'null');\n\t\tif (position === null) {\n\t\t\t// cancel rename when input widget isn't rendered anymore\n\t\t\tthis.cancelInput(true, 'afterRender (because position is null)');\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._editor.hasModel() || // shouldn't happen\n\t\t\t!this._editor.getDomNode() // can happen during tests based on suggestWidget's similar predicate check\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tassertType(this._renameCandidateListView);\n\t\tassertType(this._nPxAvailableAbove !== undefined);\n\t\tassertType(this._nPxAvailableBelow !== undefined);\n\n\t\tconst inputBoxHeight = dom.getTotalHeight(this._inputWithButton.domNode);\n\n\t\tconst labelHeight = dom.getTotalHeight(this._label!);\n\n\t\tlet totalHeightAvailable: number;\n\t\tif (position === ContentWidgetPositionPreference.BELOW) {\n\t\t\ttotalHeightAvailable = this._nPxAvailableBelow;\n\t\t} else {\n\t\t\ttotalHeightAvailable = this._nPxAvailableAbove;\n\t\t}\n\n\t\tthis._renameCandidateListView!.layout({\n\t\t\theight: totalHeightAvailable - labelHeight - inputBoxHeight,\n\t\t\twidth: dom.getTotalWidth(this._inputWithButton.domNode),\n\t\t});\n\t}\n\n\n\tprivate _currentAcceptInput?: (wantsPreview: boolean) => void;\n\tprivate _currentCancelInput?: (focusEditor: boolean) => void;\n\tprivate _requestRenameCandidatesOnce?: (triggerKind: NewSymbolNameTriggerKind, cts: CancellationToken) => ProviderResult<NewSymbolName[]>[];\n\n\tacceptInput(wantsPreview: boolean): void {\n\t\tthis._trace(`invoking acceptInput`);\n\t\tthis._currentAcceptInput?.(wantsPreview);\n\t}\n\n\tcancelInput(focusEditor: boolean, caller: string): void {\n\t\t// this._trace(`invoking cancelInput, caller: ${caller}, _currentCancelInput: ${this._currentAcceptInput ? 'not undefined' : 'undefined'}`);\n\t\tthis._currentCancelInput?.(focusEditor);\n\t}\n\n\tfocusNextRenameSuggestion() {\n\t\tif (!this._renameCandidateListView?.focusNext()) {\n\t\t\tthis._inputWithButton.input.value = this._currentName!;\n\t\t}\n\t}\n\n\tfocusPreviousRenameSuggestion() { // TODO@ulugbekna: this and focusNext should set the original name if no candidate is focused\n\t\tif (!this._renameCandidateListView?.focusPrevious()) {\n\t\t\tthis._inputWithButton.input.value = this._currentName!;\n\t\t}\n\t}\n\n\t/**\n\t * @param requestRenameCandidates is `undefined` when there are no rename suggestion providers\n\t */\n\tgetInput(\n\t\twhere: IRange,\n\t\tcurrentName: string,\n\t\tsupportPreview: boolean,\n\t\trequestRenameCandidates: undefined | ((triggerKind: NewSymbolNameTriggerKind, cts: CancellationToken) => ProviderResult<NewSymbolName[]>[]),\n\t\tcts: CancellationTokenSource\n\t): Promise<RenameWidgetResult | boolean> {\n\n\t\tconst { start: selectionStart, end: selectionEnd } = this._getSelection(where, currentName);\n\n\t\tthis._renameCts = cts;\n\n\t\tconst disposeOnDone = new DisposableStore();\n\n\t\tthis._nRenameSuggestionsInvocations = 0;\n\n\t\tthis._hadAutomaticRenameSuggestionsInvocation = false;\n\n\t\tif (requestRenameCandidates === undefined) {\n\t\t\tthis._inputWithButton.button.style.display = 'none';\n\t\t} else {\n\t\t\tthis._inputWithButton.button.style.display = 'flex';\n\n\t\t\tthis._requestRenameCandidatesOnce = requestRenameCandidates;\n\n\t\t\tthis._requestRenameCandidates(currentName, false);\n\n\t\t\tdisposeOnDone.add(dom.addDisposableListener(\n\t\t\t\tthis._inputWithButton.button,\n\t\t\t\t'click',\n\t\t\t\t() => this._requestRenameCandidates(currentName, true)\n\t\t\t));\n\t\t\tdisposeOnDone.add(dom.addDisposableListener(\n\t\t\t\tthis._inputWithButton.button,\n\t\t\t\tdom.EventType.KEY_DOWN,\n\t\t\t\t(e) => {\n\t\t\t\t\tconst keyEvent = new StandardKeyboardEvent(e);\n\n\t\t\t\t\tif (keyEvent.equals(KeyCode.Enter) || keyEvent.equals(KeyCode.Space)) {\n\t\t\t\t\t\tkeyEvent.stopPropagation();\n\t\t\t\t\t\tkeyEvent.preventDefault();\n\t\t\t\t\t\tthis._requestRenameCandidates(currentName, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t));\n\t\t}\n\n\t\tthis._isEditingRenameCandidate = false;\n\n\t\tthis._domNode!.classList.toggle('preview', supportPreview);\n\n\t\tthis._position = new Position(where.startLineNumber, where.startColumn);\n\t\tthis._currentName = currentName;\n\n\t\tthis._inputWithButton.input.value = currentName;\n\t\tthis._inputWithButton.input.setAttribute('selectionStart', selectionStart.toString());\n\t\tthis._inputWithButton.input.setAttribute('selectionEnd', selectionEnd.toString());\n\t\tthis._inputWithButton.input.size = Math.max((where.endColumn - where.startColumn) * 1.1, 20); // determines width\n\n\t\tthis._beforeFirstInputFieldEditSW.reset();\n\n\n\t\tdisposeOnDone.add(toDisposable(() => {\n\t\t\tthis._renameCts = undefined;\n\t\t\tcts.dispose(true);\n\t\t})); // @ulugbekna: this may result in `this.cancelInput` being called twice, but it should be safe since we set it to undefined after 1st call\n\t\tdisposeOnDone.add(toDisposable(() => {\n\t\t\tif (this._renameCandidateProvidersCts !== undefined) {\n\t\t\t\tthis._renameCandidateProvidersCts.dispose(true);\n\t\t\t\tthis._renameCandidateProvidersCts = undefined;\n\t\t\t}\n\t\t}));\n\n\t\tdisposeOnDone.add(toDisposable(() => this._candidates.clear()));\n\n\t\tconst inputResult = new DeferredPromise<RenameWidgetResult | boolean>();\n\n\t\tinputResult.p.finally(() => {\n\t\t\tdisposeOnDone.dispose();\n\t\t\tthis._hide();\n\t\t});\n\n\t\tthis._currentCancelInput = (focusEditor) => {\n\t\t\tthis._trace('invoking _currentCancelInput');\n\t\t\tthis._currentAcceptInput = undefined;\n\t\t\tthis._currentCancelInput = undefined;\n\t\t\t// fixme session cleanup\n\t\t\tthis._renameCandidateListView?.clearCandidates();\n\t\t\tinputResult.complete(focusEditor);\n\t\t\treturn true;\n\t\t};\n\n\t\tthis._currentAcceptInput = (wantsPreview) => {\n\t\t\tthis._trace('invoking _currentAcceptInput');\n\t\t\tassertType(this._renameCandidateListView !== undefined);\n\n\t\t\tconst nRenameSuggestions = this._renameCandidateListView.nCandidates;\n\n\t\t\tlet newName: string;\n\t\t\tlet source: NewNameSource;\n\t\t\tconst focusedCandidate = this._renameCandidateListView.focusedCandidate;\n\t\t\tif (focusedCandidate !== undefined) {\n\t\t\t\tthis._trace('using new name from renameSuggestion');\n\t\t\t\tnewName = focusedCandidate;\n\t\t\t\tsource = { k: 'renameSuggestion' };\n\t\t\t} else {\n\t\t\t\tthis._trace('using new name from inputField');\n\t\t\t\tnewName = this._inputWithButton.input.value;\n\t\t\t\tsource = this._isEditingRenameCandidate ? { k: 'userEditedRenameSuggestion' } : { k: 'inputField' };\n\t\t\t}\n\n\t\t\tif (newName === currentName || newName.trim().length === 0 /* is just whitespace */) {\n\t\t\t\tthis.cancelInput(true, '_currentAcceptInput (because newName === value || newName.trim().length === 0)');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._currentAcceptInput = undefined;\n\t\t\tthis._currentCancelInput = undefined;\n\t\t\tthis._renameCandidateListView.clearCandidates();\n\t\t\t// fixme session cleanup\n\n\t\t\tinputResult.complete({\n\t\t\t\tnewName,\n\t\t\t\twantsPreview: supportPreview && wantsPreview,\n\t\t\t\tstats: {\n\t\t\t\t\tsource,\n\t\t\t\t\tnRenameSuggestions,\n\t\t\t\t\ttimeBeforeFirstInputFieldEdit: this._timeBeforeFirstInputFieldEdit,\n\t\t\t\t\tnRenameSuggestionsInvocations: this._nRenameSuggestionsInvocations,\n\t\t\t\t\thadAutomaticRenameSuggestionsInvocation: this._hadAutomaticRenameSuggestionsInvocation,\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tdisposeOnDone.add(cts.token.onCancellationRequested(() => this.cancelInput(true, 'cts.token.onCancellationRequested')));\n\t\tif (!_sticky) {\n\t\t\tdisposeOnDone.add(this._editor.onDidBlurEditorWidget(() => this.cancelInput(!this._domNode?.ownerDocument.hasFocus(), 'editor.onDidBlurEditorWidget')));\n\t\t}\n\n\t\tthis._show();\n\n\t\treturn inputResult.p;\n\t}\n\n\tprivate _requestRenameCandidates(currentName: string, isManuallyTriggered: boolean) {\n\t\tif (this._requestRenameCandidatesOnce === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tif (this._renameCandidateProvidersCts !== undefined) {\n\t\t\tthis._renameCandidateProvidersCts.dispose(true);\n\t\t}\n\n\t\tassertType(this._renameCts);\n\n\t\tif (this._inputWithButton.buttonState !== 'stop') {\n\n\t\t\tthis._renameCandidateProvidersCts = new CancellationTokenSource();\n\n\t\t\tconst triggerKind = isManuallyTriggered ? NewSymbolNameTriggerKind.Invoke : NewSymbolNameTriggerKind.Automatic;\n\t\t\tconst candidates = this._requestRenameCandidatesOnce(triggerKind, this._renameCandidateProvidersCts.token);\n\n\t\t\tif (candidates.length === 0) {\n\t\t\t\tthis._inputWithButton.setSparkleButton();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!isManuallyTriggered) {\n\t\t\t\tthis._hadAutomaticRenameSuggestionsInvocation = true;\n\t\t\t}\n\n\t\t\tthis._nRenameSuggestionsInvocations += 1;\n\n\t\t\tthis._inputWithButton.setStopButton();\n\n\t\t\tthis._updateRenameCandidates(candidates, currentName, this._renameCts.token);\n\t\t}\n\t}\n\n\t/**\n\t * This allows selecting only part of the symbol name in the input field based on the selection in the editor\n\t */\n\tprivate _getSelection(where: IRange, currentName: string): { start: number; end: number } {\n\t\tassertType(this._editor.hasModel());\n\n\t\tconst selection = this._editor.getSelection();\n\t\tlet start = 0;\n\t\tlet end = currentName.length;\n\n\t\tif (!Range.isEmpty(selection) && !Range.spansMultipleLines(selection) && Range.containsRange(where, selection)) {\n\t\t\tstart = Math.max(0, selection.startColumn - where.startColumn);\n\t\t\tend = Math.min(where.endColumn, selection.endColumn) - where.startColumn;\n\t\t}\n\n\t\treturn { start, end };\n\t}\n\n\tprivate _show(): void {\n\t\tthis._trace('invoking _show');\n\t\tthis._editor.revealLineInCenterIfOutsideViewport(this._position!.lineNumber, ScrollType.Smooth);\n\t\tthis._visible = true;\n\t\tthis._visibleContextKey.set(true);\n\t\tthis._editor.layoutContentWidget(this);\n\n\t\t// TODO@ulugbekna: could this be simply run in `afterRender`?\n\t\tsetTimeout(() => {\n\t\t\tthis._inputWithButton.input.focus();\n\t\t\tthis._inputWithButton.input.setSelectionRange(\n\t\t\t\tparseInt(this._inputWithButton.input.getAttribute('selectionStart')!),\n\t\t\t\tparseInt(this._inputWithButton.input.getAttribute('selectionEnd')!)\n\t\t\t);\n\t\t}, 100);\n\t}\n\n\tprivate async _updateRenameCandidates(candidates: ProviderResult<NewSymbolName[]>[], currentName: string, token: CancellationToken) {\n\t\tconst trace = (...args: unknown[]) => this._trace('_updateRenameCandidates', ...args);\n\n\t\ttrace('start');\n\t\tconst namesListResults = await raceCancellation(Promise.allSettled(candidates), token);\n\n\t\tthis._inputWithButton.setSparkleButton();\n\n\t\tif (namesListResults === undefined) {\n\t\t\ttrace('returning early - received updateRenameCandidates results - undefined');\n\t\t\treturn;\n\t\t}\n\n\t\tconst newNames = namesListResults.flatMap(namesListResult =>\n\t\t\tnamesListResult.status === 'fulfilled' && isDefined(namesListResult.value)\n\t\t\t\t? namesListResult.value\n\t\t\t\t: []\n\t\t);\n\t\ttrace(`received updateRenameCandidates results - total (unfiltered) ${newNames.length} candidates.`);\n\n\t\t// deduplicate and filter out the current value\n\n\t\tconst distinctNames = arrays.distinct(newNames, v => v.newSymbolName);\n\t\ttrace(`distinct candidates - ${distinctNames.length} candidates.`);\n\n\t\tconst validDistinctNames = distinctNames.filter(({ newSymbolName }) => newSymbolName.trim().length > 0 && newSymbolName !== this._inputWithButton.input.value && newSymbolName !== currentName && !this._candidates.has(newSymbolName));\n\t\ttrace(`valid distinct candidates - ${newNames.length} candidates.`);\n\n\t\tvalidDistinctNames.forEach(n => this._candidates.add(n.newSymbolName));\n\n\t\tif (validDistinctNames.length < 1) {\n\t\t\ttrace('returning early - no valid distinct candidates');\n\t\t\treturn;\n\t\t}\n\n\t\t// show the candidates\n\t\ttrace('setting candidates');\n\t\tthis._renameCandidateListView!.setCandidates(validDistinctNames);\n\n\t\t// ask editor to re-layout given that the widget is now of a different size after rendering rename candidates\n\t\ttrace('asking editor to re-layout');\n\t\tthis._editor.layoutContentWidget(this);\n\t}\n\n\tprivate _hide(): void {\n\t\tthis._trace('invoked _hide');\n\t\tthis._visible = false;\n\t\tthis._visibleContextKey.reset();\n\t\tthis._editor.layoutContentWidget(this);\n\t}\n\n\tprivate _getTopForPosition(): number {\n\t\tconst visibleRanges = this._editor.getVisibleRanges();\n\t\tlet firstLineInViewport: number;\n\t\tif (visibleRanges.length > 0) {\n\t\t\tfirstLineInViewport = visibleRanges[0].startLineNumber;\n\t\t} else {\n\t\t\tthis._logService.warn('RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty');\n\t\t\tfirstLineInViewport = Math.max(1, this._position!.lineNumber - 5); // @ulugbekna: fallback to current line minus 5\n\t\t}\n\t\treturn this._editor.getTopForLineNumber(this._position!.lineNumber) - this._editor.getTopForLineNumber(firstLineInViewport);\n\t}\n\n\tprivate _trace(...args: unknown[]) {\n\t\tthis._logService.trace('RenameWidget', ...args);\n\t}\n}\n\nclass RenameCandidateListView {\n\n\t/** Parent node of the list widget; needed to control # of list elements visible */\n\tprivate readonly _listContainer: HTMLDivElement;\n\tprivate readonly _listWidget: List<NewSymbolName>;\n\n\tprivate _lineHeight: number;\n\tprivate _availableHeight: number;\n\tprivate _minimumWidth: number;\n\tprivate _typicalHalfwidthCharacterWidth: number;\n\n\tprivate readonly _disposables: DisposableStore;\n\n\t// FIXME@ulugbekna: rewrite using event emitters\n\tconstructor(parent: HTMLElement, opts: { fontInfo: FontInfo; onFocusChange: (newSymbolName: string) => void; onSelectionChange: () => void }) {\n\n\t\tthis._disposables = new DisposableStore();\n\n\t\tthis._availableHeight = 0;\n\t\tthis._minimumWidth = 0;\n\n\t\tthis._lineHeight = opts.fontInfo.lineHeight;\n\t\tthis._typicalHalfwidthCharacterWidth = opts.fontInfo.typicalHalfwidthCharacterWidth;\n\n\t\tthis._listContainer = document.createElement('div');\n\t\tthis._listContainer.className = 'rename-box rename-candidate-list-container';\n\t\tparent.appendChild(this._listContainer);\n\n\t\tthis._listWidget = RenameCandidateListView._createListWidget(this._listContainer, this._candidateViewHeight, opts.fontInfo);\n\n\t\tthis._disposables.add(this._listWidget.onDidChangeFocus(\n\t\t\te => {\n\t\t\t\tif (e.elements.length === 1) {\n\t\t\t\t\topts.onFocusChange(e.elements[0].newSymbolName);\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis._disposables\n\t\t));\n\n\t\tthis._disposables.add(this._listWidget.onDidChangeSelection(\n\t\t\te => {\n\t\t\t\tif (e.elements.length === 1) {\n\t\t\t\t\topts.onSelectionChange();\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis._disposables\n\t\t));\n\n\t\tthis._disposables.add(\n\t\t\tthis._listWidget.onDidBlur(e => { // @ulugbekna: because list widget otherwise remembers last focused element and returns it as focused element\n\t\t\t\tthis._listWidget.setFocus([]);\n\t\t\t})\n\t\t);\n\n\t\tthis._listWidget.style(getListStyles({\n\t\t\tlistInactiveFocusForeground: quickInputListFocusForeground,\n\t\t\tlistInactiveFocusBackground: quickInputListFocusBackground,\n\t\t}));\n\t}\n\n\tdispose() {\n\t\tthis._listWidget.dispose();\n\t\tthis._disposables.dispose();\n\t}\n\n\t// height - max height allowed by parent element\n\tpublic layout({ height, width }: { height: number; width: number }): void {\n\t\tthis._availableHeight = height;\n\t\tthis._minimumWidth = width;\n\t}\n\n\tpublic setCandidates(candidates: NewSymbolName[]): void {\n\n\t\t// insert candidates into list widget\n\t\tthis._listWidget.splice(0, 0, candidates);\n\n\t\t// adjust list widget layout\n\t\tconst height = this._pickListHeight(this._listWidget.length);\n\t\tconst width = this._pickListWidth(candidates);\n\n\t\tthis._listWidget.layout(height, width);\n\n\t\t// adjust list container layout\n\t\tthis._listContainer.style.height = `${height}px`;\n\t\tthis._listContainer.style.width = `${width}px`;\n\n\t\taria.status(nls.localize('renameSuggestionsReceivedAria', \"Received {0} rename suggestions\", candidates.length));\n\t}\n\n\tpublic clearCandidates(): void {\n\t\tthis._listContainer.style.height = '0px';\n\t\tthis._listContainer.style.width = '0px';\n\t\tthis._listWidget.splice(0, this._listWidget.length, []);\n\t}\n\n\tpublic get nCandidates() {\n\t\treturn this._listWidget.length;\n\t}\n\n\tpublic get focusedCandidate(): string | undefined {\n\t\tif (this._listWidget.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst selectedElement = this._listWidget.getSelectedElements()[0];\n\t\tif (selectedElement !== undefined) {\n\t\t\treturn selectedElement.newSymbolName;\n\t\t}\n\t\tconst focusedElement = this._listWidget.getFocusedElements()[0];\n\t\tif (focusedElement !== undefined) {\n\t\t\treturn focusedElement.newSymbolName;\n\t\t}\n\t\treturn;\n\t}\n\n\tpublic focusNext(): boolean {\n\t\tif (this._listWidget.length === 0) {\n\t\t\treturn false;\n\t\t}\n\t\tconst focusedIxs = this._listWidget.getFocus();\n\t\tif (focusedIxs.length === 0) {\n\t\t\tthis._listWidget.focusFirst();\n\t\t\tthis._listWidget.reveal(0);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (focusedIxs[0] === this._listWidget.length - 1) {\n\t\t\t\tthis._listWidget.setFocus([]);\n\t\t\t\tthis._listWidget.reveal(0); // @ulugbekna: without this, it seems like focused element is obstructed\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tthis._listWidget.focusNext();\n\t\t\t\tconst focused = this._listWidget.getFocus()[0];\n\t\t\t\tthis._listWidget.reveal(focused);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @returns true if focus is moved to previous element\n\t */\n\tpublic focusPrevious(): boolean {\n\t\tif (this._listWidget.length === 0) {\n\t\t\treturn false;\n\t\t}\n\t\tconst focusedIxs = this._listWidget.getFocus();\n\t\tif (focusedIxs.length === 0) {\n\t\t\tthis._listWidget.focusLast();\n\t\t\tconst focused = this._listWidget.getFocus()[0];\n\t\t\tthis._listWidget.reveal(focused);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (focusedIxs[0] === 0) {\n\t\t\t\tthis._listWidget.setFocus([]);\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tthis._listWidget.focusPrevious();\n\t\t\t\tconst focused = this._listWidget.getFocus()[0];\n\t\t\t\tthis._listWidget.reveal(focused);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic clearFocus(): void {\n\t\tthis._listWidget.setFocus([]);\n\t}\n\n\tprivate get _candidateViewHeight(): number {\n\t\tconst { totalHeight } = RenameCandidateView.getLayoutInfo({ lineHeight: this._lineHeight });\n\t\treturn totalHeight;\n\t}\n\n\tprivate _pickListHeight(nCandidates: number) {\n\t\tconst heightToFitAllCandidates = this._candidateViewHeight * nCandidates;\n\t\tconst MAX_N_CANDIDATES = 7; // @ulugbekna: max # of candidates we want to show at once\n\t\tconst height = Math.min(heightToFitAllCandidates, this._availableHeight, this._candidateViewHeight * MAX_N_CANDIDATES);\n\t\treturn height;\n\t}\n\n\tprivate _pickListWidth(candidates: NewSymbolName[]): number {\n\t\tconst longestCandidateWidth = Math.ceil(Math.max(...candidates.map(c => c.newSymbolName.length)) * this._typicalHalfwidthCharacterWidth);\n\t\tconst width = Math.max(\n\t\t\tthis._minimumWidth,\n\t\t\t4 /* padding */ + 16 /* sparkle icon */ + 5 /* margin-left */ + longestCandidateWidth + 10 /* (possibly visible) scrollbar width */ // TODO@ulugbekna: approximate calc - clean this up\n\t\t);\n\t\treturn width;\n\t}\n\n\tprivate static _createListWidget(container: HTMLElement, candidateViewHeight: number, fontInfo: FontInfo) {\n\t\tconst virtualDelegate = new class implements IListVirtualDelegate<NewSymbolName> {\n\t\t\tgetTemplateId(element: NewSymbolName): string {\n\t\t\t\treturn 'candidate';\n\t\t\t}\n\n\t\t\tgetHeight(element: NewSymbolName): number {\n\t\t\t\treturn candidateViewHeight;\n\t\t\t}\n\t\t};\n\n\t\tconst renderer = new class implements IListRenderer<NewSymbolName, RenameCandidateView> {\n\t\t\treadonly templateId = 'candidate';\n\n\t\t\trenderTemplate(container: HTMLElement): RenameCandidateView {\n\t\t\t\treturn new RenameCandidateView(container, fontInfo);\n\t\t\t}\n\n\t\t\trenderElement(candidate: NewSymbolName, index: number, templateData: RenameCandidateView): void {\n\t\t\t\ttemplateData.populate(candidate);\n\t\t\t}\n\n\t\t\tdisposeTemplate(templateData: RenameCandidateView): void {\n\t\t\t\ttemplateData.dispose();\n\t\t\t}\n\t\t};\n\n\t\treturn new List(\n\t\t\t'NewSymbolNameCandidates',\n\t\t\tcontainer,\n\t\t\tvirtualDelegate,\n\t\t\t[renderer],\n\t\t\t{\n\t\t\t\tkeyboardSupport: false, // @ulugbekna: because we handle keyboard events through proper commands & keybinding service, see `rename.ts`\n\t\t\t\tmouseSupport: true,\n\t\t\t\tmultipleSelectionSupport: false,\n\t\t\t}\n\t\t);\n\t}\n}\n\nclass InputWithButton implements IDisposable {\n\n\tprivate _buttonState: 'sparkle' | 'stop' | undefined;\n\n\tprivate _domNode: HTMLDivElement | undefined;\n\tprivate _inputNode: HTMLInputElement | undefined;\n\tprivate _buttonNode: HTMLElement | undefined;\n\tprivate _buttonHoverContent: string = '';\n\tprivate _buttonGenHoverText: string | undefined;\n\tprivate _buttonCancelHoverText: string | undefined;\n\tprivate _sparkleIcon: HTMLElement | undefined;\n\tprivate _stopIcon: HTMLElement | undefined;\n\n\tprivate readonly _onDidInputChange = new Emitter<void>();\n\tpublic readonly onDidInputChange = this._onDidInputChange.event;\n\n\tprivate readonly _disposables = new DisposableStore();\n\n\tget domNode() {\n\t\tif (!this._domNode) {\n\n\t\t\tthis._domNode = document.createElement('div');\n\t\t\tthis._domNode.className = 'rename-input-with-button';\n\t\t\tthis._domNode.style.display = 'flex';\n\t\t\tthis._domNode.style.flexDirection = 'row';\n\t\t\tthis._domNode.style.alignItems = 'center';\n\n\t\t\tthis._inputNode = document.createElement('input');\n\t\t\tthis._inputNode.className = 'rename-input';\n\t\t\tthis._inputNode.type = 'text';\n\t\t\tthis._inputNode.style.border = 'none';\n\t\t\tthis._inputNode.setAttribute('aria-label', nls.localize('renameAriaLabel', \"Rename input. Type new name and press Enter to commit.\"));\n\n\t\t\tthis._domNode.appendChild(this._inputNode);\n\n\t\t\tthis._buttonNode = document.createElement('div');\n\t\t\tthis._buttonNode.className = 'rename-suggestions-button';\n\t\t\tthis._buttonNode.setAttribute('tabindex', '0');\n\n\t\t\tthis._buttonGenHoverText = nls.localize('generateRenameSuggestionsButton', \"Generate new name suggestions\");\n\t\t\tthis._buttonCancelHoverText = nls.localize('cancelRenameSuggestionsButton', \"Cancel\");\n\t\t\tthis._buttonHoverContent = this._buttonGenHoverText;\n\t\t\tthis._disposables.add(getBaseLayerHoverDelegate().setupDelayedHover(this._buttonNode, () => ({\n\t\t\t\tcontent: this._buttonHoverContent,\n\t\t\t\tappearance: {\n\t\t\t\t\tshowPointer: true,\n\t\t\t\t\tcompact: true,\n\t\t\t\t}\n\t\t\t})));\n\n\t\t\tthis._domNode.appendChild(this._buttonNode);\n\n\t\t\t// notify if selection changes to cancel request to rename-suggestion providers\n\n\t\t\tthis._disposables.add(dom.addDisposableListener(this.input, dom.EventType.INPUT, () => this._onDidInputChange.fire()));\n\t\t\tthis._disposables.add(dom.addDisposableListener(this.input, dom.EventType.KEY_DOWN, (e) => {\n\t\t\t\tconst keyEvent = new StandardKeyboardEvent(e);\n\t\t\t\tif (keyEvent.keyCode === KeyCode.LeftArrow || keyEvent.keyCode === KeyCode.RightArrow) {\n\t\t\t\t\tthis._onDidInputChange.fire();\n\t\t\t\t}\n\t\t\t}));\n\t\t\tthis._disposables.add(dom.addDisposableListener(this.input, dom.EventType.CLICK, () => this._onDidInputChange.fire()));\n\n\t\t\t// focus \"container\" border instead of input box\n\n\t\t\tthis._disposables.add(dom.addDisposableListener(this.input, dom.EventType.FOCUS, () => {\n\t\t\t\tthis.domNode.style.outlineWidth = '1px';\n\t\t\t\tthis.domNode.style.outlineStyle = 'solid';\n\t\t\t\tthis.domNode.style.outlineOffset = '-1px';\n\t\t\t\tthis.domNode.style.outlineColor = 'var(--vscode-focusBorder)';\n\t\t\t}));\n\t\t\tthis._disposables.add(dom.addDisposableListener(this.input, dom.EventType.BLUR, () => {\n\t\t\t\tthis.domNode.style.outline = 'none';\n\t\t\t}));\n\t\t}\n\t\treturn this._domNode;\n\t}\n\n\tget input() {\n\t\tassertType(this._inputNode);\n\t\treturn this._inputNode;\n\t}\n\n\tget button() {\n\t\tassertType(this._buttonNode);\n\t\treturn this._buttonNode;\n\t}\n\n\tget buttonState() {\n\t\treturn this._buttonState;\n\t}\n\n\tsetSparkleButton() {\n\t\tthis._buttonState = 'sparkle';\n\t\tthis._sparkleIcon ??= renderIcon(Codicon.sparkle);\n\t\tdom.clearNode(this.button);\n\t\tthis.button.appendChild(this._sparkleIcon);\n\t\tthis.button.setAttribute('aria-label', 'Generating new name suggestions');\n\t\tthis._buttonHoverContent = this._buttonGenHoverText!;\n\t\tthis.input.focus();\n\t}\n\n\tsetStopButton() {\n\t\tthis._buttonState = 'stop';\n\t\tthis._stopIcon ??= renderIcon(Codicon.stopCircle);\n\t\tdom.clearNode(this.button);\n\t\tthis.button.appendChild(this._stopIcon);\n\t\tthis.button.setAttribute('aria-label', 'Cancel generating new name suggestions');\n\t\tthis._buttonHoverContent = this._buttonCancelHoverText!;\n\t\tthis.input.focus();\n\t}\n\n\tdispose(): void {\n\t\tthis._disposables.dispose();\n\t}\n}\n\nclass RenameCandidateView {\n\n\tprivate static _PADDING: number = 2;\n\n\tprivate readonly _domNode: HTMLElement;\n\tprivate readonly _icon: HTMLElement;\n\tprivate readonly _label: HTMLElement;\n\n\tconstructor(parent: HTMLElement, fontInfo: FontInfo) {\n\n\t\tthis._domNode = document.createElement('div');\n\t\tthis._domNode.className = 'rename-box rename-candidate';\n\t\tthis._domNode.style.display = `flex`;\n\t\tthis._domNode.style.columnGap = `5px`;\n\t\tthis._domNode.style.alignItems = `center`;\n\t\tthis._domNode.style.height = `${fontInfo.lineHeight}px`;\n\t\tthis._domNode.style.padding = `${RenameCandidateView._PADDING}px`;\n\n\t\t// @ulugbekna: needed to keep space when the `icon.style.display` is set to `none`\n\t\tconst iconContainer = document.createElement('div');\n\t\ticonContainer.style.display = `flex`;\n\t\ticonContainer.style.alignItems = `center`;\n\t\ticonContainer.style.width = iconContainer.style.height = `${fontInfo.lineHeight * 0.8}px`;\n\t\tthis._domNode.appendChild(iconContainer);\n\n\t\tthis._icon = renderIcon(Codicon.sparkle);\n\t\tthis._icon.style.display = `none`;\n\t\ticonContainer.appendChild(this._icon);\n\n\t\tthis._label = document.createElement('div');\n\t\tdomFontInfo.applyFontInfo(this._label, fontInfo);\n\t\tthis._domNode.appendChild(this._label);\n\n\t\tparent.appendChild(this._domNode);\n\t}\n\n\tpublic populate(value: NewSymbolName) {\n\t\tthis._updateIcon(value);\n\t\tthis._updateLabel(value);\n\t}\n\n\tprivate _updateIcon(value: NewSymbolName) {\n\t\tconst isAIGenerated = !!value.tags?.includes(NewSymbolNameTag.AIGenerated);\n\t\tthis._icon.style.display = isAIGenerated ? 'inherit' : 'none';\n\t}\n\n\tprivate _updateLabel(value: NewSymbolName) {\n\t\tthis._label.innerText = value.newSymbolName;\n\t}\n\n\tpublic static getLayoutInfo({ lineHeight }: { lineHeight: number }): { totalHeight: number } {\n\t\tconst totalHeight = lineHeight + RenameCandidateView._PADDING * 2 /* top & bottom padding */;\n\t\treturn { totalHeight };\n\t}\n\n\tpublic dispose() {\n\t}\n}\n"]}
1
+ {"version":3,"sources":["vs/editor/contrib/rename/browser/renameWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,KAAK,IAAI,MAAM,0CAA0C,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AAEjF,OAAO,EAAE,IAAI,EAAE,MAAM,gDAA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C;IAEO,WAAW,CAAC,KAAoB;QACvC,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAC3E,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IAC/D,CAAC;IAEO,YAAY,CAAC,KAAoB;QACxC,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC;IAC7C,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,EAAE,UAAU,EAA0B;QACjE,MAAM,WAAW,GAAG,UAAU,GAAG,mBAAmB,CAAC,QAAQ,GAAG,CAAC,CAAC,0BAA0B,CAAC;QAC7F,OAAO,EAAE,WAAW,EAAE,CAAC;IACxB,CAAC;IAEM,OAAO;IACd,CAAC","file":"renameWidget.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport * as aria from '../../../../base/browser/ui/aria/aria.js';\nimport { getBaseLayerHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegate2.js';\nimport { renderIcon } from '../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { IListRenderer, IListVirtualDelegate } from '../../../../base/browser/ui/list/list.js';\nimport { List } from '../../../../base/browser/ui/list/listWidget.js';\nimport * as arrays from '../../../../base/common/arrays.js';\nimport { DeferredPromise, raceCancellation } from '../../../../base/common/async.js';\nimport { CancellationToken, CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { Codicon } from '../../../../base/common/codicons.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { KeyCode } from '../../../../base/common/keyCodes.js';\nimport { DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { StopWatch } from '../../../../base/common/stopwatch.js';\nimport { assertType, isDefined } from '../../../../base/common/types.js';\nimport './renameWidget.css';\nimport * as domFontInfo from '../../../browser/config/domFontInfo.js';\nimport { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { FontInfo } from '../../../common/config/fontInfo.js';\nimport { IDimension } from '../../../common/core/2d/dimension.js';\nimport { Position } from '../../../common/core/position.js';\nimport { IRange, Range } from '../../../common/core/range.js';\nimport { ScrollType } from '../../../common/editorCommon.js';\nimport { NewSymbolName, NewSymbolNameTag, NewSymbolNameTriggerKind, ProviderResult } from '../../../common/languages.js';\nimport * as nls from '../../../../nls.js';\nimport { IContextKey, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { ILogService } from '../../../../platform/log/common/log.js';\nimport { getListStyles } from '../../../../platform/theme/browser/defaultStyles.js';\nimport {\n\teditorWidgetBackground,\n\tinputBackground,\n\tinputBorder,\n\tinputForeground,\n\tquickInputListFocusBackground,\n\tquickInputListFocusForeground,\n\twidgetBorder,\n\twidgetShadow } from '../../../../platform/theme/common/colorRegistry.js';\nimport { IColorTheme, IThemeService } from '../../../../platform/theme/common/themeService.js';\n\n/** for debugging */\nconst _sticky = false\n\t// || Boolean(\"true\") // done \"weirdly\" so that a lint warning prevents you from pushing this\n\t;\n\n\nexport const CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey<boolean>('renameInputVisible', false, nls.localize('renameInputVisible', \"Whether the rename input widget is visible\"));\nexport const CONTEXT_RENAME_INPUT_FOCUSED = new RawContextKey<boolean>('renameInputFocused', false, nls.localize('renameInputFocused', \"Whether the rename input widget is focused\"));\n\n/**\n * \"Source\" of the new name:\n * - 'inputField' - user entered the new name\n * - 'renameSuggestion' - user picked from rename suggestions\n * - 'userEditedRenameSuggestion' - user _likely_ edited a rename suggestion (\"likely\" because when input started being edited, a rename suggestion had focus)\n */\nexport type NewNameSource =\n\t| { k: 'inputField' }\n\t| { k: 'renameSuggestion' }\n\t| { k: 'userEditedRenameSuggestion' };\n\n/**\n * Various statistics regarding rename input field\n */\nexport type RenameWidgetStats = {\n\tnRenameSuggestions: number;\n\tsource: NewNameSource;\n\ttimeBeforeFirstInputFieldEdit: number | undefined;\n\tnRenameSuggestionsInvocations: number;\n\thadAutomaticRenameSuggestionsInvocation: boolean;\n};\n\nexport type RenameWidgetResult = {\n\t/**\n\t * The new name to be used\n\t */\n\tnewName: string;\n\twantsPreview?: boolean;\n\tstats: RenameWidgetStats;\n};\n\ninterface IRenameWidget {\n}\n\nexport class RenameWidget implements IRenameWidget, IContentWidget, IDisposable {\n\n\t// implement IContentWidget\n\treadonly allowEditorOverflow: boolean = true;\n\n\t// UI state\n\n\tprivate _domNode?: HTMLElement;\n\tprivate _inputWithButton: InputWithButton;\n\tprivate _renameCandidateListView?: RenameCandidateListView;\n\tprivate _label?: HTMLDivElement;\n\n\tprivate _nPxAvailableAbove?: number;\n\tprivate _nPxAvailableBelow?: number;\n\n\t// Model state\n\n\tprivate _position?: Position;\n\tprivate _currentName?: string;\n\t/** Is true if input field got changes when a rename candidate was focused; otherwise, false */\n\tprivate _isEditingRenameCandidate: boolean;\n\n\tprivate readonly _candidates: Set<string>;\n\n\tprivate _visible?: boolean;\n\n\t/** must be reset at session start */\n\tprivate _beforeFirstInputFieldEditSW: StopWatch;\n\n\t/**\n\t * Milliseconds before user edits the input field for the first time\n\t * @remarks must be set once per session\n\t */\n\tprivate _timeBeforeFirstInputFieldEdit: number | undefined;\n\n\tprivate _nRenameSuggestionsInvocations: number;\n\n\tprivate _hadAutomaticRenameSuggestionsInvocation: boolean;\n\n\tprivate _renameCandidateProvidersCts: CancellationTokenSource | undefined;\n\tprivate _renameCts: CancellationTokenSource | undefined;\n\n\tprivate readonly _visibleContextKey: IContextKey<boolean>;\n\tprivate readonly _disposables = new DisposableStore();\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _acceptKeybindings: [string, string],\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@ILogService private readonly _logService: ILogService,\n\t) {\n\t\tthis._visibleContextKey = CONTEXT_RENAME_INPUT_VISIBLE.bindTo(contextKeyService);\n\n\t\tthis._isEditingRenameCandidate = false;\n\n\t\tthis._nRenameSuggestionsInvocations = 0;\n\n\t\tthis._hadAutomaticRenameSuggestionsInvocation = false;\n\n\t\tthis._candidates = new Set();\n\n\t\tthis._beforeFirstInputFieldEditSW = new StopWatch();\n\n\t\tthis._inputWithButton = new InputWithButton();\n\t\tthis._disposables.add(this._inputWithButton);\n\n\t\tthis._editor.addContentWidget(this);\n\n\t\tthis._disposables.add(this._editor.onDidChangeConfiguration(e => {\n\t\t\tif (e.hasChanged(EditorOption.fontInfo)) {\n\t\t\t\tthis._updateFont();\n\t\t\t}\n\t\t}));\n\n\t\tthis._disposables.add(_themeService.onDidColorThemeChange(this._updateStyles, this));\n\t}\n\n\tdispose(): void {\n\t\tthis._disposables.dispose();\n\t\tthis._editor.removeContentWidget(this);\n\t}\n\n\tgetId(): string {\n\t\treturn '__renameInputWidget';\n\t}\n\n\tgetDomNode(): HTMLElement {\n\t\tif (!this._domNode) {\n\t\t\tthis._domNode = document.createElement('div');\n\t\t\tthis._domNode.className = 'monaco-editor rename-box';\n\n\t\t\tthis._domNode.appendChild(this._inputWithButton.domNode);\n\n\t\t\tthis._renameCandidateListView = this._disposables.add(\n\t\t\t\tnew RenameCandidateListView(this._domNode, {\n\t\t\t\t\tfontInfo: this._editor.getOption(EditorOption.fontInfo),\n\t\t\t\t\tonFocusChange: (newSymbolName: string) => {\n\t\t\t\t\t\tthis._inputWithButton.input.value = newSymbolName;\n\t\t\t\t\t\tthis._isEditingRenameCandidate = false; // @ulugbekna: reset\n\t\t\t\t\t},\n\t\t\t\t\tonSelectionChange: () => {\n\t\t\t\t\t\tthis._isEditingRenameCandidate = false; // @ulugbekna: because user picked a rename suggestion\n\t\t\t\t\t\tthis.acceptInput(false); // we don't allow preview with mouse click for now\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tthis._disposables.add(\n\t\t\t\tthis._inputWithButton.onDidInputChange(() => {\n\t\t\t\t\tif (this._renameCandidateListView?.focusedCandidate !== undefined) {\n\t\t\t\t\t\tthis._isEditingRenameCandidate = true;\n\t\t\t\t\t}\n\t\t\t\t\tthis._timeBeforeFirstInputFieldEdit ??= this._beforeFirstInputFieldEditSW.elapsed();\n\t\t\t\t\tif (this._renameCandidateProvidersCts?.token.isCancellationRequested === false) {\n\t\t\t\t\t\tthis._renameCandidateProvidersCts.cancel();\n\t\t\t\t\t}\n\t\t\t\t\tthis._renameCandidateListView?.clearFocus();\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tthis._label = document.createElement('div');\n\t\t\tthis._label.className = 'rename-label';\n\t\t\tthis._domNode.appendChild(this._label);\n\n\t\t\tthis._updateFont();\n\t\t\tthis._updateStyles(this._themeService.getColorTheme());\n\t\t}\n\t\treturn this._domNode;\n\t}\n\n\tprivate _updateStyles(theme: IColorTheme): void {\n\t\tif (!this._domNode) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst widgetShadowColor = theme.getColor(widgetShadow);\n\t\tconst widgetBorderColor = theme.getColor(widgetBorder);\n\t\tthis._domNode.style.backgroundColor = String(theme.getColor(editorWidgetBackground) ?? '');\n\t\tthis._domNode.style.boxShadow = widgetShadowColor ? ` 0 0 8px 2px ${widgetShadowColor}` : '';\n\t\tthis._domNode.style.border = widgetBorderColor ? `1px solid ${widgetBorderColor}` : '';\n\t\tthis._domNode.style.color = String(theme.getColor(inputForeground) ?? '');\n\n\t\tconst border = theme.getColor(inputBorder);\n\n\t\tthis._inputWithButton.domNode.style.backgroundColor = String(theme.getColor(inputBackground) ?? '');\n\t\tthis._inputWithButton.input.style.backgroundColor = String(theme.getColor(inputBackground) ?? '');\n\t\tthis._inputWithButton.domNode.style.borderWidth = border ? '1px' : '0px';\n\t\tthis._inputWithButton.domNode.style.borderStyle = border ? 'solid' : 'none';\n\t\tthis._inputWithButton.domNode.style.borderColor = border?.toString() ?? 'none';\n\t}\n\n\tprivate _updateFont(): void {\n\t\tif (this._domNode === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tassertType(this._label !== undefined, 'RenameWidget#_updateFont: _label must not be undefined given _domNode is defined');\n\n\t\tthis._editor.applyFontInfo(this._inputWithButton.input);\n\n\t\tconst fontInfo = this._editor.getOption(EditorOption.fontInfo);\n\t\tthis._label.style.fontSize = `${this._computeLabelFontSize(fontInfo.fontSize)}px`;\n\t}\n\n\tprivate _computeLabelFontSize(editorFontSize: number) {\n\t\treturn editorFontSize * 0.8;\n\t}\n\n\tgetPosition(): IContentWidgetPosition | null {\n\t\tif (!this._visible) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!this._editor.hasModel() || // @ulugbekna: shouldn't happen\n\t\t\t!this._editor.getDomNode() // @ulugbekna: can happen during tests based on suggestWidget's similar predicate check\n\t\t) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst bodyBox = dom.getClientArea(this.getDomNode().ownerDocument.body);\n\t\tconst editorBox = dom.getDomNodePagePosition(this._editor.getDomNode());\n\n\t\tconst cursorBoxTop = this._getTopForPosition();\n\n\t\tthis._nPxAvailableAbove = cursorBoxTop + editorBox.top;\n\t\tthis._nPxAvailableBelow = bodyBox.height - this._nPxAvailableAbove;\n\n\t\tconst lineHeight = this._editor.getOption(EditorOption.lineHeight);\n\t\tconst { totalHeight: candidateViewHeight } = RenameCandidateView.getLayoutInfo({ lineHeight });\n\n\t\tconst positionPreference = this._nPxAvailableBelow > candidateViewHeight * 6 /* approximate # of candidates to fit in (inclusive of rename input box & rename label) */\n\t\t\t? [ContentWidgetPositionPreference.BELOW, ContentWidgetPositionPreference.ABOVE]\n\t\t\t: [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW];\n\n\t\treturn {\n\t\t\tposition: this._position!,\n\t\t\tpreference: positionPreference,\n\t\t};\n\t}\n\n\tbeforeRender(): IDimension | null {\n\t\tconst [accept, preview] = this._acceptKeybindings;\n\t\tthis._label!.innerText = nls.localize({ key: 'label', comment: ['placeholders are keybindings, e.g \"F2 to Rename, Shift+F2 to Preview\"'] }, \"{0} to Rename, {1} to Preview\", this._keybindingService.lookupKeybinding(accept)?.getLabel(), this._keybindingService.lookupKeybinding(preview)?.getLabel());\n\n\t\tthis._domNode!.style.minWidth = `200px`; // to prevent from widening when candidates come in\n\n\t\treturn null;\n\t}\n\n\tafterRender(position: ContentWidgetPositionPreference | null): void {\n\t\t// FIXME@ulugbekna: commenting trace log out until we start unmounting the widget from editor properly - https://github.com/microsoft/vscode/issues/226975\n\t\t// this._trace('invoking afterRender, position: ', position ? 'not null' : 'null');\n\t\tif (position === null) {\n\t\t\t// cancel rename when input widget isn't rendered anymore\n\t\t\tthis.cancelInput(true, 'afterRender (because position is null)');\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._editor.hasModel() || // shouldn't happen\n\t\t\t!this._editor.getDomNode() // can happen during tests based on suggestWidget's similar predicate check\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tassertType(this._renameCandidateListView);\n\t\tassertType(this._nPxAvailableAbove !== undefined);\n\t\tassertType(this._nPxAvailableBelow !== undefined);\n\n\t\tconst inputBoxHeight = dom.getTotalHeight(this._inputWithButton.domNode);\n\n\t\tconst labelHeight = dom.getTotalHeight(this._label!);\n\n\t\tlet totalHeightAvailable: number;\n\t\tif (position === ContentWidgetPositionPreference.BELOW) {\n\t\t\ttotalHeightAvailable = this._nPxAvailableBelow;\n\t\t} else {\n\t\t\ttotalHeightAvailable = this._nPxAvailableAbove;\n\t\t}\n\n\t\tthis._renameCandidateListView!.layout({\n\t\t\theight: totalHeightAvailable - labelHeight - inputBoxHeight,\n\t\t\twidth: dom.getTotalWidth(this._inputWithButton.domNode),\n\t\t});\n\t}\n\n\n\tprivate _currentAcceptInput?: (wantsPreview: boolean) => void;\n\tprivate _currentCancelInput?: (focusEditor: boolean) => void;\n\tprivate _requestRenameCandidatesOnce?: (triggerKind: NewSymbolNameTriggerKind, cts: CancellationToken) => ProviderResult<NewSymbolName[]>[];\n\n\tacceptInput(wantsPreview: boolean): void {\n\t\tthis._trace(`invoking acceptInput`);\n\t\tthis._currentAcceptInput?.(wantsPreview);\n\t}\n\n\tcancelInput(focusEditor: boolean, caller: string): void {\n\t\t// this._trace(`invoking cancelInput, caller: ${caller}, _currentCancelInput: ${this._currentAcceptInput ? 'not undefined' : 'undefined'}`);\n\t\tthis._currentCancelInput?.(focusEditor);\n\t}\n\n\tfocusNextRenameSuggestion() {\n\t\tif (!this._renameCandidateListView?.focusNext()) {\n\t\t\tthis._inputWithButton.input.value = this._currentName!;\n\t\t}\n\t}\n\n\tfocusPreviousRenameSuggestion() { // TODO@ulugbekna: this and focusNext should set the original name if no candidate is focused\n\t\tif (!this._renameCandidateListView?.focusPrevious()) {\n\t\t\tthis._inputWithButton.input.value = this._currentName!;\n\t\t}\n\t}\n\n\t/**\n\t * @param requestRenameCandidates is `undefined` when there are no rename suggestion providers\n\t */\n\tgetInput(\n\t\twhere: IRange,\n\t\tcurrentName: string,\n\t\tsupportPreview: boolean,\n\t\trequestRenameCandidates: undefined | ((triggerKind: NewSymbolNameTriggerKind, cts: CancellationToken) => ProviderResult<NewSymbolName[]>[]),\n\t\tcts: CancellationTokenSource\n\t): Promise<RenameWidgetResult | boolean> {\n\n\t\tconst { start: selectionStart, end: selectionEnd } = this._getSelection(where, currentName);\n\n\t\tthis._renameCts = cts;\n\n\t\tconst disposeOnDone = new DisposableStore();\n\n\t\tthis._nRenameSuggestionsInvocations = 0;\n\n\t\tthis._hadAutomaticRenameSuggestionsInvocation = false;\n\n\t\tif (requestRenameCandidates === undefined) {\n\t\t\tthis._inputWithButton.button.style.display = 'none';\n\t\t} else {\n\t\t\tthis._inputWithButton.button.style.display = 'flex';\n\n\t\t\tthis._requestRenameCandidatesOnce = requestRenameCandidates;\n\n\t\t\tthis._requestRenameCandidates(currentName, false);\n\n\t\t\tdisposeOnDone.add(dom.addDisposableListener(\n\t\t\t\tthis._inputWithButton.button,\n\t\t\t\t'click',\n\t\t\t\t() => this._requestRenameCandidates(currentName, true)\n\t\t\t));\n\t\t\tdisposeOnDone.add(dom.addDisposableListener(\n\t\t\t\tthis._inputWithButton.button,\n\t\t\t\tdom.EventType.KEY_DOWN,\n\t\t\t\t(e) => {\n\t\t\t\t\tconst keyEvent = new StandardKeyboardEvent(e);\n\n\t\t\t\t\tif (keyEvent.equals(KeyCode.Enter) || keyEvent.equals(KeyCode.Space)) {\n\t\t\t\t\t\tkeyEvent.stopPropagation();\n\t\t\t\t\t\tkeyEvent.preventDefault();\n\t\t\t\t\t\tthis._requestRenameCandidates(currentName, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t));\n\t\t}\n\n\t\tthis._isEditingRenameCandidate = false;\n\n\t\tthis._domNode!.classList.toggle('preview', supportPreview);\n\n\t\tthis._position = new Position(where.startLineNumber, where.startColumn);\n\t\tthis._currentName = currentName;\n\n\t\tthis._inputWithButton.input.value = currentName;\n\t\tthis._inputWithButton.input.setAttribute('selectionStart', selectionStart.toString());\n\t\tthis._inputWithButton.input.setAttribute('selectionEnd', selectionEnd.toString());\n\t\tthis._inputWithButton.input.size = Math.max((where.endColumn - where.startColumn) * 1.1, 20); // determines width\n\n\t\tthis._beforeFirstInputFieldEditSW.reset();\n\n\n\t\tdisposeOnDone.add(toDisposable(() => {\n\t\t\tthis._renameCts = undefined;\n\t\t\tcts.dispose(true);\n\t\t})); // @ulugbekna: this may result in `this.cancelInput` being called twice, but it should be safe since we set it to undefined after 1st call\n\t\tdisposeOnDone.add(toDisposable(() => {\n\t\t\tif (this._renameCandidateProvidersCts !== undefined) {\n\t\t\t\tthis._renameCandidateProvidersCts.dispose(true);\n\t\t\t\tthis._renameCandidateProvidersCts = undefined;\n\t\t\t}\n\t\t}));\n\n\t\tdisposeOnDone.add(toDisposable(() => this._candidates.clear()));\n\n\t\tconst inputResult = new DeferredPromise<RenameWidgetResult | boolean>();\n\n\t\tinputResult.p.finally(() => {\n\t\t\tdisposeOnDone.dispose();\n\t\t\tthis._hide();\n\t\t});\n\n\t\tthis._currentCancelInput = (focusEditor) => {\n\t\t\tthis._trace('invoking _currentCancelInput');\n\t\t\tthis._currentAcceptInput = undefined;\n\t\t\tthis._currentCancelInput = undefined;\n\t\t\t// fixme session cleanup\n\t\t\tthis._renameCandidateListView?.clearCandidates();\n\t\t\tinputResult.complete(focusEditor);\n\t\t\treturn true;\n\t\t};\n\n\t\tthis._currentAcceptInput = (wantsPreview) => {\n\t\t\tthis._trace('invoking _currentAcceptInput');\n\t\t\tassertType(this._renameCandidateListView !== undefined);\n\n\t\t\tconst nRenameSuggestions = this._renameCandidateListView.nCandidates;\n\n\t\t\tlet newName: string;\n\t\t\tlet source: NewNameSource;\n\t\t\tconst focusedCandidate = this._renameCandidateListView.focusedCandidate;\n\t\t\tif (focusedCandidate !== undefined) {\n\t\t\t\tthis._trace('using new name from renameSuggestion');\n\t\t\t\tnewName = focusedCandidate;\n\t\t\t\tsource = { k: 'renameSuggestion' };\n\t\t\t} else {\n\t\t\t\tthis._trace('using new name from inputField');\n\t\t\t\tnewName = this._inputWithButton.input.value;\n\t\t\t\tsource = this._isEditingRenameCandidate ? { k: 'userEditedRenameSuggestion' } : { k: 'inputField' };\n\t\t\t}\n\n\t\t\tif (newName === currentName || newName.trim().length === 0 /* is just whitespace */) {\n\t\t\t\tthis.cancelInput(true, '_currentAcceptInput (because newName === value || newName.trim().length === 0)');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._currentAcceptInput = undefined;\n\t\t\tthis._currentCancelInput = undefined;\n\t\t\tthis._renameCandidateListView.clearCandidates();\n\t\t\t// fixme session cleanup\n\n\t\t\tinputResult.complete({\n\t\t\t\tnewName,\n\t\t\t\twantsPreview: supportPreview && wantsPreview,\n\t\t\t\tstats: {\n\t\t\t\t\tsource,\n\t\t\t\t\tnRenameSuggestions,\n\t\t\t\t\ttimeBeforeFirstInputFieldEdit: this._timeBeforeFirstInputFieldEdit,\n\t\t\t\t\tnRenameSuggestionsInvocations: this._nRenameSuggestionsInvocations,\n\t\t\t\t\thadAutomaticRenameSuggestionsInvocation: this._hadAutomaticRenameSuggestionsInvocation,\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tdisposeOnDone.add(cts.token.onCancellationRequested(() => this.cancelInput(true, 'cts.token.onCancellationRequested')));\n\t\tif (!_sticky) {\n\t\t\tdisposeOnDone.add(this._editor.onDidBlurEditorWidget(() => this.cancelInput(!this._domNode?.ownerDocument.hasFocus(), 'editor.onDidBlurEditorWidget')));\n\t\t}\n\n\t\tthis._show();\n\n\t\treturn inputResult.p;\n\t}\n\n\tprivate _requestRenameCandidates(currentName: string, isManuallyTriggered: boolean) {\n\t\tif (this._requestRenameCandidatesOnce === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tif (this._renameCandidateProvidersCts !== undefined) {\n\t\t\tthis._renameCandidateProvidersCts.dispose(true);\n\t\t}\n\n\t\tassertType(this._renameCts);\n\n\t\tif (this._inputWithButton.buttonState !== 'stop') {\n\n\t\t\tthis._renameCandidateProvidersCts = new CancellationTokenSource();\n\n\t\t\tconst triggerKind = isManuallyTriggered ? NewSymbolNameTriggerKind.Invoke : NewSymbolNameTriggerKind.Automatic;\n\t\t\tconst candidates = this._requestRenameCandidatesOnce(triggerKind, this._renameCandidateProvidersCts.token);\n\n\t\t\tif (candidates.length === 0) {\n\t\t\t\tthis._inputWithButton.setSparkleButton();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!isManuallyTriggered) {\n\t\t\t\tthis._hadAutomaticRenameSuggestionsInvocation = true;\n\t\t\t}\n\n\t\t\tthis._nRenameSuggestionsInvocations += 1;\n\n\t\t\tthis._inputWithButton.setStopButton();\n\n\t\t\tthis._updateRenameCandidates(candidates, currentName, this._renameCts.token);\n\t\t}\n\t}\n\n\t/**\n\t * This allows selecting only part of the symbol name in the input field based on the selection in the editor\n\t */\n\tprivate _getSelection(where: IRange, currentName: string): { start: number; end: number } {\n\t\tassertType(this._editor.hasModel());\n\n\t\tconst selection = this._editor.getSelection();\n\t\tlet start = 0;\n\t\tlet end = currentName.length;\n\n\t\tif (!Range.isEmpty(selection) && !Range.spansMultipleLines(selection) && Range.containsRange(where, selection)) {\n\t\t\tstart = Math.max(0, selection.startColumn - where.startColumn);\n\t\t\tend = Math.min(where.endColumn, selection.endColumn) - where.startColumn;\n\t\t}\n\n\t\treturn { start, end };\n\t}\n\n\tprivate _show(): void {\n\t\tthis._trace('invoking _show');\n\t\tthis._editor.revealLineInCenterIfOutsideViewport(this._position!.lineNumber, ScrollType.Smooth);\n\t\tthis._visible = true;\n\t\tthis._visibleContextKey.set(true);\n\t\tthis._editor.layoutContentWidget(this);\n\n\t\t// TODO@ulugbekna: could this be simply run in `afterRender`?\n\t\tsetTimeout(() => {\n\t\t\tthis._inputWithButton.input.focus();\n\t\t\tthis._inputWithButton.input.setSelectionRange(\n\t\t\t\tparseInt(this._inputWithButton.input.getAttribute('selectionStart')!),\n\t\t\t\tparseInt(this._inputWithButton.input.getAttribute('selectionEnd')!)\n\t\t\t);\n\t\t}, 100);\n\t}\n\n\tprivate async _updateRenameCandidates(candidates: ProviderResult<NewSymbolName[]>[], currentName: string, token: CancellationToken) {\n\t\tconst trace = (...args: unknown[]) => this._trace('_updateRenameCandidates', ...args);\n\n\t\ttrace('start');\n\t\tconst namesListResults = await raceCancellation(Promise.allSettled(candidates), token);\n\n\t\tthis._inputWithButton.setSparkleButton();\n\n\t\tif (namesListResults === undefined) {\n\t\t\ttrace('returning early - received updateRenameCandidates results - undefined');\n\t\t\treturn;\n\t\t}\n\n\t\tconst newNames = namesListResults.flatMap(namesListResult =>\n\t\t\tnamesListResult.status === 'fulfilled' && isDefined(namesListResult.value)\n\t\t\t\t? namesListResult.value\n\t\t\t\t: []\n\t\t);\n\t\ttrace(`received updateRenameCandidates results - total (unfiltered) ${newNames.length} candidates.`);\n\n\t\t// deduplicate and filter out the current value\n\n\t\tconst distinctNames = arrays.distinct(newNames, v => v.newSymbolName);\n\t\ttrace(`distinct candidates - ${distinctNames.length} candidates.`);\n\n\t\tconst validDistinctNames = distinctNames.filter(({ newSymbolName }) => newSymbolName.trim().length > 0 && newSymbolName !== this._inputWithButton.input.value && newSymbolName !== currentName && !this._candidates.has(newSymbolName));\n\t\ttrace(`valid distinct candidates - ${newNames.length} candidates.`);\n\n\t\tvalidDistinctNames.forEach(n => this._candidates.add(n.newSymbolName));\n\n\t\tif (validDistinctNames.length < 1) {\n\t\t\ttrace('returning early - no valid distinct candidates');\n\t\t\treturn;\n\t\t}\n\n\t\t// show the candidates\n\t\ttrace('setting candidates');\n\t\tthis._renameCandidateListView!.setCandidates(validDistinctNames);\n\n\t\t// ask editor to re-layout given that the widget is now of a different size after rendering rename candidates\n\t\ttrace('asking editor to re-layout');\n\t\tthis._editor.layoutContentWidget(this);\n\t}\n\n\tprivate _hide(): void {\n\t\tthis._trace('invoked _hide');\n\t\tthis._visible = false;\n\t\tthis._visibleContextKey.reset();\n\t\tthis._editor.layoutContentWidget(this);\n\t}\n\n\tprivate _getTopForPosition(): number {\n\t\tconst visibleRanges = this._editor.getVisibleRanges();\n\t\tlet firstLineInViewport: number;\n\t\tif (visibleRanges.length > 0) {\n\t\t\tfirstLineInViewport = visibleRanges[0].startLineNumber;\n\t\t} else {\n\t\t\tthis._logService.warn('RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty');\n\t\t\tfirstLineInViewport = Math.max(1, this._position!.lineNumber - 5); // @ulugbekna: fallback to current line minus 5\n\t\t}\n\t\treturn this._editor.getTopForLineNumber(this._position!.lineNumber) - this._editor.getTopForLineNumber(firstLineInViewport);\n\t}\n\n\tprivate _trace(...args: unknown[]) {\n\t\tthis._logService.trace('RenameWidget', ...args);\n\t}\n}\n\nclass RenameCandidateListView {\n\n\t/** Parent node of the list widget; needed to control # of list elements visible */\n\tprivate readonly _listContainer: HTMLDivElement;\n\tprivate readonly _listWidget: List<NewSymbolName>;\n\n\tprivate _lineHeight: number;\n\tprivate _availableHeight: number;\n\tprivate _minimumWidth: number;\n\tprivate _typicalHalfwidthCharacterWidth: number;\n\n\tprivate readonly _disposables: DisposableStore;\n\n\t// FIXME@ulugbekna: rewrite using event emitters\n\tconstructor(parent: HTMLElement, opts: { fontInfo: FontInfo; onFocusChange: (newSymbolName: string) => void; onSelectionChange: () => void }) {\n\n\t\tthis._disposables = new DisposableStore();\n\n\t\tthis._availableHeight = 0;\n\t\tthis._minimumWidth = 0;\n\n\t\tthis._lineHeight = opts.fontInfo.lineHeight;\n\t\tthis._typicalHalfwidthCharacterWidth = opts.fontInfo.typicalHalfwidthCharacterWidth;\n\n\t\tthis._listContainer = document.createElement('div');\n\t\tthis._listContainer.className = 'rename-box rename-candidate-list-container';\n\t\tparent.appendChild(this._listContainer);\n\n\t\tthis._listWidget = RenameCandidateListView._createListWidget(this._listContainer, this._candidateViewHeight, opts.fontInfo);\n\n\t\tthis._disposables.add(this._listWidget.onDidChangeFocus(\n\t\t\te => {\n\t\t\t\tif (e.elements.length === 1) {\n\t\t\t\t\topts.onFocusChange(e.elements[0].newSymbolName);\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis._disposables\n\t\t));\n\n\t\tthis._disposables.add(this._listWidget.onDidChangeSelection(\n\t\t\te => {\n\t\t\t\tif (e.elements.length === 1) {\n\t\t\t\t\topts.onSelectionChange();\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis._disposables\n\t\t));\n\n\t\tthis._disposables.add(\n\t\t\tthis._listWidget.onDidBlur(e => { // @ulugbekna: because list widget otherwise remembers last focused element and returns it as focused element\n\t\t\t\tthis._listWidget.setFocus([]);\n\t\t\t})\n\t\t);\n\n\t\tthis._listWidget.style(getListStyles({\n\t\t\tlistInactiveFocusForeground: quickInputListFocusForeground,\n\t\t\tlistInactiveFocusBackground: quickInputListFocusBackground,\n\t\t}));\n\t}\n\n\tdispose() {\n\t\tthis._listWidget.dispose();\n\t\tthis._disposables.dispose();\n\t}\n\n\t// height - max height allowed by parent element\n\tpublic layout({ height, width }: { height: number; width: number }): void {\n\t\tthis._availableHeight = height;\n\t\tthis._minimumWidth = width;\n\t}\n\n\tpublic setCandidates(candidates: NewSymbolName[]): void {\n\n\t\t// insert candidates into list widget\n\t\tthis._listWidget.splice(0, 0, candidates);\n\n\t\t// adjust list widget layout\n\t\tconst height = this._pickListHeight(this._listWidget.length);\n\t\tconst width = this._pickListWidth(candidates);\n\n\t\tthis._listWidget.layout(height, width);\n\n\t\t// adjust list container layout\n\t\tthis._listContainer.style.height = `${height}px`;\n\t\tthis._listContainer.style.width = `${width}px`;\n\n\t\taria.status(nls.localize('renameSuggestionsReceivedAria', \"Received {0} rename suggestions\", candidates.length));\n\t}\n\n\tpublic clearCandidates(): void {\n\t\tthis._listContainer.style.height = '0px';\n\t\tthis._listContainer.style.width = '0px';\n\t\tthis._listWidget.splice(0, this._listWidget.length, []);\n\t}\n\n\tpublic get nCandidates() {\n\t\treturn this._listWidget.length;\n\t}\n\n\tpublic get focusedCandidate(): string | undefined {\n\t\tif (this._listWidget.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst selectedElement = this._listWidget.getSelectedElements()[0];\n\t\tif (selectedElement !== undefined) {\n\t\t\treturn selectedElement.newSymbolName;\n\t\t}\n\t\tconst focusedElement = this._listWidget.getFocusedElements()[0];\n\t\tif (focusedElement !== undefined) {\n\t\t\treturn focusedElement.newSymbolName;\n\t\t}\n\t\treturn;\n\t}\n\n\tpublic focusNext(): boolean {\n\t\tif (this._listWidget.length === 0) {\n\t\t\treturn false;\n\t\t}\n\t\tconst focusedIxs = this._listWidget.getFocus();\n\t\tif (focusedIxs.length === 0) {\n\t\t\tthis._listWidget.focusFirst();\n\t\t\tthis._listWidget.reveal(0);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (focusedIxs[0] === this._listWidget.length - 1) {\n\t\t\t\tthis._listWidget.setFocus([]);\n\t\t\t\tthis._listWidget.reveal(0); // @ulugbekna: without this, it seems like focused element is obstructed\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tthis._listWidget.focusNext();\n\t\t\t\tconst focused = this._listWidget.getFocus()[0];\n\t\t\t\tthis._listWidget.reveal(focused);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @returns true if focus is moved to previous element\n\t */\n\tpublic focusPrevious(): boolean {\n\t\tif (this._listWidget.length === 0) {\n\t\t\treturn false;\n\t\t}\n\t\tconst focusedIxs = this._listWidget.getFocus();\n\t\tif (focusedIxs.length === 0) {\n\t\t\tthis._listWidget.focusLast();\n\t\t\tconst focused = this._listWidget.getFocus()[0];\n\t\t\tthis._listWidget.reveal(focused);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (focusedIxs[0] === 0) {\n\t\t\t\tthis._listWidget.setFocus([]);\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tthis._listWidget.focusPrevious();\n\t\t\t\tconst focused = this._listWidget.getFocus()[0];\n\t\t\t\tthis._listWidget.reveal(focused);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic clearFocus(): void {\n\t\tthis._listWidget.setFocus([]);\n\t}\n\n\tprivate get _candidateViewHeight(): number {\n\t\tconst { totalHeight } = RenameCandidateView.getLayoutInfo({ lineHeight: this._lineHeight });\n\t\treturn totalHeight;\n\t}\n\n\tprivate _pickListHeight(nCandidates: number) {\n\t\tconst heightToFitAllCandidates = this._candidateViewHeight * nCandidates;\n\t\tconst MAX_N_CANDIDATES = 7; // @ulugbekna: max # of candidates we want to show at once\n\t\tconst height = Math.min(heightToFitAllCandidates, this._availableHeight, this._candidateViewHeight * MAX_N_CANDIDATES);\n\t\treturn height;\n\t}\n\n\tprivate _pickListWidth(candidates: NewSymbolName[]): number {\n\t\tconst longestCandidateWidth = Math.ceil(Math.max(...candidates.map(c => c.newSymbolName.length)) * this._typicalHalfwidthCharacterWidth);\n\t\tconst width = Math.max(\n\t\t\tthis._minimumWidth,\n\t\t\t4 /* padding */ + 16 /* sparkle icon */ + 5 /* margin-left */ + longestCandidateWidth + 10 /* (possibly visible) scrollbar width */ // TODO@ulugbekna: approximate calc - clean this up\n\t\t);\n\t\treturn width;\n\t}\n\n\tprivate static _createListWidget(container: HTMLElement, candidateViewHeight: number, fontInfo: FontInfo) {\n\t\tconst virtualDelegate = new class implements IListVirtualDelegate<NewSymbolName> {\n\t\t\tgetTemplateId(element: NewSymbolName): string {\n\t\t\t\treturn 'candidate';\n\t\t\t}\n\n\t\t\tgetHeight(element: NewSymbolName): number {\n\t\t\t\treturn candidateViewHeight;\n\t\t\t}\n\t\t};\n\n\t\tconst renderer = new class implements IListRenderer<NewSymbolName, RenameCandidateView> {\n\t\t\treadonly templateId = 'candidate';\n\n\t\t\trenderTemplate(container: HTMLElement): RenameCandidateView {\n\t\t\t\treturn new RenameCandidateView(container, fontInfo);\n\t\t\t}\n\n\t\t\trenderElement(candidate: NewSymbolName, index: number, templateData: RenameCandidateView): void {\n\t\t\t\ttemplateData.populate(candidate);\n\t\t\t}\n\n\t\t\tdisposeTemplate(templateData: RenameCandidateView): void {\n\t\t\t\ttemplateData.dispose();\n\t\t\t}\n\t\t};\n\n\t\treturn new List(\n\t\t\t'NewSymbolNameCandidates',\n\t\t\tcontainer,\n\t\t\tvirtualDelegate,\n\t\t\t[renderer],\n\t\t\t{\n\t\t\t\tkeyboardSupport: false, // @ulugbekna: because we handle keyboard events through proper commands & keybinding service, see `rename.ts`\n\t\t\t\tmouseSupport: true,\n\t\t\t\tmultipleSelectionSupport: false,\n\t\t\t}\n\t\t);\n\t}\n}\n\nclass InputWithButton implements IDisposable {\n\n\tprivate _buttonState: 'sparkle' | 'stop' | undefined;\n\n\tprivate _domNode: HTMLDivElement | undefined;\n\tprivate _inputNode: HTMLInputElement | undefined;\n\tprivate _buttonNode: HTMLElement | undefined;\n\tprivate _buttonHoverContent: string = '';\n\tprivate _buttonGenHoverText: string | undefined;\n\tprivate _buttonCancelHoverText: string | undefined;\n\tprivate _sparkleIcon: HTMLElement | undefined;\n\tprivate _stopIcon: HTMLElement | undefined;\n\n\tprivate readonly _onDidInputChange = new Emitter<void>();\n\tpublic readonly onDidInputChange = this._onDidInputChange.event;\n\n\tprivate readonly _disposables = new DisposableStore();\n\n\tget domNode() {\n\t\tif (!this._domNode) {\n\n\t\t\tthis._domNode = document.createElement('div');\n\t\t\tthis._domNode.className = 'rename-input-with-button';\n\t\t\tthis._domNode.style.display = 'flex';\n\t\t\tthis._domNode.style.flexDirection = 'row';\n\t\t\tthis._domNode.style.alignItems = 'center';\n\n\t\t\tthis._inputNode = document.createElement('input');\n\t\t\tthis._inputNode.className = 'rename-input';\n\t\t\tthis._inputNode.type = 'text';\n\t\t\tthis._inputNode.style.border = 'none';\n\t\t\tthis._inputNode.setAttribute('aria-label', nls.localize('renameAriaLabel', \"Rename input. Type new name and press Enter to commit.\"));\n\n\t\t\tthis._domNode.appendChild(this._inputNode);\n\n\t\t\tthis._buttonNode = document.createElement('div');\n\t\t\tthis._buttonNode.className = 'rename-suggestions-button';\n\t\t\tthis._buttonNode.setAttribute('tabindex', '0');\n\n\t\t\tthis._buttonGenHoverText = nls.localize('generateRenameSuggestionsButton', \"Generate New Name Suggestions\");\n\t\t\tthis._buttonCancelHoverText = nls.localize('cancelRenameSuggestionsButton', \"Cancel\");\n\t\t\tthis._buttonHoverContent = this._buttonGenHoverText;\n\t\t\tthis._disposables.add(getBaseLayerHoverDelegate().setupDelayedHover(this._buttonNode, () => ({\n\t\t\t\tcontent: this._buttonHoverContent,\n\t\t\t\tappearance: {\n\t\t\t\t\tshowPointer: true,\n\t\t\t\t\tcompact: true,\n\t\t\t\t}\n\t\t\t})));\n\n\t\t\tthis._domNode.appendChild(this._buttonNode);\n\n\t\t\t// notify if selection changes to cancel request to rename-suggestion providers\n\n\t\t\tthis._disposables.add(dom.addDisposableListener(this.input, dom.EventType.INPUT, () => this._onDidInputChange.fire()));\n\t\t\tthis._disposables.add(dom.addDisposableListener(this.input, dom.EventType.KEY_DOWN, (e) => {\n\t\t\t\tconst keyEvent = new StandardKeyboardEvent(e);\n\t\t\t\tif (keyEvent.keyCode === KeyCode.LeftArrow || keyEvent.keyCode === KeyCode.RightArrow) {\n\t\t\t\t\tthis._onDidInputChange.fire();\n\t\t\t\t}\n\t\t\t}));\n\t\t\tthis._disposables.add(dom.addDisposableListener(this.input, dom.EventType.CLICK, () => this._onDidInputChange.fire()));\n\n\t\t\t// focus \"container\" border instead of input box\n\n\t\t\tthis._disposables.add(dom.addDisposableListener(this.input, dom.EventType.FOCUS, () => {\n\t\t\t\tthis.domNode.style.outlineWidth = '1px';\n\t\t\t\tthis.domNode.style.outlineStyle = 'solid';\n\t\t\t\tthis.domNode.style.outlineOffset = '-1px';\n\t\t\t\tthis.domNode.style.outlineColor = 'var(--vscode-focusBorder)';\n\t\t\t}));\n\t\t\tthis._disposables.add(dom.addDisposableListener(this.input, dom.EventType.BLUR, () => {\n\t\t\t\tthis.domNode.style.outline = 'none';\n\t\t\t}));\n\t\t}\n\t\treturn this._domNode;\n\t}\n\n\tget input() {\n\t\tassertType(this._inputNode);\n\t\treturn this._inputNode;\n\t}\n\n\tget button() {\n\t\tassertType(this._buttonNode);\n\t\treturn this._buttonNode;\n\t}\n\n\tget buttonState() {\n\t\treturn this._buttonState;\n\t}\n\n\tsetSparkleButton() {\n\t\tthis._buttonState = 'sparkle';\n\t\tthis._sparkleIcon ??= renderIcon(Codicon.sparkle);\n\t\tdom.clearNode(this.button);\n\t\tthis.button.appendChild(this._sparkleIcon);\n\t\tthis.button.setAttribute('aria-label', 'Generating new name suggestions');\n\t\tthis._buttonHoverContent = this._buttonGenHoverText!;\n\t\tthis.input.focus();\n\t}\n\n\tsetStopButton() {\n\t\tthis._buttonState = 'stop';\n\t\tthis._stopIcon ??= renderIcon(Codicon.stopCircle);\n\t\tdom.clearNode(this.button);\n\t\tthis.button.appendChild(this._stopIcon);\n\t\tthis.button.setAttribute('aria-label', 'Cancel generating new name suggestions');\n\t\tthis._buttonHoverContent = this._buttonCancelHoverText!;\n\t\tthis.input.focus();\n\t}\n\n\tdispose(): void {\n\t\tthis._disposables.dispose();\n\t}\n}\n\nclass RenameCandidateView {\n\n\tprivate static _PADDING: number = 2;\n\n\tprivate readonly _domNode: HTMLElement;\n\tprivate readonly _icon: HTMLElement;\n\tprivate readonly _label: HTMLElement;\n\n\tconstructor(parent: HTMLElement, fontInfo: FontInfo) {\n\n\t\tthis._domNode = document.createElement('div');\n\t\tthis._domNode.className = 'rename-box rename-candidate';\n\t\tthis._domNode.style.display = `flex`;\n\t\tthis._domNode.style.columnGap = `5px`;\n\t\tthis._domNode.style.alignItems = `center`;\n\t\tthis._domNode.style.height = `${fontInfo.lineHeight}px`;\n\t\tthis._domNode.style.padding = `${RenameCandidateView._PADDING}px`;\n\n\t\t// @ulugbekna: needed to keep space when the `icon.style.display` is set to `none`\n\t\tconst iconContainer = document.createElement('div');\n\t\ticonContainer.style.display = `flex`;\n\t\ticonContainer.style.alignItems = `center`;\n\t\ticonContainer.style.width = iconContainer.style.height = `${fontInfo.lineHeight * 0.8}px`;\n\t\tthis._domNode.appendChild(iconContainer);\n\n\t\tthis._icon = renderIcon(Codicon.sparkle);\n\t\tthis._icon.style.display = `none`;\n\t\ticonContainer.appendChild(this._icon);\n\n\t\tthis._label = document.createElement('div');\n\t\tdomFontInfo.applyFontInfo(this._label, fontInfo);\n\t\tthis._domNode.appendChild(this._label);\n\n\t\tparent.appendChild(this._domNode);\n\t}\n\n\tpublic populate(value: NewSymbolName) {\n\t\tthis._updateIcon(value);\n\t\tthis._updateLabel(value);\n\t}\n\n\tprivate _updateIcon(value: NewSymbolName) {\n\t\tconst isAIGenerated = !!value.tags?.includes(NewSymbolNameTag.AIGenerated);\n\t\tthis._icon.style.display = isAIGenerated ? 'inherit' : 'none';\n\t}\n\n\tprivate _updateLabel(value: NewSymbolName) {\n\t\tthis._label.innerText = value.newSymbolName;\n\t}\n\n\tpublic static getLayoutInfo({ lineHeight }: { lineHeight: number }): { totalHeight: number } {\n\t\tconst totalHeight = lineHeight + RenameCandidateView._PADDING * 2 /* top & bottom padding */;\n\t\treturn { totalHeight };\n\t}\n\n\tpublic dispose() {\n\t}\n}\n"]}