Merge pull request #39 from cvsloane/fix/polecat-dispatcher-notification

feat: notify dispatcher when polecat work completes
This commit is contained in:
Steve Yegge
2026-01-04 23:09:23 -08:00
committed by GitHub
3 changed files with 106 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ type AttachmentFields struct {
AttachedMolecule string // Root issue ID of the attached molecule
AttachedAt string // ISO 8601 timestamp when attached
AttachedArgs string // Natural language args passed via gt sling --args (no-tmux mode)
DispatchedBy string // Agent ID that dispatched this work (for completion notification)
}
// ParseAttachmentFields extracts attachment fields from an issue's description.
@@ -61,6 +62,9 @@ func ParseAttachmentFields(issue *Issue) *AttachmentFields {
case "attached_args", "attached-args", "attachedargs":
fields.AttachedArgs = value
hasFields = true
case "dispatched_by", "dispatched-by", "dispatchedby":
fields.DispatchedBy = value
hasFields = true
}
}
@@ -88,6 +92,9 @@ func FormatAttachmentFields(fields *AttachmentFields) string {
if fields.AttachedArgs != "" {
lines = append(lines, "attached_args: "+fields.AttachedArgs)
}
if fields.DispatchedBy != "" {
lines = append(lines, "dispatched_by: "+fields.DispatchedBy)
}
return strings.Join(lines, "\n")
}
@@ -107,6 +114,9 @@ func SetAttachmentFields(issue *Issue, fields *AttachmentFields) string {
"attached_args": true,
"attached-args": true,
"attachedargs": true,
"dispatched_by": true,
"dispatched-by": true,
"dispatchedby": true,
}
// Collect non-attachment lines from existing description