@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Interface StreamOptions

    Options of ctx.stream() / streamText.

    interface StreamOptions {
        strategy?: "auto" | StreamStrategy;
        throttleMs?: number;
        signal?: AbortSignal;
        onCancel?: "flush" | "discard";
        maxLength?: number;
        minChunkChars?: number;
        maxChunkChars?: number;
        typing?: boolean;
        typingIntervalMs?: number;
        cursor?: string;
        canStop?: boolean;
        keepOnStop?: boolean;
        sendOptions?: SendOptions;
        draftPlatformData?: Record<string, unknown>;
    }
    Index
    strategy?: "auto" | StreamStrategy

    'auto' (default) picks from capabilities.streaming; an unsupported choice degrades.

    throttleMs?: number

    Minimum ms between two live updates (draft/edit). Default 400 (draft), 1000 (edit).

    signal?: AbortSignal

    Abort the stream: reading stops and the source's return() is called.

    onCancel?: "flush" | "discard"

    What to do with the text produced so far on cancellation. Default 'flush' (send it). 'discard' sends nothing more and removes the live preview: a draft simply expires and, with the edit strategy, the message being edited is deleted (when the transport can delete; otherwise only its cursor is removed). Messages already completed before the cancel stay.

    maxLength?: number

    Max chars per message. Default capabilities.maxTextLength, else 4096 (capabilities.maxTextBytes also applies).

    minChunkChars?: number

    'chunk': minimum chars before a chunk is sent at a sentence boundary. Default 160.

    maxChunkChars?: number

    'chunk': hard size of a chunk with no sentence boundary. Default min(maxLength, 1500).

    typing?: boolean

    Show typing while waiting (chunk/buffer, and edit before its first message). Default true.

    typingIntervalMs?: number

    Interval (ms) to refresh the typing indicator. Default 8000.

    cursor?: string

    Suffix shown on in-progress drafts/edits (e.g. ' ▌'). Never in the final text. Default ''.

    canStop?: boolean

    Draft: show a stop button (Telegram can_stop). Default false.

    keepOnStop?: boolean

    Draft: keep the draft visible when the user stops it (Telegram keep_on_stop).

    sendOptions?: SendOptions

    Options for the FIRST message sent (e.g. { quoted: ctx.ref }).

    draftPlatformData?: Record<string, unknown>

    Transport passthrough for draft calls (e.g. Telegram message_thread_id).