Edit - Go SDK
The Go SDK and docs are currently in beta. Report issues on GitHub.
1edit := components.CreateEditClearToolUses20250919(components.EditClearToolUses20250919{/* values here */})
1edit := components.CreateEditClearThinking20251015(components.EditClearThinking20251015{/* values here */})
1edit := components.CreateEditCompact20260112(components.EditCompact20260112{/* values here */})
Use the Type field to determine which variant is active, then access the corresponding field:
Type
1switch edit.Type {2 case components.EditTypeClearToolUses20250919:3 // edit.EditClearToolUses20250919 is populated4 case components.EditTypeClearThinking20251015:5 // edit.EditClearThinking20251015 is populated6 case components.EditTypeCompact20260112:7 // edit.EditCompact20260112 is populated8}