7 lines
326 B
TypeScript
7 lines
326 B
TypeScript
export function isOpencodeUpstreamSaturated(message: string | null | undefined): boolean {
|
|
const normalized = message?.trim().toLowerCase() ?? '';
|
|
if (!normalized) return false;
|
|
return normalized.includes('当前分组上游负载已饱和')
|
|
|| (normalized.includes('upstream') && normalized.includes('saturat'));
|
|
}
|