diff --git a/README.md b/README.md index 9d3df00e980..4e4cadcb009 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,31 @@ +## Project Roadmap/Goals + +The current priorities are to improve core capabilities and user experience of the Aider project + +1. **Base Asynchronicity (aider-ce coroutine-experiment branch)** + * [x] Refactor codebase to have the main loop run asynchronously + * [x] Update test harness to work with new asynchronous methods + +2. **Repo Map Accuracy** + * [ ] [Bias page ranking toward active/editable files in repo map parsing](https://github.com/Aider-AI/aider/issues/2405) + * [ ] [Handle non-unique symbols that break down in large codebases](https://github.com/Aider-AI/aider/issues/2341) + * [ ] [Include AST information in repo map for richer context](https://github.com/Aider-AI/aider/issues/2688) + +3. **Context Discovery** + * [ ] Develop AST-based search capabilities + * [ ] Enhance file search with ripgrep integration + * [ ] Implement RAG (Retrieval-Augmented Generation) for better code retrieval + * [ ] Build an explicit workflow and local tooling for internal discovery mechanisms + +4. **Context Delivery** + * [ ] Use workflow for internal discovery to better target file snippets needed for specific tasks + * [ ] Add support for partial files and code snippets in model completion messages + +5. **TUI Experience** + * [ ] Add a full TUI (probably using textual) to have a visual interface competitive with the other coding agent terminal programs + * [ ] Re-integrate pretty output formatting + * [ ] Implement a response area, a prompt area with current auto completion capabilities, and a helper area for management utility commands + ## Fork Additions This project aims to be compatible with upstream Aider, but with priority commits merged in and with some opportunistic bug fixes and optimizations @@ -32,6 +60,7 @@ This project aims to be compatible with upstream Aider, but with priority commit * [Remove Confirm Responses from History](https://github.com/Aider-AI/aider/pull/3958) * [Benchmark Results By Language](https://github.com/dwash96/aider-ce/pull/27) * [Allow Benchmarks to Use Repo Map For Better Accuracy](https://github.com/dwash96/aider-ce/pull/25) +* [Read File Globbing](https://github.com/Aider-AI/aider/pull/3395) ### Other Notes * [MCP Configuration](https://github.com/dwash96/aider-ce/blob/main/aider/website/docs/config/mcp.md) diff --git a/aider/__init__.py b/aider/__init__.py index ffea43fcd2b..ea0868a76cb 100644 --- a/aider/__init__.py +++ b/aider/__init__.py @@ -1,6 +1,6 @@ from packaging import version -__version__ = "0.87.11.dev" +__version__ = "0.87.12.dev" safe_version = __version__ try: diff --git a/aider/args.py b/aider/args.py index 8607828b76b..b75436d1abd 100644 --- a/aider/args.py +++ b/aider/args.py @@ -780,13 +780,13 @@ def get_parser(default_config_files, git_root): "--file", action="append", metavar="FILE", - help="specify a file to edit (can be used multiple times)", + help="specify a file to edit (can be used multiple times, glob patterns supported)", ).complete = shtab.FILE group.add_argument( "--read", action="append", metavar="FILE", - help="specify a read-only file (can be used multiple times)", + help="specify a read-only file (can be used multiple times, glob patterns supported)", ).complete = shtab.FILE group.add_argument( "--vim", diff --git a/aider/coders/editblock_prompts.py b/aider/coders/editblock_prompts.py index df2734aae36..d9897dfe9a4 100644 --- a/aider/coders/editblock_prompts.py +++ b/aider/coders/editblock_prompts.py @@ -15,8 +15,6 @@ class EditBlockPrompts(CoderPrompts): Consider potential edge cases. Think about how to verify your changes are correct. -Always reply to the user in {language}. - Once you understand the request and have a plan, you MUST: 1. Decide if you need to propose *SEARCH/REPLACE* edits to any files that haven't been added to the chat. You can create new files without asking! diff --git a/aider/coders/patch_prompts.py b/aider/coders/patch_prompts.py index 690a0888445..66832ee16c7 100644 --- a/aider/coders/patch_prompts.py +++ b/aider/coders/patch_prompts.py @@ -15,8 +15,6 @@ class PatchPrompts(EditBlockPrompts): Take requests for changes to the supplied code. If the request is ambiguous, ask questions. -Always reply to the user in {language}. - Once you understand the request you MUST: 1. Decide if you need to propose edits to any files that haven't been added to the chat. You can create new files without asking! diff --git a/aider/coders/udiff_prompts.py b/aider/coders/udiff_prompts.py index e3848042982..dc58fb1bd6a 100644 --- a/aider/coders/udiff_prompts.py +++ b/aider/coders/udiff_prompts.py @@ -15,8 +15,6 @@ class UnifiedDiffPrompts(CoderPrompts): Take requests for changes to the supplied code. If the request is ambiguous, ask questions. -Always reply to the user in {language}. - Once you have a plan, for each file that needs to be changed, write out the changes similar to a unified diff like `diff -U0` would produce. """ diff --git a/aider/coders/wholefile_prompts.py b/aider/coders/wholefile_prompts.py index 3136cee2566..7aca4315686 100644 --- a/aider/coders/wholefile_prompts.py +++ b/aider/coders/wholefile_prompts.py @@ -8,11 +8,6 @@ class WholeFilePrompts(CoderPrompts): Think step-by-step. Plan your changes carefully. Explain your plan first. Take requests for changes to the supplied code. If the request is ambiguous, ask questions. -Consider potential edge cases. -Think about how to verify your changes are correct. - -Always reply to the user in {language}. - {final_reminders} Once you understand the request and have a plan, you MUST: 1. Determine if any code changes are needed. diff --git a/aider/main.py b/aider/main.py index f080f2ac150..ad9927b934b 100644 --- a/aider/main.py +++ b/aider/main.py @@ -1,3 +1,4 @@ +import glob import json import os import re @@ -449,6 +450,25 @@ def sanity_check_repo(repo, io): return False +def expand_glob_patterns(patterns, root="."): + """Expand glob patterns in a list of file paths.""" + expanded_files = [] + for pattern in patterns: + # Check if the pattern contains glob characters + if any(c in pattern for c in "*?[]"): + # Use glob to expand the pattern + matches = glob.glob(pattern, recursive=True) + if matches: + expanded_files.extend(matches) + else: + # If no matches, keep the original pattern + expanded_files.append(pattern) + else: + # Not a glob pattern, keep as is + expanded_files.append(pattern) + return expanded_files + + def main(argv=None, input=None, output=None, force_git_root=None, return_coder=False): report_uncaught_exceptions() @@ -677,10 +697,16 @@ def get_io(pretty): for fname in loaded_dotenvs: io.tool_output(f"Loaded {fname}") + # Expand glob patterns in files and file arguments all_files = args.files + (args.file or []) + all_files = expand_glob_patterns(all_files) fnames = [str(Path(fn).resolve()) for fn in all_files] + + # Expand glob patterns in read arguments + read_patterns = args.read or [] + read_expanded = expand_glob_patterns(read_patterns) read_only_fnames = [] - for fn in args.read or []: + for fn in read_expanded: path = Path(fn).expanduser().resolve() if path.is_dir(): read_only_fnames.extend(str(f) for f in path.rglob("*") if f.is_file())