mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix /cut command
This commit is contained in:
@@ -7967,8 +7967,9 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$(document).on("click", ".mes_edit_delete", async function () {
|
$(document).on("click", ".mes_edit_delete", async function (event, customData) {
|
||||||
if (power_user.confirm_message_delete) {
|
const fromSlashCommand = customData?.fromSlashCommand || false;
|
||||||
|
if (power_user.confirm_message_delete && fromSlashCommand !== true) {
|
||||||
const confirmation = await callPopup("Are you sure you want to delete this message?", 'confirm');
|
const confirmation = await callPopup("Are you sure you want to delete this message?", 'confirm');
|
||||||
if (!confirmation) {
|
if (!confirmation) {
|
||||||
return;
|
return;
|
||||||
|
@@ -16,7 +16,8 @@ import {
|
|||||||
name1,
|
name1,
|
||||||
name2,
|
name2,
|
||||||
replaceCurrentChat,
|
replaceCurrentChat,
|
||||||
setCharacterId
|
setCharacterId,
|
||||||
|
setEditedMessageId
|
||||||
} from "../script.js";
|
} from "../script.js";
|
||||||
import { favsToHotswap, isMobile, initMovingUI } from "./RossAscends-mods.js";
|
import { favsToHotswap, isMobile, initMovingUI } from "./RossAscends-mods.js";
|
||||||
import {
|
import {
|
||||||
@@ -1123,8 +1124,8 @@ async function doMesCut(_, text) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
mesToCut.find('.mes_edit_delete').trigger('click');
|
setEditedMessageId(mesIDToCut);
|
||||||
$('#dialogue_popup_ok').trigger('click');
|
mesToCut.find('.mes_edit_delete').trigger('click', { fromSlashCommand: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user