diff --git a/frontends/tgapp.py b/frontends/tgapp.py index 15ad73f..985362f 100644 --- a/frontends/tgapp.py +++ b/frontends/tgapp.py @@ -1,4 +1,4 @@ -import os, sys, re, threading, asyncio, queue as Q, socket, time, random +import os, sys, re, threading, asyncio, queue as Q, time, random sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) _TEMP_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'temp') from agentmain import GeneraticAgent @@ -16,10 +16,12 @@ from chatapp_common import ( HELP_TEXT, TELEGRAM_MENU_COMMANDS, clean_reply, + ensure_single_instance, extract_files, format_restore, + redirect_log, + require_runtime, split_text, - strip_files, ) from continue_cmd import handle_frontend_command, reset_conversation from llmcore import mykeys @@ -38,6 +40,8 @@ _MD_TOKEN_RE = re.compile( r"|\[([^\]]+)\]\(([^)\n]+)\)" r"|`([^`\n]+)`" r"|\*\*([^\n]+?)\*\*" + r"|__([^\n]+?)__" + r"|~~([^\n]+?)~~" r"|(?