@masterteam/components 0.0.167 → 0.0.169

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.
@@ -1627,13 +1627,10 @@ class FormulaEditorCode {
1627
1627
  return {
1628
1628
  suggestions: (response.suggestions ?? []).map((suggestion, index) => {
1629
1629
  const normalizedSuggestion = normalizeAutocompleteSuggestion(suggestion, response.context);
1630
- const label = normalizedSuggestion.description?.trim() ||
1631
- normalizedSuggestion.displayText ||
1630
+ const label = normalizedSuggestion.displayText?.trim() ||
1632
1631
  normalizedSuggestion.text;
1633
- const detail = normalizedSuggestion.displayText &&
1634
- normalizedSuggestion.displayText !== label
1635
- ? normalizedSuggestion.displayText
1636
- : normalizedSuggestion.category;
1632
+ const description = normalizedSuggestion.description?.trim() || '';
1633
+ const detail = description || normalizedSuggestion.category || '';
1637
1634
  const insertText = normalizedSuggestion.insertText ??
1638
1635
  normalizedSuggestion.text;
1639
1636
  const { text, rule } = this.applyCursorOffset(insertText, normalizedSuggestion.cursorOffset ?? 0);
@@ -1643,6 +1640,9 @@ class FormulaEditorCode {
1643
1640
  insertText: text,
1644
1641
  insertTextRules: rule,
1645
1642
  detail,
1643
+ documentation: description
1644
+ ? { value: description }
1645
+ : undefined,
1646
1646
  range: this.getCompletionRanges(model, position, normalizedSuggestion),
1647
1647
  sortText: String(index).padStart(4, '0'),
1648
1648
  filterText: buildCompletionFilterText(normalizedSuggestion),