What feature would you like to see?
Feature Request
Problem Description
Currently, when typing multiline input in kimi-cli, the Up/Down arrow keys always navigate through command history, e
ven when the cursor is in the middle of a multiline text. This makes it inconvenient to edit multiline prompts becaus
e users cannot use arrow keys to move the cursor between lines.
Expected Behavior
Implement smart arrow key navigation similar to Claude Code's approach:
| Cursor Position |
Up Arrow |
Down Arrow |
| Not at boundary (can move up/down in text) |
Move cursor up one line |
Move cursor down one line |
| At top boundary (first line) |
Show previous history entry |
Move cursor down one line |
| At bottom boundary (last line) |
Move cursor up one line |
Show next history entry |
Use Case
When writing long prompts with multiple lines (e.g., using Alt+Enter or Ctrl+J to insert newlines), users often n
eed to navigate within the text to make edits. Currently, pressing Up arrow immediately switches to the previous hist
ory entry, losing the current input context.
Proposed Implementation
The logic could work as follows:
def handle_up_arrow(buffer):
if cursor_not_at_first_line(buffer):
move_cursor_up()
else:
show_previous_history()
def handle_down_arrow(buffer):
if cursor_not_at_last_line(buffer):
move_cursor_down()
else:
show_next_history()
Reference
Claude Code implements this feature in their Vim mode with the following behavior:
▌ "In vim normal mode, if the cursor is at the beginning or end of input and cannot move further, the arrow keys na
▌ vigate command history instead"
### Additional information
This feature would significantly improve the user experience when writing complex multiline prompts, especially for users who frequently write code blocks or detailed instructions in the input.
What feature would you like to see?
Feature Request
Problem Description
Currently, when typing multiline input in kimi-cli, the Up/Down arrow keys always navigate through command history, e
ven when the cursor is in the middle of a multiline text. This makes it inconvenient to edit multiline prompts becaus
e users cannot use arrow keys to move the cursor between lines.
Expected Behavior
Implement smart arrow key navigation similar to Claude Code's approach:
Use Case
When writing long prompts with multiple lines (e.g., using
Alt+EnterorCtrl+Jto insert newlines), users often need to navigate within the text to make edits. Currently, pressing Up arrow immediately switches to the previous hist
ory entry, losing the current input context.
Proposed Implementation
The logic could work as follows: