From e9e9421d8acd77972e285556b60da45cd221887c Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Tue, 15 Aug 2023 16:47:16 +0300 Subject: [PATCH] Don't try to render prompt manager if group is still generating --- public/scripts/PromptManager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/scripts/PromptManager.js b/public/scripts/PromptManager.js index 33753b0a7..ed3dd704c 100644 --- a/public/scripts/PromptManager.js +++ b/public/scripts/PromptManager.js @@ -1,4 +1,5 @@ import {callPopup, event_types, eventSource, is_send_press, main_api, substituteParams} from "../script.js"; +import { is_group_generating } from "./group-chats.js"; import {TokenHandler} from "./openai.js"; import {power_user} from "./power-user.js"; import { debounce, waitUntilCondition } from "./utils.js"; @@ -574,7 +575,7 @@ PromptManagerModule.prototype.render = function (afterTryGenerate = true) { if (null === this.activeCharacter) return; this.error = null; - waitUntilCondition(() => is_send_press == false, 1024 * 1024, 100).then(() => { + waitUntilCondition(() => !is_send_press && !is_group_generating, 1024 * 1024, 100).then(() => { if (true === afterTryGenerate) { // Executed during dry-run for determining context composition this.profileStart('filling context');