Show current work (in_progress issues) in crew/polecat status bar

- Added GetPaneWorkDir to tmux package to get pane current directory
- Added getCurrentWork helper that queries beads for in_progress issues
- Worker status line now shows first in_progress issue (ID: title)
- Falls back to GT_ISSUE env var if set, or empty if no work in progress
- Truncated to 40 chars to fit status bar

Example: 👷 gt-44wh: Polecats must not create GitHu… |

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-21 23:26:54 -08:00
parent bb8eeab324
commit 509beaf0aa
2 changed files with 58 additions and 7 deletions

View File

@@ -207,6 +207,15 @@ func (t *Tmux) GetPaneCommand(session string) (string, error) {
return strings.TrimSpace(out), nil
}
// GetPaneWorkDir returns the current working directory of a pane.
func (t *Tmux) GetPaneWorkDir(session string) (string, error) {
out, err := t.run("list-panes", "-t", session, "-F", "#{pane_current_path}")
if err != nil {
return "", err
}
return strings.TrimSpace(out), nil
}
// CapturePane captures the visible content of a pane.
func (t *Tmux) CapturePane(session string, lines int) (string, error) {
return t.run("capture-pane", "-p", "-t", session, "-S", fmt.Sprintf("-%d", lines))