You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Go codegen: per-event-type data structs (fixes#1031)
Replace the flat quicktype-generated Data union struct with per-event-type
data structs, matching the C# codegen approach. Adding a new session event
type can no longer change the struct shape of existing event types.
- Replace generateSessionEvents() in scripts/codegen/go.ts with custom
codegen that produces 74 per-event data structs, a SessionEventData
interface, and custom UnmarshalJSON/MarshalJSON on SessionEvent
- Update go/session.go to use idiomatic Go type switches for event dispatch
- Update samples, tests, and doc examples for the new API
- Add type/const aliases for PermissionRequest, Attachment, and related
types to ease migration
- Add .gitattributes eol=lf for generated files to prevent cross-platform
line ending diffs
- Re-enable the codegen-check CI workflow (remove go/generated_session_events.go
revert workaround)
- Add ui, uri, mime to Go initialisms for correct field naming
* Go codegen: use idiomatic Go doc comments on generated types
Prefix all generated type comments with the type name per Go convention
(e.g., '// SessionStartData session initialization metadata.').
* Revert "Go codegen: use idiomatic Go doc comments on generated types"
This reverts commit 8e5423b.
* Fix Go code examples in docs, scenarios, and lint warning
Update all Go code examples in docs/, test/scenarios/, and one E2E
test to use per-event type assertions instead of the old flat
event.Data.FieldName pattern.
Fix staticcheck SA5011 lint warning in tools_test.go (nil check
must precede type assertion).
0 commit comments