fix(peek): Support cross-rig crew paths like beads/crew/dave
gt peek now correctly handles crew worker paths by detecting the crew/
prefix and using the proper crew session name format (gt-{rig}-crew-{name}).
Changes:
- Add CaptureSession method to Manager for raw session ID capture
- Detect crew/ prefix in peek command and use CrewSessionName
- Update help text with crew path examples
Fixes: gt-yud21
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -395,6 +395,21 @@ func (m *Manager) Capture(polecat string, lines int) (string, error) {
|
||||
return m.tmux.CapturePane(sessionID, lines)
|
||||
}
|
||||
|
||||
// CaptureSession returns the recent output from a session by raw session ID.
|
||||
// Use this for crew workers or other non-polecat sessions where the session
|
||||
// name doesn't follow the standard gt-{rig}-{polecat} pattern.
|
||||
func (m *Manager) CaptureSession(sessionID string, lines int) (string, error) {
|
||||
running, err := m.tmux.HasSession(sessionID)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("checking session: %w", err)
|
||||
}
|
||||
if !running {
|
||||
return "", ErrSessionNotFound
|
||||
}
|
||||
|
||||
return m.tmux.CapturePane(sessionID, lines)
|
||||
}
|
||||
|
||||
// Inject sends a message to a polecat session.
|
||||
// Uses a longer debounce delay for large messages to ensure paste completes.
|
||||
func (m *Manager) Inject(polecat, message string) error {
|
||||
|
||||
Reference in New Issue
Block a user