Fix A2A streaming chunk parsing and context_id persistence in OpenStudio MCP Demo UI#64
Closed
Copilot wants to merge 1 commit intoopenstudio_mcpfrom
Closed
Fix A2A streaming chunk parsing and context_id persistence in OpenStudio MCP Demo UI#64Copilot wants to merge 1 commit intoopenstudio_mcpfrom
Copilot wants to merge 1 commit intoopenstudio_mcpfrom
Conversation
Open
Copilot
AI
changed the title
[WIP] Update MCP demo implementation based on review feedback
Fix A2A streaming chunk parsing and context_id persistence in OpenStudio MCP Demo UI
Mar 2, 2026
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.
The OpenStudio MCP demo UI was only checking
chunk.get("content")on streaming responses, missing the actual A2A JSON-RPC envelope structure and never persistingcontext_id, causing empty responses and broken multi-turn conversations.Changes
contentfield access with full A2A JSON-RPC result parsing, branching onresult.kind:artifact-update→ extracts text fromartifact.partsstatus-update→ extracts text fromstatus.message.partscontext_idpersistence — capturesresult.contextIdon each chunk and stores it inst.session_state["context_id"]for follow-up turnsdelta.text,message.text,content, anddatachunk shapes for robustnessMirrors the pattern already established in
examples/eplus_mcp_demo/ui.py.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.