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

40 lines (37 loc) 1.08 kB
import { ChatSession, ChatMessage } from '../shared/types.js'; interface SessionState { session: ChatSession; messages: ChatMessage[]; isActive: boolean; lastAccessedAt: string; messageCount: number; metadata: SessionMetadata; } interface SessionMetadata { providers: string[]; models: string[]; totalTokensUsed?: number; averageResponseTime?: number; lastModel?: string; lastProvider?: string; tags?: string[]; customData?: Record<string, any>; } interface SessionRestoreOptions { includeMessages?: boolean; messageLimit?: number; fromDate?: string; toDate?: string; } interface SessionHistoryEntry { timestamp: string; action: 'created' | 'updated' | 'message_added' | 'title_changed' | 'accessed'; details: string; metadata?: Record<string, any>; } interface SessionPersistenceOptions { autoSave?: boolean; saveInterval?: number; maxHistoryEntries?: number; } export type { SessionHistoryEntry, SessionMetadata, SessionPersistenceOptions, SessionRestoreOptions, SessionState };