Merge branch 'staging' into worldinfo-endpoint

This commit is contained in:
Cohee 2023-12-07 12:58:57 +02:00
commit 8082144c5a
2 changed files with 7 additions and 2 deletions

View File

@ -7732,7 +7732,7 @@ jQuery(async function () {
registerSlashCommand('dupe', DupeChar, [], ' duplicates the currently selected character', true, true); registerSlashCommand('dupe', DupeChar, [], ' duplicates the currently selected character', true, true);
registerSlashCommand('api', connectAPISlash, [], '<span class="monospace">(kobold, horde, novel, ooba, oai, claude, windowai, openrouter, scale, ai21, palm)</span> connect to an API', true, true); registerSlashCommand('api', connectAPISlash, [], '<span class="monospace">(kobold, horde, novel, ooba, oai, claude, windowai, openrouter, scale, ai21, palm)</span> connect to an API', true, true);
registerSlashCommand('impersonate', doImpersonate, ['imp'], ' calls an impersonation response', 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('closechat', doCloseChat, [], ' closes the current chat', true, true);
registerSlashCommand('panels', doTogglePanels, ['togglepanels'], ' toggle UI panels on/off', 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); registerSlashCommand('forcesave', doForceSave, [], ' forces a save of the current chat and settings', true, true);
@ -8161,6 +8161,7 @@ jQuery(async function () {
}; };
try { try {
showLoader();
const response = await fetch('/api/chats/rename', { const response = await fetch('/api/chats/rename', {
method: 'POST', method: 'POST',
body: JSON.stringify(body), body: JSON.stringify(body),
@ -8193,8 +8194,11 @@ jQuery(async function () {
$('#option_select_chat').trigger('click'); $('#option_select_chat').trigger('click');
$('#options').hide(); $('#options').hide();
} catch { } catch {
hideLoader();
await delay(500); await delay(500);
await callPopup('An error has occurred. Chat was not renamed.', 'text'); await callPopup('An error has occurred. Chat was not renamed.', 'text');
} finally {
hideLoader();
} }
}); });
@ -8352,7 +8356,7 @@ jQuery(async function () {
if (id == 'option_select_chat') { if (id == 'option_select_chat') {
if ((selected_group && !is_group_generating) || (this_chid !== undefined && !is_send_press) || fromSlashCommand) { if ((selected_group && !is_group_generating) || (this_chid !== undefined && !is_send_press) || fromSlashCommand) {
displayPastChats(); 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.. //however, the dialog popup still gets one..
if (!fromSlashCommand) { if (!fromSlashCommand) {
console.log('displaying shadow'); console.log('displaying shadow');

View File

@ -813,6 +813,7 @@ async function CreateZenSliders(elmnt) {
if (numVal === offVal) { handle.text('Off').css('color', 'rgba(128,128,128,0.5'); } if (numVal === offVal) { handle.text('Off').css('color', 'rgba(128,128,128,0.5'); }
else if (numVal === allVal) { handle.text('All'); } else if (numVal === allVal) { handle.text('All'); }
else { handle.css('color', ''); } else { handle.css('color', ''); }
numVal = steps[stepNumber];
} }
//everything else uses the flat slider value //everything else uses the flat slider value
//also note: the above sliders are not custom inputtable due to the array aliasing //also note: the above sliders are not custom inputtable due to the array aliasing