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
6 changed files with 349 additions and 38 deletions

View File

@@ -71,12 +71,11 @@ type Model struct {
symbolsProvider completions.CompletionProvider
showCompletionDialog bool
leaderBinding *key.Binding
// isLeaderSequence bool
toastManager *toast.ToastManager
interruptKeyState InterruptKeyState
exitKeyState ExitKeyState
messagesRight bool
fileViewer fileviewer.Model
toastManager *toast.ToastManager
interruptKeyState InterruptKeyState
exitKeyState ExitKeyState
messagesRight bool
fileViewer fileviewer.Model
}
func (a Model) Init() tea.Cmd {
@@ -650,6 +649,10 @@ func (a Model) View() string {
return mainLayout + "\n" + a.status.View()
}
func (a Model) Cleanup() {
a.status.Cleanup()
}
func (a Model) openFile(filepath string) (tea.Model, tea.Cmd) {
var cmd tea.Cmd
response, err := a.app.Client.File.Read(