fix: add Pin/Unpin methods and call bd pin in pinToHook (gt-o3is)
Adds Pin() and Unpin() methods to the beads wrapper that call bd pin/unpin. Updates pinToHook() to call b.Pin() after AttachMolecule() to set the pinned boolean field and assignee on the work issue. This should enable bd hook to show pinned work. NOTE: There's a known issue where bd pin via subprocess doesn't actually set the pinned field even though it reports success. The handoff bead attachment remains the primary mechanism until this is resolved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1057,11 +1057,21 @@ func pinToHook(beadsPath, agentAddress, issueID string, moleculeCtx *MoleculeCon
|
||||
attachedMolecule = moleculeCtx.RootIssueID
|
||||
}
|
||||
|
||||
// Attach molecule to handoff bead
|
||||
// Attach molecule to handoff bead (stores in description)
|
||||
_, err = b.AttachMolecule(handoff.ID, attachedMolecule)
|
||||
if err != nil {
|
||||
return fmt.Errorf("attaching molecule: %w", err)
|
||||
}
|
||||
|
||||
// Also pin the work issue itself to the agent
|
||||
// This sets the pinned boolean field AND assignee so bd hook can find it
|
||||
// NOTE: There's a known issue (gt-o3is) where bd pin via subprocess doesn't
|
||||
// actually set the pinned field, even though it reports success.
|
||||
if err := b.Pin(attachedMolecule, role); err != nil {
|
||||
// Non-fatal - the handoff bead attachment is the primary mechanism
|
||||
// This just enables bd hook visibility
|
||||
fmt.Printf(" %s pin work issue: %v\n", style.Dim.Render("Note: could not"), err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user