commands.go
1package tui
2
3import (
4 "smoothie/tui/bubbles/commits"
5
6 tea "github.com/charmbracelet/bubbletea"
7)
8
9type windowMsg struct{}
10
11func (m *Model) windowChangesCmd() tea.Msg {
12 w := <-m.windowChanges
13 m.width = w.Width
14 m.height = w.Height
15 return windowMsg{}
16}
17
18func (m *Model) getCommitsCmd() tea.Msg {
19 m.commitTimeline = commits.NewBubble(m.height, 2, 80, m.repoSource.GetCommits(200))
20 m.state = loadedState
21 return nil
22}