-
Notifications
You must be signed in to change notification settings - Fork 1.4k
display folder instead of individual child files in get-errors result #1866
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
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 GetErrorsTool to track the input URI (file or folder path) that was used to find diagnostics, allowing the tool to display more user-friendly messages. When diagnostics are found via a folder path, the display message shows the folder rather than individual files. The changes also add directory stat support to the MockFileSystemService for testing purposes.
Key Changes:
- Modified
GetErrorsTool.getDiagnostics()to track and return theinputUrifor each diagnostic result - Added logic to differentiate between exact file matches (no
inputUri) and folder matches (stores folder asinputUri) - Implemented URI deduplication in display messages to show folders instead of listing all contained files
- Enhanced
MockFileSystemServiceto supportstat()calls on mocked directories
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/platform/filesystem/node/test/mockFileSystemService.ts |
Added support for returning stat information for mocked directories |
src/extension/tools/node/getErrorsTool.tsx |
Added inputUri tracking to diagnostic results, implemented deduplication logic for display URIs, and minor formatting changes |
src/extension/tools/node/test/getErrorsTool.spec.tsx |
Added file system service setup and updated test expectations to include inputUri field for folder path tests |
80e6e9c to
46cbcfa
Compare
Fixes microsoft/vscode#275945