From 594789bdfadebea41bceef069adfbe24dbaa82d9 Mon Sep 17 00:00:00 2001 From: ebolam Date: Mon, 15 Aug 2022 18:17:25 -0400 Subject: [PATCH] Fix for retry --- aiserver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aiserver.py b/aiserver.py index f422a89b..425862ed 100644 --- a/aiserver.py +++ b/aiserver.py @@ -6382,6 +6382,7 @@ def UI_2_Pinning(data): @socketio.on('back') def UI_2_back(data): print("back") + koboldai_vars.actions.clear_unused_options() ignore = koboldai_vars.actions.pop() #==================================================================# @@ -6391,13 +6392,15 @@ def UI_2_back(data): def UI_2_redo(data): if len(koboldai_vars.actions.get_current_options()) == 1: koboldai_vars.actions.use_option(0) + #==================================================================# # Event triggered when user clicks the retry button #==================================================================# @socketio.on('retry') def UI_2_retry(data): - if koboldai_vars.numseqs == 1: + + if len(koboldai_vars.actions.get_current_options()) == 0: UI_2_back(None) koboldai_vars.actions.clear_unused_options() koboldai_vars.lua_koboldbridge.feedback = None