Change same name logs to toast
| @@ -9879,8 +9879,12 @@ export async function renameChat(oldFileName, newName) { | |||
| 9879 | renamed_file: `${newName.trim()}.jsonl`, | 9879 | renamed_file: `${newName.trim()}.jsonl`, |
| 9880 | }; | 9880 | }; |
| 9881 | 9881 | ||
| 9882 | if (body.original_file === body.renamed_file) { | ||
| 9883 | console.debug('Chat rename cancelled, old and new names are the same'); | ||
| 9884 | return; | ||
| 9885 | } | ||
| 9882 | if (equalsIgnoreCaseAndAccents(body.original_file, body.renamed_file)) { | 9886 | if (equalsIgnoreCaseAndAccents(body.original_file, body.renamed_file)) { |
| 9883 | console.warn('Chat name is the same (ignoring case and accents)'); | 9887 | toastr.warning('Name not accepted, as it is the same as before (ignoring case and accents).', 'Rename Chat'); |
| 9884 | return; | 9888 | return; |
| 9885 | } | 9889 | } |
| 9886 | 9890 | ||
| @@ -896,7 +896,7 @@ export async function initPresetManager() { | |||
| 896 | return; | 896 | return; |
| 897 | } | 897 | } |
| 898 | if (equalsIgnoreCaseAndAccents(oldName, newName)) { | 898 | if (equalsIgnoreCaseAndAccents(oldName, newName)) { |
| 899 | console.warn('Preset name is the same (ignoring case and accents)'); | 899 | toastr.warning('Name not accepted, as it is the same as before (ignoring case and accents).', 'Rename Preset'); |
| 900 | return; | 900 | return; |
| 901 | } | 901 | } |
| 902 | 902 | ||
| @@ -3587,7 +3587,7 @@ async function renameWorldInfo(name, data) { | |||
| 3587 | return; | 3587 | return; |
| 3588 | } | 3588 | } |
| 3589 | if (equalsIgnoreCaseAndAccents(oldName, newName)) { | 3589 | if (equalsIgnoreCaseAndAccents(oldName, newName)) { |
| 3590 | console.warn('World info name is the same (ignoring case and accents)'); | 3590 | toastr.warning('Name not accepted, as it is the same as before (ignoring case and accents).', 'Rename World Info'); |
| 3591 | return; | 3591 | return; |
| 3592 | } | 3592 | } |
| 3593 | 3593 | ||