Skip to content

[Bug]LLM同时调用@功能与自定义分段回复功能时,分段回复不起作用 #8325

Description

@xiaopangxie123

What happened / 发生了什么

QQ群内LLM调用工具@群友时,若消息中带有自定义的分段回复关键词,整条消息会直接发出来,不会经过处理,而没有调用@的消息正常

Image Image

Reproduce / 如何复现?

  1. 打开用户识别功能(让LLM可以@群友)
  2. 启用分段回复
  3. 在群里让Bot@自己并发几句话

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

AstrBot 4.25.1、Linux Docker部署、Deepseek、aiocqhttp

OS

Linux

Logs / 报错日志

[2026-05-25 17:31:26.195] [Core]
[INFO]
[respond.stage:183]: Prepare to send - [技术]Decrib_official | 哇,你们好可爱/2842682873:
[2026-05-25 17:31:28.264] [Core]
[INFO]
[core.event_bus:61]: [default] [napcat2(aiocqhttp)] [技术]Decrib_official | 哇,你们好可爱/2842682873: 找到bug的位置了 艾特和分段优先级原因不能同时出现
[2026-05-25 17:31:28.274] [Plug]
[INFO]
[astrbot_plugin_astrbot_enhance_mode.main:1421]: enhance-mode | model_choice | 栈填充 | origin=napcat2:GroupMessage:684468174 progress=1/1 sender=2842682873
[2026-05-25 17:31:28.274] [Plug]
[INFO]
[astrbot_plugin_astrbot_enhance_mode.main:1326]: enhance-mode | model_choice | 开始判定 | origin=napcat2:GroupMessage:684468174 trigger=stack_full stack_size=1 history=3
[2026-05-25 17:31:29.354] [Plug]
[INFO]
[astrbot_plugin_astrbot_enhance_mode.main:1376]: enhance-mode | model_choice | 判定通过(REPLY) | origin=napcat2:GroupMessage:684468174 trigger=stack_full persona=Christina
[2026-05-25 17:31:29.358] [Plug]
[INFO]
[astrbot_plugin_astrbot_enhance_mode.main:1612]: enhance-mode | active_reply triggered | origin=napcat2:GroupMessage:684468174 mode=model_choice provider=ProviderOpenAIOfficial
[2026-05-25 17:31:32.681] [Core]
[INFO]
[core.event_bus:61]: [default] [napcat2(aiocqhttp)] [技术]Decrib_official | 哇,你们好可爱/2842682873: 所以: [图片]
[2026-05-25 17:31:32.692] [Plug]
[INFO]
[astrbot_plugin_astrbot_enhance_mode.main:1421]: enhance-mode | model_choice | 栈填充 | origin=napcat2:GroupMessage:684468174 progress=1/1 sender=2842682873
[2026-05-25 17:31:32.692] [Plug]
[INFO]
[astrbot_plugin_astrbot_enhance_mode.main:1326]: enhance-mode | model_choice | 开始判定 | origin=napcat2:GroupMessage:684468174 trigger=stack_full stack_size=1 history=3
[2026-05-25 17:31:33.276] [Core]
[INFO]
[respond.stage:183]: Prepare to send - [技术]Decrib_official | 哇,你们好可爱/2842682873:
[2026-05-25 17:31:33.277] [Core]
[INFO]
[runners.tool_loop_agent_runner:975]: Agent 使用工具: ['send_message_to_user']
[2026-05-25 17:31:33.277] [Core]
[INFO]
[runners.tool_loop_agent_runner:1028]: 使用工具:send_message_to_user,参数:{'messages': [{'type': 'mention_user', 'mention_user_id': '2842682873'}, {'type': 'plain', 'text': '啊这|找到bug了('}]}
[2026-05-25 17:31:33.723] [Core]
[INFO]
[runners.tool_loop_agent_runner:1225]: Tool send_message_to_user Result: Message sent to session napcat2:GroupMessage:684468174
[2026-05-25 17:31:33.778] [Plug]
[INFO]
[astrbot_plugin_astrbot_enhance_mode.main:1387]: enhance-mode | model_choice | 判定拒绝(SKIP) | origin=napcat2:GroupMessage:684468174 trigger=stack_full persona=Christina
[2026-05-25 17:31:38.120] [Plug]
[INFO]
[astrbot_plugin_emotionai.main:833]: [EmotionAI DEBUG] LLM 完整输出:

[感知] Decrib找到bug位置了 关于@和分段优先级的问题
[评估] 问题解决了 感到高兴 想回复他
[代谢] 负面消解无 激情冷却无
[决策] 用@功能回复他 因为@优先级高于分段 不能同时用
[更新] joy:+2 favor:+1

修复了|这次应该没问题
[2026-05-25 17:31:38.121] [Plug]
[INFO]
[astrbot_plugin_emotionai.main:843]: [EmotionAI DEBUG] 提取到的思维链内容:

[感知] Decrib找到bug位置了 关于@和分段优先级的问题
[评估] 问题解决了 感到高兴 想回复他
[代谢] 负面消解无 激情冷却无
[决策] 用@功能回复他 因为@优先级高于分段 不能同时用
[更新] joy:+2 favor:+1
[2026-05-25 17:31:38.121] [Plug]
[INFO]
[astrbot_plugin_emotionai.main:853]: [EmotionAI DEBUG] >>> 命中更新行 [Line 5]: [更新] joy:+2 favor:+1
[2026-05-25 17:31:38.121] [Plug]
[INFO]
[astrbot_plugin_emotionai.main:857]: [EmotionAI DEBUG] 正则抓取结果: [('joy', '+2'), ('favor', '+1')]
[2026-05-25 17:31:38.122] [Plug]
[INFO]
[astrbot_plugin_emotionai.main:892]: [EmotionAI] 最终捕获的情感变更: {'joy': 2, 'favor': 1}
[2026-05-25 17:31:39.305] [Plug]
[INFO]
[astrbot_plugin_meme_manager.main:1070]: [meme_manager] 去重后的最终表情列表: ['happy']
[2026-05-25 17:31:39.318] [Core]
[INFO]
[respond.stage:183]: Prepare to send - [技术]Decrib_official | 哇,你们好可爱/2842682873: 修复了 这次应该没问题
[2026-05-25 17:32:17.868] [Core]
[INFO]
[core.event_bus:61]: [default] [napcat2(aiocqhttp)] [技术]Decrib_official | 哇,你们好可爱/2842682873: [图片]
[2026-05-25 17:32:17.880] [Plug]
[INFO]
[astrbot_plugin_astrbot_enhance_mode.main:1421]: enhance-mode | model_choice | 栈填充 | origin=napcat2:GroupMessage:684468174 progress=1/1 sender=2842682873
[2026-05-25 17:32:17.881] [Plug]
[INFO]
[astrbot_plugin_astrbot_enhance_mode.main:1326]: enhance-mode | model_choice | 开始判定 | origin=napcat2:GroupMessage:684468174 trigger=stack_full stack_size=1 history=3

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • Yes!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreThe bug / feature is about astrbot's core, backendbugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions