Refactor hideMessageCallback and unhideMessageCallback to remove unnecessary console logs. Introduce onlyUniqueJson and sortIgnoreCaseAndAccents utility functions

This commit is contained in:
Cohee
2025-03-12 10:18:02 +02:00
parent 1026e1f8e9
commit e7189a1260
3 changed files with 38 additions and 17 deletions

View File

@ -3055,10 +3055,6 @@ async function askCharacter(args, text) {
}
async function hideMessageCallback(args, value) {
if (!value) {
console.log('No range provided. Hiding the last message.');
}
const range = value ? stringToRange(value, 0, chat.length - 1) : { start: chat.length - 1, end: chat.length - 1 };
if (!range) {
@ -3072,10 +3068,6 @@ async function hideMessageCallback(args, value) {
}
async function unhideMessageCallback(args, value) {
if (!value) {
console.log('No range provided. Unhiding the last message');
}
const range = value ? stringToRange(value, 0, chat.length - 1) : { start: chat.length - 1, end: chat.length - 1 };
if (!range) {