/** * Interactive TUI - Terminal User Interface for CLI * Minimal but functional interactive mode with readline */ import { SlashCommandContext } from './slash-commands'; import { CostTracker } from './cost-tracker'; export interface TUIConfig { prompt?: string; welcomeMessage?: string; historyFile?: string; maxHistorySize?: number; onMessage?: (message: string) => Promise; onExit?: () => void; } export interface TUIState { running: boolean; history: string[]; context: SlashCommandContext; } /** * Interactive TUI class */ export declare class InteractiveTUI { private config; private state; private slashHandler; private costTracker; private readline; private rl; constructor(config?: TUIConfig); /** * Start the interactive session */ start(): Promise; /** * Stop the interactive session */ stop(): void; /** * Main input loop */ private inputLoop; /** * Prompt for input */ private prompt; /** * Output a message */ private output; /** * Add input to history */ private addToHistory; /** * Load history from file */ private loadHistory; /** * Save history to file */ private saveHistory; /** * Get current state */ getState(): TUIState; /** * Get cost tracker */ getCostTracker(): CostTracker; /** * Update context */ updateContext(updates: Partial): void; } /** * Create an interactive TUI instance */ export declare function createInteractiveTUI(config?: TUIConfig): InteractiveTUI; /** * Simple status display helper */ export declare class StatusDisplay { private lines; add(label: string, value: string | number): this; addSeparator(): this; addHeader(text: string): this; toString(): string; print(): void; clear(): void; } /** * Create a status display */ export declare function createStatusDisplay(): StatusDisplay; /** * History manager for persistent command history */ export declare class HistoryManager { private history; private maxSize; private filePath?; constructor(maxSize?: number, filePath?: string); add(entry: string): void; getAll(): string[]; search(query: string): string[]; load(): Promise; save(): Promise; clear(): void; } /** * Create a history manager */ export declare function createHistoryManager(maxSize?: number, filePath?: string): HistoryManager;