Repository navigation
Let document tools continue reading past their response budget - #1235
Conversation
Signed-off-by: Floating-Y <118035379+Floating-Y@users.noreply.github.com>
WaylandYang
left a comment
There was a problem hiding this comment.
Thank you, this is exactly the fix: an optional offset over the body text, the next offset and document id in the notice, and guidance that a partial read is not proof of absence. I ran the document tests on a fresh database; the two-call tail read passes.
Merging. Thanks again.
|
It is still marked as a draft, so it cannot be merged yet. Mark it ready for review when you are and we will merge it. Thanks! |
|
Thanks for reviewing and running the tests! The PR is now ready for review. |
WaylandYang
left a comment
There was a problem hiding this comment.
Thank you for marking it ready. This closes #1209 as scoped there: one optional offset over the body text, the next offset and document id in the notice, and tests that read the tail in two calls over both Chat and MCP. Merging.
Why
Closes #1209.
A ready document can contain the answer past the 24,000-character response budget, but every
get_documentcall previously returned the same prefix. Callers could not reach the stored tail.What changes
offsetto the shared Chat/MCP tool. Omitting it still starts at zero. Offsets count Unicode characters across trimmed section bodies in order, excluding headers and separators.How it was checked
Windows x64, Rust 1.98.1, commit
b3cb080, based ondev@ff87e80:cargo fmt --all --checkcargo clippy --locked --workspace --all-targets -- -D warningscargo test --locked --workspace: 1,531 passed, 0 failed, 6 existing opt-in/live tests ignored. Database tests used disposable PostgreSQL 16/pgvector withUTOPIA_TEST_REQUIRE_DB=1and four test threads.pnpm --dir web buildpnpm --dir web test: 36 files, 268 tests passed.Before review