parseFrame
function parseFrame<T>(data, provider): T;Defined in: core/src/transport.ts:313
Parse one SSE payload as the JSON event it must be.
A frame that is not JSON used to be skipped as “a keep-alive or a frame we do
not model”. But parseSseStream already drops comments and empty frames,
which is every keep-alive the vendors send, so what reaches here unparsable
is a broken stream: a delta, a tool call or the finish itself, gone, with the
turn still reading as whole. It fails as network, the same as a socket that
dies mid-read (cc-proxy fails these too).
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data |
string |
provider |
string |
Returns
Section titled “Returns”T