mlx-bun library API
    Preparing search index...

    What a source can see of the sequence so far.

    interface TokenView {
        budget: number;
        length: number;
        tail(n: number): readonly number[];
    }
    Index
    budget: number

    Tokens the caller may still emit (max_tokens − generated).

    length: number

    Tokens seen: prompt + everything emitted (injected tokens included).

    • The last n ids, oldest first. Shorter near the start of a request, and bounded by the session's retained window — a source that needs more history keeps its own copy (see observe()).

      Parameters

      • n: number

      Returns readonly number[]