Skip to content

Conversation

bryanchen-d
Copy link
Contributor

@bryanchen-d bryanchen-d commented Oct 8, 2025

Support folder paths in get_errors tool.

This is to fix microsoft/vscode#265437

@bryanchen-d bryanchen-d requested a review from roblourens October 8, 2025 21:16
@bryanchen-d bryanchen-d self-assigned this Oct 14, 2025
@bryanchen-d bryanchen-d marked this pull request as ready for review October 14, 2025 22:31
@Copilot Copilot AI review requested due to automatic review settings October 14, 2025 22:31
Copy link
Contributor

@Copilot 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 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

@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 14, 2025
Copy link
Member

@roblourens roblourens left a 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

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.

Agent tries to use get_errors with folder paths

2 participants