Allow /gen with empty prompts

2a598fb7066c7e3fe8312a3077710905dae0cb79

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

1 files changed, +6 -5Showing whitespace changes
public/scripts/slash-commands.js+6 -5
@@ -2147,12 +2147,13 @@ async function generateRawCallback(args, value) {
21472147 }
21482148}
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+ */
21502156async function generateCallback(args, value) {
2151- if (!value) {
2152- console.warn('WARN: No argument provided for /gen command');
2153- return;
2154- }
2155-
21562157 // Prevent generate recursion
21572158 $('#send_textarea').val('')[0].dispatchEvent(new Event('input', { bubbles: true }));
21582159 const lock = isTrueBoolean(args?.lock);