@lvce-editor/editor-worker 19.79.3 → 19.80.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,6 +38,14 @@ export interface DocumentSymbol {
38
38
  readonly selectionStartOffset: number;
39
39
  readonly startOffset: number;
40
40
  }
41
+ export interface CodeLens {
42
+ readonly action?: string;
43
+ readonly extensionId: string;
44
+ readonly id: number;
45
+ readonly label: string;
46
+ readonly providerId: string;
47
+ }
48
+ export type CodeLensRows = Readonly<Record<number, readonly CodeLens[]>>;
41
49
  export type EditorGutterDecorationType = "added" | "deleted" | "modified";
42
50
  export interface EditorGutterDecoration {
43
51
  readonly rowIndex: number;
@@ -83,6 +91,8 @@ export interface EditorState {
83
91
  readonly breakPoints: readonly number[];
84
92
  readonly canCoalesceTyping?: boolean;
85
93
  readonly charWidth: number;
94
+ readonly codeLensEnabled?: boolean;
95
+ readonly codeLensRows?: CodeLensRows;
86
96
  readonly columnWidth: number;
87
97
  readonly combineWhitespaceTokens?: boolean;
88
98
  readonly completionsOnType?: boolean;
package/dist/diff-sdk.js CHANGED
@@ -585,9 +585,14 @@ const getRenderedLineCount = (height, rowHeight, deltaY) => {
585
585
  };
586
586
 
587
587
  const toMergeConflictActionsRow = rowIndex => ~rowIndex;
588
- const isMergeConflictActionsRow = viewRow => viewRow < 0;
588
+
589
+ // Merge conflict rows use the signed 32-bit range. Reserve a separate range for code lenses.
590
+ const firstCodeLensRow = -4294967296;
591
+ const isCodeLensRow = viewRow => viewRow <= firstCodeLensRow;
592
+ const getCodeLensRowIndex = viewRow => firstCodeLensRow - viewRow;
593
+ const isMergeConflictActionsRow = viewRow => viewRow < 0 && !isCodeLensRow(viewRow);
589
594
  const getMergeConflictRowIndex = viewRow => ~viewRow;
590
- const getViewLineIndices = (lineCount, isRowHidden, mergeConflicts) => {
595
+ const getViewLineIndices = (lineCount, isRowHidden, mergeConflicts, codeLensRows) => {
591
596
  const conflictStartRows = new Set(mergeConflicts.map(conflict => conflict.startRowIndex));
592
597
  const result = [];
593
598
  for (let rowIndex = 0; rowIndex < lineCount; rowIndex++) {
@@ -597,6 +602,9 @@ const getViewLineIndices = (lineCount, isRowHidden, mergeConflicts) => {
597
602
  if (conflictStartRows.has(rowIndex)) {
598
603
  result.push(toMergeConflictActionsRow(rowIndex));
599
604
  }
605
+ if (codeLensRows?.[rowIndex]) {
606
+ result.push(firstCodeLensRow - rowIndex);
607
+ }
600
608
  result.push(rowIndex);
601
609
  }
602
610
  return result;
@@ -605,7 +613,7 @@ const getVisibleViewLineIndices = (viewLineIndices, startVisualRow, numberOfVisi
605
613
  return viewLineIndices.slice(startVisualRow, startVisualRow + numberOfVisibleLines);
606
614
  };
607
615
  const getVisibleLineIndices = visibleViewLineIndices => {
608
- return visibleViewLineIndices.filter(viewRow => !isMergeConflictActionsRow(viewRow));
616
+ return visibleViewLineIndices.filter(viewRow => viewRow >= 0);
609
617
  };
610
618
  const getVisualRowForDocumentRow$1 = (rowIndex, viewLineIndices) => {
611
619
  const visualRow = viewLineIndices.indexOf(rowIndex);
@@ -616,6 +624,9 @@ const getDocumentRowForVisualRow$1 = (visualRow, viewLineIndices) => {
616
624
  return visualRow;
617
625
  }
618
626
  const viewRow = viewLineIndices[visualRow];
627
+ if (isCodeLensRow(viewRow)) {
628
+ return getCodeLensRowIndex(viewRow);
629
+ }
619
630
  return isMergeConflictActionsRow(viewRow) ? getMergeConflictRowIndex(viewRow) : viewRow;
620
631
  };
621
632
 
@@ -805,16 +816,16 @@ const updateLayout = (editor, foldingRanges) => {
805
816
  rowHeight
806
817
  } = editor;
807
818
  const mergeConflicts = editor.mergeConflictActionsEnabled ? getMergeConflicts(lines) : [];
808
- const hasMergeConflictRows = mergeConflicts.length > 0;
809
- const viewLineIndices = hasMergeConflictRows ? getViewLineIndices(lines.length, rowIndex => isRowHidden(rowIndex, foldingRanges), mergeConflicts) : [];
810
- const visibleLineCount = hasMergeConflictRows ? viewLineIndices.length : getVisibleLineCount(lines.length, foldingRanges);
819
+ const hasSyntheticRows = mergeConflicts.length > 0 || Boolean(editor.codeLensRows);
820
+ const viewLineIndices = hasSyntheticRows ? getViewLineIndices(lines.length, rowIndex => isRowHidden(rowIndex, foldingRanges), mergeConflicts, editor.codeLensRows) : [];
821
+ const visibleLineCount = hasSyntheticRows ? viewLineIndices.length : getVisibleLineCount(lines.length, foldingRanges);
811
822
  const finalY = Math.max(visibleLineCount - numberOfVisibleLines, 0);
812
823
  const finalDeltaY = Math.max(visibleLineCount * itemHeight - height, 0);
813
824
  const deltaY = clamp(editor.deltaY, 0, finalDeltaY);
814
825
  const startVisualRow = Math.floor(deltaY / itemHeight);
815
826
  const renderedLineCount = getRenderedLineCount(height, itemHeight, deltaY);
816
- const visibleViewLineIndices = hasMergeConflictRows ? getVisibleViewLineIndices(viewLineIndices, startVisualRow, renderedLineCount) : getViewportLineIndices(lines.length, foldingRanges, startVisualRow, renderedLineCount);
817
- const visibleLineIndices = hasMergeConflictRows ? getVisibleLineIndices(visibleViewLineIndices) : visibleViewLineIndices;
827
+ const visibleViewLineIndices = hasSyntheticRows ? getVisibleViewLineIndices(viewLineIndices, startVisualRow, renderedLineCount) : getViewportLineIndices(lines.length, foldingRanges, startVisualRow, renderedLineCount);
828
+ const visibleLineIndices = hasSyntheticRows ? getVisibleLineIndices(visibleViewLineIndices) : visibleViewLineIndices;
818
829
  const minLineY = visibleLineIndices[0] ?? 0;
819
830
  const maxLineY = visibleLineIndices.length === 0 ? 0 : visibleLineIndices.at(-1) + 1;
820
831
  const contentHeight = visibleLineCount * rowHeight;
@@ -11668,9 +11679,9 @@ const setDeltaY$1 = async (state, value) => {
11668
11679
  }
11669
11680
  const startVisualRow = Math.floor(newDeltaY / itemHeight);
11670
11681
  const renderedLineCount = getRenderedLineCount(height, itemHeight, newDeltaY);
11671
- const hasMergeConflictRows = state.viewLineIndices?.length > 0;
11672
- const visibleViewLineIndices = hasMergeConflictRows ? getVisibleViewLineIndices(state.viewLineIndices, startVisualRow, renderedLineCount) : getViewportLineIndices(state.lines.length, state.foldingRanges || [], startVisualRow, renderedLineCount);
11673
- const visibleLineIndices = hasMergeConflictRows ? getVisibleLineIndices(visibleViewLineIndices) : visibleViewLineIndices;
11682
+ const hasSyntheticRows = state.viewLineIndices?.length > 0;
11683
+ const visibleViewLineIndices = hasSyntheticRows ? getVisibleViewLineIndices(state.viewLineIndices, startVisualRow, renderedLineCount) : getViewportLineIndices(state.lines.length, state.foldingRanges || [], startVisualRow, renderedLineCount);
11684
+ const visibleLineIndices = hasSyntheticRows ? getVisibleLineIndices(visibleViewLineIndices) : visibleViewLineIndices;
11674
11685
  const minLineY = visibleLineIndices[0] ?? 0;
11675
11686
  const maxLineY = visibleLineIndices.length === 0 ? 0 : visibleLineIndices.at(-1) + 1;
11676
11687
  const newEditor1 = {
@@ -13695,6 +13706,14 @@ const updateColorPickerValue$1 = async (editor, value) => {
13695
13706
  };
13696
13707
  };
13697
13708
 
13709
+ const getDocument = editor => ({
13710
+ documentId: editor.id,
13711
+ languageId: editor.languageId,
13712
+ text: getText$1(editor),
13713
+ uri: editor.uri
13714
+ });
13715
+ const sameDocument = (left, right) => left.uri === right.uri && left.languageId === right.languageId && left.lines === right.lines && left.lifecycle === right.lifecycle;
13716
+
13698
13717
  const getTextDocument$2 = editor => ({
13699
13718
  documentId: editor.id || editor.uid,
13700
13719
  languageId: editor.languageId,
@@ -14314,8 +14333,15 @@ const mergeConflictsEqual$1 = (oldState, newState) => {
14314
14333
  };
14315
14334
  const updateDerivedState = async (oldState, newState, deferGutterDecorations = false) => {
14316
14335
  const horizontalState = oldState.initial || oldState.lines !== newState.lines || oldState.width !== newState.width || oldState.charWidth !== newState.charWidth || oldState.fontFamily !== newState.fontFamily || oldState.fontSize !== newState.fontSize || oldState.fontWeight !== newState.fontWeight || oldState.isMonospaceFont !== newState.isMonospaceFont || oldState.letterSpacing !== newState.letterSpacing || oldState.rtl !== newState.rtl || oldState.tabSize !== newState.tabSize || oldState.lineNumbers !== newState.lineNumbers || oldState.breakPoints !== newState.breakPoints || oldState.gutterDecorations !== newState.gutterDecorations || oldState.lightBulbRowIndex !== newState.lightBulbRowIndex ? await updateHorizontalLayout(newState) : newState;
14317
- const layoutState = oldState.lines !== newState.lines && 'foldingRanges' in newState ? updateLayout(horizontalState, []) : horizontalState;
14318
- const nextState = mergeConflictsEqual$1(oldState, layoutState) ? layoutState : {
14336
+ const linesChanged = oldState.lines !== newState.lines;
14337
+ const clearCodeLenses = oldState.codeLensRows && (!newState.codeLensEnabled || !sameDocument(oldState, newState));
14338
+ const codeLensRows = clearCodeLenses ? undefined : horizontalState.codeLensRows;
14339
+ const codeLensRowsChanged = oldState.codeLensRows !== codeLensRows;
14340
+ const layoutState = (linesChanged || codeLensRowsChanged) && 'foldingRanges' in newState ? updateLayout({
14341
+ ...horizontalState,
14342
+ codeLensRows
14343
+ }, linesChanged ? [] : horizontalState.foldingRanges) : horizontalState;
14344
+ const nextState = !codeLensRowsChanged && mergeConflictsEqual$1(oldState, layoutState) ? layoutState : {
14319
14345
  ...layoutState,
14320
14346
  incrementalEdits: emptyIncrementalEdits
14321
14347
  };
@@ -14561,6 +14587,71 @@ const merge = (current, snapshot, result) => {
14561
14587
  };
14562
14588
  };
14563
14589
 
14590
+ const lensIds = {
14591
+ next: 0
14592
+ };
14593
+ const toRows = (result, lineCount) => {
14594
+ const rows = Object.create(null);
14595
+ for (const {
14596
+ extensionId,
14597
+ lenses,
14598
+ providerId
14599
+ } of result) {
14600
+ const validLenses = lenses.filter(lens => lens && Number.isSafeInteger(lens.rowIndex) && lens.rowIndex >= 0 && lens.rowIndex < lineCount && typeof lens.label === 'string');
14601
+ for (const lens of validLenses) {
14602
+ const row = rows[lens.rowIndex] ||= [];
14603
+ row.push({
14604
+ ...(typeof lens.action === 'string' && {
14605
+ action: lens.action
14606
+ }),
14607
+ extensionId,
14608
+ id: lensIds.next++,
14609
+ label: lens.label,
14610
+ providerId
14611
+ });
14612
+ }
14613
+ }
14614
+ return rows;
14615
+ };
14616
+ const request = async editor => {
14617
+ try {
14618
+ const result = await invoke$9(editor.applicationId, 'Extensions.executeCodeLensProviders', getDocument(editor));
14619
+ if (!Array.isArray(result) || result.length === 0) {
14620
+ return;
14621
+ }
14622
+ const codeLensRows = toRows(result, editor.lines.length);
14623
+ if (Object.keys(codeLensRows).length === 0) {
14624
+ return;
14625
+ }
14626
+ const committed = await enqueue(editor.uid, async () => {
14627
+ const current = get$a(editor.uid);
14628
+ if (!current?.newState.codeLensEnabled || !sameDocument(editor, current.newState)) {
14629
+ return false;
14630
+ }
14631
+ const nextState = await updateDerivedState(current.newState, {
14632
+ ...current.newState,
14633
+ codeLensRows
14634
+ });
14635
+ const latest = get$a(editor.uid);
14636
+ if (!latest || latest.newState !== current.newState || editor.lifecycle?.disposed) {
14637
+ return false;
14638
+ }
14639
+ set$b(editor.uid, latest.oldState, nextState);
14640
+ return true;
14641
+ });
14642
+ if (committed) {
14643
+ await invoke$7('Editor.renderPending', editor.uid);
14644
+ }
14645
+ } catch {
14646
+ // Code lenses are optional and should never interrupt editing.
14647
+ }
14648
+ };
14649
+ const requestIfChanged = (oldState, newState) => {
14650
+ if (newState.codeLensEnabled && !newState.initial && !newState.largeFile && !newState.loadError && (oldState.initial || !oldState.codeLensEnabled || !sameDocument(oldState, newState))) {
14651
+ void request(newState);
14652
+ }
14653
+ };
14654
+
14564
14655
  class Diff {
14565
14656
  diff(oldStr, newStr,
14566
14657
  // Type below is not accurate/complete - see above for full possibilities - but it compiles
@@ -15759,6 +15850,7 @@ const wrapCommand$1 = (fn, preservesTypingCoalescing = false, returnState = true
15759
15850
  if (editorDiagnosticEffect.isActive(state, newEditorWithDerivedState)) {
15760
15851
  void editorDiagnosticEffect.apply(newEditorWithDerivedState);
15761
15852
  }
15853
+ requestIfChanged(state, newEditorWithDerivedState);
15762
15854
  const finalEditor = newEditorWithDerivedState;
15763
15855
  if (deferGutterDecorations) {
15764
15856
  schedule(finalEditor);
@@ -15795,6 +15887,7 @@ const wrapCommand$1 = (fn, preservesTypingCoalescing = false, returnState = true
15795
15887
  continue;
15796
15888
  }
15797
15889
  set$b(otherUid, latest.oldState, synchronizedEditor);
15890
+ requestIfChanged(editor, synchronizedEditor);
15798
15891
  if (deferGutterDecorations) {
15799
15892
  schedule(synchronizedEditor);
15800
15893
  }
@@ -17204,6 +17297,30 @@ const updateAutomaticCompletion = async editor => {
17204
17297
  return openCompletion(editor, true);
17205
17298
  };
17206
17299
 
17300
+ const activateCodeLens = async (state, rowIndex, lensId) => {
17301
+ const {
17302
+ applicationId,
17303
+ codeLensEnabled,
17304
+ codeLensRows
17305
+ } = state;
17306
+ const lens = codeLensRows?.[Number(rowIndex)]?.find(({
17307
+ id
17308
+ }) => id === Number(lensId));
17309
+ if (!codeLensEnabled || !lens?.action) {
17310
+ return state;
17311
+ }
17312
+ const document = getDocument(state);
17313
+ try {
17314
+ const edit = await invoke$9(applicationId, 'Extensions.resolveCodeLens', document, lens.extensionId, lens.providerId, lens.action);
17315
+ if (!edit || !Number.isSafeInteger(edit.offset) || !Number.isSafeInteger(edit.deleted) || edit.offset < 0 || edit.deleted < 0 || edit.offset + edit.deleted > document.text.length || typeof edit.inserted !== 'string' || /[\r\n]/.test(edit.inserted)) {
17316
+ return state;
17317
+ }
17318
+ return await scheduleDocumentAndCursorsSelections(state, getTextChanges(state, [edit]));
17319
+ } catch {
17320
+ return state;
17321
+ }
17322
+ };
17323
+
17207
17324
  const getAcceptedLines = (lines, conflict, action) => {
17208
17325
  const current = lines.slice(conflict.currentStartRowIndex, conflict.currentEndRowIndex);
17209
17326
  const incoming = lines.slice(conflict.incomingStartRowIndex, conflict.incomingEndRowIndex);
@@ -24363,6 +24480,8 @@ const HandleMergeConflictActionsMouseDown = 37;
24363
24480
  const HandleMouseOut = 38;
24364
24481
  const HandleMouseOver = 39;
24365
24482
  const HandleHoverMouseDown = 40;
24483
+ const HandleCodeLensClick = 41;
24484
+ const HandleCodeLensPointerDown = 42;
24366
24485
 
24367
24486
  const getLineInfoVirtualDom = lineInfo => {
24368
24487
  const dom = [{
@@ -24642,6 +24761,7 @@ ${editorSelector} .GutterRows {
24642
24761
  display: flex;
24643
24762
  flex-direction: column;
24644
24763
  }
24764
+ ${editorSelector} .EditorCodeLenses,
24645
24765
  ${editorSelector} .MergeConflictActions,
24646
24766
  ${editorSelector} .MergeConflictActionsGutter {
24647
24767
  box-sizing: border-box;
@@ -24649,6 +24769,7 @@ ${editorSelector} .MergeConflictActionsGutter {
24649
24769
  height: var(--EditorRowHeight);
24650
24770
  line-height: var(--EditorRowHeight);
24651
24771
  }
24772
+ ${editorSelector} .EditorCodeLenses,
24652
24773
  ${editorSelector} .MergeConflictActions {
24653
24774
  align-items: center;
24654
24775
  display: flex;
@@ -24656,6 +24777,7 @@ ${editorSelector} .MergeConflictActions {
24656
24777
  padding-left: 4px;
24657
24778
  user-select: none;
24658
24779
  }
24780
+ ${editorSelector} .EditorCodeLensAction,
24659
24781
  ${editorSelector} .MergeConflictAction {
24660
24782
  appearance: none;
24661
24783
  background: none;
@@ -24665,6 +24787,8 @@ ${editorSelector} .MergeConflictAction {
24665
24787
  font: inherit;
24666
24788
  padding: 0;
24667
24789
  }
24790
+ ${editorSelector} .EditorCodeLensAction:hover,
24791
+ ${editorSelector} .EditorCodeLensAction:focus-visible,
24668
24792
  ${editorSelector} .MergeConflictAction:hover,
24669
24793
  ${editorSelector} .MergeConflictAction:focus-visible {
24670
24794
  color: var(--TextLinkActiveForeground, #4daafc);
@@ -25191,13 +25315,46 @@ const addMergeConflictActions = (dom, rowIndex) => {
25191
25315
  }, text(label));
25192
25316
  }
25193
25317
  };
25194
- const getEditorRowsVirtualDom$1 = (textInfos, differences, lineNumbers = true, highlightedLine = -1, visibleLineIndices = [], endOfLineDecorations = [], visibleViewLineIndices = [], problemsHighlightedRow = -1, diagnostics = [], deltaX = 0, width = Infinity, charWidth = 1, tabSize = 2, lines = [], horizontalVirtualizationThreshold = 500, horizontalVisibleRanges = [], rtl = false) => {
25318
+ const addCodeLenses = (dom, codeLensRows, rowIndex) => {
25319
+ const lenses = codeLensRows[rowIndex] ?? [];
25320
+ dom.push({
25321
+ childCount: lenses.length,
25322
+ className: 'EditorCodeLenses',
25323
+ onMouseDown: HandleHoverMouseDown,
25324
+ onPointerDown: HandleCodeLensPointerDown,
25325
+ type: Div
25326
+ });
25327
+ for (const {
25328
+ action,
25329
+ id,
25330
+ label
25331
+ } of lenses) {
25332
+ dom.push(action ? {
25333
+ childCount: 1,
25334
+ className: 'EditorCodeLensAction',
25335
+ 'data-action': String(id),
25336
+ 'data-rowIndex': rowIndex,
25337
+ onClick: HandleCodeLensClick,
25338
+ title: label,
25339
+ type: Button$1
25340
+ } : {
25341
+ childCount: 1,
25342
+ title: label,
25343
+ type: Span
25344
+ }, text(label));
25345
+ }
25346
+ };
25347
+ const getEditorRowsVirtualDom$1 = (textInfos, differences, lineNumbers = true, highlightedLine = -1, visibleLineIndices = [], endOfLineDecorations = [], visibleViewLineIndices = [], problemsHighlightedRow = -1, diagnostics = [], deltaX = 0, width = Infinity, charWidth = 1, tabSize = 2, lines = [], horizontalVirtualizationThreshold = 500, horizontalVisibleRanges = [], rtl = false, codeLensRows = {}) => {
25195
25348
  const dom = [];
25196
25349
  const actualViewRows = visibleViewLineIndices.length === 0 ? Array.from({
25197
25350
  length: textInfos.length
25198
25351
  }, (_, index) => visibleLineIndices[index] ?? index) : visibleViewLineIndices;
25199
25352
  let textInfoIndex = 0;
25200
25353
  for (const viewRow of actualViewRows) {
25354
+ if (isCodeLensRow(viewRow)) {
25355
+ addCodeLenses(dom, codeLensRows, getCodeLensRowIndex(viewRow));
25356
+ continue;
25357
+ }
25201
25358
  if (isMergeConflictActionsRow(viewRow)) {
25202
25359
  addMergeConflictActions(dom, getMergeConflictRowIndex(viewRow));
25203
25360
  continue;
@@ -25279,8 +25436,8 @@ const getEditorRowsVirtualDom$1 = (textInfos, differences, lineNumbers = true, h
25279
25436
  return dom;
25280
25437
  };
25281
25438
 
25282
- const getEditorRowsVirtualDom = (textInfos, differences, lineNumbers = true, highlightedLine = -1, visibleLineIndices = [], endOfLineDecorations = [], visibleViewLineIndices = [], problemsHighlightedRow = -1, unnecessaryDiagnostics = [], horizontalVisibleRanges = [], lines = [], tabSize = 2, rtl = false) => {
25283
- const rowsDom = getEditorRowsVirtualDom$1(textInfos, differences, lineNumbers, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, problemsHighlightedRow, unnecessaryDiagnostics, 0, Infinity, 1, tabSize, lines, 500, horizontalVisibleRanges, rtl);
25439
+ const getEditorRowsVirtualDom = (textInfos, differences, lineNumbers = true, highlightedLine = -1, visibleLineIndices = [], endOfLineDecorations = [], visibleViewLineIndices = [], problemsHighlightedRow = -1, unnecessaryDiagnostics = [], horizontalVisibleRanges = [], lines = [], tabSize = 2, rtl = false, codeLensRows) => {
25440
+ const rowsDom = getEditorRowsVirtualDom$1(textInfos, differences, lineNumbers, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, problemsHighlightedRow, unnecessaryDiagnostics, 0, Infinity, 1, tabSize, lines, 500, horizontalVisibleRanges, rtl, codeLensRows);
25284
25441
  return [{
25285
25442
  childCount: visibleViewLineIndices.length || textInfos.length,
25286
25443
  className: 'EditorRows',
@@ -25377,8 +25534,8 @@ const editorLayersNode = {
25377
25534
  className: 'EditorLayers',
25378
25535
  type: Div
25379
25536
  };
25380
- const getEditorLayersVirtualDom = (selectionInfos, textInfos, differences, lineNumbers = true, highlightedLine = -1, cursorInfos = [], diagnostics = [], visibleLineIndices = [], endOfLineDecorations = [], bracketMatchInfos = [], focused = true, visibleViewLineIndices = [], problemsHighlightedRow = -1, roundedSelection = false, unnecessaryDiagnostics = [], horizontalVisibleRanges = [], lines = [], tabSize = 2, textDecorationDom = [], rtl = false) => {
25381
- return [editorLayersNode, ...getEditorSelectionsVirtualDom(selectionInfos, focused, roundedSelection), ...getEditorRowsVirtualDom(textInfos, differences, lineNumbers, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, problemsHighlightedRow, unnecessaryDiagnostics, horizontalVisibleRanges, lines, tabSize, rtl), ...getEditorCursorsVirtualDom(cursorInfos, focused), ...getEditorDiagnosticsVirtualDom(diagnostics, bracketMatchInfos, textDecorationDom)];
25537
+ const getEditorLayersVirtualDom = (selectionInfos, textInfos, differences, lineNumbers = true, highlightedLine = -1, cursorInfos = [], diagnostics = [], visibleLineIndices = [], endOfLineDecorations = [], bracketMatchInfos = [], focused = true, visibleViewLineIndices = [], problemsHighlightedRow = -1, roundedSelection = false, unnecessaryDiagnostics = [], horizontalVisibleRanges = [], lines = [], tabSize = 2, textDecorationDom = [], rtl = false, codeLensRows) => {
25538
+ return [editorLayersNode, ...getEditorSelectionsVirtualDom(selectionInfos, focused, roundedSelection), ...getEditorRowsVirtualDom(textInfos, differences, lineNumbers, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, problemsHighlightedRow, unnecessaryDiagnostics, horizontalVisibleRanges, lines, tabSize, rtl, codeLensRows), ...getEditorCursorsVirtualDom(cursorInfos, focused), ...getEditorDiagnosticsVirtualDom(diagnostics, bracketMatchInfos, textDecorationDom)];
25382
25539
  };
25383
25540
 
25384
25541
  const getEditorScrollBarDiagnosticsVirtualDom = scrollBarDiagnostics => {
@@ -25448,6 +25605,7 @@ const editorContentNode = {
25448
25605
  const getEditorContentVirtualDom = ({
25449
25606
  bracketMatchInfos = [],
25450
25607
  breadcrumbsEnabled = false,
25608
+ codeLensRows,
25451
25609
  cursorInfos = [],
25452
25610
  diagnostics = [],
25453
25611
  differences,
@@ -25475,7 +25633,7 @@ const getEditorContentVirtualDom = ({
25475
25633
  return [{
25476
25634
  ...editorContentNode,
25477
25635
  className: breadcrumbsEnabled ? 'EditorContent EditorBreadcrumbsOffset' : 'EditorContent'
25478
- }, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused, visibleViewLineIndices, problemsHighlightedRow, roundedSelection, unnecessaryDiagnostics, horizontalVisibleRanges, lines, tabSize, textDecorationDom, rtl), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom(scrollBarHeight, scrollBarWidth, scrollBarLeft)];
25636
+ }, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused, visibleViewLineIndices, problemsHighlightedRow, roundedSelection, unnecessaryDiagnostics, horizontalVisibleRanges, lines, tabSize, textDecorationDom, rtl, codeLensRows), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom(scrollBarHeight, scrollBarWidth, scrollBarLeft)];
25479
25637
  };
25480
25638
 
25481
25639
  const getGutterInfoVirtualDom = (gutterInfo, activeLineNumber) => {
@@ -25618,6 +25776,7 @@ const getEditorVirtualDom = ({
25618
25776
  breadcrumbFileIcon = '',
25619
25777
  breadcrumbsEnabled = false,
25620
25778
  breakPoints = [],
25779
+ codeLensRows,
25621
25780
  combineWhitespaceTokens: combineWhitespaceTokens$1 = false,
25622
25781
  cursorInfos = [],
25623
25782
  diagnostics: fallbackDiagnostics = [],
@@ -25701,6 +25860,9 @@ const getEditorVirtualDom = ({
25701
25860
  }, ...breadcrumbsDom, ...gutterDom, ...getEditorContentVirtualDom({
25702
25861
  bracketMatchInfos,
25703
25862
  breadcrumbsEnabled,
25863
+ ...(codeLensRows && {
25864
+ codeLensRows
25865
+ }),
25704
25866
  cursorInfos,
25705
25867
  diagnostics,
25706
25868
  differences,
@@ -25827,7 +25989,7 @@ const canRenderPlainTextAppend = (oldState, newState) => {
25827
25989
  if (oldState.initial || newState.initial || !oldState.focused || !newState.focused || oldState.uid !== newState.uid || oldTextInfos[0][1] !== newTextInfos[0][1] || oldState.cursorInfos.length !== 1 || newState.cursorInfos.length !== 1 || oldState.selectionInfos.length > 0 || newState.selectionInfos.length > 0 || oldState.selections.length !== 4 || newState.selections.length !== 4 || oldState.selections[0] !== 0 || oldState.selections[1] !== oldLine.length || oldState.selections[2] !== 0 || oldState.selections[3] !== oldLine.length || newState.selections[0] !== 0 || newState.selections[1] !== newLine.length || newState.selections[2] !== 0 || newState.selections[3] !== newLine.length) {
25828
25990
  return false;
25829
25991
  }
25830
- if (oldState.breadcrumbsEnabled || newState.breadcrumbsEnabled || oldState.minimapEnabled || newState.minimapEnabled || oldState.lineNumbers !== newState.lineNumbers || oldState.highlightActiveLineNumber !== newState.highlightActiveLineNumber || oldState.highlightedLine !== newState.highlightedLine || oldState.problemsHighlightedRow !== newState.problemsHighlightedRow || oldState.focused !== newState.focused || oldState.roundedSelection !== newState.roundedSelection || oldState.deltaX !== newState.deltaX || oldState.gutterWidth !== newState.gutterWidth || (newState.deltaX ?? 0) !== 0 && oldState.longestLineWidth !== newState.longestLineWidth || oldState.width !== newState.width || oldState.height !== newState.height || oldState.minimumSliderSize !== newState.minimumSliderSize || getScrollBarSize(getHorizontalScrollDimensions(oldState).width, oldState.longestLineWidth, oldState.minimumSliderSize) !== getScrollBarSize(getHorizontalScrollDimensions(newState).width, newState.longestLineWidth, newState.minimumSliderSize) || oldState.minLineY !== newState.minLineY || oldState.maxLineY !== newState.maxLineY || !sameValues(oldState.visibleLineIndices, newState.visibleLineIndices) || !sameValues(oldState.visibleViewLineIndices, newState.visibleViewLineIndices) || oldState.differences !== newState.differences && !sameValues(oldState.differences, newState.differences) || oldState.scrollBarHeight !== newState.scrollBarHeight || oldState.uri !== newState.uri || oldState.workspaceUri !== newState.workspaceUri || oldState.assetDir !== newState.assetDir || oldState.loadError !== newState.loadError || oldState.combineWhitespaceTokens !== newState.combineWhitespaceTokens || oldState.widgets?.length > 0 || newState.widgets?.length > 0 || oldState.mergeConflicts.length > 0 || newState.mergeConflicts.length > 0 || !isEmpty(oldState.diagnostics) || !isEmpty(newState.diagnostics) || !isEmpty(oldState.textDecorationDom) || !isEmpty(newState.textDecorationDom) || !isEmpty(oldState.visualDecorations) || !isEmpty(newState.visualDecorations) || !isEmpty(oldState.bracketMatchInfos) || !isEmpty(newState.bracketMatchInfos) || !isEmpty(oldState.endOfLineDecorations) || !isEmpty(newState.endOfLineDecorations) || !isEmpty(oldState.gutterDecorations) || !isEmpty(newState.gutterDecorations) || !isEmpty(oldState.breakPoints) || !isEmpty(newState.breakPoints)) {
25992
+ if (oldState.breadcrumbsEnabled || newState.breadcrumbsEnabled || oldState.minimapEnabled || newState.minimapEnabled || oldState.lineNumbers !== newState.lineNumbers || oldState.highlightActiveLineNumber !== newState.highlightActiveLineNumber || oldState.highlightedLine !== newState.highlightedLine || oldState.problemsHighlightedRow !== newState.problemsHighlightedRow || oldState.focused !== newState.focused || oldState.roundedSelection !== newState.roundedSelection || oldState.deltaX !== newState.deltaX || oldState.gutterWidth !== newState.gutterWidth || (newState.deltaX ?? 0) !== 0 && oldState.longestLineWidth !== newState.longestLineWidth || oldState.width !== newState.width || oldState.height !== newState.height || oldState.minimumSliderSize !== newState.minimumSliderSize || getScrollBarSize(getHorizontalScrollDimensions(oldState).width, oldState.longestLineWidth, oldState.minimumSliderSize) !== getScrollBarSize(getHorizontalScrollDimensions(newState).width, newState.longestLineWidth, newState.minimumSliderSize) || oldState.minLineY !== newState.minLineY || oldState.maxLineY !== newState.maxLineY || !sameValues(oldState.visibleLineIndices, newState.visibleLineIndices) || !sameValues(oldState.visibleViewLineIndices, newState.visibleViewLineIndices) || oldState.differences !== newState.differences && !sameValues(oldState.differences, newState.differences) || oldState.scrollBarHeight !== newState.scrollBarHeight || oldState.uri !== newState.uri || oldState.workspaceUri !== newState.workspaceUri || oldState.assetDir !== newState.assetDir || oldState.loadError !== newState.loadError || oldState.combineWhitespaceTokens !== newState.combineWhitespaceTokens || oldState.widgets?.length > 0 || newState.widgets?.length > 0 || Boolean(oldState.codeLensRows) || Boolean(newState.codeLensRows) || oldState.mergeConflicts.length > 0 || newState.mergeConflicts.length > 0 || !isEmpty(oldState.diagnostics) || !isEmpty(newState.diagnostics) || !isEmpty(oldState.textDecorationDom) || !isEmpty(newState.textDecorationDom) || !isEmpty(oldState.visualDecorations) || !isEmpty(newState.visualDecorations) || !isEmpty(oldState.bracketMatchInfos) || !isEmpty(newState.bracketMatchInfos) || !isEmpty(oldState.endOfLineDecorations) || !isEmpty(newState.endOfLineDecorations) || !isEmpty(oldState.gutterDecorations) || !isEmpty(newState.gutterDecorations) || !isEmpty(oldState.breakPoints) || !isEmpty(newState.breakPoints)) {
25831
25993
  return false;
25832
25994
  }
25833
25995
  return true;
@@ -27211,9 +27373,10 @@ const getHorizontalVirtualizationThreshold = value => {
27211
27373
  return Math.floor(threshold);
27212
27374
  };
27213
27375
  const getEditorPreferences = async applicationId => {
27214
- const [diagnosticsEnabled, fontFamily, fontSize, fontWeight, formatOnSave, formatActions, hoverEnabled, hoverDelay, horizontalVirtualizationThreshold, messageDelay, isAutoClosingBracketsEnabled$1, isAutoClosingQuotesEnabled$1, isAutoClosingTagsEnabled$1, isQuickSuggestionsEnabled$1, lineNumbers, highlightActiveLineNumber, rowHeight, tabSize, letterSpacing, completionTriggerCharacters, minimapEnabled, mergeConflictActionsEnabled, rtl, breadcrumbsEnabled, insertSpaces, dragAndDropEnabled, roundedSelection, combineWhitespaceTokens, selectedTextOccurrenceMatching, disableMonospaceOptimizations, syntaxHighlightingCacheEnabled] = await Promise.all([get$2('editor.diagnostics', applicationId), getFontFamily(applicationId), getFontSize(applicationId), getFontWeight(applicationId), get$2('editor.formatOnSave', applicationId), get$2('editor.formatActions', applicationId), get$2('editor.hover', applicationId), get$2('editor.hoverDelay', applicationId), get$2('editor.horizontalVirtualizationThreshold', applicationId), get$2('editor.messageDelay', applicationId), isAutoClosingBracketsEnabled(applicationId), isAutoClosingQuotesEnabled(applicationId), isAutoClosingTagsEnabled(), isQuickSuggestionsEnabled(applicationId), getLineNumbers(applicationId), getHighlightActiveLineNumber(applicationId), getRowHeight(applicationId), getTabSize(applicationId), getLetterSpacing(applicationId), getCompletionTriggerCharacters(), getMinimapEnabled(applicationId), getMergeConflictActionsEnabled(applicationId), get$2('editor.rtl', applicationId), get$2('breadcrumbs.enabled', applicationId), get$2('editor.insertSpaces', applicationId), get$2('editor.dragAndDrop', applicationId), get$2('editor.roundedSelection', applicationId), get$2('editor.combineWhitespaceTokens', applicationId), get$2('editor.selectedTextOccurrenceMatching', applicationId), get$2('editor.disableMonospaceOptimizations', applicationId), get$2('editor.syntaxHighlightingCache', applicationId)]);
27376
+ const [diagnosticsEnabled, fontFamily, fontSize, fontWeight, formatOnSave, formatActions, hoverEnabled, hoverDelay, horizontalVirtualizationThreshold, messageDelay, isAutoClosingBracketsEnabled$1, isAutoClosingQuotesEnabled$1, isAutoClosingTagsEnabled$1, isQuickSuggestionsEnabled$1, lineNumbers, highlightActiveLineNumber, rowHeight, tabSize, letterSpacing, completionTriggerCharacters, minimapEnabled, mergeConflictActionsEnabled, rtl, breadcrumbsEnabled, codeLensEnabled, insertSpaces, dragAndDropEnabled, roundedSelection, combineWhitespaceTokens, selectedTextOccurrenceMatching, disableMonospaceOptimizations, syntaxHighlightingCacheEnabled] = await Promise.all([get$2('editor.diagnostics', applicationId), getFontFamily(applicationId), getFontSize(applicationId), getFontWeight(applicationId), get$2('editor.formatOnSave', applicationId), get$2('editor.formatActions', applicationId), get$2('editor.hover', applicationId), get$2('editor.hoverDelay', applicationId), get$2('editor.horizontalVirtualizationThreshold', applicationId), get$2('editor.messageDelay', applicationId), isAutoClosingBracketsEnabled(applicationId), isAutoClosingQuotesEnabled(applicationId), isAutoClosingTagsEnabled(), isQuickSuggestionsEnabled(applicationId), getLineNumbers(applicationId), getHighlightActiveLineNumber(applicationId), getRowHeight(applicationId), getTabSize(applicationId), getLetterSpacing(applicationId), getCompletionTriggerCharacters(), getMinimapEnabled(applicationId), getMergeConflictActionsEnabled(applicationId), get$2('editor.rtl', applicationId), get$2('breadcrumbs.enabled', applicationId), get$2('editor.extensionCodeLens', applicationId), get$2('editor.insertSpaces', applicationId), get$2('editor.dragAndDrop', applicationId), get$2('editor.roundedSelection', applicationId), get$2('editor.combineWhitespaceTokens', applicationId), get$2('editor.selectedTextOccurrenceMatching', applicationId), get$2('editor.disableMonospaceOptimizations', applicationId), get$2('editor.syntaxHighlightingCache', applicationId)]);
27215
27377
  return {
27216
27378
  breadcrumbsEnabled: breadcrumbsEnabled ?? false,
27379
+ codeLensEnabled: codeLensEnabled === true,
27217
27380
  combineWhitespaceTokens: combineWhitespaceTokens ?? true,
27218
27381
  completionTriggerCharacters,
27219
27382
  diagnosticsEnabled: diagnosticsEnabled ?? false,
@@ -27347,6 +27510,20 @@ const applyTabCompletion = (editor, result) => {
27347
27510
  return editorSnippet(editor, result);
27348
27511
  };
27349
27512
 
27513
+ // State and undo history belong in this worker. Rendering reads changes separately.
27514
+ const wrapCommand = (fn, preservesTypingCoalescing = false) => {
27515
+ return wrapCommand$1(fn, preservesTypingCoalescing, false);
27516
+ };
27517
+ const wrapFocusCommand = fn => {
27518
+ return wrapFocusCommand$1(fn, false);
27519
+ };
27520
+ const wrapDeferredCommand = fn => {
27521
+ return wrapDeferredCommand$1(fn, false);
27522
+ };
27523
+ const wrapLatestCommand = fn => {
27524
+ return wrapLatestCommand$1(fn, false);
27525
+ };
27526
+
27350
27527
  const insertTab = editor => {
27351
27528
  return type(editor, getIndentString(editor));
27352
27529
  };
@@ -27393,6 +27570,28 @@ const handleTab = async editor => {
27393
27570
  return insertTab(editor);
27394
27571
  }
27395
27572
  };
27573
+ const createHandleTabCommand = () => {
27574
+ const handleTabFallback = wrapCommand(handleTab);
27575
+ const command = async uid => {
27576
+ // Deferred completion rendering can keep the editor's existing keyboard context.
27577
+ const editor = get$a(uid)?.newState;
27578
+ const widget = editor?.widgets.find(candidate => candidate.id === Completion);
27579
+ if (widget) {
27580
+ const hasItems = await invoke$4('Completions.hasItems', widget.newState.uid);
27581
+ if (!isCurrent$1(editor, get$a(uid)?.newState)) {
27582
+ return;
27583
+ }
27584
+ if (hasItems) {
27585
+ // Selecting a completion calls back into the editor's edit queue.
27586
+ await selectCurrent$1(uid);
27587
+ return;
27588
+ }
27589
+ }
27590
+ await handleTabFallback(uid);
27591
+ };
27592
+ registerStateCommand(command);
27593
+ return command;
27594
+ };
27396
27595
 
27397
27596
  const relaunchWorkers = async () => {
27398
27597
  await dispose();
@@ -27763,6 +27962,7 @@ const loadContent = async (state, savedState, largeFile = false, focus = true, f
27763
27962
  } = state;
27764
27963
  const {
27765
27964
  breadcrumbsEnabled,
27965
+ codeLensEnabled,
27766
27966
  combineWhitespaceTokens,
27767
27967
  completionTriggerCharacters,
27768
27968
  diagnosticsEnabled,
@@ -27804,6 +28004,7 @@ const loadContent = async (state, savedState, largeFile = false, focus = true, f
27804
28004
  ...state,
27805
28005
  breadcrumbsEnabled,
27806
28006
  charWidth,
28007
+ codeLensEnabled,
27807
28008
  combineWhitespaceTokens,
27808
28009
  completionTriggerCharacters,
27809
28010
  diagnosticsEnabled,
@@ -28078,10 +28279,10 @@ const renderLines = {
28078
28279
  visibleLineIndices,
28079
28280
  visibleViewLineIndices
28080
28281
  } = newState;
28081
- const dom = getEditorRowsVirtualDom$1(textInfos, differences, true, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, newState.problemsHighlightedRow, diagnostics || [], newState.deltaX, newState.width, newState.charWidth, newState.tabSize, newState.lines, newState.horizontalVirtualizationThreshold, newState.horizontalVisibleRanges, newState.rtl);
28282
+ const dom = getEditorRowsVirtualDom$1(textInfos, differences, true, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, newState.problemsHighlightedRow, diagnostics || [], newState.deltaX, newState.width, newState.charWidth, newState.tabSize, newState.lines, newState.horizontalVirtualizationThreshold, newState.horizontalVisibleRanges, newState.rtl, newState.codeLensRows);
28082
28283
  return [/* method */'setText', dom];
28083
28284
  },
28084
- isEqual: (oldState, newState) => oldState.lines === newState.lines && oldState.foldingRanges === newState.foldingRanges && oldState.visibleViewLineIndices === newState.visibleViewLineIndices && oldState.tokenizerId === newState.tokenizerId && oldState.minLineY === newState.minLineY && oldState.decorations === newState.decorations && oldState.embeds === newState.embeds && oldState.endOfLineDecorations === newState.endOfLineDecorations && oldState.diagnostics === newState.diagnostics && oldState.deltaX === newState.deltaX && oldState.charWidth === newState.charWidth && oldState.tabSize === newState.tabSize && oldState.rtl === newState.rtl && oldState.gutterWidth === newState.gutterWidth && oldState.horizontalVirtualizationThreshold === newState.horizontalVirtualizationThreshold && oldState.fontFamily === newState.fontFamily && oldState.fontSize === newState.fontSize && oldState.fontWeight === newState.fontWeight && oldState.letterSpacing === newState.letterSpacing && oldState.isMonospaceFont === newState.isMonospaceFont && oldState.width === newState.width && oldState.highlightedLine === newState.highlightedLine && oldState.problemsHighlightedRow === newState.problemsHighlightedRow && oldState.debugEnabled === newState.debugEnabled
28285
+ isEqual: (oldState, newState) => oldState.lines === newState.lines && oldState.codeLensRows === newState.codeLensRows && oldState.foldingRanges === newState.foldingRanges && oldState.visibleViewLineIndices === newState.visibleViewLineIndices && oldState.tokenizerId === newState.tokenizerId && oldState.minLineY === newState.minLineY && oldState.decorations === newState.decorations && oldState.embeds === newState.embeds && oldState.endOfLineDecorations === newState.endOfLineDecorations && oldState.diagnostics === newState.diagnostics && oldState.deltaX === newState.deltaX && oldState.charWidth === newState.charWidth && oldState.tabSize === newState.tabSize && oldState.rtl === newState.rtl && oldState.gutterWidth === newState.gutterWidth && oldState.horizontalVirtualizationThreshold === newState.horizontalVirtualizationThreshold && oldState.fontFamily === newState.fontFamily && oldState.fontSize === newState.fontSize && oldState.fontWeight === newState.fontWeight && oldState.letterSpacing === newState.letterSpacing && oldState.isMonospaceFont === newState.isMonospaceFont && oldState.width === newState.width && oldState.highlightedLine === newState.highlightedLine && oldState.problemsHighlightedRow === newState.problemsHighlightedRow && oldState.debugEnabled === newState.debugEnabled
28085
28286
  };
28086
28287
  const renderSelections = {
28087
28288
  apply: (oldState, newState) => {
@@ -28182,6 +28383,15 @@ const renderEditor = async id => {
28182
28383
 
28183
28384
  const renderEventListeners = () => {
28184
28385
  return [{
28386
+ name: HandleCodeLensClick,
28387
+ params: ['activateCodeLens', 'event.target.dataset.rowIndex', 'event.target.dataset.action'],
28388
+ preventDefault: true,
28389
+ stopPropagation: true
28390
+ }, {
28391
+ name: HandleCodeLensPointerDown,
28392
+ params: [],
28393
+ stopPropagation: true
28394
+ }, {
28185
28395
  name: HandleHoverMouseDown,
28186
28396
  params: [],
28187
28397
  stopPropagation: true
@@ -28512,20 +28722,6 @@ const updateDebugInfo = async debugId => {
28512
28722
  await RendererWorker.invoke('Editor.rerender', key);
28513
28723
  };
28514
28724
 
28515
- // State and undo history belong in this worker. Rendering reads changes separately.
28516
- const wrapCommand = (fn, preservesTypingCoalescing = false) => {
28517
- return wrapCommand$1(fn, preservesTypingCoalescing, false);
28518
- };
28519
- const wrapFocusCommand = fn => {
28520
- return wrapFocusCommand$1(fn, false);
28521
- };
28522
- const wrapDeferredCommand = fn => {
28523
- return wrapDeferredCommand$1(fn, false);
28524
- };
28525
- const wrapLatestCommand = fn => {
28526
- return wrapLatestCommand$1(fn, false);
28527
- };
28528
-
28529
28725
  const handleMouseDownAndRender = (uid, ...args) => {
28530
28726
  return executeAndRender(commandMap['Editor.handleMouseDown'], uid, args);
28531
28727
  };
@@ -28584,6 +28780,7 @@ const commandMap = {
28584
28780
  'CodeGenerator.accept': codeGeneratorAccept,
28585
28781
  'ColorPicker.loadContent': loadContent$3,
28586
28782
  'Editor.acceptMergeConflict': wrapCommand(acceptMergeConflict),
28783
+ 'Editor.activateCodeLens': wrapCommand(activateCodeLens),
28587
28784
  'Editor.addCursorAbove': wrapCommand(addCursorAbove),
28588
28785
  'Editor.addCursorBelow': wrapCommand(addCursorBelow),
28589
28786
  'Editor.applyDocumentEdits': wrapCommand(applyDocumentEdits$1),
@@ -28712,7 +28909,7 @@ const commandMap = {
28712
28909
  'Editor.handleSettingsChanged': wrapCommand(handleSettingsChanged),
28713
28910
  'Editor.handleSingleClick': wrapCommand(handleSingleClick),
28714
28911
  'Editor.handleSourceActionClick': selectItem,
28715
- 'Editor.handleTab': wrapCommand(handleTab),
28912
+ 'Editor.handleTab': createHandleTabCommand(),
28716
28913
  'Editor.handleTouchEnd': wrapCommand(handleTouchEnd),
28717
28914
  'Editor.handleTouchMove': wrapCommand(handleTouchMove),
28718
28915
  'Editor.handleTouchStart': wrapCommand(handleTouchStart),
@@ -1986,9 +1986,14 @@ const getRenderedLineCount = (height, rowHeight, deltaY) => {
1986
1986
  };
1987
1987
 
1988
1988
  const toMergeConflictActionsRow = rowIndex => ~rowIndex;
1989
- const isMergeConflictActionsRow = viewRow => viewRow < 0;
1989
+
1990
+ // Merge conflict rows use the signed 32-bit range. Reserve a separate range for code lenses.
1991
+ const firstCodeLensRow = -4294967296;
1992
+ const isCodeLensRow = viewRow => viewRow <= firstCodeLensRow;
1993
+ const getCodeLensRowIndex = viewRow => firstCodeLensRow - viewRow;
1994
+ const isMergeConflictActionsRow = viewRow => viewRow < 0 && !isCodeLensRow(viewRow);
1990
1995
  const getMergeConflictRowIndex = viewRow => ~viewRow;
1991
- const getViewLineIndices = (lineCount, isRowHidden, mergeConflicts) => {
1996
+ const getViewLineIndices = (lineCount, isRowHidden, mergeConflicts, codeLensRows) => {
1992
1997
  const conflictStartRows = new Set(mergeConflicts.map(conflict => conflict.startRowIndex));
1993
1998
  const result = [];
1994
1999
  for (let rowIndex = 0; rowIndex < lineCount; rowIndex++) {
@@ -1998,6 +2003,9 @@ const getViewLineIndices = (lineCount, isRowHidden, mergeConflicts) => {
1998
2003
  if (conflictStartRows.has(rowIndex)) {
1999
2004
  result.push(toMergeConflictActionsRow(rowIndex));
2000
2005
  }
2006
+ if (codeLensRows?.[rowIndex]) {
2007
+ result.push(firstCodeLensRow - rowIndex);
2008
+ }
2001
2009
  result.push(rowIndex);
2002
2010
  }
2003
2011
  return result;
@@ -2006,7 +2014,7 @@ const getVisibleViewLineIndices = (viewLineIndices, startVisualRow, numberOfVisi
2006
2014
  return viewLineIndices.slice(startVisualRow, startVisualRow + numberOfVisibleLines);
2007
2015
  };
2008
2016
  const getVisibleLineIndices = visibleViewLineIndices => {
2009
- return visibleViewLineIndices.filter(viewRow => !isMergeConflictActionsRow(viewRow));
2017
+ return visibleViewLineIndices.filter(viewRow => viewRow >= 0);
2010
2018
  };
2011
2019
  const getVisualRowForDocumentRow$1 = (rowIndex, viewLineIndices) => {
2012
2020
  const visualRow = viewLineIndices.indexOf(rowIndex);
@@ -2017,6 +2025,9 @@ const getDocumentRowForVisualRow$1 = (visualRow, viewLineIndices) => {
2017
2025
  return visualRow;
2018
2026
  }
2019
2027
  const viewRow = viewLineIndices[visualRow];
2028
+ if (isCodeLensRow(viewRow)) {
2029
+ return getCodeLensRowIndex(viewRow);
2030
+ }
2020
2031
  return isMergeConflictActionsRow(viewRow) ? getMergeConflictRowIndex(viewRow) : viewRow;
2021
2032
  };
2022
2033
 
@@ -2206,16 +2217,16 @@ const updateLayout = (editor, foldingRanges) => {
2206
2217
  rowHeight
2207
2218
  } = editor;
2208
2219
  const mergeConflicts = editor.mergeConflictActionsEnabled ? getMergeConflicts(lines) : [];
2209
- const hasMergeConflictRows = mergeConflicts.length > 0;
2210
- const viewLineIndices = hasMergeConflictRows ? getViewLineIndices(lines.length, rowIndex => isRowHidden(rowIndex, foldingRanges), mergeConflicts) : [];
2211
- const visibleLineCount = hasMergeConflictRows ? viewLineIndices.length : getVisibleLineCount(lines.length, foldingRanges);
2220
+ const hasSyntheticRows = mergeConflicts.length > 0 || Boolean(editor.codeLensRows);
2221
+ const viewLineIndices = hasSyntheticRows ? getViewLineIndices(lines.length, rowIndex => isRowHidden(rowIndex, foldingRanges), mergeConflicts, editor.codeLensRows) : [];
2222
+ const visibleLineCount = hasSyntheticRows ? viewLineIndices.length : getVisibleLineCount(lines.length, foldingRanges);
2212
2223
  const finalY = Math.max(visibleLineCount - numberOfVisibleLines, 0);
2213
2224
  const finalDeltaY = Math.max(visibleLineCount * itemHeight - height, 0);
2214
2225
  const deltaY = clamp(editor.deltaY, 0, finalDeltaY);
2215
2226
  const startVisualRow = Math.floor(deltaY / itemHeight);
2216
2227
  const renderedLineCount = getRenderedLineCount(height, itemHeight, deltaY);
2217
- const visibleViewLineIndices = hasMergeConflictRows ? getVisibleViewLineIndices(viewLineIndices, startVisualRow, renderedLineCount) : getViewportLineIndices(lines.length, foldingRanges, startVisualRow, renderedLineCount);
2218
- const visibleLineIndices = hasMergeConflictRows ? getVisibleLineIndices(visibleViewLineIndices) : visibleViewLineIndices;
2228
+ const visibleViewLineIndices = hasSyntheticRows ? getVisibleViewLineIndices(viewLineIndices, startVisualRow, renderedLineCount) : getViewportLineIndices(lines.length, foldingRanges, startVisualRow, renderedLineCount);
2229
+ const visibleLineIndices = hasSyntheticRows ? getVisibleLineIndices(visibleViewLineIndices) : visibleViewLineIndices;
2219
2230
  const minLineY = visibleLineIndices[0] ?? 0;
2220
2231
  const maxLineY = visibleLineIndices.length === 0 ? 0 : visibleLineIndices.at(-1) + 1;
2221
2232
  const contentHeight = visibleLineCount * rowHeight;
@@ -12128,9 +12139,9 @@ const setDeltaY$1 = async (state, value) => {
12128
12139
  }
12129
12140
  const startVisualRow = Math.floor(newDeltaY / itemHeight);
12130
12141
  const renderedLineCount = getRenderedLineCount(height, itemHeight, newDeltaY);
12131
- const hasMergeConflictRows = state.viewLineIndices?.length > 0;
12132
- const visibleViewLineIndices = hasMergeConflictRows ? getVisibleViewLineIndices(state.viewLineIndices, startVisualRow, renderedLineCount) : getViewportLineIndices(state.lines.length, state.foldingRanges || [], startVisualRow, renderedLineCount);
12133
- const visibleLineIndices = hasMergeConflictRows ? getVisibleLineIndices(visibleViewLineIndices) : visibleViewLineIndices;
12142
+ const hasSyntheticRows = state.viewLineIndices?.length > 0;
12143
+ const visibleViewLineIndices = hasSyntheticRows ? getVisibleViewLineIndices(state.viewLineIndices, startVisualRow, renderedLineCount) : getViewportLineIndices(state.lines.length, state.foldingRanges || [], startVisualRow, renderedLineCount);
12144
+ const visibleLineIndices = hasSyntheticRows ? getVisibleLineIndices(visibleViewLineIndices) : visibleViewLineIndices;
12134
12145
  const minLineY = visibleLineIndices[0] ?? 0;
12135
12146
  const maxLineY = visibleLineIndices.length === 0 ? 0 : visibleLineIndices.at(-1) + 1;
12136
12147
  const newEditor1 = {
@@ -14155,6 +14166,14 @@ const updateColorPickerValue$1 = async (editor, value) => {
14155
14166
  };
14156
14167
  };
14157
14168
 
14169
+ const getDocument = editor => ({
14170
+ documentId: editor.id,
14171
+ languageId: editor.languageId,
14172
+ text: getText$1(editor),
14173
+ uri: editor.uri
14174
+ });
14175
+ const sameDocument = (left, right) => left.uri === right.uri && left.languageId === right.languageId && left.lines === right.lines && left.lifecycle === right.lifecycle;
14176
+
14158
14177
  const getTextDocument$2 = editor => ({
14159
14178
  documentId: editor.id || editor.uid,
14160
14179
  languageId: editor.languageId,
@@ -14774,8 +14793,15 @@ const mergeConflictsEqual$1 = (oldState, newState) => {
14774
14793
  };
14775
14794
  const updateDerivedState = async (oldState, newState, deferGutterDecorations = false) => {
14776
14795
  const horizontalState = oldState.initial || oldState.lines !== newState.lines || oldState.width !== newState.width || oldState.charWidth !== newState.charWidth || oldState.fontFamily !== newState.fontFamily || oldState.fontSize !== newState.fontSize || oldState.fontWeight !== newState.fontWeight || oldState.isMonospaceFont !== newState.isMonospaceFont || oldState.letterSpacing !== newState.letterSpacing || oldState.rtl !== newState.rtl || oldState.tabSize !== newState.tabSize || oldState.lineNumbers !== newState.lineNumbers || oldState.breakPoints !== newState.breakPoints || oldState.gutterDecorations !== newState.gutterDecorations || oldState.lightBulbRowIndex !== newState.lightBulbRowIndex ? await updateHorizontalLayout(newState) : newState;
14777
- const layoutState = oldState.lines !== newState.lines && 'foldingRanges' in newState ? updateLayout(horizontalState, []) : horizontalState;
14778
- const nextState = mergeConflictsEqual$1(oldState, layoutState) ? layoutState : {
14796
+ const linesChanged = oldState.lines !== newState.lines;
14797
+ const clearCodeLenses = oldState.codeLensRows && (!newState.codeLensEnabled || !sameDocument(oldState, newState));
14798
+ const codeLensRows = clearCodeLenses ? undefined : horizontalState.codeLensRows;
14799
+ const codeLensRowsChanged = oldState.codeLensRows !== codeLensRows;
14800
+ const layoutState = (linesChanged || codeLensRowsChanged) && 'foldingRanges' in newState ? updateLayout({
14801
+ ...horizontalState,
14802
+ codeLensRows
14803
+ }, linesChanged ? [] : horizontalState.foldingRanges) : horizontalState;
14804
+ const nextState = !codeLensRowsChanged && mergeConflictsEqual$1(oldState, layoutState) ? layoutState : {
14779
14805
  ...layoutState,
14780
14806
  incrementalEdits: emptyIncrementalEdits
14781
14807
  };
@@ -15021,6 +15047,71 @@ const merge = (current, snapshot, result) => {
15021
15047
  };
15022
15048
  };
15023
15049
 
15050
+ const lensIds = {
15051
+ next: 0
15052
+ };
15053
+ const toRows = (result, lineCount) => {
15054
+ const rows = Object.create(null);
15055
+ for (const {
15056
+ extensionId,
15057
+ lenses,
15058
+ providerId
15059
+ } of result) {
15060
+ const validLenses = lenses.filter(lens => lens && Number.isSafeInteger(lens.rowIndex) && lens.rowIndex >= 0 && lens.rowIndex < lineCount && typeof lens.label === 'string');
15061
+ for (const lens of validLenses) {
15062
+ const row = rows[lens.rowIndex] ||= [];
15063
+ row.push({
15064
+ ...(typeof lens.action === 'string' && {
15065
+ action: lens.action
15066
+ }),
15067
+ extensionId,
15068
+ id: lensIds.next++,
15069
+ label: lens.label,
15070
+ providerId
15071
+ });
15072
+ }
15073
+ }
15074
+ return rows;
15075
+ };
15076
+ const request = async editor => {
15077
+ try {
15078
+ const result = await invoke$9(editor.applicationId, 'Extensions.executeCodeLensProviders', getDocument(editor));
15079
+ if (!Array.isArray(result) || result.length === 0) {
15080
+ return;
15081
+ }
15082
+ const codeLensRows = toRows(result, editor.lines.length);
15083
+ if (Object.keys(codeLensRows).length === 0) {
15084
+ return;
15085
+ }
15086
+ const committed = await enqueue(editor.uid, async () => {
15087
+ const current = get$9(editor.uid);
15088
+ if (!current?.newState.codeLensEnabled || !sameDocument(editor, current.newState)) {
15089
+ return false;
15090
+ }
15091
+ const nextState = await updateDerivedState(current.newState, {
15092
+ ...current.newState,
15093
+ codeLensRows
15094
+ });
15095
+ const latest = get$9(editor.uid);
15096
+ if (!latest || latest.newState !== current.newState || editor.lifecycle?.disposed) {
15097
+ return false;
15098
+ }
15099
+ set$b(editor.uid, latest.oldState, nextState);
15100
+ return true;
15101
+ });
15102
+ if (committed) {
15103
+ await invoke$7('Editor.renderPending', editor.uid);
15104
+ }
15105
+ } catch {
15106
+ // Code lenses are optional and should never interrupt editing.
15107
+ }
15108
+ };
15109
+ const requestIfChanged = (oldState, newState) => {
15110
+ if (newState.codeLensEnabled && !newState.initial && !newState.largeFile && !newState.loadError && (oldState.initial || !oldState.codeLensEnabled || !sameDocument(oldState, newState))) {
15111
+ void request(newState);
15112
+ }
15113
+ };
15114
+
15024
15115
  class Diff {
15025
15116
  diff(oldStr, newStr,
15026
15117
  // Type below is not accurate/complete - see above for full possibilities - but it compiles
@@ -16214,6 +16305,7 @@ const wrapCommand$1 = (fn, preservesTypingCoalescing = false, returnState = true
16214
16305
  if (editorDiagnosticEffect.isActive(state, newEditorWithDerivedState)) {
16215
16306
  void editorDiagnosticEffect.apply(newEditorWithDerivedState);
16216
16307
  }
16308
+ requestIfChanged(state, newEditorWithDerivedState);
16217
16309
  const finalEditor = newEditorWithDerivedState;
16218
16310
  if (deferGutterDecorations) {
16219
16311
  schedule(finalEditor);
@@ -16250,6 +16342,7 @@ const wrapCommand$1 = (fn, preservesTypingCoalescing = false, returnState = true
16250
16342
  continue;
16251
16343
  }
16252
16344
  set$b(otherUid, latest.oldState, synchronizedEditor);
16345
+ requestIfChanged(editor, synchronizedEditor);
16253
16346
  if (deferGutterDecorations) {
16254
16347
  schedule(synchronizedEditor);
16255
16348
  }
@@ -17655,6 +17748,30 @@ const updateAutomaticCompletion = async editor => {
17655
17748
  return openCompletion(editor, true);
17656
17749
  };
17657
17750
 
17751
+ const activateCodeLens = async (state, rowIndex, lensId) => {
17752
+ const {
17753
+ applicationId,
17754
+ codeLensEnabled,
17755
+ codeLensRows
17756
+ } = state;
17757
+ const lens = codeLensRows?.[Number(rowIndex)]?.find(({
17758
+ id
17759
+ }) => id === Number(lensId));
17760
+ if (!codeLensEnabled || !lens?.action) {
17761
+ return state;
17762
+ }
17763
+ const document = getDocument(state);
17764
+ try {
17765
+ const edit = await invoke$9(applicationId, 'Extensions.resolveCodeLens', document, lens.extensionId, lens.providerId, lens.action);
17766
+ if (!edit || !Number.isSafeInteger(edit.offset) || !Number.isSafeInteger(edit.deleted) || edit.offset < 0 || edit.deleted < 0 || edit.offset + edit.deleted > document.text.length || typeof edit.inserted !== 'string' || /[\r\n]/.test(edit.inserted)) {
17767
+ return state;
17768
+ }
17769
+ return await scheduleDocumentAndCursorsSelections(state, getTextChanges(state, [edit]));
17770
+ } catch {
17771
+ return state;
17772
+ }
17773
+ };
17774
+
17658
17775
  const getAcceptedLines = (lines, conflict, action) => {
17659
17776
  const current = lines.slice(conflict.currentStartRowIndex, conflict.currentEndRowIndex);
17660
17777
  const incoming = lines.slice(conflict.incomingStartRowIndex, conflict.incomingEndRowIndex);
@@ -24814,6 +24931,8 @@ const HandleMergeConflictActionsMouseDown = 37;
24814
24931
  const HandleMouseOut = 38;
24815
24932
  const HandleMouseOver = 39;
24816
24933
  const HandleHoverMouseDown = 40;
24934
+ const HandleCodeLensClick = 41;
24935
+ const HandleCodeLensPointerDown = 42;
24817
24936
 
24818
24937
  const getLineInfoVirtualDom = lineInfo => {
24819
24938
  const dom = [{
@@ -25093,6 +25212,7 @@ ${editorSelector} .GutterRows {
25093
25212
  display: flex;
25094
25213
  flex-direction: column;
25095
25214
  }
25215
+ ${editorSelector} .EditorCodeLenses,
25096
25216
  ${editorSelector} .MergeConflictActions,
25097
25217
  ${editorSelector} .MergeConflictActionsGutter {
25098
25218
  box-sizing: border-box;
@@ -25100,6 +25220,7 @@ ${editorSelector} .MergeConflictActionsGutter {
25100
25220
  height: var(--EditorRowHeight);
25101
25221
  line-height: var(--EditorRowHeight);
25102
25222
  }
25223
+ ${editorSelector} .EditorCodeLenses,
25103
25224
  ${editorSelector} .MergeConflictActions {
25104
25225
  align-items: center;
25105
25226
  display: flex;
@@ -25107,6 +25228,7 @@ ${editorSelector} .MergeConflictActions {
25107
25228
  padding-left: 4px;
25108
25229
  user-select: none;
25109
25230
  }
25231
+ ${editorSelector} .EditorCodeLensAction,
25110
25232
  ${editorSelector} .MergeConflictAction {
25111
25233
  appearance: none;
25112
25234
  background: none;
@@ -25116,6 +25238,8 @@ ${editorSelector} .MergeConflictAction {
25116
25238
  font: inherit;
25117
25239
  padding: 0;
25118
25240
  }
25241
+ ${editorSelector} .EditorCodeLensAction:hover,
25242
+ ${editorSelector} .EditorCodeLensAction:focus-visible,
25119
25243
  ${editorSelector} .MergeConflictAction:hover,
25120
25244
  ${editorSelector} .MergeConflictAction:focus-visible {
25121
25245
  color: var(--TextLinkActiveForeground, #4daafc);
@@ -25642,13 +25766,46 @@ const addMergeConflictActions = (dom, rowIndex) => {
25642
25766
  }, text(label));
25643
25767
  }
25644
25768
  };
25645
- const getEditorRowsVirtualDom$1 = (textInfos, differences, lineNumbers = true, highlightedLine = -1, visibleLineIndices = [], endOfLineDecorations = [], visibleViewLineIndices = [], problemsHighlightedRow = -1, diagnostics = [], deltaX = 0, width = Infinity, charWidth = 1, tabSize = 2, lines = [], horizontalVirtualizationThreshold = 500, horizontalVisibleRanges = [], rtl = false) => {
25769
+ const addCodeLenses = (dom, codeLensRows, rowIndex) => {
25770
+ const lenses = codeLensRows[rowIndex] ?? [];
25771
+ dom.push({
25772
+ childCount: lenses.length,
25773
+ className: 'EditorCodeLenses',
25774
+ onMouseDown: HandleHoverMouseDown,
25775
+ onPointerDown: HandleCodeLensPointerDown,
25776
+ type: Div
25777
+ });
25778
+ for (const {
25779
+ action,
25780
+ id,
25781
+ label
25782
+ } of lenses) {
25783
+ dom.push(action ? {
25784
+ childCount: 1,
25785
+ className: 'EditorCodeLensAction',
25786
+ 'data-action': String(id),
25787
+ 'data-rowIndex': rowIndex,
25788
+ onClick: HandleCodeLensClick,
25789
+ title: label,
25790
+ type: Button$1
25791
+ } : {
25792
+ childCount: 1,
25793
+ title: label,
25794
+ type: Span
25795
+ }, text(label));
25796
+ }
25797
+ };
25798
+ const getEditorRowsVirtualDom$1 = (textInfos, differences, lineNumbers = true, highlightedLine = -1, visibleLineIndices = [], endOfLineDecorations = [], visibleViewLineIndices = [], problemsHighlightedRow = -1, diagnostics = [], deltaX = 0, width = Infinity, charWidth = 1, tabSize = 2, lines = [], horizontalVirtualizationThreshold = 500, horizontalVisibleRanges = [], rtl = false, codeLensRows = {}) => {
25646
25799
  const dom = [];
25647
25800
  const actualViewRows = visibleViewLineIndices.length === 0 ? Array.from({
25648
25801
  length: textInfos.length
25649
25802
  }, (_, index) => visibleLineIndices[index] ?? index) : visibleViewLineIndices;
25650
25803
  let textInfoIndex = 0;
25651
25804
  for (const viewRow of actualViewRows) {
25805
+ if (isCodeLensRow(viewRow)) {
25806
+ addCodeLenses(dom, codeLensRows, getCodeLensRowIndex(viewRow));
25807
+ continue;
25808
+ }
25652
25809
  if (isMergeConflictActionsRow(viewRow)) {
25653
25810
  addMergeConflictActions(dom, getMergeConflictRowIndex(viewRow));
25654
25811
  continue;
@@ -25730,8 +25887,8 @@ const getEditorRowsVirtualDom$1 = (textInfos, differences, lineNumbers = true, h
25730
25887
  return dom;
25731
25888
  };
25732
25889
 
25733
- const getEditorRowsVirtualDom = (textInfos, differences, lineNumbers = true, highlightedLine = -1, visibleLineIndices = [], endOfLineDecorations = [], visibleViewLineIndices = [], problemsHighlightedRow = -1, unnecessaryDiagnostics = [], horizontalVisibleRanges = [], lines = [], tabSize = 2, rtl = false) => {
25734
- const rowsDom = getEditorRowsVirtualDom$1(textInfos, differences, lineNumbers, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, problemsHighlightedRow, unnecessaryDiagnostics, 0, Infinity, 1, tabSize, lines, 500, horizontalVisibleRanges, rtl);
25890
+ const getEditorRowsVirtualDom = (textInfos, differences, lineNumbers = true, highlightedLine = -1, visibleLineIndices = [], endOfLineDecorations = [], visibleViewLineIndices = [], problemsHighlightedRow = -1, unnecessaryDiagnostics = [], horizontalVisibleRanges = [], lines = [], tabSize = 2, rtl = false, codeLensRows) => {
25891
+ const rowsDom = getEditorRowsVirtualDom$1(textInfos, differences, lineNumbers, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, problemsHighlightedRow, unnecessaryDiagnostics, 0, Infinity, 1, tabSize, lines, 500, horizontalVisibleRanges, rtl, codeLensRows);
25735
25892
  return [{
25736
25893
  childCount: visibleViewLineIndices.length || textInfos.length,
25737
25894
  className: 'EditorRows',
@@ -25828,8 +25985,8 @@ const editorLayersNode = {
25828
25985
  className: 'EditorLayers',
25829
25986
  type: Div
25830
25987
  };
25831
- const getEditorLayersVirtualDom = (selectionInfos, textInfos, differences, lineNumbers = true, highlightedLine = -1, cursorInfos = [], diagnostics = [], visibleLineIndices = [], endOfLineDecorations = [], bracketMatchInfos = [], focused = true, visibleViewLineIndices = [], problemsHighlightedRow = -1, roundedSelection = false, unnecessaryDiagnostics = [], horizontalVisibleRanges = [], lines = [], tabSize = 2, textDecorationDom = [], rtl = false) => {
25832
- return [editorLayersNode, ...getEditorSelectionsVirtualDom(selectionInfos, focused, roundedSelection), ...getEditorRowsVirtualDom(textInfos, differences, lineNumbers, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, problemsHighlightedRow, unnecessaryDiagnostics, horizontalVisibleRanges, lines, tabSize, rtl), ...getEditorCursorsVirtualDom(cursorInfos, focused), ...getEditorDiagnosticsVirtualDom(diagnostics, bracketMatchInfos, textDecorationDom)];
25988
+ const getEditorLayersVirtualDom = (selectionInfos, textInfos, differences, lineNumbers = true, highlightedLine = -1, cursorInfos = [], diagnostics = [], visibleLineIndices = [], endOfLineDecorations = [], bracketMatchInfos = [], focused = true, visibleViewLineIndices = [], problemsHighlightedRow = -1, roundedSelection = false, unnecessaryDiagnostics = [], horizontalVisibleRanges = [], lines = [], tabSize = 2, textDecorationDom = [], rtl = false, codeLensRows) => {
25989
+ return [editorLayersNode, ...getEditorSelectionsVirtualDom(selectionInfos, focused, roundedSelection), ...getEditorRowsVirtualDom(textInfos, differences, lineNumbers, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, problemsHighlightedRow, unnecessaryDiagnostics, horizontalVisibleRanges, lines, tabSize, rtl, codeLensRows), ...getEditorCursorsVirtualDom(cursorInfos, focused), ...getEditorDiagnosticsVirtualDom(diagnostics, bracketMatchInfos, textDecorationDom)];
25833
25990
  };
25834
25991
 
25835
25992
  const getEditorScrollBarDiagnosticsVirtualDom = scrollBarDiagnostics => {
@@ -25899,6 +26056,7 @@ const editorContentNode = {
25899
26056
  const getEditorContentVirtualDom = ({
25900
26057
  bracketMatchInfos = [],
25901
26058
  breadcrumbsEnabled = false,
26059
+ codeLensRows,
25902
26060
  cursorInfos = [],
25903
26061
  diagnostics = [],
25904
26062
  differences,
@@ -25926,7 +26084,7 @@ const getEditorContentVirtualDom = ({
25926
26084
  return [{
25927
26085
  ...editorContentNode,
25928
26086
  className: breadcrumbsEnabled ? 'EditorContent EditorBreadcrumbsOffset' : 'EditorContent'
25929
- }, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused, visibleViewLineIndices, problemsHighlightedRow, roundedSelection, unnecessaryDiagnostics, horizontalVisibleRanges, lines, tabSize, textDecorationDom, rtl), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom(scrollBarHeight, scrollBarWidth, scrollBarLeft)];
26087
+ }, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused, visibleViewLineIndices, problemsHighlightedRow, roundedSelection, unnecessaryDiagnostics, horizontalVisibleRanges, lines, tabSize, textDecorationDom, rtl, codeLensRows), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom(scrollBarHeight, scrollBarWidth, scrollBarLeft)];
25930
26088
  };
25931
26089
 
25932
26090
  const getGutterInfoVirtualDom = (gutterInfo, activeLineNumber) => {
@@ -26069,6 +26227,7 @@ const getEditorVirtualDom = ({
26069
26227
  breadcrumbFileIcon = '',
26070
26228
  breadcrumbsEnabled = false,
26071
26229
  breakPoints = [],
26230
+ codeLensRows,
26072
26231
  combineWhitespaceTokens: combineWhitespaceTokens$1 = false,
26073
26232
  cursorInfos = [],
26074
26233
  diagnostics: fallbackDiagnostics = [],
@@ -26152,6 +26311,9 @@ const getEditorVirtualDom = ({
26152
26311
  }, ...breadcrumbsDom, ...gutterDom, ...getEditorContentVirtualDom({
26153
26312
  bracketMatchInfos,
26154
26313
  breadcrumbsEnabled,
26314
+ ...(codeLensRows && {
26315
+ codeLensRows
26316
+ }),
26155
26317
  cursorInfos,
26156
26318
  diagnostics,
26157
26319
  differences,
@@ -26278,7 +26440,7 @@ const canRenderPlainTextAppend = (oldState, newState) => {
26278
26440
  if (oldState.initial || newState.initial || !oldState.focused || !newState.focused || oldState.uid !== newState.uid || oldTextInfos[0][1] !== newTextInfos[0][1] || oldState.cursorInfos.length !== 1 || newState.cursorInfos.length !== 1 || oldState.selectionInfos.length > 0 || newState.selectionInfos.length > 0 || oldState.selections.length !== 4 || newState.selections.length !== 4 || oldState.selections[0] !== 0 || oldState.selections[1] !== oldLine.length || oldState.selections[2] !== 0 || oldState.selections[3] !== oldLine.length || newState.selections[0] !== 0 || newState.selections[1] !== newLine.length || newState.selections[2] !== 0 || newState.selections[3] !== newLine.length) {
26279
26441
  return false;
26280
26442
  }
26281
- if (oldState.breadcrumbsEnabled || newState.breadcrumbsEnabled || oldState.minimapEnabled || newState.minimapEnabled || oldState.lineNumbers !== newState.lineNumbers || oldState.highlightActiveLineNumber !== newState.highlightActiveLineNumber || oldState.highlightedLine !== newState.highlightedLine || oldState.problemsHighlightedRow !== newState.problemsHighlightedRow || oldState.focused !== newState.focused || oldState.roundedSelection !== newState.roundedSelection || oldState.deltaX !== newState.deltaX || oldState.gutterWidth !== newState.gutterWidth || (newState.deltaX ?? 0) !== 0 && oldState.longestLineWidth !== newState.longestLineWidth || oldState.width !== newState.width || oldState.height !== newState.height || oldState.minimumSliderSize !== newState.minimumSliderSize || getScrollBarSize(getHorizontalScrollDimensions(oldState).width, oldState.longestLineWidth, oldState.minimumSliderSize) !== getScrollBarSize(getHorizontalScrollDimensions(newState).width, newState.longestLineWidth, newState.minimumSliderSize) || oldState.minLineY !== newState.minLineY || oldState.maxLineY !== newState.maxLineY || !sameValues(oldState.visibleLineIndices, newState.visibleLineIndices) || !sameValues(oldState.visibleViewLineIndices, newState.visibleViewLineIndices) || oldState.differences !== newState.differences && !sameValues(oldState.differences, newState.differences) || oldState.scrollBarHeight !== newState.scrollBarHeight || oldState.uri !== newState.uri || oldState.workspaceUri !== newState.workspaceUri || oldState.assetDir !== newState.assetDir || oldState.loadError !== newState.loadError || oldState.combineWhitespaceTokens !== newState.combineWhitespaceTokens || oldState.widgets?.length > 0 || newState.widgets?.length > 0 || oldState.mergeConflicts.length > 0 || newState.mergeConflicts.length > 0 || !isEmpty(oldState.diagnostics) || !isEmpty(newState.diagnostics) || !isEmpty(oldState.textDecorationDom) || !isEmpty(newState.textDecorationDom) || !isEmpty(oldState.visualDecorations) || !isEmpty(newState.visualDecorations) || !isEmpty(oldState.bracketMatchInfos) || !isEmpty(newState.bracketMatchInfos) || !isEmpty(oldState.endOfLineDecorations) || !isEmpty(newState.endOfLineDecorations) || !isEmpty(oldState.gutterDecorations) || !isEmpty(newState.gutterDecorations) || !isEmpty(oldState.breakPoints) || !isEmpty(newState.breakPoints)) {
26443
+ if (oldState.breadcrumbsEnabled || newState.breadcrumbsEnabled || oldState.minimapEnabled || newState.minimapEnabled || oldState.lineNumbers !== newState.lineNumbers || oldState.highlightActiveLineNumber !== newState.highlightActiveLineNumber || oldState.highlightedLine !== newState.highlightedLine || oldState.problemsHighlightedRow !== newState.problemsHighlightedRow || oldState.focused !== newState.focused || oldState.roundedSelection !== newState.roundedSelection || oldState.deltaX !== newState.deltaX || oldState.gutterWidth !== newState.gutterWidth || (newState.deltaX ?? 0) !== 0 && oldState.longestLineWidth !== newState.longestLineWidth || oldState.width !== newState.width || oldState.height !== newState.height || oldState.minimumSliderSize !== newState.minimumSliderSize || getScrollBarSize(getHorizontalScrollDimensions(oldState).width, oldState.longestLineWidth, oldState.minimumSliderSize) !== getScrollBarSize(getHorizontalScrollDimensions(newState).width, newState.longestLineWidth, newState.minimumSliderSize) || oldState.minLineY !== newState.minLineY || oldState.maxLineY !== newState.maxLineY || !sameValues(oldState.visibleLineIndices, newState.visibleLineIndices) || !sameValues(oldState.visibleViewLineIndices, newState.visibleViewLineIndices) || oldState.differences !== newState.differences && !sameValues(oldState.differences, newState.differences) || oldState.scrollBarHeight !== newState.scrollBarHeight || oldState.uri !== newState.uri || oldState.workspaceUri !== newState.workspaceUri || oldState.assetDir !== newState.assetDir || oldState.loadError !== newState.loadError || oldState.combineWhitespaceTokens !== newState.combineWhitespaceTokens || oldState.widgets?.length > 0 || newState.widgets?.length > 0 || Boolean(oldState.codeLensRows) || Boolean(newState.codeLensRows) || oldState.mergeConflicts.length > 0 || newState.mergeConflicts.length > 0 || !isEmpty(oldState.diagnostics) || !isEmpty(newState.diagnostics) || !isEmpty(oldState.textDecorationDom) || !isEmpty(newState.textDecorationDom) || !isEmpty(oldState.visualDecorations) || !isEmpty(newState.visualDecorations) || !isEmpty(oldState.bracketMatchInfos) || !isEmpty(newState.bracketMatchInfos) || !isEmpty(oldState.endOfLineDecorations) || !isEmpty(newState.endOfLineDecorations) || !isEmpty(oldState.gutterDecorations) || !isEmpty(newState.gutterDecorations) || !isEmpty(oldState.breakPoints) || !isEmpty(newState.breakPoints)) {
26282
26444
  return false;
26283
26445
  }
26284
26446
  return true;
@@ -27662,9 +27824,10 @@ const getHorizontalVirtualizationThreshold = value => {
27662
27824
  return Math.floor(threshold);
27663
27825
  };
27664
27826
  const getEditorPreferences = async applicationId => {
27665
- const [diagnosticsEnabled, fontFamily, fontSize, fontWeight, formatOnSave, formatActions, hoverEnabled, hoverDelay, horizontalVirtualizationThreshold, messageDelay, isAutoClosingBracketsEnabled$1, isAutoClosingQuotesEnabled$1, isAutoClosingTagsEnabled$1, isQuickSuggestionsEnabled$1, lineNumbers, highlightActiveLineNumber, rowHeight, tabSize, letterSpacing, completionTriggerCharacters, minimapEnabled, mergeConflictActionsEnabled, rtl, breadcrumbsEnabled, insertSpaces, dragAndDropEnabled, roundedSelection, combineWhitespaceTokens, selectedTextOccurrenceMatching, disableMonospaceOptimizations, syntaxHighlightingCacheEnabled] = await Promise.all([get$2('editor.diagnostics', applicationId), getFontFamily(applicationId), getFontSize(applicationId), getFontWeight(applicationId), get$2('editor.formatOnSave', applicationId), get$2('editor.formatActions', applicationId), get$2('editor.hover', applicationId), get$2('editor.hoverDelay', applicationId), get$2('editor.horizontalVirtualizationThreshold', applicationId), get$2('editor.messageDelay', applicationId), isAutoClosingBracketsEnabled(applicationId), isAutoClosingQuotesEnabled(applicationId), isAutoClosingTagsEnabled(), isQuickSuggestionsEnabled(applicationId), getLineNumbers(applicationId), getHighlightActiveLineNumber(applicationId), getRowHeight(applicationId), getTabSize(applicationId), getLetterSpacing(applicationId), getCompletionTriggerCharacters(), getMinimapEnabled(applicationId), getMergeConflictActionsEnabled(applicationId), get$2('editor.rtl', applicationId), get$2('breadcrumbs.enabled', applicationId), get$2('editor.insertSpaces', applicationId), get$2('editor.dragAndDrop', applicationId), get$2('editor.roundedSelection', applicationId), get$2('editor.combineWhitespaceTokens', applicationId), get$2('editor.selectedTextOccurrenceMatching', applicationId), get$2('editor.disableMonospaceOptimizations', applicationId), get$2('editor.syntaxHighlightingCache', applicationId)]);
27827
+ const [diagnosticsEnabled, fontFamily, fontSize, fontWeight, formatOnSave, formatActions, hoverEnabled, hoverDelay, horizontalVirtualizationThreshold, messageDelay, isAutoClosingBracketsEnabled$1, isAutoClosingQuotesEnabled$1, isAutoClosingTagsEnabled$1, isQuickSuggestionsEnabled$1, lineNumbers, highlightActiveLineNumber, rowHeight, tabSize, letterSpacing, completionTriggerCharacters, minimapEnabled, mergeConflictActionsEnabled, rtl, breadcrumbsEnabled, codeLensEnabled, insertSpaces, dragAndDropEnabled, roundedSelection, combineWhitespaceTokens, selectedTextOccurrenceMatching, disableMonospaceOptimizations, syntaxHighlightingCacheEnabled] = await Promise.all([get$2('editor.diagnostics', applicationId), getFontFamily(applicationId), getFontSize(applicationId), getFontWeight(applicationId), get$2('editor.formatOnSave', applicationId), get$2('editor.formatActions', applicationId), get$2('editor.hover', applicationId), get$2('editor.hoverDelay', applicationId), get$2('editor.horizontalVirtualizationThreshold', applicationId), get$2('editor.messageDelay', applicationId), isAutoClosingBracketsEnabled(applicationId), isAutoClosingQuotesEnabled(applicationId), isAutoClosingTagsEnabled(), isQuickSuggestionsEnabled(applicationId), getLineNumbers(applicationId), getHighlightActiveLineNumber(applicationId), getRowHeight(applicationId), getTabSize(applicationId), getLetterSpacing(applicationId), getCompletionTriggerCharacters(), getMinimapEnabled(applicationId), getMergeConflictActionsEnabled(applicationId), get$2('editor.rtl', applicationId), get$2('breadcrumbs.enabled', applicationId), get$2('editor.extensionCodeLens', applicationId), get$2('editor.insertSpaces', applicationId), get$2('editor.dragAndDrop', applicationId), get$2('editor.roundedSelection', applicationId), get$2('editor.combineWhitespaceTokens', applicationId), get$2('editor.selectedTextOccurrenceMatching', applicationId), get$2('editor.disableMonospaceOptimizations', applicationId), get$2('editor.syntaxHighlightingCache', applicationId)]);
27666
27828
  return {
27667
27829
  breadcrumbsEnabled: breadcrumbsEnabled ?? false,
27830
+ codeLensEnabled: codeLensEnabled === true,
27668
27831
  combineWhitespaceTokens: combineWhitespaceTokens ?? true,
27669
27832
  completionTriggerCharacters,
27670
27833
  diagnosticsEnabled: diagnosticsEnabled ?? false,
@@ -27798,6 +27961,20 @@ const applyTabCompletion = (editor, result) => {
27798
27961
  return editorSnippet(editor, result);
27799
27962
  };
27800
27963
 
27964
+ // State and undo history belong in this worker. Rendering reads changes separately.
27965
+ const wrapCommand = (fn, preservesTypingCoalescing = false) => {
27966
+ return wrapCommand$1(fn, preservesTypingCoalescing, false);
27967
+ };
27968
+ const wrapFocusCommand = fn => {
27969
+ return wrapFocusCommand$1(fn, false);
27970
+ };
27971
+ const wrapDeferredCommand = fn => {
27972
+ return wrapDeferredCommand$1(fn, false);
27973
+ };
27974
+ const wrapLatestCommand = fn => {
27975
+ return wrapLatestCommand$1(fn, false);
27976
+ };
27977
+
27801
27978
  const insertTab = editor => {
27802
27979
  return type(editor, getIndentString(editor));
27803
27980
  };
@@ -27844,6 +28021,27 @@ const handleTab = async editor => {
27844
28021
  return insertTab(editor);
27845
28022
  }
27846
28023
  };
28024
+ const createHandleTabCommand = () => {
28025
+ const handleTabFallback = wrapCommand(handleTab);
28026
+ const command = async uid => {
28027
+ // Deferred completion rendering can keep the editor's existing keyboard context.
28028
+ const editor = get$9(uid)?.newState;
28029
+ const widget = editor?.widgets.find(candidate => candidate.id === Completion);
28030
+ if (widget) {
28031
+ const hasItems = await invoke$4('Completions.hasItems', widget.newState.uid);
28032
+ if (!isCurrent$1(editor, get$9(uid)?.newState)) {
28033
+ return;
28034
+ }
28035
+ if (hasItems) {
28036
+ // Selecting a completion calls back into the editor's edit queue.
28037
+ await selectCurrent$1(uid);
28038
+ return;
28039
+ }
28040
+ }
28041
+ await handleTabFallback(uid);
28042
+ };
28043
+ return command;
28044
+ };
27847
28045
 
27848
28046
  const relaunchWorkers = async () => {
27849
28047
  await dispose();
@@ -28214,6 +28412,7 @@ const loadContent = async (state, savedState, largeFile = false, focus = true, f
28214
28412
  } = state;
28215
28413
  const {
28216
28414
  breadcrumbsEnabled,
28415
+ codeLensEnabled,
28217
28416
  combineWhitespaceTokens,
28218
28417
  completionTriggerCharacters,
28219
28418
  diagnosticsEnabled,
@@ -28255,6 +28454,7 @@ const loadContent = async (state, savedState, largeFile = false, focus = true, f
28255
28454
  ...state,
28256
28455
  breadcrumbsEnabled,
28257
28456
  charWidth,
28457
+ codeLensEnabled,
28258
28458
  combineWhitespaceTokens,
28259
28459
  completionTriggerCharacters,
28260
28460
  diagnosticsEnabled,
@@ -28529,10 +28729,10 @@ const renderLines = {
28529
28729
  visibleLineIndices,
28530
28730
  visibleViewLineIndices
28531
28731
  } = newState;
28532
- const dom = getEditorRowsVirtualDom$1(textInfos, differences, true, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, newState.problemsHighlightedRow, diagnostics || [], newState.deltaX, newState.width, newState.charWidth, newState.tabSize, newState.lines, newState.horizontalVirtualizationThreshold, newState.horizontalVisibleRanges, newState.rtl);
28732
+ const dom = getEditorRowsVirtualDom$1(textInfos, differences, true, highlightedLine, visibleLineIndices, endOfLineDecorations, visibleViewLineIndices, newState.problemsHighlightedRow, diagnostics || [], newState.deltaX, newState.width, newState.charWidth, newState.tabSize, newState.lines, newState.horizontalVirtualizationThreshold, newState.horizontalVisibleRanges, newState.rtl, newState.codeLensRows);
28533
28733
  return [/* method */'setText', dom];
28534
28734
  },
28535
- isEqual: (oldState, newState) => oldState.lines === newState.lines && oldState.foldingRanges === newState.foldingRanges && oldState.visibleViewLineIndices === newState.visibleViewLineIndices && oldState.tokenizerId === newState.tokenizerId && oldState.minLineY === newState.minLineY && oldState.decorations === newState.decorations && oldState.embeds === newState.embeds && oldState.endOfLineDecorations === newState.endOfLineDecorations && oldState.diagnostics === newState.diagnostics && oldState.deltaX === newState.deltaX && oldState.charWidth === newState.charWidth && oldState.tabSize === newState.tabSize && oldState.rtl === newState.rtl && oldState.gutterWidth === newState.gutterWidth && oldState.horizontalVirtualizationThreshold === newState.horizontalVirtualizationThreshold && oldState.fontFamily === newState.fontFamily && oldState.fontSize === newState.fontSize && oldState.fontWeight === newState.fontWeight && oldState.letterSpacing === newState.letterSpacing && oldState.isMonospaceFont === newState.isMonospaceFont && oldState.width === newState.width && oldState.highlightedLine === newState.highlightedLine && oldState.problemsHighlightedRow === newState.problemsHighlightedRow && oldState.debugEnabled === newState.debugEnabled
28735
+ isEqual: (oldState, newState) => oldState.lines === newState.lines && oldState.codeLensRows === newState.codeLensRows && oldState.foldingRanges === newState.foldingRanges && oldState.visibleViewLineIndices === newState.visibleViewLineIndices && oldState.tokenizerId === newState.tokenizerId && oldState.minLineY === newState.minLineY && oldState.decorations === newState.decorations && oldState.embeds === newState.embeds && oldState.endOfLineDecorations === newState.endOfLineDecorations && oldState.diagnostics === newState.diagnostics && oldState.deltaX === newState.deltaX && oldState.charWidth === newState.charWidth && oldState.tabSize === newState.tabSize && oldState.rtl === newState.rtl && oldState.gutterWidth === newState.gutterWidth && oldState.horizontalVirtualizationThreshold === newState.horizontalVirtualizationThreshold && oldState.fontFamily === newState.fontFamily && oldState.fontSize === newState.fontSize && oldState.fontWeight === newState.fontWeight && oldState.letterSpacing === newState.letterSpacing && oldState.isMonospaceFont === newState.isMonospaceFont && oldState.width === newState.width && oldState.highlightedLine === newState.highlightedLine && oldState.problemsHighlightedRow === newState.problemsHighlightedRow && oldState.debugEnabled === newState.debugEnabled
28536
28736
  };
28537
28737
  const renderSelections = {
28538
28738
  apply: (oldState, newState) => {
@@ -28633,6 +28833,15 @@ const renderEditor = async id => {
28633
28833
 
28634
28834
  const renderEventListeners = () => {
28635
28835
  return [{
28836
+ name: HandleCodeLensClick,
28837
+ params: ['activateCodeLens', 'event.target.dataset.rowIndex', 'event.target.dataset.action'],
28838
+ preventDefault: true,
28839
+ stopPropagation: true
28840
+ }, {
28841
+ name: HandleCodeLensPointerDown,
28842
+ params: [],
28843
+ stopPropagation: true
28844
+ }, {
28636
28845
  name: HandleHoverMouseDown,
28637
28846
  params: [],
28638
28847
  stopPropagation: true
@@ -28963,20 +29172,6 @@ const updateDebugInfo = async debugId => {
28963
29172
  await invoke$e('Editor.rerender', key);
28964
29173
  };
28965
29174
 
28966
- // State and undo history belong in this worker. Rendering reads changes separately.
28967
- const wrapCommand = (fn, preservesTypingCoalescing = false) => {
28968
- return wrapCommand$1(fn, preservesTypingCoalescing, false);
28969
- };
28970
- const wrapFocusCommand = fn => {
28971
- return wrapFocusCommand$1(fn, false);
28972
- };
28973
- const wrapDeferredCommand = fn => {
28974
- return wrapDeferredCommand$1(fn, false);
28975
- };
28976
- const wrapLatestCommand = fn => {
28977
- return wrapLatestCommand$1(fn, false);
28978
- };
28979
-
28980
29175
  const handleMouseDownAndRender = (uid, ...args) => {
28981
29176
  return executeAndRender(commandMap['Editor.handleMouseDown'], uid, args);
28982
29177
  };
@@ -29032,6 +29227,7 @@ const commandMap = {
29032
29227
  'CodeGenerator.accept': codeGeneratorAccept,
29033
29228
  'ColorPicker.loadContent': loadContent$3,
29034
29229
  'Editor.acceptMergeConflict': wrapCommand(acceptMergeConflict),
29230
+ 'Editor.activateCodeLens': wrapCommand(activateCodeLens),
29035
29231
  'Editor.addCursorAbove': wrapCommand(addCursorAbove),
29036
29232
  'Editor.addCursorBelow': wrapCommand(addCursorBelow),
29037
29233
  'Editor.applyDocumentEdits': wrapCommand(applyDocumentEdits$1),
@@ -29160,7 +29356,7 @@ const commandMap = {
29160
29356
  'Editor.handleSettingsChanged': wrapCommand(handleSettingsChanged),
29161
29357
  'Editor.handleSingleClick': wrapCommand(handleSingleClick),
29162
29358
  'Editor.handleSourceActionClick': selectItem,
29163
- 'Editor.handleTab': wrapCommand(handleTab),
29359
+ 'Editor.handleTab': createHandleTabCommand(),
29164
29360
  'Editor.handleTouchEnd': wrapCommand(handleTouchEnd),
29165
29361
  'Editor.handleTouchMove': wrapCommand(handleTouchMove),
29166
29362
  'Editor.handleTouchStart': wrapCommand(handleTouchStart),
@@ -158,6 +158,14 @@
158
158
  "type": "enum",
159
159
  "value": "on"
160
160
  },
161
+ {
162
+ "category": "text-editor",
163
+ "description": "Show information and actions above lines, including dependency version hints from Version Lens",
164
+ "heading": "Extension Code Lens",
165
+ "id": "editor.extensionCodeLens",
166
+ "type": "boolean",
167
+ "value": false
168
+ },
161
169
  {
162
170
  "category": "text-editor",
163
171
  "description": "Controls whether actions for accepting merge conflict changes are shown in the editor",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "19.79.3",
3
+ "version": "19.80.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"