MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / Update

Method Update

tui/busy.go:49–67  ·  view source on GitHub ↗
(msg tea.Msg)

Source from the content-addressed store, hash-verified

47}
48
49func (m BusyModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
50 switch msg := msg.(type) {
51 case BusyDoneMsg:
52 m.Quitting = true
53 return m, tea.Quit
54 case tea.KeyMsg:
55 switch msg.String() {
56 case "q", "Q", "esc", "ctrl+c":
57 selfInterrupt()
58 m.Quitting = true
59 return m, tea.Quit
60 }
61 case spinner.TickMsg:
62 var cmd tea.Cmd
63 m.spin, cmd = m.spin.Update(msg)
64 return m, cmd
65 }
66 return m, nil
67}
68
69func (m BusyModel) View() string {
70 if m.Quitting {

Calls 1

selfInterruptFunction · 0.70