From 90e558cf3fc90c0da6fc3d273ca1e6ecc8630fdb Mon Sep 17 00:00:00 2001 From: Gnome Ann <> Date: Tue, 24 Aug 2021 11:24:29 -0400 Subject: [PATCH] Won't freeze anymore if you delete the prompt --- aiserver.py | 2 ++ static/application.js | 1 + 2 files changed, 3 insertions(+) diff --git a/aiserver.py b/aiserver.py index f34734ae..ee7572e0 100644 --- a/aiserver.py +++ b/aiserver.py @@ -1429,6 +1429,8 @@ def inlinedelete(chunk): # Don't delete prompt if(chunk == 0): # Send error message + refresh_story() + emit('from_server', {'cmd': 'errmsg', 'data': "Cannot delete the prompt."}) emit('from_server', {'cmd': 'editmode', 'data': 'false'}, broadcast=True) else: del vars.actions[chunk-1] diff --git a/static/application.js b/static/application.js index 09abd4f4..39d5447e 100644 --- a/static/application.js +++ b/static/application.js @@ -852,6 +852,7 @@ $(document).ready(function(){ }, 5); } newly_loaded = false; + hideMessage(); } else if(msg.cmd == "scrolldown") { setTimeout(function () { $('#gamescreen').animate({scrollTop: $('#gamescreen').prop('scrollHeight')}, 1000);