UNPKG

create-ai-chat-context-experimental

Version:

Phase 2: TypeScript rewrite - AI Chat Context & Memory System with conversation extraction and AICF format support (powered by aicf-core v2.1.0).

60 lines 1.68 kB
/** * This file is part of create-ai-chat-context-experimental. * Licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). * See LICENSE file for details. */ /** * Warp Parser * Extracts conversation data from Warp Terminal SQLite database * October 2025 */ import type { Message } from '../types/index.js'; import type { Result } from '../types/index.js'; /** * Warp query structure from SQLite ai_queries table */ interface WarpQuery { exchange_id: string; conversation_id: string; start_ts: string; input: string; working_directory?: string; output_status: string; model_id?: string; } /** * Parse Warp Terminal SQLite format * Extracts messages from Warp AI queries */ export declare class WarpParser { /** * Parse raw Warp query data into messages * * @param queries - Array of Warp queries from SQLite * @param conversationId - Conversation ID * @returns Result with Message[] or error */ parse(queries: WarpQuery[], conversationId: string): Result<Message[]>; /** * Extract messages from Warp queries * Handles JSON-formatted queries and action results */ private extractMessages; /** * Extract content from Warp action results */ private extractActionResult; /** * Clean message content * Remove JSON artifacts and normalize whitespace */ private cleanContent; /** * Detect if data is from Warp * @param input - Raw input string * @returns true if data appears to be from Warp */ isWarpData(input: string): boolean; } export {}; //# sourceMappingURL=WarpParser.d.ts.map