toolSlot accumulates one streamed tool call. OpenAI delivers `arguments` as JSON fragmented across chunks, each fragment invalid alone; we append raw and parse once, in resolve().
| 587 | |
| 588 | // readSSE reads OpenAI SSE frames until [DONE] or EOF, forwarding |
| 589 | // content/reasoning/tool-call events to out. Returns the final assistant |
| 590 | // message (content + accumulated tool calls), the server completion and prompt |
| 591 | // token counts, and any scanner error. parent is threaded through so sends |
| 592 | // abort on cancellation instead of blocking on an undrained buffer. |
| 593 | // serverStreamError is an error the SERVER reported inside the SSE stream, as |
| 594 | // opposed to a transport failure. Typed so the replay path can tell the two |
| 595 | // apart: resending a request the server already refused just repeats the refusal. |
nothing calls this directly
no outgoing calls
no test coverage detected