import { PptxAiChatStore, PptxAiStoredChat } from 'pptx-viewer-shared/ai'; /** One tool invocation captured with its full technical detail. */ export interface AiLogToolCall { toolName: string; toolCallId: string; state: string; input: unknown; output: unknown; errorText?: string; } /** One message: its role, concatenated prose, and any tool calls it made. */ export interface AiLogMessage { role: string; text: string; toolCalls: AiLogToolCall[]; } /** One chat conversation in export form. */ export interface AiLogChat { id: string; title: string; deckId?: string; createdAt: number; updatedAt: number; createdAtIso: string; updatedAtIso: string; messageCount: number; messages: AiLogMessage[]; } /** Top-level detailed export document. */ export interface AiLogExport { format: 'pptx-ai-chat-log'; version: 1; exportedAt: string; detailed: boolean; chatCount: number; chats: AiLogChat[]; } /** Options controlling how the export document is built. */ export interface BuildChatLogOptions { /** Include tool-call inputs/outputs. Default `true`. */ detailed?: boolean; /** Epoch ms stamped as `exportedAt`. Default `Date.now()`. */ now?: number; } /** Build the detailed export document from already-loaded chats (pure). */ export declare function buildChatLogExport(chats: readonly PptxAiStoredChat[], options?: BuildChatLogOptions): AiLogExport; /** Render the same detailed export as a human-readable Markdown transcript. */ export declare function buildChatLogMarkdown(doc: AiLogExport): string; /** Load every stored chat (newest first) in full detail from a store. */ export declare function collectStoredChats(store: PptxAiChatStore): Promise; /** File format to download. */ export type AiLogFormat = 'json' | 'markdown'; /** Options for {@link exportAiChatLogs}. */ export interface ExportAiChatLogsOptions { /** Store to read from. Defaults to the shared `createChatHistoryStore()`. */ store?: PptxAiChatStore; /** `'json'` (default) or `'markdown'`. */ format?: AiLogFormat; /** Include tool inputs/outputs. Default `true`. */ detailed?: boolean; /** Epoch ms for the filename + `exportedAt`. Default `Date.now()`. */ now?: number; } /** * Read all stored chats and trigger a browser download of the detailed log. * * @returns the number of chats exported. When `0`, no file is downloaded so the * caller can surface an empty-state message instead. */ export declare function exportAiChatLogs(options?: ExportAiChatLogsOptions): Promise; //# sourceMappingURL=ai-log-export.d.ts.map