feat: show current git branch in status bar, and make it responsive (#1339)

Co-authored-by: adamdotdevin <2363879+adamdottv@users.noreply.github.com>
This commit is contained in:
Andrea Grandi 2025-07-29 18:15:04 +02:00 committed by GitHub
parent df03e182d2
commit 3bd2b340c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 349 additions and 38 deletions

View file

@ -101,8 +101,9 @@ func main() {
panic(err)
}
tuiModel := tui.NewModel(app_).(*tui.Model)
program := tea.NewProgram(
tui.NewModel(app_),
tuiModel,
tea.WithAltScreen(),
tea.WithMouseCellMotion(),
)
@ -132,6 +133,7 @@ func main() {
go func() {
sig := <-sigChan
slog.Info("Received signal, shutting down gracefully", "signal", sig)
tuiModel.Cleanup()
program.Quit()
}()
@ -141,5 +143,6 @@ func main() {
slog.Error("TUI error", "error", err)
}
tuiModel.Cleanup()
slog.Info("TUI exited", "result", result)
}