feat(coding-agent): watch .git/HEAD for branch changes (#79)

Auto-updates footer when git branch changes externally (e.g., git checkout in another terminal)
This commit is contained in:
Tino Ehrich 2025-11-29 21:52:13 +01:00 committed by GitHub
parent 532bb69ed6
commit 832273d4d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 52 additions and 1 deletions

View file

@ -464,6 +464,11 @@ export class TuiRenderer {
this.updateEditorBorderColor();
this.ui.requestRender();
});
// Set up git branch watcher
this.footer.watchBranch(() => {
this.ui.requestRender();
});
}
private subscribeToAgent(): void {
@ -1523,6 +1528,7 @@ export class TuiRenderer {
this.loadingAnimation.stop();
this.loadingAnimation = null;
}
this.footer.dispose();
if (this.isInitialized) {
this.ui.stop();
this.isInitialized = false;