import { ProgressEvent } from "../core/progress.js"; import { ModelInfo } from "../core/progress_log.js"; /** * Renders load progress on a terminal using the shared normalized load-log * format (core/progress_log.ts) — the same text rendition Share mirrors to * the browser console, so a pasted CLI run and a pasted browser log read * identically. Format spec: Share design/new/load-log-format.md. * * Writes to stderr so stdout stays clean for data output. On a TTY the * current stage's line repaints in place and freezes (newline) when the * stage completes; when redirected (CI logs) it prints the live line at * most once per nonTtyIntervalMs plus every frozen stage line. */ export declare class CliProgressRenderer { private readonly out; private readonly nonTtyIntervalMs; private readonly log; private lastLineLength; private lastPrintTime; /** * Construct this against an output stream. * * @param out The stream to render to (default stderr). * @param nonTtyIntervalMs Minimum ms between live lines when not a TTY. */ constructor(out?: NodeJS.WriteStream, nonTtyIntervalMs?: number); /** * Print the early model line (from header info). * * @param info The model header info. */ onModelInfo(info: ModelInfo): void; /** * Progress callback — bound as an arrow so it can be handed directly to a * ProgressTracker / ModelLoadOptions.onProgress. * * @param event The progress event to render. */ readonly onProgress: (event: ProgressEvent) => void; /** * Finish rendering: freeze any running stage's line and print the * separate before/after Total line. * * @param atElapsedMs Optional load-end elapsed ms, so the final stage's * duration covers the time until the load finished (not just until its * last progress event). * @param atMemoryMb Optional load-end heap MB. */ done(atElapsedMs?: number, atMemoryMb?: number): void; /** * Print a line permanently, replacing any animated line on a TTY. * * @param line The line to freeze. */ private freezeLine; } //# sourceMappingURL=cli_progress_renderer.d.ts.map