beginTurn installs a fresh per-turn context, flips phase to thinking, and returns the chat stream-reader Cmd. Every path starting a new LLM round funnels through here so one m.cancel() cancels the whole cascade.
()
| 628 | m.cancel() |
| 629 | } |
| 630 | m.turnCtx, m.cancel = context.WithCancel(context.Background()) |
| 631 | } |
| 632 | |
| 633 | // beginTurn installs a fresh per-turn context, flips phase to thinking, and |
| 634 | // returns the chat stream-reader Cmd. Every path starting a new LLM round |
| 635 | // funnels through here so one m.cancel() cancels the whole cascade. |
| 636 | func (m *Model) beginTurn() tea.Cmd { |
| 637 | m.installTurnContext() |
| 638 | m.turnStart = time.Now() |
| 639 | m.lastOutcome = outcomeNone // the new run replaces the prior frozen summary |
no test coverage detected