Skip to content

(feat): Add support for batch file reading in fs_read tool #1969

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

Closed
wants to merge 2 commits into from

Conversation

evanliu048
Copy link
Contributor

Issue #, if available:

Description:

This PR introduces a comprehensive implementation of the fs_read tool with support for batch operations across multiple modes:

  • Line: Read specific lines from one or more files
  • Directory: Recursively list contents of directories with configurable depth
  • Search: Perform substring search with contextual lines
  • Image: Validate and prepare image paths for downstream tools

Key features:

Supports both single and batch inputs via the PathOrPaths abstraction
Adds structured output via FileReadResult and BatchReadResult
Handles cross-platform directory traversal (Unix and Windows)
Implements robust validation and consistent CLI messaging
Preserves compatibility with existing InvokeOutput format

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@evanliu048 evanliu048 requested a review from a team as a code owner May 27, 2025 06:25
@evanliu048 evanliu048 closed this May 27, 2025
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.

1 participant