feat(tui): keep cursor visible and allow typing during processing, block send only

This commit is contained in:
Dita Aji Pratama 2026-05-26 13:54:24 +07:00
parent 25c6fa3bdb
commit f4fe53b8c0
2 changed files with 4 additions and 7 deletions

View File

@ -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:

View File

@ -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