| 8419 | static bool responses_sse_message_added(int fd, responses_stream *st) { |
| 8420 | buf b = {0}; |
| 8421 | buf_printf(&b, |
| 8422 | "{\"type\":\"response.output_item.added\",\"output_index\":%d," |
| 8423 | "\"item\":{\"id\":\"%s\",\"type\":\"message\",\"status\":\"in_progress\"," |
| 8424 | "\"role\":\"assistant\",\"content\":[]}}", |
| 8425 | st->message_index, st->message_id); |
| 8426 | bool ok = responses_sse_emit_event(fd, st, b.ptr); |
| 8427 | buf_free(&b); |
| 8428 | return ok; |
| 8429 | } |
| 8430 | |
| 8431 | static bool responses_sse_message_text_part_added(int fd, responses_stream *st) { |
| 8432 | buf b = {0}; |
| 8433 | buf_printf(&b, |