feat(agui): add enable acting chunk configuration#1649
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for streaming “acting chunk” intermediate tool outputs through the AGUI adapter and Spring Boot starters via a new configuration flag.
Changes:
- Introduces
enableActingChunkinAguiAdapterConfigand wires it intoStreamOptions.includeActingChunk(...). - Exposes
agentscope.agui.enable-acting-chunkin Spring BootAguiPropertiesand passes it through MVC/WebFlux autoconfig. - Extends adapter config unit tests to cover the new flag (and adds explicit reasoning-flag builder coverage).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| agentscope-extensions/agentscope-spring-boot-starters/agentscope-agui-spring-boot-starter/src/main/java/io/agentscope/spring/boot/agui/webflux/AgentscopeAguiWebFluxAutoConfiguration.java | Passes the new enableActingChunk property into the adapter config builder for WebFlux. |
| agentscope-extensions/agentscope-spring-boot-starters/agentscope-agui-spring-boot-starter/src/main/java/io/agentscope/spring/boot/agui/mvc/AgentscopeAguiMvcAutoConfiguration.java | Passes the new enableActingChunk property into the adapter config builder for MVC. |
| agentscope-extensions/agentscope-spring-boot-starters/agentscope-agui-spring-boot-starter/src/main/java/io/agentscope/spring/boot/agui/common/AguiProperties.java | Adds enableActingChunk configuration property with docs and accessors. |
| agentscope-extensions/agentscope-extensions-agui/src/test/java/io/agentscope/core/agui/adapter/AguiAdapterConfigTest.java | Adds assertions and new tests for enableActingChunk (and builder reasoning coverage). |
| agentscope-extensions/agentscope-extensions-agui/src/main/java/io/agentscope/core/agui/adapter/AguiAgentAdapter.java | Enables inclusion of acting chunks in StreamOptions based on config. |
| agentscope-extensions/agentscope-extensions-agui/src/main/java/io/agentscope/core/agui/adapter/AguiAdapterConfig.java | Adds enableActingChunk to config + builder API and getter docs. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
AgentScopeJavaBot
left a comment
There was a problem hiding this comment.
🤖 AI Review
This PR adds an enableActingChunk boolean configuration to the AGUI module, preparing for future support of ActivitySnapshot/ActivityDelta events. The change is a clean, well-structured configuration plumbing that spans the adapter config, the agent adapter wiring, Spring Boot properties, and both MVC/WebFlux auto-configurations. The implementation faithfully follows the existing pattern established by enableReasoning. Test coverage for the config layer is adequate. One notable observation is the default value inversion: StreamOptions.Builder.includeActingChunk defaults to true in core, but this PR sets AguiAdapterConfig.Builder.enableActingChunk to false. This does NOT cause a user-visible behavior change because AguiAgentAdapter.convertEvent() already silently drops acting chunks (they arrive with EventType.TOOL_RESULT and isLast=false, but the conversion only processes TOOL_RESULT when isLast=true). Still, a brief inline comment explaining the rationale would improve future maintainability.
| StreamOptions.builder() | ||
| .eventTypes(EventType.ALL) | ||
| .incremental(true) | ||
| .includeActingChunk(config.isEnableActingChunk()) |
There was a problem hiding this comment.
[nitpick] The StreamOptions.Builder.includeActingChunk defaults to true in core, but this PR explicitly overrides it to false (via config.isEnableActingChunk()). While this does NOT change user-visible behavior (acting chunks are already silently dropped by convertEvent's event.isLast() guard), the inverted default may confuse future readers. Consider adding a one-line comment: // Explicitly gate acting chunks behind config — AGUI event conversion for chunks is not yet implemented.
Description
Agui module adds enable-acting-chunk configuration. (Prepare for supporting ActivitySnapshot/ActivityDelta events)
Checklist
Please check the following items before code is ready to be reviewed.
mvn spotless:applymvn test)