Condense a transcript from raw bytes, auto-detecting format. Currently supports Claude Code JSONL. Future: Gemini JSON, other formats.
(raw: &[u8], format: &str)
| 89 | /// |
| 90 | /// Currently supports Claude Code JSONL. Future: Gemini JSON, other formats. |
| 91 | pub fn condense_transcript(raw: &[u8], format: &str) -> Vec<CondensedEntry> { |
| 92 | match format { |
| 93 | "jsonl" => condense_claude_transcript(raw), |
| 94 | "opencode" => condense_opencode_transcript(raw), |
| 95 | // Future: "json" => condense_gemini_transcript(raw), |
| 96 | _ => { |
| 97 | log::warn!("Unknown transcript format '{}', returning empty", format); |
| 98 | Vec::new() |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | /// Parse a synthesized OpenCode JSONL transcript into condensed entries. |
| 104 | /// |