Member Junction
    Preparing search index...

    A toast with an image (or icon), a bold title and a line of detail — see MJNotificationService.CreateRichNotification.

    interface MJRichNotificationOptions {
        context?: MJNotificationContext;
        dedupeKey?: string;
        dedupeWindowMs?: number;
        deferMs?: number;
        hideAfter?: number;
        iconClass?: string | null;
        imageUrl?: string | null;
        message?: string | null;
        onClick?: () => void;
        title: string;
    }
    Index

    Properties

    Handed to MJNotificationService.CompletionImageUrlResolver, whose answer wins over imageUrl.

    dedupeKey?: string

    Toasts sharing a key within dedupeWindowMs collapse into ONE. A toast already on screen wins — a later call with the same key only keeps it up longer, so the wording never changes under the reader's eyes. A toast still waiting on deferMs is replaced by the later call and shown at once. An agent run's completion is announced twice — by the server's Agent Completion notification and by the client that ran it — and the reader should hear it once, in one wording.

    dedupeWindowMs?: number

    Default 3 000 — wide enough to fold the two announcements of one completion (the deferred server notification and the client's, tens of ms apart), narrow enough that a different agent finishing seconds later in the same conversation is announced on its own.

    deferMs?: number

    Hold the toast this long before showing it, giving a better-worded announcement with the same dedupeKey the chance to take its place. The server's completion notification uses this: the client that ran the agent announces the same completion a few ms later with the agent's name and the conversation's, and that is the one to show.

    hideAfter?: number

    Auto-hide in ms; omit for a sticky toast with a close button.

    iconClass?: string | null

    Font Awesome class used when there is no image, e.g. "fa-solid fa-robot".

    imageUrl?: string | null

    Image at the left — an agent's avatar. Wins over iconClass.

    message?: string | null

    Second line, e.g. "in General Discussion".

    onClick?: () => void

    Runs when the toast body is clicked, e.g. open the conversation.

    title: string

    Bold first line, e.g. "Sage finished".