diff --git a/public/index.html b/public/index.html index 7cb4f79da..cc468feae 100644 --- a/public/index.html +++ b/public/index.html @@ -1387,7 +1387,7 @@ Do Sample - + Add BOS Token @@ -1411,7 +1411,7 @@ Skip Special Tokens - + Temperature Last diff --git a/public/script.js b/public/script.js index 3251c47fc..571b95d2f 100644 --- a/public/script.js +++ b/public/script.js @@ -3464,9 +3464,13 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu scenario, char: name2, user: name1, + worldInfoBefore, + worldInfoAfter, beforeScenarioAnchor, afterScenarioAnchor, + storyString, mesExmString, + mesSendString, finalMesSend, generatedPromptCache, main: system, @@ -9292,13 +9296,16 @@ jQuery(async function () { $(document).keyup(function (e) { if (e.key === 'Escape') { - if (power_user.auto_save_msg_edits === false) { + const isEditVisible = $('#curEditTextarea').is(':visible'); + if (isEditVisible && power_user.auto_save_msg_edits === false) { closeMessageEditor(); $('#send_textarea').focus(); + return; } - if (power_user.auto_save_msg_edits === true) { + if (isEditVisible && power_user.auto_save_msg_edits === true) { $(`#chat .mes[mesid="${this_edit_mes_id}"] .mes_edit_done`).click(); $('#send_textarea').focus(); + return; } if (!this_edit_mes_id && $('#mes_stop').is(':visible')) { $('#mes_stop').trigger('click'); diff --git a/public/scripts/extensions/quick-reply/index.js b/public/scripts/extensions/quick-reply/index.js index ae9be7ac8..376fd7152 100644 --- a/public/scripts/extensions/quick-reply/index.js +++ b/public/scripts/extensions/quick-reply/index.js @@ -183,7 +183,7 @@ const init = async () => { slash.init(); autoExec = new AutoExecuteHandler(settings); - autoExec.handleStartup(); + await autoExec.handleStartup(); }; eventSource.on(event_types.APP_READY, init); @@ -197,16 +197,16 @@ const onChatChanged = async (chatIdx) => { manager.rerender(); buttons.refresh(); - autoExec.handleChatChanged(); + await autoExec.handleChatChanged(); }; eventSource.on(event_types.CHAT_CHANGED, onChatChanged); const onUserMessage = async () => { - autoExec.handleUser(); + await autoExec.handleUser(); }; eventSource.on(event_types.USER_MESSAGE_RENDERED, onUserMessage); const onAiMessage = async () => { - autoExec.handleAi(); + await autoExec.handleAi(); }; eventSource.on(event_types.CHARACTER_MESSAGE_RENDERED, onAiMessage); diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index 08adfbcb7..51b08538d 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -511,7 +511,7 @@ jQuery(function () { 'rep_pen_textgenerationwebui': 1, 'rep_pen_range_textgenerationwebui': 0, 'dynatemp_textgenerationwebui': false, - 'seed_textgenerationwebui': 1, + 'seed_textgenerationwebui': -1, 'ban_eos_token_textgenerationwebui': false, 'do_sample_textgenerationwebui': true, 'add_bos_token_textgenerationwebui': true, @@ -595,7 +595,7 @@ jQuery(function () { function showTypeSpecificControls(type) { $('[data-tg-type]').each(function () { - const tgTypes = $(this).attr('data-tg-type').split(','); + const tgTypes = $(this).attr('data-tg-type').split(',').map(x => x.trim()); for (const tgType of tgTypes) { if (tgType === type || tgType == 'all') { $(this).show(); diff --git a/start.sh b/start.sh index 719bb6265..a88bc42de 100755 --- a/start.sh +++ b/start.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if ! command -v npm &> /dev/null then