Skip to content

fix(agent): 对齐 EventType.ALL 的文档与流式行为#1463

Open
guslegend0510 wants to merge 2 commits into
agentscope-ai:mainfrom
guslegend0510:fix/eventtype-all-docs
Open

fix(agent): 对齐 EventType.ALL 的文档与流式行为#1463
guslegend0510 wants to merge 2 commits into
agentscope-ai:mainfrom
guslegend0510:fix/eventtype-all-docs

Conversation

@guslegend0510

Copy link
Copy Markdown

做了什么

  • 明确 EventType.ALLStreamOptions#getEventTypes() 实际会包含 AGENT_RESULT
  • 同步更新英文/中文流式文档,和真实行为保持一致
  • 补充回归测试,验证 EventType.ALL 会流式输出 AGENT_RESULT

原因

验证

  • mvn -pl agentscope-core spotless:apply
  • mvn -pl agentscope-core -Dtest=StreamOptionsTest test

Fixes #1439

@guslegend0510 guslegend0510 requested a review from a team May 23, 2026 08:26
@CLAassistant

CLAassistant commented May 23, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov

codecov Bot commented May 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@LearningGp LearningGp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we confirm that the AGENT_RESULT event should be included in ALL, the Javadoc for AGENT_RESULT itself should also be updated accordingly.
PTAL @chickenlj

@AgentScopeJavaBot AgentScopeJavaBot added bug Something isn't working area/core/agent Agent runtime, pipeline, hooks, plan area/docs Documentation labels May 28, 2026
@guslegend0510 guslegend0510 force-pushed the fix/eventtype-all-docs branch from a199153 to 0ea0c3b Compare June 9, 2026 22:50
@guslegend0510

Copy link
Copy Markdown
Author

@LearningGp 麻烦审核,一下,谢谢

@AgentScopeJavaBot AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 AI Review

This PR correctly updates the AGENT_RESULT Javadoc to reflect that it is streamed by default (because StreamOptions defaults use EventType.ALL and shouldStream() returns true for any type when ALL is present). However, the fix is incomplete: the ALL constant's own Javadoc at line 97 still says "Special value to stream all event types (except AGENT_RESULT)" — the exact same misinformation this PR aims to correct. Additionally, the PR description claims to update English/Chinese streaming docs and add regression tests, but neither appears in the diff. The streaming docs (docs/v1/en/docs/task/streaming.md lines 46-47 and docs/v1/zh/docs/task/streaming.md lines 46-47) still state AGENT_RESULT is "not included in stream by default" and ALL means "all the above (except AGENT_RESULT)". Please fix these remaining inconsistencies so the documentation alignment is complete.

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

Labels

area/core/agent Agent runtime, pipeline, hooks, plan area/docs Documentation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EventTypes针对ALL的注释和实际代码实现逻辑不相符

5 participants