Skip to content

feat(agui): add enable acting chunk configuration#1649

Open
jujn wants to merge 2 commits into
agentscope-ai:mainfrom
jujn:feat/agui/enable-acting-chunk
Open

feat(agui): add enable acting chunk configuration#1649
jujn wants to merge 2 commits into
agentscope-ai:mainfrom
jujn:feat/agui/enable-acting-chunk

Conversation

@jujn

@jujn jujn commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

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.

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@jujn jujn requested review from a team and Copilot June 6, 2026 13:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 enableActingChunk in AguiAdapterConfig and wires it into StreamOptions.includeActingChunk(...).
  • Exposes agentscope.agui.enable-acting-chunk in Spring Boot AguiProperties and 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

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...tscope/spring/boot/agui/common/AguiProperties.java 0.00% 4 Missing ⚠️
...t/agui/mvc/AgentscopeAguiMvcAutoConfiguration.java 0.00% 1 Missing ⚠️
...ebflux/AgentscopeAguiWebFluxAutoConfiguration.java 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@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 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())

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.

[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.

@AgentScopeJavaBot AgentScopeJavaBot added enhancement New feature or request area/ext/integration External protocols & middleware integrations area/ext/spring-boot Spring Boot starters labels Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ext/integration External protocols & middleware integrations area/ext/spring-boot Spring Boot starters enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants