From 5c2926102bf822a498c9c7b4d4c59b8e5dd6c976 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Sat, 21 Feb 2026 12:36:14 -0800 Subject: [PATCH] fix: improve placeholder handling and hint height in CLI - Updated the placeholder text logic to append new fragments after existing ones, preserving the prompt appearance. - Adjusted the hint height to maintain a 1-line spacer while the agent is running, preventing output from crowding the input area. --- cli.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cli.py b/cli.py index 7b85c571..8aabde91 100755 --- a/cli.py +++ b/cli.py @@ -2097,7 +2097,8 @@ class HermesCLI: if not ti.document.text and ti.lineno == 0: text = self._get_text() if text: - return Transformation(fragments=[('class:placeholder', text)]) + # Append after existing fragments (preserves the ❯ prompt) + return Transformation(fragments=ti.fragments + [('class:placeholder', text)]) return Transformation(fragments=ti.fragments) def _get_placeholder(): @@ -2151,7 +2152,9 @@ class HermesCLI: def get_hint_height(): if cli_ref._sudo_state or cli_ref._approval_state or cli_ref._clarify_state: return 1 - return 0 + # Keep a 1-line spacer while agent runs so output doesn't push + # right up against the top rule of the input area + return 1 if cli_ref._agent_running else 0 spacer = Window( content=FormattedTextControl(get_hint_text),