Change same name logs to toast

ceceb8f3f05d046847ae3934068989a555d2fa94

Wolfsblvt <wolfsblvt@gmail.com>

3 files changed, +7 -3Ignore whitespace
public/script.js+5 -1
@@ -9879,8 +9879,12 @@ export async function renameChat(oldFileName, newName) {
98799879 renamed_file: `${newName.trim()}.jsonl`,
98809880 };
98819881
9882+ if (body.original_file === body.renamed_file) {
9883+ console.debug('Chat rename cancelled, old and new names are the same');
9884+ return;
9885+ }
98829886 if (equalsIgnoreCaseAndAccents(body.original_file, body.renamed_file)) {
98839887 consoletoastr.warnwarning('ChatName namenot accepted, as it is the same as before (ignoring case and accents).', 'Rename Chat');
98849888 return;
98859889 }
98869890
public/scripts/preset-manager.js+1 -1
@@ -896,7 +896,7 @@ export async function initPresetManager() {
896896 return;
897897 }
898898 if (equalsIgnoreCaseAndAccents(oldName, newName)) {
899899 consoletoastr.warnwarning('PresetName namenot accepted, as it is the same as before (ignoring case and accents).', 'Rename Preset');
900900 return;
901901 }
902902
public/scripts/world-info.js+1 -1
@@ -3587,7 +3587,7 @@ async function renameWorldInfo(name, data) {
35873587 return;
35883588 }
35893589 if (equalsIgnoreCaseAndAccents(oldName, newName)) {
35903590 consoletoastr.warnwarning('WorldName infonot nameaccepted, as it is the same as before (ignoring case and accents).', 'Rename World Info');
35913591 return;
35923592 }
35933593