toolResultMsg carries one finished tool call back to Update, tagged with the turnCtx it was dispatched against. Update drops it when that ctx no longer matches m.turnCtx: the originating turn was Ctrl+C'd and superseded. Otherwise the orphan result appends to the new turn's history with no preceding
| 31 | // Otherwise the orphan result appends to the new turn's history with no |
| 32 | // preceding assistant.tool_calls and abandons that turn's live stream. |
| 33 | type toolResultMsg struct { |
| 34 | Msg chmctx.Message |
| 35 | turnCtx context.Context |
| 36 | } |
| 37 | |
| 38 | // readEvent drains one event from the LLM stream as a tea.Msg, re-scheduled |
| 39 | // until the channel closes. Tags ch so Update can spot stale prior-turn events. |
nothing calls this directly
no outgoing calls
no test coverage detected