| 1 | package responses |
| 2 | |
| 3 | import ( |
| 4 | "context" |
| 5 | "encoding/json" |
| 6 | |
| 7 | "reasonix/internal/provider" |
| 8 | ) |
| 9 | |
| 10 | func emitSearchReplay(ctx context.Context, out chan<- provider.Chunk, raw json.RawMessage) bool { |
| 11 | if !sendChunk(ctx, out, provider.Chunk{Type: provider.ChunkResponsesItem, ResponsesItem: raw}) { |
| 12 | return false |
| 13 | } |
| 14 | if search := provider.ServerSearchFromResponsesItem(raw); search != nil { |
| 15 | return sendChunk(ctx, out, provider.Chunk{Type: provider.ChunkServerSearch, ServerSearch: search}) |
| 16 | } |
| 17 | return true |
| 18 | } |
| 19 |