Description:
In Vibe CLI v2.18.4, pressing Shift+Enter in the chat input still submits the message instead of inserting a new line, despite issue #751 being marked as completed.
Steps to reproduce:
- Launch Vibe CLI v2.18.4
- Type some text in the chat input
- Press
Shift+Enter
- Observe: message is submitted (same as pressing
Enter)
- Note:
Ctrl+J works correctly and inserts a newline
Root cause analysis:
In vibe/cli/textual_ui/widgets/chat_input/text_area.py:
- Line 37: Binding
"shift+enter,ctrl+j" → insert_newline is correctly defined
- Line 157-158:
action_insert_newline() correctly inserts \n
- Line 336-339: Event handler intercepts
shift+enter and stops it WITHOUT calling the action:
if event.key == "shift+enter":
event.prevent_default()
event.stop()
return
This handler runs before the binding can trigger, effectively blocking Shift+Enter. Ctrl+J works because it is not intercepted by this handler.
Expected behavior:
Shift+Enter should insert a newline in the chat input, just like Ctrl+J does.
Actual behavior:
Shift+Enter submits the message (same as Enter).
Version:
- Vibe CLI: 2.18.4
- OS: macOS (reporter confirmed it works everywhere else)
Related:
Suggested fix:
Either:
- Remove lines 336-339 entirely (let the binding handle it), OR
- Replace the handler with:
self.action_insert_newline()
Description:
In Vibe CLI v2.18.4, pressing
Shift+Enterin the chat input still submits the message instead of inserting a new line, despite issue #751 being marked as completed.Steps to reproduce:
Shift+EnterEnter)Ctrl+Jworks correctly and inserts a newlineRoot cause analysis:
In
vibe/cli/textual_ui/widgets/chat_input/text_area.py:"shift+enter,ctrl+j"→insert_newlineis correctly definedaction_insert_newline()correctly inserts\nshift+enterand stops it WITHOUT calling the action:This handler runs before the binding can trigger, effectively blocking
Shift+Enter.Ctrl+Jworks because it is not intercepted by this handler.Expected behavior:
Shift+Entershould insert a newline in the chat input, just likeCtrl+Jdoes.Actual behavior:
Shift+Entersubmits the message (same asEnter).Version:
Related:
Suggested fix:
Either:
self.action_insert_newline()