Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. Automatic ready-for-review conversion failed; please mark the pull request ready manually if it is still a draft. |
리뷰 · 우선순위 24 / 80이 PR은 Cursor에 다시 보여줄 도구 호출 인자를, 너무 길어서 잘라 둔 뒤 봉투에 남은 바이트로 되돌릴 때 메모리를 크게 쓰지 않게 고칩니다. 도구 결과가 다시 재생되면, 그 결과를 만든 호출의 인자가 한 줄로 붙습니다. 인자가 한도를 넘으면 뒤를
베이스는 라인 라인 메인테이너의 판단이 필요한 지점 초안 체크리스트 네 칸이 아직 비어 있습니다. PR 설명은 네 칸이 채워지기 전에는 초안으로 둔다고 적습니다. 코드와 별개로, 초안을 벗길 시점만 정하면 됩니다. 1077의 두 번째 조건은 지워도 동작이 같습니다. 너의 추천 합쳐도 됩니다. 잘린 인자를 되돌리기 전에, 원문 바이트가 남은 예산에 드는지 먼저 보는 쪽이 맞습니다. 넘치면 넓힌 글을 만들지 않고 다음 결과로 넘어갑니다. 나중에 실제 비용이 예산을 넘으면 거절하는 기존 검사도 그대로입니다. 두 번째 조건은 지워도 됩니다. 큰 버퍼를 테스트로 잠그려면 이 댓글은 grok-bot이 작성했습니다 |
Motivation
Description
truncateUtf8now usesencodeIntointo a bound-sized buffer instead of encoding the whole input first.boundedUtf8ByteLengthreturns the UTF-8 length only when it fits the bound, without allocating an input-sized buffer.serializedToolCallArgumentsTextreuses the single serialization the refund pass already produced, and the pass rejects an impossible restoration with a bounded scan before building the widened string.structure/providers/cursor.mddocuments the bounded scan and serialization reuse.tests/providers/cursor/cursor-tool-result-invocation.test.tsasserts an impossible restoration serializes its arguments only once.Testing
bun test tests/providers/cursor/cursor-tool-result-invocation.test.ts: 36 tests pass.Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.