mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 10:57:45 +01:00
Silent /abort
This commit is contained in:
parent
64b0123acf
commit
d9f9da99e6
@ -1423,7 +1423,7 @@ async function runCallback(args, name) {
|
||||
|
||||
function abortCallback() {
|
||||
$('#send_textarea').val('')[0].dispatchEvent(new Event('input', { bubbles:true }));
|
||||
throw new Error('/abort command executed');
|
||||
throw new Error('/abort command executed', { cause: 'abort' });
|
||||
}
|
||||
|
||||
async function delayCallback(_, amount) {
|
||||
@ -2749,10 +2749,12 @@ export async function executeSlashCommandsOnChatInput(text, options = {}) {
|
||||
}
|
||||
} catch (e) {
|
||||
document.querySelector('#form_sheld').classList.add('script_error');
|
||||
toastr.error(e.message);
|
||||
result = new SlashCommandClosureResult();
|
||||
result.isError = true;
|
||||
result.errorMessage = e.message;
|
||||
if (e.cause !== 'abort') {
|
||||
toastr.error(e.message);
|
||||
}
|
||||
} finally {
|
||||
delay(1000).then(()=>clearCommandProgressDebounced());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user