@memori.ai/memori-react 2.3.1 → 2.4.1
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/CHANGELOG.md +15 -0
- package/README.md +62 -8
- package/dist/components/MemoriWidget/MemoriWidget.d.ts +15 -5
- package/dist/components/MemoriWidget/MemoriWidget.js +100 -16
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/layouts/Chat.js +1 -1
- package/dist/components/layouts/Chat.js.map +1 -1
- package/dist/components/layouts/FullPage.js +1 -1
- package/dist/components/layouts/FullPage.js.map +1 -1
- package/dist/components/layouts/Totem.js +1 -1
- package/dist/components/layouts/Totem.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.d.ts +15 -5
- package/esm/components/MemoriWidget/MemoriWidget.js +100 -16
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/layouts/Chat.js +1 -1
- package/esm/components/layouts/Chat.js.map +1 -1
- package/esm/components/layouts/FullPage.js +1 -1
- package/esm/components/layouts/FullPage.js.map +1 -1
- package/esm/components/layouts/Totem.js +1 -1
- package/esm/components/layouts/Totem.js.map +1 -1
- package/package.json +1 -1
- package/src/components/MemoriWidget/MemoriWidget.tsx +142 -143
- package/src/components/layouts/Chat.tsx +19 -7
- package/src/components/layouts/FullPage.tsx +20 -9
- package/src/components/layouts/Totem.tsx +24 -9
- package/src/components/layouts/layouts.stories.tsx +15 -6
|
@@ -42,11 +42,11 @@ import message from '../ui/Message';
|
|
|
42
42
|
// Components
|
|
43
43
|
import PositionDrawer from '../PositionDrawer/PositionDrawer';
|
|
44
44
|
import MemoriAuth from '../Auth/Auth';
|
|
45
|
-
import Chat from '../Chat/Chat';
|
|
46
|
-
import StartPanel from '../StartPanel/StartPanel';
|
|
47
|
-
import Avatar from '../Avatar/Avatar';
|
|
48
|
-
import ChangeMode from '../ChangeMode/ChangeMode';
|
|
49
|
-
import Header from '../Header/Header';
|
|
45
|
+
import Chat, { Props as ChatProps } from '../Chat/Chat';
|
|
46
|
+
import StartPanel, { Props as StartPanelProps } from '../StartPanel/StartPanel';
|
|
47
|
+
import Avatar, { Props as AvatarProps } from '../Avatar/Avatar';
|
|
48
|
+
import ChangeMode, { Props as ChangeModeProps } from '../ChangeMode/ChangeMode';
|
|
49
|
+
import Header, { Props as HeaderProps } from '../Header/Header';
|
|
50
50
|
import AttachmentMediaModal from '../AttachmentMediaModal/AttachmentMediaModal';
|
|
51
51
|
import AttachmentLinkModal from '../AttachmentLinkModal/AttachmentLinkModal';
|
|
52
52
|
import PoweredBy from '../PoweredBy/PoweredBy';
|
|
@@ -147,13 +147,18 @@ let audioDestination: SpeakerAudioDestination;
|
|
|
147
147
|
let audioContext: IAudioContext;
|
|
148
148
|
|
|
149
149
|
export interface LayoutProps {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
Header?: typeof Header;
|
|
151
|
+
headerProps?: HeaderProps;
|
|
152
|
+
Avatar: typeof Avatar;
|
|
153
|
+
avatarProps?: AvatarProps;
|
|
154
|
+
Chat?: typeof Chat;
|
|
155
|
+
chatProps?: ChatProps;
|
|
156
|
+
StartPanel: typeof StartPanel;
|
|
157
|
+
startPanelProps?: StartPanelProps;
|
|
154
158
|
integrationStyle?: JSX.Element | null;
|
|
155
159
|
integrationBackground?: JSX.Element | null;
|
|
156
|
-
|
|
160
|
+
ChangeMode?: typeof ChangeMode;
|
|
161
|
+
changeModeProps?: ChangeModeProps;
|
|
157
162
|
poweredBy?: JSX.Element | null;
|
|
158
163
|
sessionId?: string;
|
|
159
164
|
hasUserActivatedSpeak?: boolean;
|
|
@@ -257,8 +262,8 @@ const MemoriWidget = ({
|
|
|
257
262
|
: null;
|
|
258
263
|
const isMultilanguageEnabled = !!integrationConfig?.multilanguage;
|
|
259
264
|
const [userLang, setUserLang] = useState(
|
|
260
|
-
|
|
261
|
-
|
|
265
|
+
memoriLang ??
|
|
266
|
+
integrationConfig?.lang ??
|
|
262
267
|
memori?.culture?.split('-')?.[0] ??
|
|
263
268
|
language ??
|
|
264
269
|
integrationConfig?.uiLang ??
|
|
@@ -2136,128 +2141,119 @@ const MemoriWidget = ({
|
|
|
2136
2141
|
};
|
|
2137
2142
|
}, []);
|
|
2138
2143
|
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
/>
|
|
2165
|
-
);
|
|
2144
|
+
const headerProps: HeaderProps = {
|
|
2145
|
+
memori,
|
|
2146
|
+
history,
|
|
2147
|
+
showShare,
|
|
2148
|
+
position,
|
|
2149
|
+
setShowPositionDrawer,
|
|
2150
|
+
setShowSettingsDrawer,
|
|
2151
|
+
showSpeaker: !!AZURE_COGNITIVE_SERVICES_TTS_KEY,
|
|
2152
|
+
speakerMuted: muteSpeaker,
|
|
2153
|
+
setSpeakerMuted: mute => {
|
|
2154
|
+
setMuteSpeaker(mute);
|
|
2155
|
+
if (mute) {
|
|
2156
|
+
stopAudio();
|
|
2157
|
+
} else {
|
|
2158
|
+
audioContext = new AudioContext();
|
|
2159
|
+
let buffer = audioContext.createBuffer(1, 10000, 22050);
|
|
2160
|
+
let source = audioContext.createBufferSource();
|
|
2161
|
+
source.buffer = buffer;
|
|
2162
|
+
source.connect(audioContext.destination);
|
|
2163
|
+
}
|
|
2164
|
+
},
|
|
2165
|
+
showSettings,
|
|
2166
|
+
hasUserActivatedSpeak,
|
|
2167
|
+
showReload: selectedLayout === 'TOTEM',
|
|
2168
|
+
};
|
|
2166
2169
|
|
|
2167
|
-
const
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
/>
|
|
2182
|
-
);
|
|
2170
|
+
const avatarProps: AvatarProps = {
|
|
2171
|
+
memori,
|
|
2172
|
+
integration,
|
|
2173
|
+
integrationConfig,
|
|
2174
|
+
tenant,
|
|
2175
|
+
instruct,
|
|
2176
|
+
avatar3dVisible,
|
|
2177
|
+
setAvatar3dVisible,
|
|
2178
|
+
hasUserActivatedSpeak,
|
|
2179
|
+
isPlayingAudio,
|
|
2180
|
+
loading: memoriTyping,
|
|
2181
|
+
baseUrl,
|
|
2182
|
+
apiUrl,
|
|
2183
|
+
};
|
|
2183
2184
|
|
|
2184
|
-
const
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
/>
|
|
2203
|
-
);
|
|
2185
|
+
const startPanelProps: StartPanelProps = {
|
|
2186
|
+
memori: memori,
|
|
2187
|
+
tenant: tenant,
|
|
2188
|
+
gamificationLevel: gamificationLevel,
|
|
2189
|
+
language: language,
|
|
2190
|
+
userLang: userLang,
|
|
2191
|
+
setUserLang: setUserLang,
|
|
2192
|
+
baseUrl: baseUrl,
|
|
2193
|
+
apiUrl: apiUrl,
|
|
2194
|
+
position: position,
|
|
2195
|
+
openPositionDrawer: () => setShowPositionDrawer(true),
|
|
2196
|
+
integrationConfig: integrationConfig,
|
|
2197
|
+
instruct: instruct,
|
|
2198
|
+
sessionId: sessionId,
|
|
2199
|
+
clickedStart: clickedStart,
|
|
2200
|
+
onClickStart: onClickStart,
|
|
2201
|
+
initializeTTS: initializeTTS,
|
|
2202
|
+
};
|
|
2204
2203
|
|
|
2205
|
-
const
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
(
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
isPlayingAudio={isPlayingAudio}
|
|
2259
|
-
/>
|
|
2260
|
-
) : null;
|
|
2204
|
+
const chatProps: ChatProps = {
|
|
2205
|
+
memori,
|
|
2206
|
+
sessionID: sessionId || '',
|
|
2207
|
+
tenant,
|
|
2208
|
+
translateTo:
|
|
2209
|
+
isMultilanguageEnabled &&
|
|
2210
|
+
userLang.toUpperCase() !==
|
|
2211
|
+
(
|
|
2212
|
+
memori.culture?.split('-')?.[0] ??
|
|
2213
|
+
i18n.language ??
|
|
2214
|
+
'IT'
|
|
2215
|
+
)?.toUpperCase()
|
|
2216
|
+
? userLang
|
|
2217
|
+
: undefined,
|
|
2218
|
+
baseUrl,
|
|
2219
|
+
apiUrl,
|
|
2220
|
+
memoriTyping,
|
|
2221
|
+
history: layout === 'TOTEM' ? history.slice(-2) : history,
|
|
2222
|
+
authToken: loginToken,
|
|
2223
|
+
dialogState: currentDialogState,
|
|
2224
|
+
setDialogState: setCurrentDialogState,
|
|
2225
|
+
pushMessage,
|
|
2226
|
+
simulateUserPrompt,
|
|
2227
|
+
showDates,
|
|
2228
|
+
showContextPerLine,
|
|
2229
|
+
showAIicon,
|
|
2230
|
+
client,
|
|
2231
|
+
selectReceiverTag,
|
|
2232
|
+
preview,
|
|
2233
|
+
sendOnEnter,
|
|
2234
|
+
setSendOnEnter,
|
|
2235
|
+
microphoneMode: continuousSpeech ? 'CONTINUOUS' : 'HOLD_TO_TALK',
|
|
2236
|
+
attachmentsMenuOpen,
|
|
2237
|
+
setAttachmentsMenuOpen,
|
|
2238
|
+
instruct,
|
|
2239
|
+
showInputs,
|
|
2240
|
+
showMicrophone: !!AZURE_COGNITIVE_SERVICES_TTS_KEY,
|
|
2241
|
+
userMessage,
|
|
2242
|
+
onChangeUserMessage,
|
|
2243
|
+
sendMessage: (msg: string) => {
|
|
2244
|
+
stopAudio();
|
|
2245
|
+
stopListening();
|
|
2246
|
+
sendMessage(msg);
|
|
2247
|
+
setUserMessage('');
|
|
2248
|
+
resetTranscript();
|
|
2249
|
+
},
|
|
2250
|
+
stopListening: clearListening,
|
|
2251
|
+
startListening,
|
|
2252
|
+
stopAudio,
|
|
2253
|
+
resetTranscript,
|
|
2254
|
+
listening,
|
|
2255
|
+
isPlayingAudio,
|
|
2256
|
+
};
|
|
2261
2257
|
|
|
2262
2258
|
const integrationBackground =
|
|
2263
2259
|
integration && globalBackgroundUrl ? (
|
|
@@ -2280,13 +2276,11 @@ const MemoriWidget = ({
|
|
|
2280
2276
|
setHasUserActivatedSpeak(false);
|
|
2281
2277
|
setClickedStart(false);
|
|
2282
2278
|
};
|
|
2283
|
-
const
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
/>
|
|
2289
|
-
);
|
|
2279
|
+
const changeModeProps: ChangeModeProps = {
|
|
2280
|
+
canInstruct: !!memori.giverTag,
|
|
2281
|
+
instruct: !!instruct,
|
|
2282
|
+
onChangeMode,
|
|
2283
|
+
};
|
|
2290
2284
|
|
|
2291
2285
|
const poweredBy = <PoweredBy tenant={tenant} userLang={userLang} />;
|
|
2292
2286
|
|
|
@@ -2328,13 +2322,18 @@ const MemoriWidget = ({
|
|
|
2328
2322
|
style={{ height }}
|
|
2329
2323
|
>
|
|
2330
2324
|
<Layout
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2325
|
+
Header={Header}
|
|
2326
|
+
headerProps={headerProps}
|
|
2327
|
+
Avatar={Avatar}
|
|
2328
|
+
avatarProps={avatarProps}
|
|
2329
|
+
Chat={Chat}
|
|
2330
|
+
chatProps={chatProps}
|
|
2331
|
+
StartPanel={StartPanel}
|
|
2332
|
+
startPanelProps={startPanelProps}
|
|
2335
2333
|
integrationStyle={integrationStyle}
|
|
2336
2334
|
integrationBackground={integrationBackground}
|
|
2337
|
-
|
|
2335
|
+
ChangeMode={ChangeMode}
|
|
2336
|
+
changeModeProps={changeModeProps}
|
|
2338
2337
|
poweredBy={poweredBy}
|
|
2339
2338
|
sessionId={sessionId}
|
|
2340
2339
|
hasUserActivatedSpeak={hasUserActivatedSpeak}
|
|
@@ -3,12 +3,16 @@ import Spin from '../ui/Spin';
|
|
|
3
3
|
import { LayoutProps } from '../MemoriWidget/MemoriWidget';
|
|
4
4
|
|
|
5
5
|
const ChatLayout: React.FC<LayoutProps> = ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
Header,
|
|
7
|
+
headerProps,
|
|
8
|
+
Chat,
|
|
9
|
+
chatProps,
|
|
10
|
+
StartPanel,
|
|
11
|
+
startPanelProps,
|
|
9
12
|
integrationStyle,
|
|
10
13
|
integrationBackground,
|
|
11
|
-
|
|
14
|
+
ChangeMode,
|
|
15
|
+
changeModeProps,
|
|
12
16
|
sessionId,
|
|
13
17
|
hasUserActivatedSpeak,
|
|
14
18
|
showInstruct = false,
|
|
@@ -21,12 +25,20 @@ const ChatLayout: React.FC<LayoutProps> = ({
|
|
|
21
25
|
|
|
22
26
|
<Spin spinning={loading} className="memori-chat-layout">
|
|
23
27
|
{poweredBy}
|
|
24
|
-
{showInstruct &&
|
|
28
|
+
{showInstruct && ChangeMode && changeModeProps && (
|
|
29
|
+
<ChangeMode {...changeModeProps} />
|
|
30
|
+
)}
|
|
25
31
|
|
|
26
|
-
<div className="memori-chat-layout--header">
|
|
32
|
+
<div className="memori-chat-layout--header">
|
|
33
|
+
{Header && headerProps && <Header {...headerProps} />}
|
|
34
|
+
</div>
|
|
27
35
|
|
|
28
36
|
<div className="memori-chat-layout--controls">
|
|
29
|
-
{sessionId && hasUserActivatedSpeak
|
|
37
|
+
{sessionId && hasUserActivatedSpeak && Chat && chatProps ? (
|
|
38
|
+
<Chat {...chatProps} />
|
|
39
|
+
) : startPanelProps ? (
|
|
40
|
+
<StartPanel {...startPanelProps} />
|
|
41
|
+
) : null}
|
|
30
42
|
</div>
|
|
31
43
|
</Spin>
|
|
32
44
|
</>
|
|
@@ -3,13 +3,18 @@ import Spin from '../ui/Spin';
|
|
|
3
3
|
import { LayoutProps } from '../MemoriWidget/MemoriWidget';
|
|
4
4
|
|
|
5
5
|
const FullPageLayout: React.FC<LayoutProps> = ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
Header,
|
|
7
|
+
headerProps,
|
|
8
|
+
Avatar,
|
|
9
|
+
avatarProps,
|
|
10
|
+
Chat,
|
|
11
|
+
chatProps,
|
|
12
|
+
StartPanel,
|
|
13
|
+
startPanelProps,
|
|
10
14
|
integrationStyle,
|
|
11
15
|
integrationBackground,
|
|
12
|
-
|
|
16
|
+
ChangeMode,
|
|
17
|
+
changeModeProps,
|
|
13
18
|
sessionId,
|
|
14
19
|
hasUserActivatedSpeak,
|
|
15
20
|
showInstruct = false,
|
|
@@ -21,16 +26,22 @@ const FullPageLayout: React.FC<LayoutProps> = ({
|
|
|
21
26
|
{integrationBackground}
|
|
22
27
|
|
|
23
28
|
<Spin spinning={loading}>
|
|
24
|
-
{showInstruct &&
|
|
29
|
+
{showInstruct && ChangeMode && changeModeProps && (
|
|
30
|
+
<ChangeMode {...changeModeProps} />
|
|
31
|
+
)}
|
|
25
32
|
|
|
26
|
-
{
|
|
33
|
+
{Header && headerProps && <Header {...headerProps} />}
|
|
27
34
|
|
|
28
35
|
<div className="memori--grid">
|
|
29
36
|
<div className="memori--grid-column memori--grid-column-left">
|
|
30
|
-
{
|
|
37
|
+
{Avatar && avatarProps && <Avatar {...avatarProps} />}
|
|
31
38
|
</div>
|
|
32
39
|
<div className="memori--grid-column memori--grid-column-right">
|
|
33
|
-
{sessionId && hasUserActivatedSpeak
|
|
40
|
+
{sessionId && hasUserActivatedSpeak && Chat && chatProps ? (
|
|
41
|
+
<Chat {...chatProps} />
|
|
42
|
+
) : startPanelProps ? (
|
|
43
|
+
<StartPanel {...startPanelProps} />
|
|
44
|
+
) : null}
|
|
34
45
|
</div>
|
|
35
46
|
|
|
36
47
|
{poweredBy}
|
|
@@ -3,13 +3,18 @@ import Spin from '../ui/Spin';
|
|
|
3
3
|
import { LayoutProps } from '../MemoriWidget/MemoriWidget';
|
|
4
4
|
|
|
5
5
|
const TotemLayout: React.FC<LayoutProps> = ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
Header,
|
|
7
|
+
headerProps,
|
|
8
|
+
Avatar,
|
|
9
|
+
avatarProps,
|
|
10
|
+
Chat,
|
|
11
|
+
chatProps,
|
|
12
|
+
StartPanel,
|
|
13
|
+
startPanelProps,
|
|
10
14
|
integrationStyle,
|
|
11
15
|
integrationBackground,
|
|
12
|
-
|
|
16
|
+
ChangeMode,
|
|
17
|
+
changeModeProps,
|
|
13
18
|
sessionId,
|
|
14
19
|
hasUserActivatedSpeak,
|
|
15
20
|
showInstruct = false,
|
|
@@ -22,14 +27,24 @@ const TotemLayout: React.FC<LayoutProps> = ({
|
|
|
22
27
|
|
|
23
28
|
<Spin spinning={loading} className="memori-totem-layout">
|
|
24
29
|
{poweredBy}
|
|
25
|
-
{showInstruct &&
|
|
30
|
+
{showInstruct && ChangeMode && changeModeProps && (
|
|
31
|
+
<ChangeMode {...changeModeProps} />
|
|
32
|
+
)}
|
|
26
33
|
|
|
27
|
-
<div className="memori-totem-layout--header">
|
|
34
|
+
<div className="memori-totem-layout--header">
|
|
35
|
+
{Header && headerProps && <Header {...headerProps} />}
|
|
36
|
+
</div>
|
|
28
37
|
|
|
29
|
-
<div className="memori-totem-layout--avatar">
|
|
38
|
+
<div className="memori-totem-layout--avatar">
|
|
39
|
+
{Avatar && avatarProps && <Avatar {...avatarProps} />}
|
|
40
|
+
</div>
|
|
30
41
|
|
|
31
42
|
<div className="memori-totem-layout--controls">
|
|
32
|
-
{sessionId && hasUserActivatedSpeak
|
|
43
|
+
{sessionId && hasUserActivatedSpeak && Chat && chatProps ? (
|
|
44
|
+
<Chat {...chatProps} />
|
|
45
|
+
) : startPanelProps ? (
|
|
46
|
+
<StartPanel {...startPanelProps} />
|
|
47
|
+
) : null}
|
|
33
48
|
</div>
|
|
34
49
|
</Spin>
|
|
35
50
|
</>
|
|
@@ -23,13 +23,18 @@ const meta: Meta = {
|
|
|
23
23
|
export default meta;
|
|
24
24
|
|
|
25
25
|
const CustomLayout: React.FC<LayoutProps> = ({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
Header,
|
|
27
|
+
headerProps,
|
|
28
|
+
Avatar,
|
|
29
|
+
avatarProps,
|
|
30
|
+
Chat,
|
|
31
|
+
chatProps,
|
|
32
|
+
StartPanel,
|
|
33
|
+
startPanelProps,
|
|
30
34
|
integrationStyle,
|
|
31
35
|
integrationBackground,
|
|
32
|
-
|
|
36
|
+
ChangeMode,
|
|
37
|
+
changeModeProps,
|
|
33
38
|
sessionId,
|
|
34
39
|
hasUserActivatedSpeak,
|
|
35
40
|
showInstruct = false,
|
|
@@ -44,7 +49,11 @@ const CustomLayout: React.FC<LayoutProps> = ({
|
|
|
44
49
|
{poweredBy}
|
|
45
50
|
|
|
46
51
|
<div className="memori-mycustom-layout--controls">
|
|
47
|
-
{sessionId && hasUserActivatedSpeak
|
|
52
|
+
{sessionId && hasUserActivatedSpeak && Chat && chatProps ? (
|
|
53
|
+
<Chat {...chatProps} />
|
|
54
|
+
) : startPanelProps ? (
|
|
55
|
+
<StartPanel {...startPanelProps} />
|
|
56
|
+
) : null}
|
|
48
57
|
</div>
|
|
49
58
|
</Spin>
|
|
50
59
|
</>
|