fix: unblock local news page generation

This commit is contained in:
john
2026-07-25 21:55:00 +08:00
parent 793e64bfbc
commit 6b6f9ed01c
16 changed files with 1075 additions and 47 deletions
+4 -1
View File
@@ -46,7 +46,10 @@ export function shouldKeepStreamingAfterRunError(status, message = '', code = ''
// the session SSE is still the source of truth, so recover from the session
// instead of showing a terminal error in the chat composer.
const text = `${String(code ?? '')} ${String(message ?? '')}`.toLowerCase();
if (String(code ?? '').trim() === 'SESSION_RUN_CONFLICT') return false;
const normalizedCode = String(code ?? '').trim();
if (normalizedCode === 'SESSION_RUN_CONFLICT' || normalizedCode === 'AGENT_RUN_FAILED') {
return false;
}
return text.includes('session already has an active request')
|| text.includes('active request. cancel it first');
}