Update is the bubbletea entry point: it dispatches to update()'s typed handlers then drains the outbox into a single tea.Println, so lines land in scrollback in the exact order appendLine / flushStreaming queued them. One Println per cycle, never a Batch; Batch runs children concurrently, leaving ar
(msg tea.Msg)
| 378 | // local model's full native window): a cloud profile packs blind until |
| 379 | // X-Context-Window arrives on the next response, and under-packing one turn |
| 380 | // costs history while over-packing it is a 400 or a silent truncation. |
| 381 | const defaultPackFallback = 32768 |
| 382 | |
| 383 | // resizeSettleDelay debounces width-resize bursts: longer than typical drag |
| 384 | // SIGWINCH cadence (10-50ms) so a continuous drag collapses to one settle, |
| 385 | // short enough that a one-off resize feels instant. |
| 386 | const resizeSettleDelay = 150 * time.Millisecond |
| 387 | |
| 388 | type resizeSettleMsg struct{ gen int } |
| 389 | |
| 390 | // eraseScrollback wipes the terminal's saved-lines buffer (DECSED 3); no |
| 391 | // tea.ClearScreen equivalent clears scrollback. |
| 392 | var eraseScrollback tea.Cmd = func() tea.Msg { |