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.78 kB
text/typescript
import { SessionDisplayInfo, SessionStats } from '../../cli/commands/chat/types.cjs';
import { ChatSession } from '../shared/types.cjs';
declare namespace SessionFormatUtils {
function formatSessionTable(sessions: ChatSession[]): string;
function formatSessionJSON(sessions: ChatSession[]): string;
function formatSessionSummary(sessions: ChatSession[]): string;
function toDisplayInfo(session: ChatSession): SessionDisplayInfo;
function formatSessionStats(stats: SessionStats): string;
}
declare namespace SessionSearchUtils {
function filterSessions(sessions: ChatSession[], query: string): ChatSession[];
function filterByDateRange(sessions: ChatSession[], fromDate?: string, toDate?: string): ChatSession[];
function filterByProfile(sessions: ChatSession[], profile: string): ChatSession[];
function sortSessions(sessions: ChatSession[], sortBy?: 'createdAt' | 'updatedAt' | 'title' | 'messageCount', order?: 'asc' | 'desc'): ChatSession[];
function paginateSessions(sessions: ChatSession[], page?: number, limit?: number): {
sessions: ChatSession[];
pagination: {
page: number;
limit: number;
total: number;
totalPages: number;
hasNext: boolean;
hasPrev: boolean;
};
};
}
declare namespace SessionValidationUtils {
function isValidSessionId(sessionId: string): boolean;
function isValidSessionTitle(title: string): boolean;
function isValidProfile(profile: string): boolean;
function sanitizeTitle(title: string): string;
function validateSession(session: Partial<ChatSession>): {
isValid: boolean;
errors: string[];
};
}
export { SessionFormatUtils, SessionSearchUtils, SessionValidationUtils };