Files
SillyTavern/public/css
Wolfsblvt 9f4449973b Macros 2.0 - Optional scoped content + improved closing-tag autocomplete (#5117)
* feat(macros): Add optional scope detection and improved closing tag autocomplete

- Implement `isScopeOptional()` to detect when scoped content is optional based on macro argument requirements
- Filter optional scopes from autocomplete hints unless force-triggered (Ctrl+Space)
- Add "OPTIONAL" badge styling for optional scoped content in autocomplete UI
- Show multiple closing tag suggestions (innermost to outermost) with priority ordering
- Display nesting level information for nested optional scopes

* fix(autocomplete): show original macro details when typing closing tags

Add nameOffset=2 to MacroClosingTagAutoCompleteOption to skip {{ prefix for fuzzy highlighting. When typing closing tags ({{/macroName}}), detect and show the original macro's details instead of "no match" error by looking up the macro definition and creating a non-selectable context option with no argument highlighting.
2026-02-08 02:25:21 +02:00
..
2024-04-10 00:01:03 +03:00
2023-07-20 20:32:15 +03:00
2023-07-20 20:32:15 +03:00
2025-05-24 18:59:15 +03:00
2023-07-20 20:32:15 +03:00
2025-05-24 18:59:15 +03:00
2025-06-11 21:26:19 +03:00
2023-07-20 20:32:15 +03:00
2023-07-20 20:32:15 +03:00