Skip to content

Conversation

@evanliu048
Copy link
Contributor

Issue #, if available:

Description of changes:
Enhanced the fs_read tool to support batch operations, allowing multiple file/directory operations in a single command while maintaining backward compatibility.

Changes

1. Core Structure Updates:

  • Modified FsRead struct to support batch operations via operations: Option<Vec<FsReadOperation>>
  • Added optional summary field for better UX when describing batch operations
  • Maintained backward compatibility for single operations

2. Mixed Output Support

  • Added OutputKind::Mixed { text: String, images: RichImageBlocks } variant to handle operations that return both text and images
  • Ensures all operation results (text and images) are properly passed to the model
  • Fixed issue where batch operations with images would lose text results

3. fs_read JSON Schema Updates Updated

{
  "operations": [{
    "mode": "Line|Directory|Search|Image",
    "path": "...",
    // mode-specific parameters
  }],
  "purpose": "optional description"
}

Experience

Screen.Recording.2025-07-01.at.10.18.33.AM.mov

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 July 3, 2025 17:56
@chaynabors chaynabors merged commit b1d9517 into main Jul 3, 2025
17 of 25 checks passed
@chaynabors chaynabors deleted the batch_read_new branch July 3, 2025 17:58
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.

2 participants