Merge remote-tracking branch 'origin/feature/v1.3_主agent_rxd' into test

This commit is contained in:
rd
2025-09-05 13:53:40 +08:00

View File

@ -70,15 +70,14 @@ export default async (config: SSEConfig, url: string = DEFAULT_SSE_URL): Promise
} }
}, },
onerror(error: Error) { onerror(error: Error) {
// console.error('SSE error:', error); // 请求失败时主动关闭SSE连接
abortController.abort();
handleError?.(error); handleError?.(error);
}, },
onclose() { onclose() {
// console.log('SSE connection closed');
handleClose?.(); handleClose?.();
}, },
async onopen(response: Response) { async onopen(response: Response) {
// console.log('onopen', response);
handleOpen?.(response); handleOpen?.(response);
}, },
}); });