appendUserTurn appends a user-role message to history and starts a turn. The only path that does so; used by submit.
(content string)
| 638 | } |
| 639 | // Echo to scrollback with the same accent ▌ the textarea uses, one visual |
| 640 | // language for "your voice" across live input and history. |
| 641 | m.appendLine(stylePrompt.Render("▌ ") + styleUser.Render(echoText)) |
| 642 | m.promptHistory = append(m.promptHistory, entry) |
| 643 | m.histIdx = -1 |
| 644 | // Persist the (redacted) prompt so ↑ finds it after a restart. Errors are |
| 645 | // swallowed: a transient failure isn't worth derailing submit, and a |
| 646 | // permanent one (read-only .codehamr/) would just be noise on every prompt. |