featherbit UI
    Preparing search index...

    Function useTemplateToken

    • Detects an in-progress {{path (and, when legacyDollar, $name/${name) token at the caret, filters suggestions against it (trigger + mode + substring), and exposes keyboard navigation + insertion.

      Parameters

      Returns TemplateTokenState

      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.