From f4fe53b8c036b7da4273b0a0647b31792ebd615c Mon Sep 17 00:00:00 2001 From: Dita Aji Pratama Date: Tue, 26 May 2026 13:54:24 +0700 Subject: [PATCH] feat(tui): keep cursor visible and allow typing during processing, block send only --- tui/app.py | 4 ++-- tui/input.py | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tui/app.py b/tui/app.py index eec1d80..2d7d5b2 100644 --- a/tui/app.py +++ b/tui/app.py @@ -58,8 +58,8 @@ class HendrikTUI: continue draw(self, stdscr) - # Sembunyikan kursor saat processing, tampilkan high visibility saat idle - curses.curs_set(0 if self.processing else 2) + # Tampilkan kursor (high visibility) agar user bisa ngetik walau processing + curses.curs_set(2) try: key = stdscr.getch() except KeyboardInterrupt: diff --git a/tui/input.py b/tui/input.py index f4aa532..f2a3dd1 100644 --- a/tui/input.py +++ b/tui/input.py @@ -47,13 +47,10 @@ def handle_key(app, stdscr, key): elif key == curses.KEY_RESIZE: pass - # -- Blocked during processing -- - elif processing: - pass # ignore all other keys while processing - # -- Ctrl shortcuts -- elif key == 4: # Ctrl+D → submit query ke LLM - submit(app, stdscr) + if not processing: + submit(app, stdscr) elif key == 23: # Ctrl+W → popup ganti workspace workspace_popup(app, stdscr) elif key == 12: # Ctrl+L → clear chat log