Allow /gen with empty prompts

2a598fb7066c7e3fe8312a3077710905dae0cb79

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

1 files changed, +6 -5Ignore whitespace
public/scripts/slash-commands.js+6 -5
@@ -2147,12 +2147,13 @@ async function generateRawCallback(args, value) {
2147 }2147 }
2148}2148}
21492149
2150/**
2151 * Callback for the /gen command
2152 * @param {object} args Named arguments
2153 * @param {string} value Unnamed argument
2154 * @returns {Promise<string>} The generated text
2155 */
2150async function generateCallback(args, value) {2156async function generateCallback(args, value) {
2151 if (!value) {
2152 console.warn('WARN: No argument provided for /gen command');
2153 return;
2154 }
2155
2156 // Prevent generate recursion2157 // Prevent generate recursion
2157 $('#send_textarea').val('')[0].dispatchEvent(new Event('input', { bubbles: true }));2158 $('#send_textarea').val('')[0].dispatchEvent(new Event('input', { bubbles: true }));
2158 const lock = isTrueBoolean(args?.lock);2159 const lock = isTrueBoolean(args?.lock);