mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix /del command (for real this time)
This commit is contained in:
@ -5439,10 +5439,10 @@ function updateMessage(div) {
|
|||||||
return { mesBlock, text, mes, bias };
|
return { mesBlock, text, mes, bias };
|
||||||
}
|
}
|
||||||
|
|
||||||
function openMessageDelete() {
|
function openMessageDelete(fromSlashCommand) {
|
||||||
closeMessageEditor();
|
closeMessageEditor();
|
||||||
hideSwipeButtons();
|
hideSwipeButtons();
|
||||||
if ((this_chid != undefined && !is_send_press) || (selected_group && !is_group_generating)) {
|
if (fromSlashCommand || (this_chid != undefined && !is_send_press) || (selected_group && !is_group_generating)) {
|
||||||
$("#dialogue_del_mes").css("display", "block");
|
$("#dialogue_del_mes").css("display", "block");
|
||||||
$("#send_form").css("display", "none");
|
$("#send_form").css("display", "none");
|
||||||
$(".del_checkbox").each(function () {
|
$(".del_checkbox").each(function () {
|
||||||
@ -7999,7 +7999,7 @@ jQuery(async function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if (id == "option_delete_mes") {
|
else if (id == "option_delete_mes") {
|
||||||
setTimeout(openMessageDelete, animation_duration);
|
setTimeout(() => openMessageDelete(fromSlashCommand), animation_duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (id == "option_close_chat") {
|
else if (id == "option_close_chat") {
|
||||||
|
@ -1814,9 +1814,8 @@ async function doMesCut(_, text) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function doDelMode(_, text) {
|
async function doDelMode(_, text) {
|
||||||
|
|
||||||
//first enter delmode
|
//first enter delmode
|
||||||
$("#option_delete_mes").trigger('click')
|
$("#option_delete_mes").trigger('click', { fromSlashCommand: true });
|
||||||
|
|
||||||
//reject invalid args
|
//reject invalid args
|
||||||
if (text && isNaN(text)) {
|
if (text && isNaN(text)) {
|
||||||
|
Reference in New Issue
Block a user