Add UIDelegate bridge for SDK UI event forwarding#88
Open
robertson-waweru wants to merge 2 commits into
Open
Conversation
Implements AgentforceUIDelegate on both platforms to surface conversation lifecycle events (utterance sent, agent switch, modify-utterance) to JS. The didReceiveResponse callback is active on Android only — iOS SDK 260.5 does not expose AgentforceMessage properties publicly.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #88 +/- ##
=======================================
Coverage ? 100.00%
=======================================
Files ? 1
Lines ? 7
Branches ? 0
=======================================
Hits ? 7
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Align modify-utterance timeout to 10s on both platforms (was 5s on Android) - iOS: always emit hasAttachment and timestamp in event payloads - iOS: fix race in awaitModifiedUtterance — register continuation before sending event - iOS: drain pending continuations when forwarding is disabled to prevent leaks - iOS: remove undeclared attachment field from UtteranceSentEvent payload - Android: log timeout and exceptions in modifyUtteranceBeforeSending - Android: replace misleading val getter with isoTimestamp() function - TS: make onAgentResponse optional (iOS SDK limitation) - TS: guard against non-string returns from modifyUtterance handler
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
AgentforceUIDelegateon iOS and Android native bridges to forward conversation lifecycle events to JavaScriptdidSendUtterance,userDidSwitchAgents, andmodifyUtteranceBeforeSendingcallbacks via a newUIDelegateinterface in the TypeScript layerdidReceiveResponseis active on Android only — iOS SDK 260.5 does not exposeAgentforceMessageproperties publicly (noted with comment for future enablement)setUIDelegate()/clearUIDelegate()API toAgentforceServiceTest plan