Skip to content

Conversation

@ngxson
Copy link
Collaborator

@ngxson ngxson commented Dec 7, 2025

Fix #17828

Fix #17829

To test it, run llama-cli, write some text (without sending it) and use left/right arrows to edit them

Edit: Home/end keys and history support is allso added thanks to @ServeurpersoCom

Disclosure AI usage: next_utf8_char_pos is written by AI because I have no experience working with windows API. The rest is mostly written by me (minus some small auto-completion)

@ngxson ngxson marked this pull request as ready for review December 7, 2025 10:11
@ngxson ngxson requested a review from ggerganov as a code owner December 7, 2025 10:11
@ngxson
Copy link
Collaborator Author

ngxson commented Dec 7, 2025

Thanks @ServeurpersoCom for testing & adding some improvements on windows!

CC @ggerganov , this is a small feature but quite important for the UX - hope to get it merged soon!

@ngxson ngxson force-pushed the xsn/cli_arrow_left_right branch from cd05610 to 77ca259 Compare December 7, 2025 12:29
@ngxson ngxson changed the title console: allow using arrow left/right to edit the line (with UTF-8 support) console: allow using arrow left/right, home/end keys and history mode Dec 7, 2025
@ngxson
Copy link
Collaborator Author

ngxson commented Dec 7, 2025

FYI, I merged some more changes from @ServeurpersoCom to include history too (using up/down keys)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: add support for up/down history in console::readline Feature request: add support for left/right arrow for console::readline

2 participants