Merged
Conversation
…re type set() builds and sends set_image messages on the wire, reusing existing server handling. No new wire protocol types needed — set_input/set_input_ack are not introduced. The server sees set_image for both setImage() and set() calls.
commit: |
set()
tomershlasky
approved these changes
Feb 9, 2026
Contributor
tomershlasky
left a comment
There was a problem hiding this comment.
I pretty like it actually, looks much more clean and maintainable (and the other pros you mentioned)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Alternative to PR #76. Adds the same
set()SDK method but without introducing a new wire protocol type.set()sendstype: "set_image"on the wire (same assetImage())set_imagefor both calls — no server changes neededset_input/set_input_ackwire types introducedUsage
Tradeoffs vs #76
set_image(reused)set_input(new)set()vssetImage()set_imagebehaviorTests
70/70 passing
Note
Medium Risk
Adds a new realtime client API that changes how prompt/image updates are sent and introduces URL fetching/base64 conversion behavior, which can affect runtime behavior and timeouts but does not change the wire protocol.
Overview
Adds a unified
realtimeClient.set()method that atomically updates prompt and/or reference image via the existingset_imagepathway (with input validation and a longer update timeout), and exposes the newSetInputtype from the SDK entrypoint.Refactors image handling to a shared
imageToBase64helper (supportingFile/Blob, raw base64,data:URLs, andhttp(s)URLs viafetch) and updates thelucy-2realtime example plus new unit tests coveringset()validation and call behavior.Written by Cursor Bugbot for commit efca18d. This will update automatically on new commits. Configure here.