diff --git a/public/script.js b/public/script.js index c435e9fd0..184379da0 100644 --- a/public/script.js +++ b/public/script.js @@ -11084,9 +11084,9 @@ jQuery(async function () { const oldFileName = oldFileNameFull.replace('.jsonl', ''); const popupText = await renderTemplateAsync('chatRename'); - const newName = await callPopup(popupText, 'input', oldFileName); + const newName = await callGenericPopup(popupText, POPUP_TYPE.INPUT, oldFileName); - if (!newName || newName == oldFileName) { + if (!newName || typeof newName !== 'string' || newName == oldFileName) { console.log('no new name found, aborting'); return; }