Fix 'send if empty' Closes #4881

088ce0e962b138bb60958f8d32b549a4123f6508

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +1 -1Showing whitespace changes
public/script.js+1 -1
@@ -4066,7 +4066,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
4066 await sendMessageAsUser(textareaText, messageBias);4066 await sendMessageAsUser(textareaText, messageBias);
4067 }4067 }
4068 }4068 }
4069 else if (textareaText == '' && !automatic_trigger && !dryRun && type === undefined && main_api == 'openai' && oai_settings.send_if_empty.trim().length > 0) {4069 else if (textareaText == '' && !automatic_trigger && !dryRun && [undefined, 'normal'].includes(type) && main_api == 'openai' && oai_settings.send_if_empty.trim().length > 0) {
4070 // Use send_if_empty if set and the user message is empty. Only when sending messages normally4070 // Use send_if_empty if set and the user message is empty. Only when sending messages normally
4071 await sendMessageAsUser(oai_settings.send_if_empty.trim(), messageBias);4071 await sendMessageAsUser(oai_settings.send_if_empty.trim(), messageBias);
4072 }4072 }