From 35850198314624207bf3bc5dd1f9346063536bcd Mon Sep 17 00:00:00 2001 From: Teknium Date: Fri, 20 Mar 2026 23:36:47 -0700 Subject: [PATCH] feat(cli): enhance user input display with consistent formatting - Added a user bar separator for improved visual clarity when displaying pasted text and user input in the HermesCLI. - Ensured consistent formatting for both multi-line and single-line user inputs, enhancing the overall user experience in the command-line interface. These changes contribute to a more organized and visually appealing output during interactions. --- cli.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cli.py b/cli.py index c3dcbcb4..8f3edd06 100755 --- a/cli.py +++ b/cli.py @@ -6877,28 +6877,34 @@ class HermesCLI: paste_match = _re.match(r'\[Pasted text #\d+: \d+ lines → (.+)\]', user_input) if isinstance(user_input, str) else None if paste_match: paste_path = Path(paste_match.group(1)) + _user_bar = f"[{_accent_hex()}]{'─' * 40}[/]" if paste_path.exists(): full_text = paste_path.read_text(encoding="utf-8") line_count = full_text.count('\n') + 1 print() + ChatConsole().print(_user_bar) ChatConsole().print( f"[bold {_accent_hex()}]●[/] [bold]{_escape(f'[Pasted text: {line_count} lines]')}[/]" ) user_input = full_text else: print() + ChatConsole().print(_user_bar) ChatConsole().print(f"[bold {_accent_hex()}]●[/] [bold]{_escape(user_input)}[/]") else: + _user_bar = f"[{_accent_hex()}]{'─' * 40}[/]" if '\n' in user_input: first_line = user_input.split('\n')[0] line_count = user_input.count('\n') + 1 print() + ChatConsole().print(_user_bar) ChatConsole().print( f"[bold {_accent_hex()}]●[/] [bold]{_escape(first_line)}[/] " f"[dim](+{line_count - 1} lines)[/]" ) else: print() + ChatConsole().print(_user_bar) ChatConsole().print(f"[bold {_accent_hex()}]●[/] [bold]{_escape(user_input)}[/]") # Show image attachment count