[FEATURE]: Ctrl+R to search and navigate prompt history instead of just arrow keys
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Implement something similar to reverse-i-search on bash.
Benefits:
- instead of using arrow keys to find a previous prompt executed and resend that prompt, do a reverse search and load it into the prompt box. Saves time.
This issue might be a duplicate of existing issues. Please check:
- #1701: Feature request: history reverse search like curses-based TUIs
Feel free to ignore if none of these address your specific case.
+1 need it
This is a good idea
If anyone wants to make a pr i think this would be a good addition
If anyone wants to make a pr i think this would be a good addition
@rekram1-node we create PR #5775 , thanks to review it.
@jiahaoxiang2000 I checked the pr you created out of curiosity and found an issue with the onSelect logic you should should offset the cursor logic otherwise the ui will only show one line if you have a multline input
input.cursorOffset = input.plainText.length
It's not my place to say but with just showing truncated text i don't see how this will be very useful since its very confusing without seeing the full text content as to what was written in a previous prompt.
With the UI you went with I ran opus 4.5 to get some dummy ui for a version with full context and suggested a ui similar to fzf --preview but @rekram1-node could give better feedback here as to what they would want. Maybe just simple search style like bash where you search and it shows on the input instantly instead of opening history modal.
I checked the pr you created out of curiosity and found an issue with the onSelect logic you should should offset the cursor logic otherwise the ui will only show one line if you have a multline input
input.cursorOffset = input.plainText.length
we had fix this, https://github.com/sst/opencode/pull/5775/commits/38b567a2f1bab4e3549da861e32b6e6f2e8fab41 in #5775 , very thank @ShpetimA .
@ShpetimA Claude code v2.0.70 used the full context and suggested you talked