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

Function loadTranscriptState

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

Source from the content-addressed store, hash-verified

93}
94
95export function loadTranscriptState(sessionId: string): LoadedTranscriptState {
96 const rows = loadMessageRows(sessionId);
97 return buildEffectiveTranscript(
98 rows.map((row) => JSON.parse(row.message_json) as ModelMessage),
99 rows.map((row) => row.seq),
100 rows.map((row) => new Date(row.created_at)),
101 loadLatestCompaction(sessionId),
102 );
103}
104
105export function loadTranscript(sessionId: string): ModelMessage[] {
106 return loadTranscriptState(sessionId).messages;

Callers 2

loadTranscriptFunction · 0.85
constructorMethod · 0.85

Calls 3

buildEffectiveTranscriptFunction · 0.90
loadMessageRowsFunction · 0.85
loadLatestCompactionFunction · 0.85

Tested by

no test coverage detected