This commit is contained in:
Timothy Jaeryang Baek committed 2026-04-02 19:29:23 -05:00
1 parent 8c2afb8157
commit 730e52a431
1 file changed
+5 -5
+5 -5
View File
@@ -2417,7 +2417,7 @@
history.messages[responseMessage.id] = responseMessage; history.messages[responseMessage.id] = responseMessage;
}; };
const stopResponse = async () => { const stopResponse = async (processQueue = true) => {
if (taskIds) { if (taskIds) {
for (const taskId of taskIds) { for (const taskId of taskIds) {
const res = await stopTask(localStorage.token, taskId).catch((error) => { const res = await stopTask(localStorage.token, taskId).catch((error) => {
@@ -2449,7 +2449,9 @@
generationController = null; generationController = null;
} }
await processNextInQueue($chatId); if (processQueue) {
await processNextInQueue($chatId);
}
}; };
const submitMessage = async (parentId, prompt) => { const submitMessage = async (parentId, prompt) => {
@@ -2913,10 +2915,8 @@
...q, ...q,
[$chatId]: queue.filter((m) => m.id !== id) [$chatId]: queue.filter((m) => m.id !== id)
})); }));
// Stop current generation first await stopResponse(false);
await stopResponse();
await tick(); await tick();
// Submit queued message directly without clearing input
await submitPrompt(item.prompt, item.files); await submitPrompt(item.prompt, item.files);
} }
}} }}