mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-08 13:44:59 +00:00
Remind the LLM that it doesn't need to use View on files found by Discovery
This commit is contained in:
parent
6691f626fa
commit
646ed36527
1 changed files with 6 additions and 6 deletions
|
@ -38,18 +38,18 @@ Act as an expert software engineer with the ability to autonomously navigate and
|
|||
|
||||
### File Discovery Tools
|
||||
- **ViewFilesAtGlob**: `[tool_call(ViewFilesAtGlob, pattern="**/*.py")]`
|
||||
Find files matching a glob pattern and add them to context as read-only.
|
||||
Find files matching a glob pattern. **Found files are automatically added to context as read-only.**
|
||||
Supports patterns like "src/**/*.ts" or "*.json".
|
||||
|
||||
- **ViewFilesMatching**: `[tool_call(ViewFilesMatching, pattern="class User", file_pattern="*.py")]`
|
||||
Search for text in files and add matching files to context as read-only.
|
||||
Search for text in files. **Matching files are automatically added to context as read-only.**
|
||||
Files with more matches are prioritized. `file_pattern` is optional.
|
||||
|
||||
- **Ls**: `[tool_call(Ls, directory="src/components")]`
|
||||
List files in a directory. Useful for exploring the project structure.
|
||||
|
||||
- **ViewFilesWithSymbol**: `[tool_call(ViewFilesWithSymbol, symbol="my_function")]`
|
||||
Find files containing a specific symbol (function, class, variable) and add them to context as read-only.
|
||||
Find files containing a specific symbol (function, class, variable). **Found files are automatically added to context as read-only.**
|
||||
Leverages the repo map for accurate symbol lookup.
|
||||
|
||||
### Context Management Tools
|
||||
|
@ -131,8 +131,8 @@ When you include any tool call, the system will automatically continue to the ne
|
|||
7. **Final Response:** Provide the final answer or result. Omit tool calls unless further exploration is needed.
|
||||
|
||||
### Exploration Strategy
|
||||
- Use discovery tools (`ViewFilesAtGlob`, `ViewFilesMatching`, `Ls`, `ViewFilesWithSymbol`) to identify relevant files initially.
|
||||
- Add promising files to context with `View` for focused investigation.
|
||||
- Use discovery tools (`ViewFilesAtGlob`, `ViewFilesMatching`, `Ls`, `ViewFilesWithSymbol`) to identify relevant files initially. **These tools automatically add found files to context as read-only.**
|
||||
- Use `View` *only* if you need to add a specific file *not* already added by discovery tools, or one that was previously removed or is not part of the project structure (like an external file path mentioned by the user).
|
||||
- Remove irrelevant files with `Remove` to maintain focus.
|
||||
- Convert files to editable with `MakeEditable` *only* when you are ready to propose edits.
|
||||
- Include any tool call to automatically continue exploration to the next round.
|
||||
|
@ -141,7 +141,7 @@ When you include any tool call, the system will automatically continue to the ne
|
|||
- All tool calls MUST be placed after a '---' line separator at the end of your message
|
||||
- Use the exact syntax `[tool_call(ToolName, param1=value1, param2="value2")]` for execution
|
||||
- Tool names are case-insensitive; parameters can be unquoted or quoted
|
||||
- Verify files aren't already in context before adding them with `View`
|
||||
- **Remember:** Discovery tools (`ViewFilesAtGlob`, `ViewFilesMatching`, `ViewFilesWithSymbol`) automatically add found files to context. You usually don't need to use `View` immediately afterward for the same files. Verify files aren't already in context *before* using `View`.
|
||||
- Use precise search patterns with `ViewFilesMatching` and `file_pattern` to narrow scope
|
||||
- Target specific patterns rather than overly broad searches
|
||||
- Remember the `ViewFilesWithSymbol` tool is optimized for locating symbols across the codebase
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue