Parses a single SSE line from the AI SDK v6 UI Message Stream protocol. Returns null if the line cannot be parsed or should be ignored.
Format: data: <json>\n
data: <json>\n
Supported types: text-start – Text block start (forwarded as-is) text-delta – Text chunk text-end – Text block end (forwarded as-is) tool-input-available – Tool call (client tools only, without providerExecuted) tool-output-available – Tool result (informational, skipped) finish – Finish event with reason error – Error event start – Stream start (skipped) [DONE] – Stream termination (skipped)
A single line from the SSE byte stream.
Fallback ID for text parts that lack an explicit id.
https://ai-sdk.dev/docs/ai-sdk-ui/stream-protocol
Parses a single SSE line from the AI SDK v6 UI Message Stream protocol. Returns null if the line cannot be parsed or should be ignored.
Format:
data: <json>\nSupported types: text-start – Text block start (forwarded as-is) text-delta – Text chunk text-end – Text block end (forwarded as-is) tool-input-available – Tool call (client tools only, without providerExecuted) tool-output-available – Tool result (informational, skipped) finish – Finish event with reason error – Error event start – Stream start (skipped) [DONE] – Stream termination (skipped)