pub fn read_grok_transcript(session_path: &Path) -> Result<GrokTranscript>Expand description
Project a Grok Build session directory. chat_history.jsonl is the
conversation of record: one JSON object per line, internally tagged by
type.
system— the rendered system prompt; not conversation.user—contentis a list of{type: "text"|"image", ...}parts. Asynthetic_reasonmarks a message the runtime injected rather than one a person typed.assistant—contentis the response text, with anytool_callsas{id, name, arguments}beside it.reasoning— an inlined Responses-API reasoning item whosesummaryholds{type: "summary_text", text}parts.tool_result—{tool_call_id, content}.
Compaction rewrites the file in place, so a compaction_meta message with
no earlier real prompt means the raw history is already gone.