Skip to content

SSE decoder fix in packages/ssestream/ssestream.go #3

Open
kasyap1234 wants to merge 2 commits into
coder:mainfrom
kasyap1234:main
Open

SSE decoder fix in packages/ssestream/ssestream.go #3
kasyap1234 wants to merge 2 commits into
coder:mainfrom
kasyap1234:main

Conversation

@kasyap1234

Copy link
Copy Markdown

Implemented the SSE decoder fix in packages/ssestream/ssestream.go so empty/comment-only blocks no longer dispatch empty events.

Added tests in packages/ssestream/ssestream_test.go covering:

  1. : OPENROUTER PROCESSING\n\n comment-only blocks
  2. event: blocks without data:
  3. multiline data: preservation
    Validation:

go test ./packages/ssestream passes

Introduce hasData to track if any data was collected since the last
empty line. Dispatch events on blank lines only when data exists; otherwise
reset state without emitting an event.
@kasyap1234

Copy link
Copy Markdown
Author

@kylecarbs requesting you to review this ,as this is linked to this coder/coder#26469

@phorcys420

Copy link
Copy Markdown
Member

(linked to coder/coder#26469)

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.

2 participants