Skip to main content

is_jsonl_transcript

Function is_jsonl_transcript 

Source
pub fn is_jsonl_transcript(path: &str) -> bool
Expand description

Whether a file is a JSON Lines transcript, as Claude Code writes them.

A JSON document — Gemini’s chat sessions, say — is one object, so its first line either fails to parse (pretty-printed) or parses into something a transcript entry never is. Only the first non-empty line is read: sniffing must not cost a pass over a multi-megabyte transcript.