fix: map Jules session transcript from Activity union fields - #139
Draft
cursor[bot] wants to merge 1 commit into
Draft
fix: map Jules session transcript from Activity union fields#139cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
listActivities expected flat role/content fields that the Jules v1alpha Activity resource does not have, so session drawers and getOutput always showed empty conversation text against the live API. Map agentMessaged / userMessaged / progress / plan / failure unions, and paginate activities. Co-authored-by: Parvez Kose <koseparvez@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Bug and impact
Opening a Jules session (CLI
getOutputor web drawer) showed an empty conversation against the live Jules API, even when activities existed.Root cause
realJulesPort.listActivitiestreated activities as flat{role,content,message}objects. The Jules v1alpha Activity resource usesoriginatorplus typed unions (agentMessaged.agentMessage,userMessaged.userMessage,progressUpdated,planGenerated,sessionFailed). Mapping always produced emptycontent.Fix
activities.list(pageSize=100+nextPageToken) so long sessions are not silently truncated at the default 50web/_coreJules port artifactsValidation
npx vitest run test/jules-port-activities.test.ts test/jules.test.ts test/jules-port.test.ts(14 passed)