MCPcopy Create free account
hub / github.com/codehamr/codehamr / appendUserTurn

Method appendUserTurn

internal/tui/model.go:640–643  ·  view source on GitHub ↗

appendUserTurn appends a user-role message to history and starts a turn. The only path that does so; used by submit.

(content string)

Source from the content-addressed store, hash-verified

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.

Callers 1

submitMethod · 0.95

Calls 1

beginTurnMethod · 0.95

Tested by

no test coverage detected