Redo no longer goes through formatting function (thereby getting changed)

This commit is contained in:
ebolam 2022-03-05 11:15:33 -05:00
parent 353817b4da
commit 4dd119c38d
1 changed files with 4 additions and 3 deletions

View File

@ -2802,7 +2802,7 @@ def actionredo():
genout = genout + [{"generated_text": item['Text']} for item in vars.actions_metadata[vars.actions.get_last_key()+1]['Alternative Text'] if (item["Pinned"]==True) and (item["Previous Selection"]==False)] genout = genout + [{"generated_text": item['Text']} for item in vars.actions_metadata[vars.actions.get_last_key()+1]['Alternative Text'] if (item["Pinned"]==True) and (item["Previous Selection"]==False)]
if len(genout) == 1: if len(genout) == 1:
vars.actions_metadata[vars.actions.get_last_key()+1]['Alternative Text'] = [item for item in vars.actions_metadata[vars.actions.get_last_key()+1]['Alternative Text'] if (item["Previous Selection"]!=True)] vars.actions_metadata[vars.actions.get_last_key()+1]['Alternative Text'] = [item for item in vars.actions_metadata[vars.actions.get_last_key()+1]['Alternative Text'] if (item["Previous Selection"]!=True)]
genresult(genout[0]['generated_text'], flash=True) genresult(genout[0]['generated_text'], flash=True, ignore_formatting=True)
else: else:
# Store sequences in memory until selection is made # Store sequences in memory until selection is made
vars.genseqs = genout vars.genseqs = genout
@ -3191,11 +3191,12 @@ def generate(txt, minimum, maximum, found_entries=None):
#==================================================================# #==================================================================#
# Deal with a single return sequence from generate() # Deal with a single return sequence from generate()
#==================================================================# #==================================================================#
def genresult(genout, flash=True): def genresult(genout, flash=True, ignore_formatting=False):
if not vars.quiet: if not vars.quiet:
print("{0}{1}{2}".format(colors.CYAN, genout, colors.END)) print("{0}{1}{2}".format(colors.CYAN, genout, colors.END))
# Format output before continuing # Format output before continuing
if not ignore_formatting:
genout = applyoutputformatting(genout) genout = applyoutputformatting(genout)
vars.lua_koboldbridge.feedback = genout vars.lua_koboldbridge.feedback = genout