Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an optional timeout parameter to the setImage method across the realtime SDK, allowing callers to customize the timeout duration for image send operations instead of always using the default 15-second timeout.
Changes:
- Added
timeoutparameter to thesetImagemethod signature in the client, manager, and connection layers - Implemented timeout logic using the custom value when provided, falling back to the default
AVATAR_SETUP_TIMEOUT_MS - Added comprehensive unit tests to verify both custom and default timeout behavior
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/sdk/src/realtime/client.ts | Updated setImage method signature in RealTimeClient type and implementation to include optional timeout parameter |
| packages/sdk/src/realtime/webrtc-manager.ts | Updated setImage method signature to accept timeout parameter and pass it through to the connection layer |
| packages/sdk/src/realtime/webrtc-connection.ts | Implemented timeout logic using options?.timeout ?? AVATAR_SETUP_TIMEOUT_MS in setImageBase64 method |
| packages/sdk/tests/unit.test.ts | Added test suite for timeout behavior covering both custom and default timeout scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
commit: |
infoshoc
approved these changes
Jan 26, 2026
dansheme
added a commit
that referenced
this pull request
Jan 26, 2026
<!-- CURSOR_SUMMARY --> > [!NOTE] > Adds configurable timeout support for sending reference images in realtime flows. > > - Extends `setImage` (client and manager) and `setImageBase64` (connection) to accept `options.timeout` with default `15000ms` > - Uses `options.timeout ?? AVATAR_SETUP_TIMEOUT_MS` for `set_image` ack waiting; preserves existing behavior when not provided > - Adds unit tests verifying custom and default timeout behavior; updates test imports to use `vi` timers > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 014310a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
Note
Adds configurable timeout support for sending reference images in realtime flows.
setImage(client and manager) andsetImageBase64(connection) to acceptoptions.timeoutwith default15000msoptions.timeout ?? AVATAR_SETUP_TIMEOUT_MSforset_imageack waiting; preserves existing behavior when not providedvitimersWritten by Cursor Bugbot for commit 014310a. This will update automatically on new commits. Configure here.