import { ChatSession, ChatMessage } from '../types/index.js';
declare class ChatService {
    private sessions;
    constructor();
    private loadSessions;
    private saveSessions;
    createSession(model: string, title?: string, userId?: string, personaId?: string): Promise<ChatSession>;
    getSession(sessionId: string, userId?: string): ChatSession | undefined;
    getAllSessions(userId?: string): ChatSession[];
    updateSession(sessionId: string, updates: Partial<ChatSession>, userId?: string): Promise<ChatSession | undefined>;
    addMessage(sessionId: string, message: Omit<ChatMessage, 'id' | 'timestamp'> & {
        id?: string;
    }, userId?: string): ChatMessage | undefined;
    updateMessage(sessionId: string, messageId: string, updates: Partial<ChatMessage>, userId?: string): ChatMessage | undefined;
    deleteSession(sessionId: string, userId?: string): boolean;
    clearAllSessions(userId?: string): void;
    private generateTitle;
    getMessagesForContext(sessionId: string, maxMessages?: number): ChatMessage[];
    private updateSystemMessageForPersona;
    private updateSystemMessageToDefault;
    private replaceSystemMessage;
    /**
     * Process advanced persona interactions: memory storage, retrieval, and mutations
     */
    private processAdvancedPersonaInteraction;
    /**
     * Update system message to include relevant memories
     */
    private updateSystemMessageWithMemories;
    /**
     * Process advanced persona response - store AI responses as memories for future reference
     */
    private processAdvancedPersonaResponse;
    /**
     * Create a new branch for a message (used for regeneration)
     * This marks the original message as inactive and creates a new active variant
     */
    createMessageBranch(sessionId: string, originalMessageId: string, newMessage: Omit<ChatMessage, 'id' | 'timestamp'> & {
        id?: string;
    }, userId?: string): ChatMessage | undefined;
    /**
     * Switch to a different branch of a message
     */
    switchMessageBranch(sessionId: string, messageId: string, targetBranchIndex: number, userId?: string): ChatMessage | undefined;
    /**
     * Get all branches for a message
     */
    getMessageBranches(sessionId: string, messageId: string, userId?: string): ChatMessage[];
}
declare const _default: ChatService;
export default _default;
//# sourceMappingURL=chatService.d.ts.map