-
Notifications
You must be signed in to change notification settings - Fork 87
Tracks: Studio Code chat & instructions events (STU-2120) #4506
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
Merged
Merged
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b34c2e9
Tracks: Studio Code chat & instructions events (STU-2120)
wojtekn c4bc540
Avoid runtime import of pi-coding-agent from common (dev-only depende…
wojtekn 926fc73
Document that studio ui emits no Tracks events for instructions
wojtekn fe1130b
Drop agent_version from Studio Code events (derivable from app_version)
wojtekn c9c73b6
Trim comments and analytics doc
wojtekn b638999
Make TurnStatus an alias of TracksAiOutcome so they cannot drift
wojtekn c99ea01
Shorten comments
wojtekn 1189205
Let the session log own TurnStatus instead of the Tracks module
wojtekn 1d16468
Run the instructions edit-session cleanup on unmount only
wojtekn 75fb98b
Await the chat Tracks events so headless runs don't drop them
wojtekn b9e8af2
Drop tests that assert literals or language behavior
wojtekn 5b55a55
Surface the agent CLI child's output in dev runs
wojtekn 9d8b617
Log only the props that would be sent
wojtekn ed506a3
Note what session_created counts
wojtekn 8f948b5
Condense the studio ui analytics-gap note
wojtekn 3bb3860
Trim comments explaining what is not sent
wojtekn a392cc8
Fix studio ui note rendering as a blockquote
wojtekn 7c79860
Merge branch 'trunk' into stu-2120-tracks-ai-chat-studio-code-events
wojtekn 7b2f127
Drop is_resumed; derive turn position from the session funnel
wojtekn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
It seems this is always true in the
uisince we always create the session.Should we look into existing messages instead of just session id?
Example:
Would have recorded Tracks event: studio_code_session_created { platform: 'darwin', arch: 'arm64', app_version: '1.18.0-beta1', is_a11n: true, channel: 'studio-ui', ui_version: 'v2', ai_session_id: 'a989d09b-8ef5-4059-aceb-0f835203c16f', agent_name: 'pi', client: 'studio-code', has_site: true } Would have bumped stat: studio-code-ui-send=darwin Would have recorded Tracks event: studio_code_message_sent { platform: 'darwin', arch: 'arm64', app_version: '1.18.0-beta1', is_a11n: true, channel: 'studio-ui', ui_version: 'v2', ai_session_id: 'a989d09b-8ef5-4059-aceb-0f835203c16f', agent_name: 'pi', client: 'studio-code', provider: 'wpcom', model: 'claude-sonnet-5', model_family: 'anthropic', has_images: false, has_files: false, is_resumed: true }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.
Good point, this prop would be meaningful only in CLI.
I decided to remove it in 7b2f127, as we can use studio_code_session_created and studio_code_message_sent to identify the first turn in a conversation, calculate the number of messages per session, and distinguish one-shot conversations from continued ones.