/** * Terminal title manager with animated working indicator. * * Provides a centralized controller for terminal window/tab titles. * - Static title: "Jensen - " * - Working title: " Jensen - " with animated braille spinner * * The spinner is active during agent work cycles and stops when the agent * is idle, waiting for user input, cancelled, or errored. */ /** * Minimal terminal interface for title operations. * Accepts any object with a setTitle method. */ export interface TitleTerminal { setTitle(title: string): void; } /** * Manages the terminal window/tab title with optional animated spinner. * * Thread-safe and idempotent: * - Multiple setWorking(true) calls create at most one animation interval * - setWorking(false) is safe to call repeatedly * - dispose() cleans up all timers and prevents further writes * - Graceful no-op when stdout is not a TTY */ export declare class TerminalTitle { private workspaceName; private terminal; private spinnerIndex; private spinnerInterval; private isWorking; private isDisposed; private isTty; constructor(terminal: TitleTerminal, workspaceName: string); /** * Set the initial static title. * Safe to call multiple times — overwrites the workspace name and resets to static title. * If a spinner is active, it is stopped first. */ initialize(workspaceName: string): void; /** * Enable or disable the animated spinner. * When active, the title cycles through spinner frames. * When inactive, reverts to the static title. */ setWorking(active: boolean): void; /** * Stop the spinner and prevent any further title writes. * Safe to call multiple times. */ dispose(): void; /** * Immediately write the static title to the terminal. */ private writeStatic; /** * Write the current spinner frame to the terminal title. */ private writeSpinnerFrame; /** * Write a title to the terminal using OSC sequence. */ private writeTitle; private startSpinner; private stopSpinner; } //# sourceMappingURL=terminal-title.d.ts.map