| 93 | } |
| 94 | |
| 95 | func InitializeCommitUI(cfg config.Config, includeEmoji bool) CommitUI { |
| 96 | sp := spinner.New() |
| 97 | sp.Spinner = spinner.Points |
| 98 | sp.Style = lipgloss.NewStyle().Foreground(colorAccent) |
| 99 | |
| 100 | prog := progress.New( |
| 101 | progress.WithSolidFill(string(colorPrimary)), |
| 102 | progress.WithGradient("#7209b7", "#4361ee"), |
| 103 | ) |
| 104 | |
| 105 | vp := viewport.New(80, 20) |
| 106 | |
| 107 | return CommitUI{ |
| 108 | cfg: cfg, |
| 109 | includeEmoji: includeEmoji, |
| 110 | commitMsgs: make(map[string]string), |
| 111 | commitResults: make(map[string]string), |
| 112 | spinner: sp, |
| 113 | progress: prog, |
| 114 | viewport: vp, |
| 115 | state: stateLoading, |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | func (m CommitUI) Init() tea.Cmd { |
| 120 | return tea.Batch( |