Skip to content

标题:修复 AutoContext 压缩助手消息被误判为最终回复#1488

Open
guslegend0510 wants to merge 1 commit into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1483
Open

标题:修复 AutoContext 压缩助手消息被误判为最终回复#1488
guslegend0510 wants to merge 1 commit into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1483

Conversation

@guslegend0510
Copy link
Copy Markdown

背景

AutoContext 压缩后会生成带 _compress_meta 的 assistant 消息,这类消息属于合成消息,不应作为对话的最终自然回复。原逻辑会把它们算作 final assistant response,影响后续上下文判断。

修改内容

  • 将任意携带 _compress_meta 的 assistant 消息统一视为 synthetic message。
  • 在 final assistant response 判定中排除此类消息。
  • 让最终回复识别只依赖真实对话输出,避免压缩过程干扰结果。

验证

  • mvn -pl agentscope-extensions/agentscope-extensions-autocontext-memory -am "-Dtest=MsgUtilsTest,AutoContextMemoryTest" test

Fixes #1483

@guslegend0510 guslegend0510 requested a review from a team May 25, 2026 10:19
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] AutoContextMemory 可能将压缩生成的 assistant 消息误判为最终 assistant 回复

3 participants