Fix Gemini CLI JSONL session parsing#171
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesGemini CLI JSONL Parsing and Session Context Filtering
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fix Gemini CLI session parsing for newer JSONL chat files.
Gemini CLI can persist message state inside JSONL snapshot rows shaped like:
{"$set":{"messages":[...]}}Splitrail already handled standalone JSONL message rows, but it ignored every
$setrow. If a Gemini CLI session stored token-bearing messages in those snapshots, Splitrail could miss the usage locally and, after upload checkpoints advanced, the cloud view would appear to stop receiving Gemini data.This PR:
$set.messagessnapshot rows in Gemini CLI JSONL sessions<session_context>setup message so it does not count as a user prompt or become the session name*.jsonlin Gemini CLI glob patternsVerification
cargo fmt --all --quiet cargo build --quiet cargo test --quiet cargo clippy --quiet -- -D warnings cargo doc --quietCloses #170
Summary by CodeRabbit
New Features
.jsonlchat files in addition to.jsonfilesBug Fixes