Skip to content

getMessageTreeBySession

const getMessageTreeBySession: (sessionId) => Promise<object[]> = sqliteRepo.getMessageTreeBySession

Defined in: src/lib/repositories/chat-history.ts:29

The id/parentId/timestamp triple every message in a session contributes to the tree: enough to build the siblings map and walk the active path, and nothing else. Reading whole rows to do that shipped every message body, attachment blob and inlined image across the persistence worker’s structured clone on each session switch, to keep fifty.

string

Promise<object[]>