Skip to content

UPSTREAM PR #17836: console: allow using arrow left/right, home/end keys and history mode - #478

Open
loci-dev wants to merge 6 commits into
mainfrom
upstream-PR17836-branch_ngxson-xsn/cli_arrow_left_right
Open

loci-dev wants to merge 6 commits into
mainfrom
upstream-PR17836-branch_ngxson-xsn/cli_arrow_left_right

Conversation

@loci-dev

@loci-dev loci-dev commented Dec 7, 2025

Copy link
Copy Markdown

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_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)

@loci-review

loci-review Bot commented Dec 7, 2025

Copy link
Copy Markdown

Explore the complete analysis inside the Version Insights

Performance Analysis Summary - PR #478

Analysis Overview

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.

@loci-dev
loci-dev force-pushed the main branch 21 times, most recently from bc83838 to a9fcc24 Compare December 9, 2025 23:08
@loci-dev
loci-dev force-pushed the main branch 30 times, most recently from 4664cb4 to 799183f Compare December 15, 2025 21:09

This branch was previously deployed

1 inactive deployment
PROD__AL_DEMO — 440ac832 Deployed Dec 7, 2025 by loci-dev via Build and Upload Artifacts #973
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.

3 participants