MCPcopy
hub / github.com/superagent-ai/grok-cli / loadMessageRows

Function loadMessageRows

src/storage/transcript.ts:42–51  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

40}
41
42function loadMessageRows(sessionId: string): MessageRow[] {
43 return getDatabase()
44 .prepare(`
45 SELECT session_id, seq, role, message_json, created_at
46 FROM messages
47 WHERE session_id = ?
48 ORDER BY seq ASC
49 `)
50 .all(sessionId) as MessageRow[];
51}
52
53function toPersistedCompaction(row: CompactionRow | undefined): PersistedCompaction | null {
54 if (!row) return null;

Callers 3

loadRawTranscriptFunction · 0.85
loadTranscriptStateFunction · 0.85

Calls 3

getDatabaseFunction · 0.90
allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected