Skip to content

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

Open
guslegend0510 wants to merge 3 commits into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1483
Open

标题:修复 AutoContext 压缩助手消息被误判为最终回复#1488
guslegend0510 wants to merge 3 commits 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

CLAassistant commented May 25, 2026

CLA assistant check
All committers have signed the CLA.

@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!

@LearningGp
Copy link
Copy Markdown
Collaborator

image

@AgentScopeJavaBot AgentScopeJavaBot added bug Something isn't working area/ext/memory Memory/session extension implementations labels May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ext/memory Memory/session extension implementations bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

5 participants