Skip to content

fix: prevent duplicate streaming output from cursor-agent#71

Open
Snax1210 wants to merge 1 commit into
Nomadcxx:mainfrom
Snax1210:main
Open

fix: prevent duplicate streaming output from cursor-agent#71
Snax1210 wants to merge 1 commit into
Nomadcxx:mainfrom
Snax1210:main

Conversation

@Snax1210
Copy link
Copy Markdown

  • Unify delta tracking in StreamToSseConverter and StreamToAiSdkParts to handle both delta-style and accumulated-style partial events, replacing the fragile sawPartials/DeltaTracker dual-path logic.
  • Fix extractCompletionFromStream to diff partial events against previous partial text instead of blindly appending.
  • Replace async data event handler in Node.js streaming path with queue-based sequential processor to eliminate race condition when await yields control between concurrent data callbacks.

- Unify delta tracking in StreamToSseConverter and StreamToAiSdkParts
  to handle both delta-style and accumulated-style partial events,
  replacing the fragile sawPartials/DeltaTracker dual-path logic.
- Fix extractCompletionFromStream to diff partial events against
  previous partial text instead of blindly appending.
- Replace async data event handler in Node.js streaming path with
  queue-based sequential processor to eliminate race condition when
  await yields control between concurrent data callbacks.
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.

1 participant