/** * CatuiLoader - Custom loader with rotating diamond animation * Uses ◆◇◈ symbols for a smooth loading indicator * Supports stalled animation (color transition to red) and tips display */ /** * [WHO]: CatuiLoader * [FROM]: Depends on @catui/tui * [TO]: Consumed by modes/interactive/components/index.ts * [HERE]: modes/interactive/components/catui-loader.ts - */ import { Container, type TUI } from "@catui/tui"; import type { Theme } from "../theme/theme.js"; export declare class CatuiLoader extends Container { private tui; private theme; private message; private suffix; private interval; private tipTimeout; private tipInterval; private currentFrame; private textComponent; private tipComponent; private isStopped; private readonly startTime; private lastTokenTime; private sessionId; private readonly STALL_THRESHOLD_MS; private readonly frames; constructor(tui: TUI, theme: Theme, message: string, sessionId?: string); private getRandomTip; private startTipRotation; private startAnimation; /** * Get spinner color based on stall duration. * Normal: accent color * After STALL_THRESHOLD_MS: interpolates toward error red */ private getSpinnerColor; /** * Get how long since last token/output (for stalled animation). */ private getStallDuration; /** * Call this when new output arrives to reset the stall timer. */ resetStallTimer(): void; setMessage(message: string, options?: { resetStallTimer?: boolean; suffix?: string; }): void; setSessionId(sessionId: string): void; stop(): void; dispose(): void; }