btlqql opened a new issue, #437:
URL: https://github.com/apache/rocketmq-dashboard/issues/437

   ## Problem
   
   The Studio web client parses each `ReadableStream` chunk as if it contained 
complete SSE lines. Network chunk boundaries are arbitrary, so an SSE event can 
be split in the middle of its JSON payload. In that case the client emits the 
partial payload as raw text and loses the rest of the event.
   
   The current parser also only reads a JSON `content` field, while 
`LlmGatewayStub` sends tokens in the `text` field. The bundled backend stub 
therefore produces a valid SSE stream that the web client silently ignores.
   
   ## Reproduction
   
   Return this valid event across two network chunks:
   
   ```text
   event: message\r\ndata: {"text":"hel
   lo"}\r\n\r\n
   ```
   
   The current client treats the first half as malformed JSON instead of 
buffering it until the SSE event boundary.
   
   ## Expected behavior
   
   - Buffer bytes until a complete SSE event is available.
   - Support LF and CRLF event boundaries and multiple events in one network 
chunk.
   - Join multiline `data:` fields according to SSE framing rules.
   - Accept both the backend stub's `text` field and the existing `content` 
field.
   - Preserve raw text payload compatibility and flush a final event when the 
stream closes.
   
   ## Proposed validation
   
   Add frontend tests covering fragmented events, coalesced events, multiline 
data, raw payloads, and the `[DONE]` sentinel.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to