import { ChatEntry } from "../agent/grok-agent.js"; export interface SessionState { session: string; persona: string; personaColor: string; mood: string; moodColor: string; activeTask: string; activeTaskAction: string; activeTaskColor: string; cwd: string; contextCurrent: number; contextMax: number; } /** * Manages chat history persistence to ~/.grok/chat-history.json or custom path */ export declare class ChatHistoryManager { private static instance; private static customHistoryFilePath; private historyFilePath; private constructor(); /** * Set a custom history file path (must be called before getInstance) */ static setCustomHistoryPath(filePath: string): void; static getInstance(): ChatHistoryManager; /** * Get the context file path (main history JSON file) */ getContextFilePath(): string; private ensureHistoryDirExists; /** * Load chat history from file */ loadHistory(): ChatEntry[]; /** * Save chat history to file */ saveHistory(history: ChatEntry[]): void; /** * Save raw messages log to file (OpenAI format messages) */ saveMessages(messages: any[]): void; /** * Create a backup of all session files (history, messages, state, debug log) */ backupHistory(): string | null; /** * Clear all session files (history, messages, state, debug log) with automatic backup */ clearHistory(): void; /** * Save session state (persona, mood, task, cwd) to file */ saveSessionState(state: SessionState): void; /** * Load session state from file */ loadSessionState(): SessionState | null; /** * Get the debug log file path based on the context file */ getDebugLogPath(): string; /** * Static method to get debug log path (for use before agent is created) */ static getDebugLogPath(): string; }