You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
This PR modifies console input handling in common/console.cpp, adding arrow key navigation, home/end key support, and command history. The changes are isolated to the console I/O module and do not affect inference operations.
Performance analysis shows no measurable impact across all binaries. The maximum observed change is +0.001% (+1.86 nJ) in build.bin.llama-run, which falls within measurement noise. No functions in the inference pipeline (llama_decode, llama_encode, llama_tokenize) were modified or show performance changes. The console module operates outside the critical path for model inference and token processing. Power consumption remains stable across all 16 analyzed binaries, with core libraries (libllama.so, libggml-cpu.so, libggml-base.so) showing zero change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirrored from ggml-org/llama.cpp#17836
Fix ggml-org/llama.cpp#17828
Fix ggml-org/llama.cpp#17829
To test it, run
llama-cli, write some text (without sending it) and use left/right arrows to edit them`Home/end key support is allso added thanks to @ServeurpersoCom
Disclosure AI usage:
next_utf8_char_posis written by AI because I have no experience working with windows API. The rest is mostly written by me (minus some small auto-completion)