Don't try to render prompt manager if group is still generating

This commit is contained in:
Cohee 2023-08-15 16:47:16 +03:00
parent 57b9a94c17
commit e9e9421d8a
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import {callPopup, event_types, eventSource, is_send_press, main_api, substituteParams} from "../script.js"; 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 {TokenHandler} from "./openai.js";
import {power_user} from "./power-user.js"; import {power_user} from "./power-user.js";
import { debounce, waitUntilCondition } from "./utils.js"; import { debounce, waitUntilCondition } from "./utils.js";
@ -574,7 +575,7 @@ PromptManagerModule.prototype.render = function (afterTryGenerate = true) {
if (null === this.activeCharacter) return; if (null === this.activeCharacter) return;
this.error = null; 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) { if (true === afterTryGenerate) {
// Executed during dry-run for determining context composition // Executed during dry-run for determining context composition
this.profileStart('filling context'); this.profileStart('filling context');