fix: vertex streaming chunk parse (#3599)

This commit is contained in:
woody
2026-03-16 21:13:18 +08:00
committed by GitHub
parent 94f0d7179f
commit 8961db2e90
3 changed files with 235 additions and 20 deletions

View File

@@ -1046,7 +1046,7 @@ func ExtractStreamingEvents(ctx wrapper.HttpContext, chunk []byte) []StreamEvent
if lineStartIndex != -1 {
value := string(body[valueStartIndex:i])
currentEvent.SetValue(currentKey, value)
} else {
} else if eventStartIndex != -1 {
currentEvent.RawEvent = string(body[eventStartIndex : i+1])
// Extra new line. The current event is complete.
events = append(events, *currentEvent)