mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Merge pull request #69 from VE-FORBRYDERNE/lua
Lua compatibility enhancements
This commit is contained in:
@ -3232,6 +3232,7 @@ def update_story_chunk(idx: Union[int, str]):
|
||||
# prompt might not have been shown yet (with a "Generating story..."
|
||||
# message instead).
|
||||
refresh_story()
|
||||
setgamesaved(False)
|
||||
return
|
||||
|
||||
idx = (vars.actions.get_last_key() if len(vars.actions) else 0) + 1
|
||||
@ -3249,7 +3250,9 @@ def update_story_chunk(idx: Union[int, str]):
|
||||
|
||||
chunk_text = f'<chunk n="{idx}" id="n{idx}" tabindex="-1">{formatforhtml(item)}</chunk>'
|
||||
emit('from_server', {'cmd': 'updatechunk', 'data': {'index': idx, 'html': chunk_text}}, broadcast=True)
|
||||
|
||||
|
||||
setgamesaved(False)
|
||||
|
||||
#If we've set the auto save flag, we'll now save the file
|
||||
if vars.autosave and (".json" in vars.savedir):
|
||||
save()
|
||||
@ -3260,6 +3263,7 @@ def update_story_chunk(idx: Union[int, str]):
|
||||
#==================================================================#
|
||||
def remove_story_chunk(idx: int):
|
||||
emit('from_server', {'cmd': 'removechunk', 'data': idx}, broadcast=True)
|
||||
setgamesaved(False)
|
||||
|
||||
|
||||
#==================================================================#
|
||||
|
Reference in New Issue
Block a user