mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-02 22:40:22 +00:00
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:
parent
df03e182d2
commit
3bd2b340c8
6 changed files with 349 additions and 38 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue