Skip to content

feat(ghost-text): command prediction - #166

Open
versenilvis wants to merge 48 commits into
mainfrom
feat/ghost-text-prediction
Open

versenilvis wants to merge 48 commits into
mainfrom
feat/ghost-text-prediction

Conversation

@versenilvis

@versenilvis versenilvis commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

In the next v0.8.0

2026-09-28_23-30-27.mp4

New config

[core]
prediction = true
  • This is an independent ghost text from our main ghost text, its job to predict next command you may wanna use

  • How to use it?, use right arrow to expand it and only right arrow works for this
    It means "Tab" -> choose the current selection in menu, expand the first ghost text, no matter the current mode
    Right arrow -> expand second ghost text (which is the prediction)

  • As you can see in the video above, the first one is tab, the second one is right arrow

image

Key changes

  • Directory Scoping: Ranks suggestions across 5 workspace tiers so commands from other projects never leak into unrelated folders
  • Context Validation: Verifies recipes and scripts against justfile, package.json, Makefile, and disk within a strict 15ms deadline
  • Sequence Prediction: Tracks command transitions in SQLite to suggest the next step based on the previous command
  • Dedicated Keybindings: Routes Tab to menu selection and Right Arrow to ghost text prediction
  • Cross-Shell Testing: Adds end-to-end pseudo-terminal tests across zsh, bash, and fish
  • Fix pre-fix match in fuzzy search of history suggestion

currently still using and working to improve the prediction algorithm

when the user has not navigated the menu (userNavigated=false), the
first auto-highlighted item is not treated as selected — tab falls
through to the prediction path instead (mirrors right arrow behavior)
@versenilvis versenilvis changed the title feat: ghost text prediction feat(ghost-text): command prediction Sep 30, 2026
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.

1 participant