Conversation
- Add optional 'branch' parameter to BaseSessionConfig in BaseConnection.ts - Update constructOverrides to include branch in initiation event for WebRTC - Add comprehensive tests for branch parameter in overrides.test.ts This allows users to specify which agent branch to use during WebRTC sessions, similar to how it's already supported in WebSocket connections.
|
Cursor Agent can help with this pull request. Just |
|
@cursor did you read my prompt ? It's a parameter of the livekit token endpoint and parameter of the websocket not an override. Redo it start from scratch and think carefully , check how we currently get the token and add a branch id param nothing else needs to be changed |
|
I've corrected the implementation. Here's what the fix does: Changes Made:
Usage: const { startSession } = useConversation({
agentId: "your-agent-id",
branch: "feature-branch", // Optional - added to URL query params
connectionType: "webrtc",
});The |
- Add branch query parameter to WebRTC token endpoint URL - Add branch query parameter to WebSocket connection URL - Remove incorrect override implementation - Branch parameter is properly URL-encoded The branch parameter is now correctly passed as a query parameter to: - /v1/convai/conversation/token?...&branch=<branch> (WebRTC) - /v1/convai/conversation?...&branch=<branch> (WebSocket)


Add optional
branchparameter toSessionConfigto enable specifying agent branches for WebRTC connections, consistent with WebSocket functionality.Slack Thread