giga-code
Version:
A personal AI CLI assistant powered by Grok for local development.
36 lines (35 loc) • 1.18 kB
TypeScript
import { ChatEntry } from '../agent/giga-agent';
export interface SavedConversation {
id: string;
title: string;
messages: ChatEntry[];
createdAt: Date;
updatedAt: Date;
model: string;
messageCount: number;
}
export interface ConversationSummary {
id: string;
title: string;
createdAt: Date;
updatedAt: Date;
model: string;
messageCount: number;
preview: string;
}
export declare class ConversationManager {
private static instance;
private conversationsDir;
private constructor();
static getInstance(): ConversationManager;
private ensureConversationsDir;
private generateConversationId;
private getConversationPath;
generateTitle(messages: ChatEntry[]): Promise<string>;
saveConversation(messages: ChatEntry[], model: string, existingId?: string): Promise<string>;
loadConversation(id: string): Promise<SavedConversation | null>;
listConversations(): Promise<ConversationSummary[]>;
getMostRecentConversation(): Promise<SavedConversation | null>;
deleteConversation(id: string): Promise<boolean>;
searchConversations(query: string): Promise<ConversationSummary[]>;
}