Let pick-one answers carry notes from the Other box

This commit is contained in:
Ian Gulliver
2026-10-19 16:35:09 -07:00
parent 8bca7a4369
commit 5f61749e7b
8 changed files with 215 additions and 217 deletions
+3 -3
View File
@@ -494,12 +494,12 @@ func deliveryMessage(pending []store.Pending) string {
for _, o := range *r.Options {
fmt.Fprintf(b, "- %s\n", o)
}
if r.Text != nil && strings.TrimSpace(*r.Text) != "" {
fmt.Fprintf(b, "%s added: %s\n", r.User, *r.Text)
}
} else {
fmt.Fprintf(b, "%s chose: %s\n", r.User, (*r.Options)[0])
}
if r.Text != nil && strings.TrimSpace(*r.Text) != "" {
fmt.Fprintf(b, "%s added: %s\n", r.User, *r.Text)
}
case api.Other:
text := ""
if r.Text != nil {
+1 -1
View File
@@ -110,7 +110,7 @@ func (m *Manager) leadTools(l *live) []mcp.Tool {
tool("answer_question",
"Answer an open question on the human's behalf. Only when the answer is clear or the human told you it. "+
"type option: options holds the chosen choices' exact text (one for pick-one; pick-any may add text). "+
"type option: options holds the chosen choices' exact text (one for pick-one), and text may add notes."+
"type other: free text.",
`{"type": "object", "properties": {
"item_id": {"type": "string"},
-3
View File
@@ -130,9 +130,6 @@ func CheckResponse(item api.InboxItem, c api.InboxResponseCreate) (api.InboxStat
}
seen[o] = true
}
if (text != "" || images) && item.Payload["multiple"] != true {
return bad("a pick-one option takes no text or images; use other")
}
return api.Answered, nil
case api.Other: