Repository navigation
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
This was referenced Nov 8, 2026
chcodex
added a commit
to chcodex/agentscope-java
that referenced
this pull request
Nov 8, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4067.
AG-UI clients aggregate assistant text by
messageId. Before this change the text converter derived the id fromTextBlockDeltaEvent.replyId, which is the per-model-call id, sotext -> tool -> textinside one assistant turn produced two assistant messages. This resolves the text id from each event's stable execution turn id (ExecutionIdentity.turnId), the same identity used by #4026 replay and #4039 live delivery.Changes
TextBlockEventConverternow resolves the text message id directly from the event:event.getExecution().turnId()when present, otherwisereplyId-blockId. Forwarded text therefore uses the child event's own turn id when present and falls back toreplyId-blockIdonly when it has no execution identity.AguiStreamContextturn-id state (assistantTurnId,beginAssistantTurn,endAssistantTurn,resolveTextMessageId); no text identity is carried across events in the stream context anymore.AgentLifecycleEventConverteris back to its original lifecycle-only behavior and does not record text ids.TEXT_MESSAGE_STARTbefore appending, so every text segment has a matchedSTART/ENDand noSTARTis emitted while the id is still open.Relation to #4026 and #4039
#4026(pushed asc21d7e92a) already derives replay text ids fromSessionEvent.turnId()and reasoning ids fromturnId + ":reasoning".#4039(rebased and pushed as0c4f2db20) addsAgentEventIds.turnId/textMessageId/reasoningMessageId, readingevent.getExecution().turnId(), and usesturnId:reasoningfor live reasoning.AgentEventIds.textMessageIdexactly; on rebase the local resolver can be replaced byAgentEventIds. ThestartTextMessagereopen hunk still overlaps with feat(agui): hand off active runs to live frames #4039; keep either implementation when resolving.Tests
mvn -o -q -pl agentscope-extensions/agentscope-extensions-protocol/agentscope-extensions-agui -am -DskipTests -Dmaven.javadoc.skip=true installmvn -o -q -pl agentscope-extensions/agentscope-extensions-protocol/agentscope-extensions-agui spotless:checkmvn -o -q -pl agentscope-extensions/agentscope-extensions-protocol/agentscope-extensions-agui test— 489 tests, 0 failures, 0 errors.turnId; each text segment has matched START/END; a second tool round keeps it; each assistant turn uses its own turn id; forwarded text uses the child turn id when present, falls back to block ids without execution, and never reuses the parent id; missing turn id keeps per-block fallback ids; reasoning does not reuse the bare text id.npm test,npm run validate,npm run broken-linkspass.No public config, legacy flag, or opt-in/opt-out was added.
Merge order
AgentEventIds.textMessageId. On feat(agui): hand off active runs to live frames #4039's rebase, keepAgentEventIdsand drop this PR's local resolver.TextBlockEventConverter.javaanddocs/v2/{en,zh}/integration/protocol/agui.md×2; resolution: take this PR's docs text, keep feat(agui): hand off active runs to live frames #4039'sAguiStreamContextreopen behavior.