agora-appbuilder-core 4.1.7-beta.1 → 4.1.7-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/defaultConfig.js +2 -2
- package/template/src/ai-agent/components/AgentControls/AgentContext.tsx +12 -0
- package/template/src/ai-agent/components/AgentControls/index.tsx +5 -1
- package/template/src/ai-agent/layout/ConversationalAI.tsx +3 -1
- package/template/src/ai-agent/layout/NewAnimation.tsx +3 -1
- package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +2 -0
- package/template/src/components/precall/joinWaitingRoomBtn.tsx +2 -0
- package/template/src/language/default-labels/precallScreenLabels.ts +5 -6
- package/template/src/subComponents/ChatBubble.tsx +4 -0
package/package.json
CHANGED
|
@@ -77,8 +77,8 @@ const DefaultConfig = {
|
|
|
77
77
|
CHAT_ORG_NAME: '',
|
|
78
78
|
CHAT_APP_NAME: '',
|
|
79
79
|
CHAT_URL: '',
|
|
80
|
-
CLI_VERSION: '3.1.7-beta.
|
|
81
|
-
CORE_VERSION: '4.1.7-beta.
|
|
80
|
+
CLI_VERSION: '3.1.7-beta.3',
|
|
81
|
+
CORE_VERSION: '4.1.7-beta.3',
|
|
82
82
|
DISABLE_LANDSCAPE_MODE: false,
|
|
83
83
|
STT_AUTO_START: false,
|
|
84
84
|
CLOUD_RECORDING_AUTO_START: false,
|
|
@@ -330,6 +330,18 @@ export const AgentProvider: React.FC<{children: React.ReactNode}> = ({
|
|
|
330
330
|
secondaryBtn: null,
|
|
331
331
|
leadingIcon: null,
|
|
332
332
|
});
|
|
333
|
+
} else if (agentConnectError.toString().indexOf('403') !== -1) {
|
|
334
|
+
Toast.show({
|
|
335
|
+
leadingIconName: 'alert',
|
|
336
|
+
type: 'error',
|
|
337
|
+
text1: 'Uh oh! Agent failed to connect',
|
|
338
|
+
text2:
|
|
339
|
+
"Verify if you've enabled your project for Agora Conversational AI on Agora Console. Or if your project's customer ID and certificate is configured correctly.",
|
|
340
|
+
visibilityTime: 5000,
|
|
341
|
+
primaryBtn: null,
|
|
342
|
+
secondaryBtn: null,
|
|
343
|
+
leadingIcon: null,
|
|
344
|
+
});
|
|
333
345
|
} else {
|
|
334
346
|
Toast.show({
|
|
335
347
|
leadingIconName: 'alert',
|
|
@@ -73,7 +73,11 @@ export const AgentControl: React.FC = () => {
|
|
|
73
73
|
) : (
|
|
74
74
|
<Image style={{width: 24, height: 24}} source={LeaveCallIcon} />
|
|
75
75
|
)}
|
|
76
|
-
{!isMobileUA() &&
|
|
76
|
+
{!isMobileUA() &&
|
|
77
|
+
!(
|
|
78
|
+
agentConnectionState === 'AGENT_CONNECTED' ||
|
|
79
|
+
agentConnectionState === 'AGENT_DISCONNECT_FAILED'
|
|
80
|
+
) ? (
|
|
77
81
|
<Text
|
|
78
82
|
style={{
|
|
79
83
|
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
@@ -84,7 +84,9 @@ export default function ConversationalAI() {
|
|
|
84
84
|
)}
|
|
85
85
|
</View>
|
|
86
86
|
<View style={styles.btnContainer}>
|
|
87
|
-
{!isLoading &&
|
|
87
|
+
{!isLoading &&
|
|
88
|
+
(agentConnectionState === 'AGENT_CONNECTED' ||
|
|
89
|
+
agentConnectionState === 'AGENT_DISCONNECT_FAILED') ? (
|
|
88
90
|
<View style={styles.controlsContainer}>
|
|
89
91
|
<MicButton />
|
|
90
92
|
<TranscriptButton />
|
|
@@ -51,7 +51,9 @@ export default function NewAnimation() {
|
|
|
51
51
|
<AiAgentCustomView connectionState={agentConnectionState} />
|
|
52
52
|
</View>
|
|
53
53
|
<View style={styles.btnContainer}>
|
|
54
|
-
{!isLoading &&
|
|
54
|
+
{!isLoading &&
|
|
55
|
+
(agentConnectionState === 'AGENT_CONNECTED' ||
|
|
56
|
+
agentConnectionState === 'AGENT_DISCONNECT_FAILED') ? (
|
|
55
57
|
<View style={styles.controlsContainer}>
|
|
56
58
|
<MicButton />
|
|
57
59
|
<TranscriptButton />
|
|
@@ -72,6 +72,7 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
|
|
|
72
72
|
waitingRoomButton({
|
|
73
73
|
ready: isInWaitingRoom,
|
|
74
74
|
isAutoRequest: $config.ENABLE_WAITING_ROOM_AUTO_REQUEST,
|
|
75
|
+
isAutoApproval: $config.ENABLE_WAITING_ROOM_AUTO_APPROVAL,
|
|
75
76
|
}),
|
|
76
77
|
);
|
|
77
78
|
const {request: requestToJoin} = useWaitingRoomAPI();
|
|
@@ -121,6 +122,7 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
|
|
|
121
122
|
waitingRoomButton({
|
|
122
123
|
ready: !isInWaitingRoom,
|
|
123
124
|
isAutoRequest: $config.ENABLE_WAITING_ROOM_AUTO_REQUEST,
|
|
125
|
+
isAutoApproval: $config.ENABLE_WAITING_ROOM_AUTO_APPROVAL,
|
|
124
126
|
}),
|
|
125
127
|
);
|
|
126
128
|
}, [isInWaitingRoom]);
|
|
@@ -89,6 +89,7 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
|
|
|
89
89
|
waitingRoomButton({
|
|
90
90
|
ready: isInWaitingRoom,
|
|
91
91
|
isAutoRequest: $config.ENABLE_WAITING_ROOM_AUTO_REQUEST,
|
|
92
|
+
isAutoApproval: $config.ENABLE_WAITING_ROOM_AUTO_APPROVAL,
|
|
92
93
|
}),
|
|
93
94
|
);
|
|
94
95
|
|
|
@@ -272,6 +273,7 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
|
|
|
272
273
|
waitingRoomButton({
|
|
273
274
|
ready: !isInWaitingRoom,
|
|
274
275
|
isAutoRequest: $config.ENABLE_WAITING_ROOM_AUTO_REQUEST,
|
|
276
|
+
isAutoApproval: $config.ENABLE_WAITING_ROOM_AUTO_APPROVAL,
|
|
275
277
|
}),
|
|
276
278
|
);
|
|
277
279
|
}, [isInWaitingRoom]);
|
|
@@ -10,6 +10,7 @@ export interface PrecallJoinBtnTextInterface {
|
|
|
10
10
|
export interface PrecallWaitingRoomJoinBtnTextInterface {
|
|
11
11
|
ready: boolean;
|
|
12
12
|
isAutoRequest: boolean;
|
|
13
|
+
isAutoApproval: boolean;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export const permissionPopupHeading = `permissionPopupHeading`;
|
|
@@ -135,12 +136,10 @@ export const PrecallScreenLabels: I18nPrecallScreenLabelsInterface = {
|
|
|
135
136
|
[precallYouAreJoiningAsHeading]: 'You are joining',
|
|
136
137
|
[precallNameInputPlaceholderText]: 'Enter Your Name',
|
|
137
138
|
[precallInputGettingName]: 'Getting name...',
|
|
138
|
-
[precallWaitingRoomJoinBtnText]: ({ready, isAutoRequest}) => {
|
|
139
|
-
return
|
|
140
|
-
? '
|
|
141
|
-
:
|
|
142
|
-
? 'Ask To Join'
|
|
143
|
-
: `Waiting for approval...`;
|
|
139
|
+
[precallWaitingRoomJoinBtnText]: ({ready, isAutoRequest, isAutoApproval}) => {
|
|
140
|
+
return ready
|
|
141
|
+
? isAutoRequest? 'Meeting Started, Join Now !': 'Ask To Join'
|
|
142
|
+
: isAutoApproval?'Joining...': `Waiting for approval...`
|
|
144
143
|
},
|
|
145
144
|
|
|
146
145
|
[precallJoinBtnText]: ({waitingRoom, ready, role}) => {
|
|
@@ -132,6 +132,10 @@ export const ReplyMessageBubble = ({
|
|
|
132
132
|
if (repliedMsg.length == 0 && chatType === ChatType.Private) {
|
|
133
133
|
repliedMsg = messageStore.filter(msg => msg.msgId === repliedMsgId);
|
|
134
134
|
}
|
|
135
|
+
|
|
136
|
+
if (repliedMsg.length == 0) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
135
139
|
const isAttachMsg = repliedMsg[0]?.type !== ChatMessageType.TXT;
|
|
136
140
|
|
|
137
141
|
let time = formatAMPM(new Date(repliedMsg[0]?.createdTimestamp));
|