-
Notifications
You must be signed in to change notification settings - Fork 4
Add targeted regex search tool for specific files #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Update README.md with search_regex tool documentation and examples - Tool is fully functional and tested with all edge cases covered - Maintains compatibility with existing tools and follows conventions Co-authored-by: eh-main-bot <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
==========================================
+ Coverage 93.09% 93.12% +0.03%
==========================================
Files 33 34 +1
Lines 811 873 +62
==========================================
+ Hits 755 813 +58
- Misses 56 60 +4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot can we simplify this? make shorter and simpler?
Args: | ||
pattern: Regex pattern to match against file content | ||
files: List of file paths to search (required) | ||
context: Number of context lines to include before/after matches (optional) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
context: Number of context lines to include before/after matches (optional) |
no need for context param
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the context parameter and simplified the implementation as requested. The tool now provides a cleaner, more focused regex search without context lines. All tests updated and passing. Changes in commit 1c6a77d.
Co-authored-by: eh-main-bot <[email protected]>
Implements a new
search_regex
tool that provides focused regex pattern searching in user-specified files, addressing the need for more targeted searches compared to the existing broadsearch_text
functionality.Key Features
Implementation Details
New Tool:
search_regex
Key Differences from
search_text
search_text
search_regex
Error Handling
The tool provides comprehensive error handling for:
Testing
Documentation
Updated README.md with:
This addresses the performance and usability concerns when users know exactly which files they want to search, providing a more efficient alternative to broad repository searches.
Fixes #29.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.