Skip to content

Conversation

@courtney-sims
Copy link
Collaborator

@courtney-sims courtney-sims commented Apr 18, 2025

Gets file list working by using file read to list files in the cwd while we wait on improved resource support

Screenshot 2025-04-18 at 2 28 55 PM

type: 'resource',
resource: {
text: await blob.text(),
uri: `file://`,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this line to me? Will blob.text() have the file names since you passed a directory to it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! blob.text() will have the list of files since a directory was passed in to container_file_read. If you look at the tool call below this for reading files, there's an if statement related to whether or not the path provided was a directory. This copies the condition where the passed path is a directory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put an image from the inspector in the description too, if that helps!

Base automatically changed from wp-1580-courtney to main April 21, 2025 14:46
@courtney-sims courtney-sims force-pushed the fix-file-list branch 4 times, most recently from 929d2d6 to 4f77716 Compare April 21, 2025 15:02
@courtney-sims courtney-sims marked this pull request as ready for review April 21, 2025 15:02
@courtney-sims courtney-sims merged commit 48a91be into main Apr 21, 2025
4 of 5 checks passed
@courtney-sims courtney-sims deleted the fix-file-list branch April 21, 2025 15:06
deloreyj pushed a commit that referenced this pull request Apr 22, 2025
* Update read tool call

* prettier

* make file write labeling consistent

* Update read and write tools descriptions

* prettier

* Don't use resources for file list

* prettier
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