Fix 'send if empty'

Closes #4881
This commit is contained in:
Cohee
2025-12-11 08:44:39 +00:00
parent fbf789fa74
commit 088ce0e962
+1 -1
View File
@@ -4066,7 +4066,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
await sendMessageAsUser(textareaText, messageBias);
}
}
else if (textareaText == '' && !automatic_trigger && !dryRun && type === undefined && main_api == 'openai' && oai_settings.send_if_empty.trim().length > 0) {
else if (textareaText == '' && !automatic_trigger && !dryRun && [undefined, 'normal'].includes(type) && main_api == 'openai' && oai_settings.send_if_empty.trim().length > 0) {
// Use send_if_empty if set and the user message is empty. Only when sending messages normally
await sendMessageAsUser(oai_settings.send_if_empty.trim(), messageBias);
}