mirror of
https://github.com/obra/episodic-memory.git
synced 2026-09-14 13:43:14 +08:00
f156416c49
Claude-Session: https://claude.ai/code/session_0112vdwZphiWzfCYfaXMes4C
20 lines
1.0 KiB
TypeScript
20 lines
1.0 KiB
TypeScript
import { ConversationExchange } from './types.js';
|
|
export declare function parseConversation(filePath: string, projectName: string, archivePath: string): Promise<ConversationExchange[]>;
|
|
/**
|
|
* Cursor transcripts carry no workspace field; recover the working directory
|
|
* from tool-call inputs: explicit cwd/working_directory values when present,
|
|
* otherwise (with `useFilePathFallback`) the longest common directory prefix
|
|
* of absolute paths the tools touched. The fallback is for the legacy vscdb
|
|
* importer, which has no other signal; live transcripts have the project slug
|
|
* in their path, which beats prefix guessing when no explicit cwd exists.
|
|
*/
|
|
export declare function detectCursorCwd(toolInputs: unknown[], useFilePathFallback?: boolean): string | undefined;
|
|
/**
|
|
* Convenience function to parse a conversation file
|
|
* Extracts project name from the file path and returns exchanges with metadata
|
|
*/
|
|
export declare function parseConversationFile(filePath: string): Promise<{
|
|
project: string;
|
|
exchanges: ConversationExchange[];
|
|
}>;
|