Token detection re-runs on every change and every selection
change (mouse click, arrow keys) against value.slice(0, selectionStart),
per the behavior contract in task-5-brief.md. Insertion replaces the
matched token span with the suggestion's insert text, restores focus, and
places the caret right after the inserted text.
Detects an in-progress
{{path(and, whenlegacyDollar,$name/${name) token at the caret, filterssuggestionsagainst it (trigger + mode + substring), and exposes keyboard navigation + insertion.