Merge pull request #43 from wagesj45/codex/fix-uncaught-syntaxerror-with-break-inside-queue-processing
Fix async rule loop
This commit is contained in:
commit
a8a4a4b4dc
1 changed files with 4 additions and 2 deletions
|
@ -106,6 +106,8 @@ async function applyAiRules(idsInput) {
|
|||
try {
|
||||
const full = await messenger.messages.getFull(id);
|
||||
const text = buildEmailText(full);
|
||||
|
||||
for (const rule of aiRules) {
|
||||
const cacheKey = await sha256Hex(`${id}|${rule.criterion}`);
|
||||
const matched = await AiClassifier.classifyText(text, rule.criterion, cacheKey);
|
||||
if (matched) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue