Repository navigation
fix: fall back to transformedContent/reasoningText when Copilot CLI content is empty - #2296
Open
suhaanthayyil wants to merge 1 commit into
Open
suhaanthayyil wants to merge 1 commit into
suhaanthayyil wants to merge 1 commit into
Conversation
…CLI transcript content Copilot CLI's user.message/assistant.message events sometimes carry an empty "content" field, with the real displayable text only in transformedContent (user) or reasoningText (assistant). Prompt/summary extraction only read "content", so those sessions showed up in Entire with blank or partial transcripts even though checkpoints captured correctly. Fall back to transformedContent (stripping Copilot's injected <current_datetime>/<reminder> wrapper blocks) and reasoningText when content is empty; content still takes precedence when populated. Fixes #1070
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped, includes strong regression coverage, and directly addresses the documented Copilot transcript schema variance without affecting the normal content-populated path.
Pull request overview
This PR fixes Copilot CLI transcript extraction so Entire can recover displayable prompt/summary text when Copilot’s primary data.content fields are empty, aligning behavior with the observed Copilot CLI JSONL schema and closing issue #1070.
Changes:
- Added fallback extraction for user prompts:
content→transformedContent(with Copilot wrapper blocks stripped). - Added fallback extraction for assistant summary text:
content→reasoningText. - Added regression + fixture-based tests to ensure fallbacks work and precedence rules remain unchanged.
File summaries
| File | Description |
|---|---|
| cmd/entire/cli/agent/copilotcli/transcript.go | Adds transformedContent/reasoningText support and strips Copilot wrapper noise for prompt fallback extraction. |
| cmd/entire/cli/agent/copilotcli/transcript_test.go | Adds fixture-based tests for empty-content fallback plus regression guards ensuring content still wins when present. |
| cmd/entire/cli/agent/copilotcli/AGENT.md | Updates agent documentation to reflect the new fallback extraction behavior. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://entire.io/gh/entireio/cli/trails/1246
Summary
Evidence
Test plan
Note: the compacted-transcript builder (`transcript/compact/copilot.go`) had the same class of bug — that's fixed separately in a follow-up PR.
Fixes #1070