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

Method Update

internal/tui/model.go:380–389  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
381const 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.
386const resizeSettleDelay = 150 * time.Millisecond
387
388type resizeSettleMsg struct{ gen int }
389
390// eraseScrollback wipes the terminal's saved-lines buffer (DECSED 3); no
391// tea.ClearScreen equivalent clears scrollback.
392var eraseScrollback tea.Cmd = func() tea.Msg {

Calls 2

updateMethod · 0.95
wrapForScrollbackFunction · 0.85