mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix /abort toasts in /while
This commit is contained in:
@ -342,13 +342,16 @@ async function whileCallback(args, value) {
|
|||||||
if (result && command) {
|
if (result && command) {
|
||||||
if (command instanceof SlashCommandClosure) {
|
if (command instanceof SlashCommandClosure) {
|
||||||
commandResult = await command.execute();
|
commandResult = await command.execute();
|
||||||
|
// don't suppress potentially loud /abort (need to bubble up to executeSlashCommandsWithOptions for toast)
|
||||||
|
if (commandResult.isAborted) break;
|
||||||
} else {
|
} else {
|
||||||
commandResult = await executeSubCommands(command, args._scope, args._parserFlags, args._abortController);
|
commandResult = await executeSubCommands(command, args._scope, args._parserFlags, args._abortController);
|
||||||
}
|
if (commandResult.isAborted) {
|
||||||
|
// abort toast (if loud) is already shown in subcommand execution,
|
||||||
if (commandResult.isAborted) {
|
// overwrite signal to quiet to prevent second toast from ancestor executions
|
||||||
args._abortController.abort(commandResult.abortReason, true);
|
args._abortController.signal.isQuiet = true;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user