@W-21447589: Add Android native bridge for setAdditionalContext#38
Open
robertson-waweru wants to merge 3 commits intosalesforce:devfrom
Open
Conversation
- Add CopilotContext.ts with CopilotContextVariable and CopilotAdditionalContext interfaces - Add CopilotContextVariableType enum with Android SDK type names (Text, Number, Boolean, etc.) - Export types from types/index.ts and src/index.ts - Add comprehensive JSDoc with examples and type mappings Establishes type contract for additional context feature.
- Add setAdditionalContext React method to AgentforceModule - Convert NSDictionary to AgentforceVariable array with JSEncodableValue enum - Handle value type conversion (string, number, boolean, array, object) - Validate conversation exists before applying context - Add method declaration to AgentforceModule.m iOS implementation of additional context support.
- Add setAdditionalContext React method to AgentforceModule.kt - Convert ReadableMap to CopilotAdditionalContext object - Import SDK classes: CopilotAdditionalContext, CopilotContextVariable - Handle multiple value types (String, Number, Boolean, Map, Array) - Validate conversation exists before applying context - Use coroutine scope for async context setting Android implementation of additional context support.
This was referenced Mar 6, 2026
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.
Part 3 of stacked PRs for additional context support (W-21447588, W-21447589).
Changes
setAdditionalContextReact method to AgentforceModule.ktTesting
Stack Context
Depends on: #36 (TypeScript types), #37 (iOS bridge) - merge in order
Next: JavaScript bridge layer (PR #4)
Android implementation of additional context support.
130 lines added