From f8cb54ba0421ceac8518c6df90b7043fd15f00c5 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 31 Mar 2026 14:56:35 -0700 Subject: [PATCH] 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. --- cli.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cli.py b/cli.py index 2f6214989..b18e53077 100644 --- a/cli.py +++ b/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.