Skip to content

Comments

fix: apply reply_with_quote and reply_with_mention to image-only response#5219

Open
KBVsent wants to merge 1 commit intoAstrBotDevs:masterfrom
KBVsent:fix/reply-quote-skip-image-only-response
Open

fix: apply reply_with_quote and reply_with_mention to image-only response#5219
KBVsent wants to merge 1 commit intoAstrBotDevs:masterfrom
KBVsent:fix/reply-quote-skip-image-only-response

Conversation

@KBVsent
Copy link
Contributor

@KBVsent KBVsent commented Feb 19, 2026

When reply_with_quote or reply_with_mention is enabled, both features
were silently skipped whenever the response chain contained no Plain text
component (e.g. image-only outputs from Text-to-Image). The root cause was
an overly broad if has_plain: guard that wrapped both features together.

Modifications / 改动点

  • astrbot/core/pipeline/result_decorate/stage.py
    Removed the has_plain guard that gated both reply_with_mention (At)
    and reply_with_quote (Reply) on the presence of a Plain text component.
    Each feature now evaluates its own existing exclusion conditions
  • This is NOT a breaking change. / 这不是一个破坏性变更。

Screenshots or Test Results / 运行截图或测试结果


Checklist / 检查清单

  • 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
  • 👀 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。/ My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
  • 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到了 requirements.txtpyproject.toml 文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
  • 😮 我的更改没有引入恶意代码。/ My changes do not introduce malicious code.

Summary by Sourcery

Bug Fixes:

  • 修复在结果修饰阶段,对于仅包含图片或非纯文本响应时,reply-with-mentionreply-with-quote 被跳过的问题。
Original summary in English

Summary by Sourcery

Bug Fixes:

  • Fix reply-with-mention and reply-with-quote being skipped for image-only or non-Plain responses in the result decoration stage.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. area:core The bug / feature is about astrbot's core, backend labels Feb 19, 2026
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嘿,我已经审查了你的改动,一切看起来都非常棒!


Sourcery 对开源项目是免费的——如果你觉得我们的代码审查有帮助,请考虑分享一下 ✨
帮我变得更有用吧!请在每条评论上点 👍 或 👎,我会根据你的反馈来改进之后的代码审查。
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@dosubot
Copy link

dosubot bot commented Feb 19, 2026

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core The bug / feature is about astrbot's core, backend size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant