diff --git a/public/script.js b/public/script.js index 759a7462b..6e7ef8fd8 100644 --- a/public/script.js +++ b/public/script.js @@ -9879,8 +9879,12 @@ export async function renameChat(oldFileName, newName) { renamed_file: `${newName.trim()}.jsonl`, }; + if (body.original_file === body.renamed_file) { + console.debug('Chat rename cancelled, old and new names are the same'); + return; + } if (equalsIgnoreCaseAndAccents(body.original_file, body.renamed_file)) { - console.warn('Chat name is the same (ignoring case and accents)'); + toastr.warning('Name not accepted, as it is the same as before (ignoring case and accents).', 'Rename Chat'); return; } diff --git a/public/scripts/preset-manager.js b/public/scripts/preset-manager.js index fc2f9e86f..32d0ecbf9 100644 --- a/public/scripts/preset-manager.js +++ b/public/scripts/preset-manager.js @@ -896,7 +896,7 @@ export async function initPresetManager() { return; } if (equalsIgnoreCaseAndAccents(oldName, newName)) { - console.warn('Preset name is the same (ignoring case and accents)'); + toastr.warning('Name not accepted, as it is the same as before (ignoring case and accents).', 'Rename Preset'); return; } diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 84f11e18e..b3985aad4 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -3587,7 +3587,7 @@ async function renameWorldInfo(name, data) { return; } if (equalsIgnoreCaseAndAccents(oldName, newName)) { - console.warn('World info name is the same (ignoring case and accents)'); + toastr.warning('Name not accepted, as it is the same as before (ignoring case and accents).', 'Rename World Info'); return; }