Repository navigation
feat(tui): open fuzzy prompt history search on ctrl+r and move markdown toggle to ctrl+m - #1417
Merged
Merged
Conversation
…wn toggle to ctrl+m ctrl+r now opens an fzf-style fuzzy search over the project prompt history. Typing filters the list with matched characters highlighted, up/down moves the selection, enter loads the selected prompt into the input for editing without sending it, and esc closes the overlay without touching the draft. display_toggle_raw_format now defaults to ctrl+m plus alt+m as a terminal-safe fallback, and ctrl+m is removed from the textarea InsertNewline keymap. Terminals without the kitty keyboard protocol still report ctrl+m as enter, so alt+m works everywhere.
4 tasks
inference-gateway-maintainer
Bot
marked this pull request as ready for review
September 29, 2026 23:39
inference-gateway-maintainer
Bot
requested a review
from a team
as a code owner
September 29, 2026 23:39
8 tasks
…earch infer init seeds keybindings.yaml with every default, so a file created before the ctrl+r change still binds display_toggle_raw_format to ctrl+r. The raw toggle is registered first and wins the key, which keeps the history search from opening. Document the two commands that fix an existing file.
…rence The note is not needed. This restores docs/configuration-reference.md to its state in 110a3e9.
Contributor
|
🎉 This PR is included in version 0.219.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Resolves #1412
Summary
Ctrl+R in the chat view now opens an fzf-style fuzzy search over the current project's prompt history, and the raw markdown toggle moves to Ctrl+M (with an alt+m fallback that works in plain terminals). The overlay lists prompts newest first with duplicates collapsed to their most recent occurrence, highlights matched characters using the existing sahilm/fuzzy + HighlightMatches helpers, and restores multi-line prompts with their original newlines. Enter loads the selected prompt into the input for editing without sending it, and Esc closes the overlay leaving the draft untouched (its Esc is consumed before the dispatcher, so it never counts toward the double-Esc go-back-in-time binding).
Changes
text_editing_history_searchaction (defaultctrl+r, chat view context, gated on no pending approval) inconfig/keybindings.goand the keybinding registry, soinfer keybindings list, the help view andinfer keybindings validatepick it up automatically.display_toggle_raw_formatdefaults fromctrl+rtoctrl+mplusalt+m, and removedctrl+mfrom the textareaInsertNewlinekeymap; Ctrl+R refresh in the/diffviewer and file explorer is untouched (they resolve their own keys outside the chat view).components.HistorySearchViewoverlay rendered above the input: query line, up to 7 visible rows with more-above/below hints, fuzzy filtering with bold+underline highlights, wrap-around selection, no-match empty state, and multiline prompts flattened to one row with a return glyph while keeping the original text on Enter.history.Store.GetAllHistory()as the read accessor overallHistory; ChatApplication opens the overlay from aHistorySearchOpenEventemitted by the keybinding handler, holds key focus (mirroring the attachments/status-bar guards), hides the autocomplete while open, and applies the accepted prompt viaSetText/SetCursor.docs/configuration-reference.md.Release note: this changes a widely used default binding - Ctrl+R now searches prompt history and toggling raw/rendered markdown is Ctrl+M (or alt+m anywhere). Users who already overrode
display_toggle_raw_formatinkeybindings.yamlkeep their keys.Follow-up docs ticket: inference-gateway/docs#868