fix(cli): align stream error handling after output-mode merge
Follow up on #1740/#1741 by typing terminal SSE errors in the SDK, classifying them as server.error in the CLI/MCP, marking Projector done on error frames, attaching session_id to MCP stream failures, and migrating the e2e chat step to the bounded JSON envelope.
This commit is contained in:
@@ -65,12 +65,7 @@ func (a *Accumulator) Append(r *sdk.StreamResponse) {
|
||||
a.AssistantMessageID = r.AssistantMessageID
|
||||
}
|
||||
// Capture references whenever they arrive - they may land on a
|
||||
// dedicated `references` event before the terminal `complete`. Strip the
|
||||
// bulky per-chunk Content so the buffered envelope stays small: agents
|
||||
// consume the index (id / parent_chunk_id / title / score / snippet) and
|
||||
// fetch full passages on demand via `chunk view`. This runs after SSE
|
||||
// parsing, so it governs outgoing envelope size — the incoming line-size
|
||||
// limit is the scanner buffer's job, not this one.
|
||||
// dedicated `references` event before the terminal `complete`.
|
||||
if r.KnowledgeReferences != nil {
|
||||
a.References = r.KnowledgeReferences
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user