fix: reconcile ACP assistant chunks before end_turn#29120
fix: reconcile ACP assistant chunks before end_turn#29120tonystark-agent wants to merge 1 commit into
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #25683: fix(acp): drain message events before returning end_turn Why it's related: You should verify whether #25683 was closed/merged without fully resolving the issue, or if #29120 represents a new approach to the same problem. |
Issue for this PR
Closes #17505
Type of change
What does this PR do?
ACP can resolve
session/promptbefore the final assistant deltas have drained tosession/update, which lets clients observeend_turnwith an empty or truncated visible reply.This change serializes ACP
sessionUpdatesends and reconciles the returned assistant message beforeend_turn. Any text/reasoning suffix that was not already streamed is replayed once, and late duplicate deltas are skipped or trimmed against the delivered character count.How did you verify your code works?
bun test test/acp/event-subscription.test.ts --timeout 30000frompackages/opencode(15 pass)bun run typecheckfrompackages/opencodebun run lint packages/opencode/src/acp/agent.ts packages/opencode/test/acp/event-subscription.test.ts(0 errors; existing warnings only)git diff --checkScreenshots / recordings
Not applicable; ACP transport ordering fix covered by unit tests.
Checklist