Feat/terminal autosuggestions#735
Open
oh4-beep wants to merge 2 commits into
Open
Conversation
Ghost-text completions drawn from the user's own shell history, in the fish/zsh-autosuggestions style. Opt-in via the terminalSuggestions pref; accept with Right arrow or End. - commandHistory.ts: pure functional core (bounded most-recent-first ring with prefix matching) plus persistence to terax-command-history.json. - osc-handlers.ts: prompt tracker gains optional lifecycle callbacks; commands captured from OSC 133;C;<cmd> (zsh/fish preexec). - suggestionOverlay.ts: DOM ghost positioned over the grid. Never written into the xterm buffer or PTY, so a geometry miss is cosmetic, never corrupting. A module-level enabled flag short-circuits the per-frame render hook so the feature is zero-cost when off. - rendererPool.ts: accept-key handling (Right/End at line end). - Settings toggle + unit tests for the ring and OSC command capture. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Accept the inline suggestion one token at a time with Alt+Right or Ctrl+Right (zsh-autosuggestions forward-word), in addition to the full accept on Right/End. - suggestionChunk.ts: pure nextSuggestionChunk() boundary helper + tests. - suggestionOverlay.ts: acceptWord() sends only the next chunk; the next render recomputes the shorter suggestion from history. - rendererPool.ts: Alt/Ctrl+Right key handling, gated on an active ghost.
Author
|
Wassup bro? Really liked the idea a while back so I thought I might help a little. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Why
How
Testing
pnpm exec tsc --noEmitcleansrc-tauri/)cargo test --lockedandcargo clippy --all-targets --locked -- -D warningsclean#[tauri::command]signature) called out below so the FE caller can be updated in locksteppnpm tauri devScreenshots / GIFs
Notes for reviewer