This commit is contained in:
Tim Baek
2026-02-05 10:24:12 +04:00
parent 62750b8980
commit d3f2cf7474
2 changed files with 42 additions and 15 deletions
+21 -15
View File
@@ -1653,21 +1653,27 @@
// Check if there are pending tasks (more reliable than lastMessage.done)
if (taskIds !== null && taskIds.length > 0) {
// Tasks pending - queue the message instead of blocking
const _files = JSON.parse(JSON.stringify(files));
messageQueue = [
...messageQueue,
{
id: uuidv4(),
prompt: userPrompt,
files: _files
}
];
// Clear input
messageInput?.setText('');
prompt = '';
files = [];
return;
if ($settings?.enableMessageQueue ?? true) {
// Queue the message
const _files = JSON.parse(JSON.stringify(files));
messageQueue = [
...messageQueue,
{
id: uuidv4(),
prompt: userPrompt,
files: _files
}
];
// Clear input
messageInput?.setText('');
prompt = '';
files = [];
return;
} else {
// Interrupt: stop current generation and proceed
await stopResponse();
await tick();
}
}
if (history?.currentId) {