562
563
async readFileEditContent(toolCallId: string, filePath: string): Promise<IFileEditContent | undefined> {
565
>
const db = await this._ensureDb();
566
>
const row = await dbGet(
567
>
db,
568
>
`SELECT before_content, after_content
569
>
FROM file_edits
570
>
WHERE tool_call_id = ? AND file_path = ?`,
571
>
[toolCallId, filePath],
572
>
);
573
>
if (!row) {
574
return undefined;
575
}
576
return {
577
>
beforeContent: row.before_content ? toUint8Array(row.before_content) : undefined,
sessionDatabase.ts
578
>
afterContent: row.after_content ? toUint8Array(row.after_content) : undefined,
579
>
};
580
>
});
581
>
}
582
583
// ---- Session metadata -----------------------------------------------