fix: migrate gt mail to use bd v0.32.0 issue commands

bd v0.32.0 removed mail commands. Updated gt mail to use:
- bd list --type message (inbox)
- bd show (read)
- bd close (delete/ack)
- bd create --type message (send)

Sender/thread/reply-to now stored in labels and extracted on read.
Added --pinned flag (blocked by bd pin bug gt-zr0a).

🤖 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-20 20:11:09 -08:00
parent b3ef048c28
commit 57917521e6
5 changed files with 96 additions and 43 deletions

View File

@@ -21,6 +21,7 @@ var (
mailBody string
mailPriority int
mailUrgent bool
mailPinned bool
mailType string
mailReplyTo string
mailNotify bool
@@ -180,6 +181,7 @@ func init() {
mailSendCmd.Flags().StringVar(&mailType, "type", "notification", "Message type (task, scavenge, notification, reply)")
mailSendCmd.Flags().StringVar(&mailReplyTo, "reply-to", "", "Message ID this is replying to")
mailSendCmd.Flags().BoolVarP(&mailNotify, "notify", "n", false, "Send tmux notification to recipient")
mailSendCmd.Flags().BoolVar(&mailPinned, "pinned", false, "Pin message (for handoff context that persists)")
_ = mailSendCmd.MarkFlagRequired("subject")
// Inbox flags
@@ -250,6 +252,9 @@ func runMailSend(cmd *cobra.Command, args []string) error {
// Set message type
msg.Type = mail.ParseMessageType(mailType)
// Set pinned flag
msg.Pinned = mailPinned
// Handle reply-to: auto-set type to reply and look up thread
if mailReplyTo != "" {
msg.ReplyTo = mailReplyTo