No staged changes detected. Would you like me to check unstaged changes instead?

This commit is contained in:
MythEclipse
2026-06-02 22:12:25 +07:00
parent 0a71e76e62
commit 4c5d76ea38
@@ -861,11 +861,21 @@ async function runTextOnlyBatch(
return `${systemText}\n\n<messages_to_analyze>\n${messagesBlock}\n</messages_to_analyze>`; return `${systemText}\n\n<messages_to_analyze>\n${messagesBlock}\n</messages_to_analyze>`;
}; };
const batchResult = await callModerationLLM( const batchResult = await Promise.race([
buildContent, callModerationLLM(buildContent, targetIds, `text-batch-${i + 1}`),
targetIds, new Promise<{ results: AnalysisResult[]; raw: unknown }>((_, reject) => {
`text-batch-${i + 1}`, const timeout = setTimeout(
); () =>
reject(
new Error(
`Text-only batch sub-batch ${i + 1} timed out for messages ${targetIds.join(", ")}`,
),
),
timeoutMs,
);
timeout.unref();
}),
]);
allResults.push(...batchResult.results); allResults.push(...batchResult.results);
if (batchResult.raw) lastRaw = batchResult.raw; if (batchResult.raw) lastRaw = batchResult.raw;