UNPKG

rawi

Version:

Rawi (راوي) is the developer-friendly AI CLI that brings the power of 11 major AI providers directly to your terminal. With seamless shell integration, persistent conversations, and 200+ specialized prompt templates, Rawi transforms your command line into

28 lines (25 loc) 1.46 kB
import { ChatSession, ChatHistoryOptions, ChatMessage, HistoryStats } from '../shared/types.js'; declare class DatabaseManager { #private; constructor(); createSession(profile: string, title?: string, type?: 'ask' | 'chat' | 'exec'): Promise<string>; getSession(sessionId: string): Promise<ChatSession | null>; getSessions(options?: ChatHistoryOptions): Promise<ChatSession[]>; deleteSession(sessionId: string): Promise<boolean>; updateSessionTitle(sessionId: string, title: string): Promise<boolean>; addMessage(sessionId: string, role: 'user' | 'assistant' | 'system', content: string, provider: string, model: string, temperature?: number, maxTokens?: number, metadata?: any): Promise<string>; getMessages(sessionId: string, limit?: number): Promise<ChatMessage[]>; searchMessages(options?: ChatHistoryOptions): Promise<ChatMessage[]>; getStats(profile?: string): Promise<HistoryStats>; close(): Promise<void>; getCurrentSession(profile: string, type?: 'ask' | 'chat' | 'exec'): Promise<string>; deleteOldSessions(profile: string, days: number): Promise<number>; vacuum(): Promise<void>; exportChatHistory(options?: ChatHistoryOptions): Promise<{ sessions: ChatSession[]; messages: Record<string, ChatMessage[]>; stats: HistoryStats; }>; createEmergencySession(profile: string, type?: 'ask' | 'chat' | 'exec'): Promise<string>; } export { DatabaseManager };