feat(tui): keep cursor visible and allow typing during processing, block send only
This commit is contained in:
parent
25c6fa3bdb
commit
f4fe53b8c0
@ -58,8 +58,8 @@ class HendrikTUI:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
draw(self, stdscr)
|
draw(self, stdscr)
|
||||||
# Sembunyikan kursor saat processing, tampilkan high visibility saat idle
|
# Tampilkan kursor (high visibility) agar user bisa ngetik walau processing
|
||||||
curses.curs_set(0 if self.processing else 2)
|
curses.curs_set(2)
|
||||||
try:
|
try:
|
||||||
key = stdscr.getch()
|
key = stdscr.getch()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|||||||
@ -47,13 +47,10 @@ def handle_key(app, stdscr, key):
|
|||||||
elif key == curses.KEY_RESIZE:
|
elif key == curses.KEY_RESIZE:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# -- Blocked during processing --
|
|
||||||
elif processing:
|
|
||||||
pass # ignore all other keys while processing
|
|
||||||
|
|
||||||
# -- Ctrl shortcuts --
|
# -- Ctrl shortcuts --
|
||||||
elif key == 4: # Ctrl+D → submit query ke LLM
|
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
|
elif key == 23: # Ctrl+W → popup ganti workspace
|
||||||
workspace_popup(app, stdscr)
|
workspace_popup(app, stdscr)
|
||||||
elif key == 12: # Ctrl+L → clear chat log
|
elif key == 12: # Ctrl+L → clear chat log
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user