-
Notifications
You must be signed in to change notification settings - Fork 649
chore: Update generated events to match schemas. #208
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
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
This PR updates the generated event schemas across multiple languages (Python, TypeScript, Go, C#) to match the latest version of the session-events.schema.json. The changes add support for new event types, additional fields for tool execution tracking, selection-based attachments, and enhanced result information.
Changes:
- Added
SessionSnapshotRewindevent type for tracking session state rewinds - Enhanced
Attachmenttype with selection support (file path, text, and position information) - Added MCP (Model Context Protocol) server and tool name tracking fields
- Added
detailedContentfield toResulttype for richer tool execution results
Reviewed changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/snapshots/session/should_abort_a_session.yaml | Updated test snapshot with modified prompts, added assistant messages, and adjusted initial_wait parameter |
| python/copilot/generated/session_events.py | Added Selection/Start/End classes, enhanced Attachment class, added new Data fields (events_removed, up_to_event_id, mcp_server_name, mcp_tool_name), updated Result with detailed_content, added SessionSnapshotRewind event type |
| nodejs/src/generated/session-events.ts | Added SessionSnapshotRewind event type, implemented discriminated union for attachments with selection support, added MCP fields and detailedContent |
| go/generated_session_events.go | Added new Data struct fields, enhanced Attachment with selection support, added SelectionClass/End/Start structs, updated Result with DetailedContent, added enum values |
| dotnet/src/Generated/SessionEvents.cs | Added SessionSnapshotRewindEvent class and data, implemented polymorphic attachment classes with File/Directory/Selection variants, added MCP fields to tool execution, updated Result with DetailedContent |
| nodejs/scripts/generate-csharp-session-types.ts | Added polymorphic class generation functions (findDiscriminator, generatePolymorphicClasses, generateDerivedClass) to support discriminated unions in C# |
Comments suppressed due to low confidence (1)
nodejs/scripts/generate-csharp-session-types.ts:414
- For loop variable variant is not used in the loop body.
for (const [constValue, variant] of discriminatorInfo.mapping) {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
✅ Cross-SDK Consistency ReviewI've reviewed this PR for consistency across all four SDK implementations (Node.js/TypeScript, Python, Go, and .NET). All generated event schemas have been updated consistently. Changes VerifiedThis PR adds four new features to the session event schemas, and all have been implemented consistently across all SDKs:
Naming Convention ComplianceAll naming follows the appropriate language conventions:
VerdictNo consistency issues found. This PR maintains excellent cross-SDK consistency, with all four implementations receiving equivalent schema updates generated from the same source schema.
|
|
Gees😞😞😞😴 |
Update the event schemas to match the latest version.