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.35 kB
import { ListSessionsOptions, SessionDisplayInfo, DeleteSessionOptions, ExportSessionsOptions, SessionStats, SessionSelectionResult } from '../../cli/commands/chat/types.js'; import { DatabaseManager } from '../database/manager.js'; import { ChatSession, ChatMessage, HistoryStats } from '../shared/types.js'; interface SessionCreationOptions { title?: string; generateTitle?: boolean; type?: 'ask' | 'chat'; } declare class SessionManager { #private; constructor(databaseManager?: DatabaseManager); createSession(profile: string, options?: SessionCreationOptions): Promise<string>; getSession(sessionId: string, profile?: string): Promise<ChatSession>; listSessions(options?: ListSessionsOptions): Promise<SessionDisplayInfo[]>; deleteSession(sessionId: string, options?: DeleteSessionOptions): Promise<boolean>; updateSessionTitle(sessionId: string, title: string, profile?: string): Promise<boolean>; exportSessions(_format: 'json' | 'markdown', options?: Omit<ExportSessionsOptions, 'format'>): Promise<{ sessions: ChatSession[]; messages: Record<string, ChatMessage[]>; stats: HistoryStats; }>; getSessionStats(profile?: string): Promise<SessionStats>; selectSession(): Promise<SessionSelectionResult>; } export { type SessionCreationOptions, SessionManager };