mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
fix(cli): anchor input prompt near bottom of terminal after responses (#4359)
After short agent responses, the prompt_toolkit input area sat mid-screen with empty terminal space below it. Now prints padding newlines (half terminal height) after each response to push the prompt toward the bottom. patch_stdout renders the padding above the input area.
This commit is contained in:
parent
b118f607b2
commit
f8cb54ba04
1 changed files with 13 additions and 0 deletions
13
cli.py
13
cli.py
|
|
@ -7568,6 +7568,19 @@ class HermesCLI:
|
|||
finally:
|
||||
self._agent_running = False
|
||||
self._spinner_text = ""
|
||||
|
||||
# Push the input prompt toward the bottom of the
|
||||
# terminal so it doesn't sit mid-screen after short
|
||||
# responses. patch_stdout renders these newlines
|
||||
# above the input area, creating visual separation
|
||||
# and anchoring the prompt near the bottom.
|
||||
try:
|
||||
_pad = shutil.get_terminal_size().lines // 2
|
||||
if _pad > 2:
|
||||
_cprint("\n" * _pad)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
app.invalidate() # Refresh status line
|
||||
|
||||
# Continuous voice: auto-restart recording after agent responds.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue