From c51a821b1edd7340b801f374a80a164ac1a04072 Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Thu, 7 Dec 2023 11:52:10 +0900 Subject: [PATCH 1/4] fix zen slider rep pen range value transfer --- public/scripts/power-user.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index 0ca7b336e..21806cb99 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -813,6 +813,7 @@ async function CreateZenSliders(elmnt) { if (numVal === offVal) { handle.text('Off').css('color', 'rgba(128,128,128,0.5'); } else if (numVal === allVal) { handle.text('All'); } else { handle.css('color', ''); } + numVal = steps[stepNumber]; } //everything else uses the flat slider value //also note: the above sliders are not custom inputtable due to the array aliasing From 698890ae0fe7e2eaf2297de204fe0124171d15e9 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 7 Dec 2023 12:20:33 +0200 Subject: [PATCH 2/4] Fix /delchat slash command --- public/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index 62d7942ad..517995f44 100644 --- a/public/script.js +++ b/public/script.js @@ -7732,7 +7732,7 @@ jQuery(async function () { registerSlashCommand('dupe', DupeChar, [], '– duplicates the currently selected character', true, true); registerSlashCommand('api', connectAPISlash, [], '(kobold, horde, novel, ooba, oai, claude, windowai, openrouter, scale, ai21, palm) – connect to an API', true, true); registerSlashCommand('impersonate', doImpersonate, ['imp'], '– calls an impersonation response', true, true); - registerSlashCommand('api/chats/delete', doDeleteChat, [], '– deletes the current chat', true, true); + registerSlashCommand('delchat', doDeleteChat, [], '– deletes the current chat', true, true); registerSlashCommand('closechat', doCloseChat, [], '– closes the current chat', true, true); registerSlashCommand('panels', doTogglePanels, ['togglepanels'], '– toggle UI panels on/off', true, true); registerSlashCommand('forcesave', doForceSave, [], '– forces a save of the current chat and settings', true, true); @@ -8352,7 +8352,7 @@ jQuery(async function () { if (id == 'option_select_chat') { if ((selected_group && !is_group_generating) || (this_chid !== undefined && !is_send_press) || fromSlashCommand) { displayPastChats(); - //this is just to avoid the shadow for past chat view when using /api/chats/delete + //this is just to avoid the shadow for past chat view when using /delchat //however, the dialog popup still gets one.. if (!fromSlashCommand) { console.log('displaying shadow'); From bd1f09c644256bd97cbee00292f1cf5def3c555b Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 7 Dec 2023 12:27:18 +0200 Subject: [PATCH 3/4] Add loader for chat renaming --- public/script.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/script.js b/public/script.js index 517995f44..46a657ef4 100644 --- a/public/script.js +++ b/public/script.js @@ -8161,6 +8161,7 @@ jQuery(async function () { }; try { + showLoader(); const response = await fetch('/api/chats/rename', { method: 'POST', body: JSON.stringify(body), @@ -8195,6 +8196,8 @@ jQuery(async function () { } catch { await delay(500); await callPopup('An error has occurred. Chat was not renamed.', 'text'); + } finally { + hideLoader(); } }); From 9b7a0f3d351efb2d9756aa894a65f16309ba9769 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 7 Dec 2023 12:29:12 +0200 Subject: [PATCH 4/4] Hide loader before displaying blocking error message --- public/script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/script.js b/public/script.js index 46a657ef4..6ab1ddccc 100644 --- a/public/script.js +++ b/public/script.js @@ -8194,6 +8194,7 @@ jQuery(async function () { $('#option_select_chat').trigger('click'); $('#options').hide(); } catch { + hideLoader(); await delay(500); await callPopup('An error has occurred. Chat was not renamed.', 'text'); } finally {