From 104ef83a85b56e1ed074ac5b4aa29c28502b054c Mon Sep 17 00:00:00 2001 From: Dita Aji Pratama Date: Sun, 16 Aug 2026 22:08:19 +0700 Subject: [PATCH] Fixing delayed processing status --- interfaces/tui/agent.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interfaces/tui/agent.py b/interfaces/tui/agent.py index 2220350..083e794 100644 --- a/interfaces/tui/agent.py +++ b/interfaces/tui/agent.py @@ -71,6 +71,12 @@ def submit(app, stdscr): app.scroll = 999999 app.processing = True + # Status langsung pindah ke PROCESSING sebelum kerja berat (persistensi + # session / LLM) yang memblok UI thread. Lazy import untuk menghindari + # circular import (agent -> render -> menubar -> actions -> agent). + from .render import draw + draw(app, stdscr) + if app.current_session is None: app.current_session = app.session_mgr.create( f"Session {datetime.now().strftime('%Y-%m-%d %H:%M')}",