refactor(read_file): carry image base64 once in structuredContent - #526
Conversation
The image read_file result duplicated the base64 in structuredContent as both `content` and `imageData`. Drop the `imageData` field and have the preview widget render from the single `content` field, halving the image structuredContent payload. No behavior change: the content[] image block (LLM vision) and the widget's data URI are both intact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR consolidates file preview image payloads onto a single ChangesUnified file preview payload
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks 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 |
* test: align file-preview tests with #524 and #526 Two tests trailed the latest contract changes: - test-file-handlers.js: #526 dropped structuredContent.imageData and carries the image base64 only in structuredContent.content. Update the image/SVG assertions to read content instead of the removed field. - test-markdown-preview.js: #524 tags read_file calls with origin:'ui'. The Test 9 and Test 11 mocks asserted exact read_file args via deepStrictEqual; add origin:'ui' so the full-document reload and the failed-save resync paths match again. No source changes; both were stale tests, not regressions. * Release v0.2.43 Automated release commit with version bump from 0.2.42 to 0.2.43
The image read_file result duplicated the base64 in structuredContent as both
contentandimageData. Drop theimageDatafield and have the preview widget render from the singlecontentfield, halving the image structuredContent payload. No behavior change: the content[] image block (LLM vision) and the widget's data URI are both intact.Summary by CodeRabbit