export type MessageCategory = | "user_message" | "assistant_text" | "thinking" | "tool_call" | "tool_result" | "system_message" | "hook_progress" | "file_snapshot" | "summary"; export type ProgressSubtype = "hook" | "bash" | "mcp" | "agent"; export interface ParsedMessage { uuid: string; category: MessageCategory; content: string; toolName?: string; toolInput?: string; timestamp?: string; rawIndex: number; toolUseId?: string; parentToolUseId?: string; progressSubtype?: ProgressSubtype; } export interface SessionEntry { id: string; summary: string; firstPrompt: string; project: string; created: string; modified: string; messageCount: number; path: string; duration?: number; // Duration in milliseconds from first to last message } export interface SessionListResponse { sessions: SessionEntry[]; } export interface SessionDetailResponse { id: string; project: string; messages: ParsedMessage[]; toolProgress?: Record; } export interface ExportRequest { session: SessionDetailResponse; visibleMessageUuids: string[]; redactedMessageUuids: string[]; autoRedactEnabled?: boolean; } export const ALL_CATEGORIES: MessageCategory[] = [ "user_message", "assistant_text", "thinking", "tool_call", "tool_result", "system_message", "hook_progress", "file_snapshot", "summary", ]; export const CATEGORY_LABELS: Record = { user_message: "User Messages", assistant_text: "Assistant Text", thinking: "Thinking Blocks", tool_call: "Tool Calls", tool_result: "Tool Results", system_message: "System Messages", hook_progress: "Hook/Progress", file_snapshot: "File Snapshots", summary: "Compactions", }; export const DEFAULT_HIDDEN_CATEGORIES: MessageCategory[] = [ "tool_result", "system_message", "hook_progress", "file_snapshot", ];