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 suggestion.insert, restores focus, and places
the caret right after the inserted text.
Controlled field +
{{path}}(and, on opted-in fields, legacy$var) autocomplete popover.