Condense a transcript from raw bytes, auto-detecting format. Currently supports Claude Code JSONL. Future: Gemini JSON, other formats.
(raw: &[u8], format: &str)
| 79 | /// |
| 80 | /// Currently supports Claude Code JSONL. Future: Gemini JSON, other formats. |
| 81 | pub fn condense_transcript(raw: &[u8], format: &str) -> Vec<CondensedEntry> { |
| 82 | match format { |
| 83 | "jsonl" => condense_claude_transcript(raw), |
| 84 | "opencode" => condense_opencode_transcript(raw), |
| 85 | // Future: "json" => condense_gemini_transcript(raw), |
| 86 | _ => { |
| 87 | log::warn!("Unknown transcript format '{}', returning empty", format); |
| 88 | Vec::new() |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | /// Parse a synthesized OpenCode JSONL transcript into condensed entries. |
| 94 | /// |