export declare const SMOOTH_STREAMING_COMMIT_INTERVAL_MS = 16; export declare const SMOOTH_STREAMING_LONG_TEXT_THRESHOLD_GRAPHEMES = 640; export declare const SMOOTH_STREAMING_LONG_TEXT_TAIL_GRAPHEMES = 180; /** * Split `text` into grapheme clusters. * * Results are cached: when `text` is an append of a previously segmented * string, only the appended suffix is segmented (plus a small overlap) and * merged with the cached result, making this O(delta) instead of O(n) per * call. * * When the new text is not a prefix-extension of the cache (e.g. a full reset * or non-append change) we fall back to full segmentation and reset the cache. */ export declare function splitStreamingTextGraphemes(text: string): string[]; /** * Reset the incremental segmentation cache. Call this when switching to a * new message so the cache from the previous message isn't carried over. * (Not strictly necessary for correctness — the cache is keyed on content — * but avoids holding a reference to the last message's text string.) */ export declare function resetSegmenterCache(): void; export declare function initialSmoothStreamingGraphemeCount(graphemes: readonly string[]): number; export declare function smoothStreamingRevealCount({ backlog, elapsedMs, inputDone, }: { backlog: number; elapsedMs: number; inputDone?: boolean; }): number; export declare function smoothStreamingPunctuationDelayMs(grapheme: string | undefined, backlog: number): number; //# sourceMappingURL=streaming-text-smoothing.d.ts.map