openbot
|
ef2259ad5e
|
feat(wecom): interactive approval template cards
- interaction events on wecom render as button_interaction template cards
(aibot_send_msg template_card): title=tool, buttons keyed <req_id>|<option_id>,
task_id=request_id, allow=primary style, reject=danger
- aibot_event_callback template_card_event -> card_answer_cb ->
SessionManager.answer_card(req_id, option_id) answers the pending permission
directly (presented anti-race rule kept); card updated in place via
aibot_respond_update_msg (已批准/已拒绝)
- text fallback on card send failure; numbered text replies still work
- tests: tests/test_approval_card.py (4 cases)
|
2026-10-14 17:55:58 +08:00 |
|