(s string)
| 630 | } |
| 631 | if !complete { |
| 632 | // Clean EOF with no completion event: the connection was cut, not |
| 633 | // finished. Returned as a plain error (not serverStreamError), so run() |
| 634 | // marks it MidStream when frames had arrived and the TUI's bounded |
| 635 | // replay reissues the request instead of finalizing a truncated reply. |
| 636 | return nil, 0, 0, errors.New("the stream ended without a completion event (response.completed): the connection was likely cut mid response") |
| 637 | } |
| 638 | |
| 639 | // Emit accumulated tool calls once at stream end, in output order. Resolve |
| 640 | // every slot once, sharing the parsed payload between the events and the |
no outgoing calls
no test coverage detected