fix(opencode): retry stalled SSE streams (#29837)

This commit is contained in:
Aiden Cline
2026-05-29 00:19:54 -05:00
committed by GitHub
parent a15d4f9f04
commit c7e1fc5e42
2 changed files with 31 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ function wrapSSE(res: Response, ms: number, ctl: AbortController) {
async pull(ctrl) {
const part = await new Promise<Awaited<ReturnType<typeof reader.read>>>((resolve, reject) => {
const id = setTimeout(() => {
const err = new Error("SSE read timed out")
const err = new ProviderError.ResponseStreamError("SSE read timed out")
ctl.abort(err)
void reader.cancel(err)
reject(err)