-
Notifications
You must be signed in to change notification settings - Fork 125
Fix Gemini transcript position tracking #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
20bbff8 to
e50f2c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates manual-commit strategy transcript accounting so Gemini session transcripts track “position” by message count (instead of treating the whole JSON file as a single line), aligning condensation and “new content” detection with GeminiCLIAgent.GetTranscriptPosition().
Changes:
- Count Gemini transcript progress using parsed
messageslength (message count), not “1 line”. - Update
countTranscriptLinesto detect Gemini JSON transcripts and count messages. - Add unit tests covering transcript line/message counting behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
cmd/entire/cli/strategy/manual_commit_hooks.go |
Counts Gemini transcripts by message count for “has new content” checks. |
cmd/entire/cli/strategy/manual_commit_condensation.go |
Records FullTranscriptLines as Gemini message count to keep condensation offsets consistent with Gemini’s transcript position semantics. |
cmd/entire/cli/strategy/manual_commit_test.go |
Adds tests for countTranscriptLines across Claude JSONL and Gemini JSON cases. |
e50f2c7 to
e34d15e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
e34d15e to
10d94d8
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 9ff9bc1149d8
…-position-tracking # Conflicts: # cmd/entire/cli/strategy/manual_commit_test.go
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 846dc1c1b06e
Note
Low Risk
Scoped to transcript parsing/counting and hook-side new-content detection; main risk is off-by-one/format-detection regressions for edge-case transcripts.
Overview
Fixes Gemini transcript handling in the manual-commit strategy by counting transcript position as message count (via
geminicli.ParseTranscript) instead of treating the JSON blob as a single line, keepingCheckpointTranscriptStartand condensation offsets consistent.Improves Gemini format detection to treat any JSON object with a
messagesfield (even an empty array) as Gemini format, and updates new-content checks (countTranscriptLines) to use the same counting logic. Adds targeted tests covering Gemini/Claude counting behavior and the empty-messagesdetection case.Written by Cursor Bugbot for commit 6e4b418. This will update automatically on new commits. Configure here.