From 24dc5baf339f543adee70fcd30df22d1566f80f1 Mon Sep 17 00:00:00 2001 From: Cohee Date: Wed, 7 Jun 2023 15:25:31 +0300 Subject: [PATCH] #456 Insert A/N with frequency 1 no matter the chat length --- public/scripts/extensions/floating-prompt/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/scripts/extensions/floating-prompt/index.js b/public/scripts/extensions/floating-prompt/index.js index 6eae5d1b4..2e4f30537 100644 --- a/public/scripts/extensions/floating-prompt/index.js +++ b/public/scripts/extensions/floating-prompt/index.js @@ -119,8 +119,8 @@ async function moduleWorker() { // take the count of messages let lastMessageNumber = Array.isArray(context.chat) && context.chat.length ? context.chat.filter(m => m.is_user).length : 0; - // special case for new chat - if (Array.isArray(context.chat) && context.chat.length === 1) { + // interval 1 should be inserted no matter what + if (chat_metadata[metadata_keys.interval] === 1) { lastMessageNumber = 1; } @@ -152,7 +152,7 @@ async function moduleWorker() {
Author's Note
- +
@@ -176,7 +176,7 @@ async function moduleWorker() { - (0 = Disable) + (0 = Disable, 1 = Always)
User inputs until next insertion: (disabled)