From 42cef9c2826fddec714cc51860de149c08f0a07e Mon Sep 17 00:00:00 2001 From: Teknium Date: Sat, 21 Mar 2026 10:34:21 -0700 Subject: [PATCH] fix: resolve merge conflict markers in cli.py breaking hermes startup PR #2346 was merged with unresolved git conflict markers (<<<<<<, =======, >>>>>>>) in cli.py at line 6047, causing SyntaxError on startup. Resolved by keeping both the Shift+Enter keybindings and the tab handler. --- cli.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/cli.py b/cli.py index e7d5d9512..886d1cada 100755 --- a/cli.py +++ b/cli.py @@ -6044,7 +6044,18 @@ class HermesCLI: """Ctrl+Enter (c-j) inserts a newline. Most terminals send c-j for Ctrl+Enter.""" event.current_buffer.insert_text('\n') -<<<<<<< Updated upstream + @kb.add('s-enter') + def handle_shift_enter(event): + """Shift+Enter inserts a newline (standard terminals).""" + event.current_buffer.insert_text('\n') + + # Kitty keyboard protocol: Ghostty and other Kitty-protocol terminals + # encode Shift+Enter as CSI 13;2u instead of a simple escape sequence. + @kb.add('escape', '[', '1', '3', ';', '2', 'u') + def handle_kitty_shift_enter(event): + """Shift+Enter in Kitty keyboard protocol (Ghostty, WezTerm, etc.).""" + event.current_buffer.insert_text('\n') + @kb.add('tab', eager=True) def handle_tab(event): """Tab: accept completion, auto-suggestion, or start completions. @@ -6081,19 +6092,6 @@ class HermesCLI: else: # No menu and no suggestion — start completions from scratch buf.start_completion() -======= - @kb.add('s-enter') - def handle_shift_enter(event): - """Shift+Enter inserts a newline (standard terminals).""" - event.current_buffer.insert_text('\n') - - # Kitty keyboard protocol: Ghostty and other Kitty-protocol terminals - # encode Shift+Enter as CSI 13;2u instead of a simple escape sequence. - @kb.add('escape', '[', '1', '3', ';', '2', 'u') - def handle_kitty_shift_enter(event): - """Shift+Enter in Kitty keyboard protocol (Ghostty, WezTerm, etc.).""" - event.current_buffer.insert_text('\n') ->>>>>>> Stashed changes # --- Clarify tool: arrow-key navigation for multiple-choice questions ---