@urth/metatell-sdk - v0.1.0
    Preparing search index...

    Function parseMentions

    • Parse @mentions out of chat message text.

      Mentions are encoded as [@display](sessionId).

      Parameters

      • text: string

        The raw message text.

      Returns Mention[]

      The mentions found, with their display text and character offsets.

      import { parseMentions } from "@urth/metatell-sdk/chat";

      parseMentions("hi [@Alice](a1b2c3d4)"); // [{ sessionId, display, start, end }]