feat: show git branch in footer

- Footer now displays active git branch after directory path (e.g., ~/project (main))
- Branch detected by reading .git/HEAD directly (fast, synchronous)
- Cache refreshed after each assistant message to detect branch changes
- Handles normal branches, detached HEAD, and non-git repos

Closes #55
This commit is contained in:
Mario Zechner 2025-11-27 12:56:45 +01:00
parent f95f41b1c4
commit 318254bff4
3 changed files with 44 additions and 1 deletions

View file

@ -589,6 +589,9 @@ export class TuiRenderer {
// Keep the streaming component - it's now the final assistant message
this.streamingComponent = null;
// Invalidate footer cache to refresh git branch (in case agent executed git commands)
this.footer.invalidate();
}
this.ui.requestRender();
break;