mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
pass prev pipeResult through if result undefined
This commit is contained in:
@@ -1524,7 +1524,11 @@ async function executeSlashCommands(text, unescape = false) {
|
|||||||
unnamedArg = unnamedArg.replace(/{{pipe}}/i, pipeResult || '');
|
unnamedArg = unnamedArg.replace(/{{pipe}}/i, pipeResult || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let oldPipeResult = pipeResult;
|
||||||
pipeResult = await result.command.callback(result.args, unnamedArg);
|
pipeResult = await result.command.callback(result.args, unnamedArg);
|
||||||
|
if (pipeResult === undefined && oldPipeResult !== undefined) {
|
||||||
|
pipeResult = oldPipeResult;
|
||||||
|
}
|
||||||
|
|
||||||
if (result.command.interruptsGeneration) {
|
if (result.command.interruptsGeneration) {
|
||||||
interrupt = true;
|
interrupt = true;
|
||||||
|
Reference in New Issue
Block a user