MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / read_transcript

Method read_transcript

src/services/session_storage.py:228–242  ·  view source on GitHub ↗

Read all entries from the JSONL transcript.

(self)

Source from the content-addressed store, hash-verified

226 # --- Transcript reading ---
227
228 def read_transcript(self) -> list[dict[str, Any]]:
229 """Read all entries from the JSONL transcript."""
230 if not self._transcript_path.exists():
231 return []
232 entries: list[dict[str, Any]] = []
233 with open(self._transcript_path, "r", encoding="utf-8") as f:
234 for line_num, line in enumerate(f, 1):
235 line = line.strip()
236 if not line:
237 continue
238 try:
239 entries.append(json.loads(line))
240 except json.JSONDecodeError as e:
241 logger.warning("Malformed JSONL line %d: %s", line_num, e)
242 return entries
243
244 def read_messages(self) -> list[Message]:
245 """Read transcript as typed Message objects."""

Calls 1

appendMethod · 0.45