-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: support folder paths in get_errors tool #1269
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
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.
Pull Request Overview
This PR enhances the get_errors
tool to support folder paths in addition to file paths, addressing issue #265437. The implementation uses path hierarchy checking to include diagnostics from files within specified folders.
Key Changes
- Updated tool logic to check if diagnostic file paths are children of provided folder paths using
isEqualOrParent
- Refactored the
getDiagnostics
method to handle both file and folder path filtering - Enhanced test coverage for the new folder path functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/extension/tools/node/getErrorsTool.tsx |
Added folder path support using isEqualOrParent check and refactored diagnostic filtering logic |
src/extension/tools/node/test/getErrorsTool.spec.tsx |
Comprehensive test rewrite to test the new functionality with folder paths and range filtering |
src/extension/tools/node/test/getErrorsResult.spec.tsx |
New file containing the original rendering tests that were moved from the main test file |
src/extension/tools/node/test/__snapshots__/getErrorsResult.spec.tsx.snap |
Updated snapshots for the separated rendering tests |
package.json |
Updated tool description to mention folder support and reformatted some configuration arrays |
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.
Sorry forgot to submit this review from earlier
Support folder paths in get_errors tool.
This is to fix microsoft/vscode#265437