diff --git a/CHANGELOG.md b/CHANGELOG.md index aa93226..d7cff69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.3.7] - 2026-07-02 + +### Added +- Agent response streaming, article search filters, and conversation page header branding added in FeatureConfiguration. +- Prefill message support when creating support conversations. + +### Fixed +- [Android] Fixed a crash related to NPEs on activities. + ## [2.3.6] - 2026-06-24 ### Changed diff --git a/README.md b/README.md index f9c12c9..5bacb7b 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,8 @@ DevRev.configure('abcdefg12345', { supportWidgetTheme: { prefersSystemTheme: true, }, + enableSupportChatStreaming: true, + supportWidgetArticleSearchFilters: articleSearchFilters, }); ``` @@ -147,6 +149,8 @@ DevRev.updateFeatureConfiguration({ supportWidgetTheme: { prefersSystemTheme: true, }, + enableSupportChatStreaming: true, + supportWidgetArticleSearchFilters: articleSearchFilters, }); ``` @@ -161,6 +165,8 @@ DevRev.updateFeatureConfiguration({ | `prefersDialogMode` | `boolean` | `false` | Prefer dialog mode for the support UI (Android only). | | `alwaysUseRemoteConfig` | `boolean` | `true` | Always use remote config. | | `supportWidgetTheme` | `SupportWidgetTheme` | — | Controls the appearance of the in-app support widget, including dynamic theme behavior. | +| `enableSupportChatStreaming` | `boolean?` | `false` | When `true`, enables real-time AI agent response streaming in PLuG conversations (WebSocket streaming, optimistic UI, animated text). | +| `supportWidgetArticleSearchFilters` | `ArticleSearchFilters?` | — | Optional filters for PLuG article search (widget and CMDK). Applied automatically when the support widget is ready. | ##### Support widget theme options @@ -175,6 +181,10 @@ const customTheme = { bottom: '20px', side: '16px', }, + conversationPageOptions: { + headerText: 'Support', + subheaderText: 'We typically reply in a few minutes', + }, }; ``` @@ -184,6 +194,16 @@ const customTheme = { | `primaryTextColor` | `string?` | — | Hex color string (e.g. `'#000000'`, `'#1F2933'`) for primary text in the support widget. | | `accentColor` | `string?` | — | Hex color string (e.g. `'#F97316'`, `'#FF0000'`) applied to buttons and highlights. | | `spacing` | `{ [key: string]: string }?` | — | CSS-like spacing overrides (`bottom` and `side` keys are recognized). | +| `conversationPageOptions` | `ConversationPageOptions?` | — | Customizes the conversation page header branding. | + +##### Conversation page options + +`ConversationPageOptions` customizes the header strings shown on the support conversation page. Both fields are optional — when omitted, the server-configured defaults are used. + +| Property | Type | Default | Description | +|----------|------|---------|-------------| +| `headerText` | `string?` | — | Custom text for the conversation header. | +| `subheaderText` | `string?` | — | Custom text for the conversation subheader. Pass a single space (`' '`) to render a blank subheader. | ## Features @@ -365,7 +385,13 @@ DevRev.showSupport() You can initiate a new support conversation directly from your app. This method displays the support chat screen and simultaneously creates a new conversation. ```typescript -DevRev.createSupportConversation() +DevRev.createSupportConversation(prefillMessage?: string) +``` + +You can optionally pass a plain-text message to prefill the conversation input field: + +```typescript +DevRev.createSupportConversation('I need help with billing for order #12345') ``` ### In-app link handling diff --git a/devrev-sdk-react-native-2.3.7.tgz b/devrev-sdk-react-native-2.3.7.tgz new file mode 100644 index 0000000..96836da Binary files /dev/null and b/devrev-sdk-react-native-2.3.7.tgz differ diff --git a/sample/package.json b/sample/package.json index 7c50f47..96821bd 100644 --- a/sample/package.json +++ b/sample/package.json @@ -10,7 +10,7 @@ "build:ios": "react-native build-ios --scheme DevRevSDKSample --mode Debug --extra-params \"-sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO\"" }, "dependencies": { - "@devrev/sdk-react-native": "^2.3.6", + "@devrev/sdk-react-native": "^2.3.7", "@notifee/react-native": "^9.1.3", "@react-native-community/cli-platform-ios": "^13.6.9", "@react-native-firebase/app": "^21.0.0", diff --git a/sample/react-native/src/screens/SessionAnalyticsScreen.tsx b/sample/react-native/src/screens/SessionAnalyticsScreen.tsx index fe18ff7..baff469 100644 --- a/sample/react-native/src/screens/SessionAnalyticsScreen.tsx +++ b/sample/react-native/src/screens/SessionAnalyticsScreen.tsx @@ -76,6 +76,41 @@ const OnDemandSessionButtons = [ }, ] as const; +const FeatureConfigurationButtons = [ + { + text: 'Enable Frame Capture', + onPress: () => + DevRev.updateFeatureConfiguration({ + enableFrameCapture: true, + autoStartRecording: true, + prefersDialogMode: false, + alwaysUseRemoteConfig: true, + supportWidgetTheme: { prefersSystemTheme: true }, + }), + }, + { + text: 'Disable Frame Capture', + onPress: () => + DevRev.updateFeatureConfiguration({ + enableFrameCapture: false, + autoStartRecording: true, + prefersDialogMode: false, + alwaysUseRemoteConfig: true, + supportWidgetTheme: { prefersSystemTheme: true }, + }), + }, +] as const; + +const CaptureErrorButtons = [ + { + text: 'Capture Error', + onPress: () => { + const error = new Error('Simulated handled error for testing'); + DevRev.captureError(error, 'test-error'); + }, + }, +] as const; + const WebViewButton = [ { text: 'Open Web View', @@ -212,6 +247,28 @@ const SessionAnalyticsScreen: React.FC<{ navigation: any }> = ({ placeholder="Manually Unmasked UI Item" /> + Feature Configuration + {FeatureConfigurationButtons.map((button, index) => ( + + ))} + + Error Capture + {CaptureErrorButtons.map((button, index) => ( + + ))} + On-Demand Sessions {OnDemandSessionButtons.map((button, index) => ( { text: 'Create Support Conversation', onPress: () => { console.log('Creating support conversation'); - DevRevSDK.createSupportConversation(); + DevRevSDK.createSupportConversation('Hi, I need help with my account'); }, }, ];