mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-03 12:47:35 +01:00
Don't execute commands on dry runs
This commit is contained in:
parent
e5f7b0b5c7
commit
59e558fba5
@ -2220,8 +2220,8 @@ export async function generateQuietPrompt(quiet_prompt, quietToLoud, skipWIAN, q
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function processCommands(message, type) {
|
async function processCommands(message, type, dryRun) {
|
||||||
if (type == "regenerate" || type == "swipe" || type == 'quiet') {
|
if (dryRun || type == "regenerate" || type == "swipe" || type == 'quiet') {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2776,7 +2776,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||||||
|
|
||||||
message_already_generated = isImpersonate ? `${name1}: ` : `${name2}: `;
|
message_already_generated = isImpersonate ? `${name1}: ` : `${name2}: `;
|
||||||
|
|
||||||
const interruptedByCommand = await processCommands($("#send_textarea").val(), type);
|
const interruptedByCommand = await processCommands($("#send_textarea").val(), type, dryRun);
|
||||||
|
|
||||||
if (interruptedByCommand) {
|
if (interruptedByCommand) {
|
||||||
$("#send_textarea").val('').trigger('input');
|
$("#send_textarea").val('').trigger('input');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user