This commit is contained in:
Timothy Jaeryang Baek committed 2026-04-12 19:02:57 -05:00
1 parent facb194a07
commit e10a00132e
1 file changed
+9
+9
View File
@@ -1391,10 +1391,16 @@
}
};
let processingQueueChats = new Set<string>();
const processNextInQueue = async (targetChatId: string) => {
if (processingQueueChats.has(targetChatId)) return;
const queue = $chatRequestQueues[targetChatId];
if (!queue || queue.length === 0) return;
processingQueueChats.add(targetChatId);
try {
const combinedPrompt = queue.map((m) => m.prompt).join('\n\n');
const combinedFiles = queue.flatMap((m) => m.files);
@@ -1404,6 +1410,9 @@
});
await submitPrompt(combinedPrompt, combinedFiles);
} finally {
processingQueueChats.delete(targetChatId);
}
};
const chatCompletedHandler = async (_chatId, modelId, responseMessageId, messages) => {