|
|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import asyncio
|
|
|
|
|
import atexit
|
|
|
|
|
import gc
|
|
|
|
|
import signal
|
|
|
|
|
import sys
|
|
|
|
|
import traceback
|
|
|
|
|
@ -273,6 +274,9 @@ async def run_pythagora_session(sm: StateManager, ui: UIBase, args: Namespace):
|
|
|
|
|
convo = await load_convo(sm, project_states=fe_states)
|
|
|
|
|
await print_convo(ui=ui, convo=convo, fake=False)
|
|
|
|
|
|
|
|
|
|
# Clear fe_states from memory after conversation is loaded
|
|
|
|
|
del fe_states
|
|
|
|
|
gc.collect() # Force garbage collection to free memory immediately
|
|
|
|
|
if last_task_in_db:
|
|
|
|
|
# if there is a task in the db (we are at backend stage), print backend convo history and add task back logs and front logs headers
|
|
|
|
|
await ui.send_front_logs_headers(
|
|
|
|
|
@ -297,6 +301,10 @@ async def run_pythagora_session(sm: StateManager, ui: UIBase, args: Namespace):
|
|
|
|
|
convo = await load_convo(sm, project_states=be_states)
|
|
|
|
|
await print_convo(ui=ui, convo=convo, fake=False)
|
|
|
|
|
|
|
|
|
|
# Clear be_states from memory after conversation is loaded
|
|
|
|
|
del be_states
|
|
|
|
|
gc.collect() # Force garbage collection to free memory immediately
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
sm.fe_auto_debug = True
|
|
|
|
|
success = await start_new_project(sm, ui, args)
|
|
|
|
|
|