You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 8, 2025. It is now read-only.
Read the content of a file from a given path; raise a ToolError if an error occurs.
"""
try:
returnpath.read_text()
exceptExceptionase:
raiseToolError(f'Ran into {e} while trying to read {path}') fromNone
We should:
write tests that measure the memory usage when reading in or editing large files and see that they fail currently (e.g. read in a 10MB file and see that it requires over 10MB of memory)
modify the existing implementation to reduce memory requirements when editing only a small part of a larger file