Feature: Integrate fuzzy finder for /add and /read-only commands#4344
Open
vk4s wants to merge 11 commits intoAider-AI:mainfrom
Open
Feature: Integrate fuzzy finder for /add and /read-only commands#4344vk4s wants to merge 11 commits intoAider-AI:mainfrom
vk4s wants to merge 11 commits intoAider-AI:mainfrom
Conversation
vk4s
commented
Jul 13, 2025
| if all_files: | ||
| selected_files = run_fzf(all_files, multi=True) | ||
|
|
||
| if not selected_files: |
Author
There was a problem hiding this comment.
This happens when you close the fzf interface (ctrl+c or esc) without selecting any file.
| stdout=subprocess.PIPE, | ||
| text=True, | ||
| ) | ||
| # fzf expects a newline-separated list of strings |
Author
There was a problem hiding this comment.
Should I leave the comments or remove them?
I couldn't find the guidelines for this.
|
|
||
| ## Read-only files | ||
|
|
||
| You can also add files to the chat as "read-only" files. Aider can see these files for context, but can't edit them. This is useful for providing reference documentation, specifications, or examples of existing code that you don't want the AI to modify. |
There was a problem hiding this comment.
should probably line-break these lines to follow the existing form of the usage.md.
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.
This change improves the
/addand/read-onlycommands by integrating a fuzzy finder, making it easier to add files to the chat.Previously, adding files required typing out their full paths or using glob patterns. Now, you can simply run
/addor/read-onlywithout any arguments to open an interactive fuzzy finder (fzf). This allows you to quickly search for and select one or more files from your repository to add to the chat.For the
/read-onlycommand, the original functionality is preserved as a convenient fallback. If you open the fuzzy finder and close it(ctrl+c)without selecting any files, the command will automatically convert all currently editable files in the chat to read-only.Usage:
To add files for editing:
This will open a fuzzy finder to select files.
To add files as read-only:
This will open a fuzzy finder. If you select files, they will be added as read-only. If you close the finder
(ctrl+c)without making a selection, all editable files in the chat will be converted to read-only (preserved existing behavior).Search chat history (new)
Search through chat history and select and apply search results, right in your terminal.
This change makes the process of adding files, improving the overall user experience.
Note: If
fzftool is not installed, the fuzzy finder features are gracefully disabled, and the commands fall back to their original behavior.Documentation:
Add files:
Read-only files: