Skip to content

Conversation

@bryanchen-d
Copy link
Contributor

@bryanchen-d bryanchen-d self-assigned this Nov 7, 2025
Copy link
Contributor

Copilot AI left a 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 the inputUri for each diagnostic result
  • Added logic to differentiate between exact file matches (no inputUri) and folder matches (stores folder as inputUri)
  • Implemented URI deduplication in display messages to show folders instead of listing all contained files
  • Enhanced MockFileSystemService to support stat() 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

@bryanchen-d bryanchen-d force-pushed the brchen/get-errors-folder branch from 80e6e9c to 46cbcfa Compare November 7, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_errors tool given a folder path should display folders instead of individual files in the result

2 participants