installTurnContext cancels any in-flight turn context and installs a fresh per-turn root on m.turnCtx / m.cancel. Cancel-old-then-install-new keeps Ctrl+C consistent: one m.cancel() always unwinds the whole current cascade.
()
| 618 | return m, tea.Sequence(cmds...) |
| 619 | } |
| 620 | |
| 621 | // submit commits a user prompt. sendText is the expanded form sent to the LLM |
| 622 | // (chip labels replaced by their original paste content); echoText is the |
| 623 | // collapsed form shown in scrollback so the chat doesn't swallow 80 lines of |
| 624 | // pasted log every turn; entry is the history snapshot replayed by ↑/↓, |
| 625 | // including chip state. |
| 626 | func (m Model) submit(sendText, echoText string, entry promptEntry) (tea.Model, tea.Cmd) { |
| 627 | // Redact secret-bearing slash commands (/hamrpass <key>) before they reach |
| 628 | // any sink that persists or replays them: the scrollback echo (kept in |
no outgoing calls