fix(acp): backfill missing text chunks from part updates#15614
fix(acp): backfill missing text chunks from part updates#15614nkosi23 wants to merge 7 commits intoanomalyco:devfrom
Conversation
…-agent-plugin fix(acp): backfill missing text chunks from part updates
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found two potentially related PRs that deal with similar concerns about duplicate events and streaming updates: Potentially Related PRs:
However, neither of these appears to be a direct duplicate of PR #15614 (the current PR), as they address different aspects of the codebase. PR #15614 is specifically focused on backfilling missing text chunks in the ACP agent when |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
…-agent-plugin-68apj7 Stream text/reasoning deltas to ACP and deduplicate using snapshots
Issue for this PR
Closes #15613
Type of change
What does this PR do?
message.part.deltadelivery, causing assistant output to appear truncated until a later refresh.message.part.updatedarrives so ACP clients receive output incrementally.This PR therefore contains:
textSnapshots: Map<string,string>topackages/opencode/src/acp/agent.tsto track the last-seen text for each part id.message.part.updatedfortextandreasoningparts by computing the missing delta viatextDelta(id, next)and emitting anagent_message_chunkoragent_thought_chunkcontaining only the new text.message.part.deltahandling to keeptextSnapshotsin sync (store full part text) so delta and updated events don’t cause duplicate emission.Codex Task
If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
How did you verify your code works?
I have added unit tests
Screenshots / recordings
Checklist
If you do not follow this template your PR will be automatically rejected.