(line string)
| 107 | } |
| 108 | |
| 109 | func (m *runModel) appendLog(line string) { |
| 110 | m.logs = append(m.logs, line) |
| 111 | if len(m.logs) > maxLogLines { |
| 112 | m.logs = m.logs[len(m.logs)-maxLogLines:] |
| 113 | } |
| 114 | m.vp.SetContent(strings.Join(m.logs, "\n")) |
| 115 | m.vp.GotoBottom() |
| 116 | } |
| 117 | |
| 118 | func (m runModel) View() string { |
| 119 | header := sectionStyle.Render("Run — start/stop the snix engine and watch logs") |