Bypass generation for QR slash commands
This commit is contained in:
parent
f2a96427a8
commit
d9d61e479d
|
@ -1,7 +1,7 @@
|
|||
import { saveSettingsDebounced, callPopup, getRequestHeaders, substituteParams } from "../../../script.js";
|
||||
import { getContext, extension_settings } from "../../extensions.js";
|
||||
import { initScrollHeight, resetScrollHeight } from "../../utils.js";
|
||||
import { registerSlashCommand } from "../../slash-commands.js";
|
||||
import { executeSlashCommands, registerSlashCommand } from "../../slash-commands.js";
|
||||
|
||||
export { MODULE_NAME };
|
||||
|
||||
|
@ -152,14 +152,19 @@ async function sendQuickReply(index) {
|
|||
|
||||
newText = substituteParams(newText);
|
||||
|
||||
// the prompt starts with '/' - execute slash commands natively
|
||||
if (prompt.startsWith('/')) {
|
||||
await executeSlashCommands(newText);
|
||||
return;
|
||||
}
|
||||
|
||||
$("#send_textarea").val(newText);
|
||||
|
||||
// Set the focus back to the textarea
|
||||
$("#send_textarea").trigger('focus');
|
||||
|
||||
// Only trigger send button if quickActionEnabled is not checked or
|
||||
// the prompt starts with '/'
|
||||
if (!extension_settings.quickReply.quickActionEnabled || prompt.startsWith('/')) {
|
||||
if (!extension_settings.quickReply.quickActionEnabled) {
|
||||
$("#send_but").trigger('click');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue