Skip to content

fix: respect ACP message boundaries in chat#56

Open
gandazgul wants to merge 1 commit into
formulahendry:mainfrom
gandazgul:fix/acp-message-boundaries
Open

fix: respect ACP message boundaries in chat#56
gandazgul wants to merge 1 commit into
formulahendry:mainfrom
gandazgul:fix/acp-message-boundaries

Conversation

@gandazgul

Copy link
Copy Markdown

Summary

  • reconcile live user_message_chunk acknowledgments with the optimistic prompt instead of appending duplicate text
  • split agent, thought, and replayed user messages when their ACP messageId changes
  • retain legacy boundaries around tool and plan updates when an agent omits messageId
  • add JSDOM regressions for live RunWield-style routing updates, replayed user messages, and multiple thought segments

Context

ACP v1 now defines messageId as the boundary for streamed user, agent, and thought messages. The chat renderer previously accumulated every agent chunk into one buffer and assumed user_message_chunk only appeared during session replay. Agents that acknowledge a live prompt therefore duplicated the user text, while multiple agent messages in one turn were concatenated.

Fixes #12

Validation

  • npm test — 5 passing
  • npm run package — production webpack build passes

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple thought data blocks are merged together

1 participant