Skip to content
Discussion options

You must be logged in to vote

Hi @Evan-bunny, thanks for picking this up!

Your direction is exactly right — rejecting offset=0 with a clear error is preferable to silently treating it as 1, since a 0 usually indicates a caller-side mistake that the caller (an LLM, in this case) should be told about so it can correct itself. The error message you proposed (explaining the 1-indexed convention and mentioning negative offsets) looks good.

Also agreed on the limit=0 note: skipping the continuation note when no lines are returned is the right fix.

One request: please include the two regression tests (offset=0 and limit=0) in tests/test_tools.py — you can follow the style of the existing test_read_offset_beyond_eof case. Oth…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Evan-bunny
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants