(ctx context.Context, event a2a.Event)
| 39 | } |
| 40 | |
| 41 | func (fq *fixingQueue) Write(ctx context.Context, event a2a.Event) error { |
| 42 | // Fix artifact update events with nil Parts |
| 43 | if artifactEvent, ok := event.(*a2a.TaskArtifactUpdateEvent); ok { |
| 44 | if artifactEvent.Artifact != nil && artifactEvent.Artifact.Parts == nil { |
| 45 | // Replace nil with an empty slice |
| 46 | artifactEvent.Artifact.Parts = []a2a.Part{} |
| 47 | } |
| 48 | } |
| 49 | return fq.queue.Write(ctx, event) |
| 50 | } |
| 51 | |
| 52 | func (fq *fixingQueue) Read(ctx context.Context) (a2a.Event, a2a.TaskVersion, error) { |
| 53 | return fq.queue.Read(ctx) |
no outgoing calls