MCPcopy Create free account
hub / github.com/SamNet-dev/snix / pumpCmd

Function pumpCmd

tui/run.go:243–251  ·  view source on GitHub ↗

pumpCmd blocks on ch and returns each message. When ch closes, emits a sentinel runExitMsg with a nil err so the model clears its state.

(ch <-chan tea.Msg)

Source from the content-addressed store, hash-verified

241// pumpCmd blocks on ch and returns each message. When ch closes, emits a
242// sentinel runExitMsg with a nil err so the model clears its state.
243func pumpCmd(ch <-chan tea.Msg) tea.Cmd {
244 return func() tea.Msg {
245 msg, ok := <-ch
246 if !ok {
247 return runExitMsg{err: nil}
248 }
249 return msg
250 }
251}
252
253// stop sends SIGINT (Unix) or Kill (Windows) to the engine subprocess.
254func (m runModel) stop() tea.Cmd {

Callers 2

UpdateMethod · 0.85
startMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected