hermes - 💡(How to fix) Fix QQ Bot InlineKeyboard button UI for approval (/approve /deny) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#18010Fetched 2026-05-01 05:54:25
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
1
Author
Participants
Timeline (top)
labeled ×4

Code Example

agent 跑危险命令
QQ 收到文字:「请回复 /approve 或 /deny」
  → 用户手动打字回复 /approve

---

agent 跑危险命令
QQ 收到带按钮的消息:
    [Allow Once] [🔒 Session] [Always] [Deny]
  → 用户点按钮 → 完事
RAW_BUFFERClick to expand / collapse

Feature Description

QQ Bot 的审批目前走的是文字 fallback——agent 要跑危险命令时,用户需要手动回复 /approve/deny。Telegram、Discord、Slack 都已实现了 send_slash_confirm 的 InlineKeyboard button UI,但 QQ adapter 没有。

QQ Bot API v2 官方支持 InlineKeyboard(ActionType 2「at bot」),技术上完全可以做到和 Telegram 一样——消息下面直接出按钮,点一下就完成审批。

Current Behavior

agent 跑危险命令
  → QQ 收到文字:「请回复 /approve 或 /deny」
  → 用户手动打字回复 /approve

Expected Behavior

agent 跑危险命令
  → QQ 收到带按钮的消息:
    [✅ Allow Once] [🔒 Session] [✅ Always] [❌ Deny]
  → 用户点按钮 → 完事

References

Environment

  • Hermes Agent (latest)
  • QQ Bot adapter: gateway/platforms/qqbot/adapter.py

extent analysis

TL;DR

Implement the send_slash_confirm method in the QQ Bot adapter to display InlineKeyboard buttons for approval.

Guidance

  • Review the QQ Bot API v2 documentation on InlineKeyboard to understand the technical requirements.
  • Study the existing implementations in Telegram, Discord, and Slack adapters for reference.
  • Implement the send_slash_confirm method in the gateway/platforms/qqbot/adapter.py file to display the approval buttons.
  • Ensure the button callback is properly handled to complete the approval process.

Example

# Example of sending a message with InlineKeyboard buttons
# (Note: This is a simplified example and may require modifications to fit the actual implementation)
from qqbot import Message

def send_slash_confirm(self, message):
    buttons = [
        {"text": "✅ Allow Once", "callback": self.approve_once},
        {"text": "🔒 Session", "callback": self.approve_session},
        {"text": "✅ Always", "callback": self.approve_always},
        {"text": "❌ Deny", "callback": self.deny}
    ]
    msg = Message(text="Please approve or deny", buttons=buttons)
    # Send the message using the QQ Bot API

Notes

The implementation details may vary depending on the specific requirements of the QQ Bot API and the Hermes Agent.

Recommendation

Apply workaround by implementing the send_slash_confirm method in the QQ Bot adapter, as it is the most direct way to achieve the desired functionality.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix QQ Bot InlineKeyboard button UI for approval (/approve /deny) [1 participants]