@memori.ai/memori-react 8.20.0 → 8.22.0
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 +24 -0
- package/dist/components/MemoriWidget/MemoriWidget.d.ts +3 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +39 -31
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/layouts/fullpage.css +115 -0
- package/dist/helpers/piiDetection.js +4 -1
- package/dist/helpers/piiDetection.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/testUtils.d.ts +5 -0
- package/dist/testUtils.js +18 -0
- package/dist/testUtils.js.map +1 -0
- package/dist/types/layout.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.d.ts +3 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +39 -31
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/layouts/fullpage.css +115 -0
- package/esm/helpers/piiDetection.js +4 -1
- package/esm/helpers/piiDetection.js.map +1 -1
- package/esm/index.js +5 -1
- package/esm/index.js.map +1 -1
- package/esm/testUtils.d.ts +5 -0
- package/esm/testUtils.js +15 -0
- package/esm/testUtils.js.map +1 -0
- package/esm/types/layout.d.ts +1 -1
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +1 -1
- package/src/components/MemoriWidget/MemoriWidget.tsx +25 -9
- package/src/components/layouts/layouts.stories.tsx +1 -0
- package/src/helpers/piiDetection.test.ts +7 -7
- package/src/helpers/piiDetection.ts +4 -3
- package/src/index.stories.tsx +2 -2
- package/src/index.tsx +5 -1
- package/src/types/layout.ts +2 -2
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [8.22.0](https://github.com/memori-ai/memori-react/compare/v8.21.0...v8.22.0) (2026-03-02)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add uiLang and spokenLang props to MemoriWidget ([f066cd6](https://github.com/memori-ai/memori-react/commit/f066cd6a930bbcd6201801c8d96e20c5be454646))
|
|
9
|
+
|
|
10
|
+
## [8.21.0](https://github.com/memori-ai/memori-react/compare/v8.20.0...v8.21.0) (2026-02-27)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* update PII detection rules to support localized labels ([1629c74](https://github.com/memori-ai/memori-react/commit/1629c7406d559a1b7e478270fba3aec08e5418ef))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* restored old uiLang prop behavior ([c08f0ed](https://github.com/memori-ai/memori-react/commit/c08f0ed13e5c27314d2edb45198f110fb5529234))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Changes
|
|
24
|
+
|
|
25
|
+
* relies on uiLang for both interface and chat language ([ef6ac43](https://github.com/memori-ai/memori-react/commit/ef6ac437151dbbfc16a5edcce671275b8f1ef038))
|
|
26
|
+
|
|
3
27
|
## [8.20.0](https://github.com/memori-ai/memori-react/compare/v8.19.3...v8.20.0) (2026-02-25)
|
|
4
28
|
|
|
5
29
|
|
|
@@ -87,6 +87,8 @@ export interface Props {
|
|
|
87
87
|
tenantID: string;
|
|
88
88
|
memoriConfigs?: MemoriConfig[];
|
|
89
89
|
memoriLang?: string;
|
|
90
|
+
uiLang?: string;
|
|
91
|
+
spokenLang?: string;
|
|
90
92
|
multilingual?: boolean;
|
|
91
93
|
integration?: Integration;
|
|
92
94
|
layout?: LayoutName;
|
|
@@ -144,5 +146,5 @@ export interface Props {
|
|
|
144
146
|
maxTotalMessagePayload?: number;
|
|
145
147
|
maxTextareaCharacters?: number;
|
|
146
148
|
}
|
|
147
|
-
declare const MemoriWidget: ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenantID, memoriLang, multilingual, integration, layout, customLayout, showShare, preview, embed, showCopyButton, showTranslationOriginal, showInputs, showDates, showContextPerLine, showSettings, showTypingText, showClear, showLogin, showUpload, showOnlyLastMessages, showChatHistory, showReasoning, height, secret, baseUrl, apiURL, engineURL, initialContextVars, initialQuestion, ttsProvider, ogImage, sessionID: initialSessionID, tenant, personification, authToken, enableAudio, defaultSpeakerActive, disableTextEnteredEvents, onStateChange, additionalInfo, additionalSettings, customMediaRenderer, userAvatar, __WEBCOMPONENT__, useMathFormatting, autoStart, applyVarsToRoot, showFunctionCache, maxTotalMessagePayload, maxTextareaCharacters, }: Props) => JSX.Element;
|
|
149
|
+
declare const MemoriWidget: ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenantID, memoriLang, uiLang, spokenLang, multilingual, integration, layout, customLayout, showShare, preview, embed, showCopyButton, showTranslationOriginal, showInputs, showDates, showContextPerLine, showSettings, showTypingText, showClear, showLogin, showUpload, showOnlyLastMessages, showChatHistory, showReasoning, height, secret, baseUrl, apiURL, engineURL, initialContextVars, initialQuestion, ttsProvider, ogImage, sessionID: initialSessionID, tenant, personification, authToken, enableAudio, defaultSpeakerActive, disableTextEnteredEvents, onStateChange, additionalInfo, additionalSettings, customMediaRenderer, userAvatar, __WEBCOMPONENT__, useMathFormatting, autoStart, applyVarsToRoot, showFunctionCache, maxTotalMessagePayload, maxTextareaCharacters, }: Props) => JSX.Element;
|
|
148
150
|
export default MemoriWidget;
|
|
@@ -158,8 +158,8 @@ window.typeBatchMessages = typeBatchMessages;
|
|
|
158
158
|
let audioContext;
|
|
159
159
|
let memoriPassword;
|
|
160
160
|
let userToken;
|
|
161
|
-
const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenantID, memoriLang, multilingual, integration, layout, customLayout, showShare, preview = false, embed = false, showCopyButton = true, showTranslationOriginal = false, showInputs = true, showDates = false, showContextPerLine = false, showSettings, showTypingText = false, showClear = false, showLogin = false, showUpload, showOnlyLastMessages, showChatHistory, showReasoning, height = '100vh', secret, baseUrl = 'https://aisuru-staging.aclambda.online', apiURL = 'https://backend-staging.memori.ai', engineURL = 'https://engine-staging.memori.ai', initialContextVars, initialQuestion, ttsProvider, ogImage, sessionID: initialSessionID, tenant, personification, authToken, enableAudio, defaultSpeakerActive = true, disableTextEnteredEvents = false, onStateChange, additionalInfo, additionalSettings, customMediaRenderer, userAvatar, __WEBCOMPONENT__ = false, useMathFormatting = false, autoStart = false, applyVarsToRoot = false, showFunctionCache = false, maxTotalMessagePayload, maxTextareaCharacters, }) => {
|
|
162
|
-
var _a, _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17;
|
|
161
|
+
const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenantID, memoriLang, uiLang, spokenLang, multilingual, integration, layout, customLayout, showShare, preview = false, embed = false, showCopyButton = true, showTranslationOriginal = false, showInputs = true, showDates = false, showContextPerLine = false, showSettings, showTypingText = false, showClear = false, showLogin = false, showUpload, showOnlyLastMessages, showChatHistory, showReasoning, height = '100vh', secret, baseUrl = 'https://aisuru-staging.aclambda.online', apiURL = 'https://backend-staging.memori.ai', engineURL = 'https://engine-staging.memori.ai', initialContextVars, initialQuestion, ttsProvider, ogImage, sessionID: initialSessionID, tenant, personification, authToken, enableAudio, defaultSpeakerActive = true, disableTextEnteredEvents = false, onStateChange, additionalInfo, additionalSettings, customMediaRenderer, userAvatar, __WEBCOMPONENT__ = false, useMathFormatting = false, autoStart = false, applyVarsToRoot = false, showFunctionCache = false, maxTotalMessagePayload, maxTextareaCharacters, }) => {
|
|
162
|
+
var _a, _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18;
|
|
163
163
|
const { t, i18n } = (0, react_i18next_1.useTranslation)();
|
|
164
164
|
const [isClient, setIsClient] = (0, react_1.useState)(false);
|
|
165
165
|
(0, react_1.useEffect)(() => {
|
|
@@ -206,7 +206,12 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
206
206
|
? multilingual
|
|
207
207
|
: !!(integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.multilanguage);
|
|
208
208
|
const forcedTimeout = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.forcedTimeout;
|
|
209
|
-
const [userLang, setUserLang] = (0, react_1.useState)((_o = (_m = (_l = (_k =
|
|
209
|
+
const [userLang, setUserLang] = (0, react_1.useState)((_p = (_o = (_m = (_l = (_k = spokenLang !== null && spokenLang !== void 0 ? spokenLang : memoriLang) !== null && _k !== void 0 ? _k : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.lang) !== null && _l !== void 0 ? _l : language) !== null && _m !== void 0 ? _m : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.uiLang) !== null && _o !== void 0 ? _o : i18n.language) !== null && _p !== void 0 ? _p : 'IT');
|
|
210
|
+
(0, react_1.useEffect)(() => {
|
|
211
|
+
if (spokenLang != null) {
|
|
212
|
+
setUserLang(spokenLang);
|
|
213
|
+
}
|
|
214
|
+
}, [spokenLang]);
|
|
210
215
|
const applyMathFormatting = useMathFormatting !== undefined
|
|
211
216
|
? useMathFormatting
|
|
212
217
|
: !!(integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.useMathFormatting);
|
|
@@ -215,12 +220,15 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
215
220
|
(0, utils_1.installMathJax)();
|
|
216
221
|
}, [applyMathFormatting]);
|
|
217
222
|
(0, react_1.useEffect)(() => {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
constants_1.uiLanguages.includes(userLang.toLowerCase())
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
223
|
+
const langToApply = uiLang && constants_1.uiLanguages.includes(uiLang.toLowerCase())
|
|
224
|
+
? uiLang.toLowerCase()
|
|
225
|
+
: userLang && constants_1.uiLanguages.includes(userLang.toLowerCase())
|
|
226
|
+
? userLang.toLowerCase()
|
|
227
|
+
: null;
|
|
228
|
+
if (langToApply && typeof (i18n === null || i18n === void 0 ? void 0 : i18n.changeLanguage) === 'function') {
|
|
229
|
+
i18n.changeLanguage(langToApply);
|
|
230
|
+
}
|
|
231
|
+
}, [uiLang, userLang]);
|
|
224
232
|
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
225
233
|
const [memoriTyping, setMemoriTyping] = (0, react_1.useState)(false);
|
|
226
234
|
const [typingText, setTypingText] = (0, react_1.useState)();
|
|
@@ -228,14 +236,14 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
228
236
|
? layout
|
|
229
237
|
: typeof (integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) === 'string'
|
|
230
238
|
? integrationConfig.layout
|
|
231
|
-
: (
|
|
239
|
+
: (_q = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) === null || _q === void 0 ? void 0 : _q.name;
|
|
232
240
|
const selectedLayout = layoutName || 'DEFAULT';
|
|
233
241
|
const piiDetection = typeof (integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) === 'object' &&
|
|
234
242
|
(integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) !== null &&
|
|
235
|
-
((
|
|
243
|
+
((_s = (_r = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) === null || _r === void 0 ? void 0 : _r.piiDetection) === null || _s === void 0 ? void 0 : _s.enabled)
|
|
236
244
|
? integrationConfig.layout.piiDetection
|
|
237
245
|
: undefined;
|
|
238
|
-
const defaultEnableAudio = (
|
|
246
|
+
const defaultEnableAudio = (_t = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _t !== void 0 ? _t : true;
|
|
239
247
|
const [hasUserActivatedListening, setHasUserActivatedListening] = (0, react_1.useState)(false);
|
|
240
248
|
const [hasUserTypedMessage, setHasUserTypedMessage] = (0, react_1.useState)(false);
|
|
241
249
|
const [showPositionDrawer, setShowPositionDrawer] = (0, react_1.useState)(false);
|
|
@@ -1123,7 +1131,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1123
1131
|
apiUrl: `${baseUrl}/api/tts`,
|
|
1124
1132
|
continuousSpeech: continuousSpeech,
|
|
1125
1133
|
preview: preview,
|
|
1126
|
-
}, autoStart, defaultEnableAudio, (
|
|
1134
|
+
}, autoStart, defaultEnableAudio, (_u = defaultSpeakerActive !== null && defaultSpeakerActive !== void 0 ? defaultSpeakerActive : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.defaultSpeakerActive) !== null && _u !== void 0 ? _u : true);
|
|
1127
1135
|
const shouldPlayAudio = (text) => {
|
|
1128
1136
|
const currentSpeakerMuted = (0, configuration_1.getLocalConfig)('muteSpeaker', !defaultEnableAudio);
|
|
1129
1137
|
console.log('[MemoriWidget] shouldPlayAudio', currentSpeakerMuted);
|
|
@@ -1261,7 +1269,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1261
1269
|
? {
|
|
1262
1270
|
'--memori-chat-bubble-bg': '#fff',
|
|
1263
1271
|
...(integrationConfig && !instruct
|
|
1264
|
-
? { '--memori-text-color': (
|
|
1272
|
+
? { '--memori-text-color': (_v = integrationConfig.textColor) !== null && _v !== void 0 ? _v : '#000' }
|
|
1265
1273
|
: {}),
|
|
1266
1274
|
...((integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.buttonBgColor)
|
|
1267
1275
|
? {
|
|
@@ -1285,12 +1293,12 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1285
1293
|
? {
|
|
1286
1294
|
'--memori-inner-bg': `rgba(${integrationConfig.innerBgColor === 'dark'
|
|
1287
1295
|
? '0, 0, 0'
|
|
1288
|
-
: '255, 255, 255'}, ${(
|
|
1296
|
+
: '255, 255, 255'}, ${(_w = integrationConfig.innerBgAlpha) !== null && _w !== void 0 ? _w : 0.4})`,
|
|
1289
1297
|
'--memori-inner-content-pad': '1.5rem',
|
|
1290
1298
|
'--memori-nav-bg-image': 'none',
|
|
1291
1299
|
'--memori-nav-bg': `rgba(${integrationConfig.innerBgColor === 'dark'
|
|
1292
1300
|
? '0, 0, 0'
|
|
1293
|
-
: '255, 255, 255'}, ${(
|
|
1301
|
+
: '255, 255, 255'}, ${(_x = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.innerBgAlpha) !== null && _x !== void 0 ? _x : 0.4})`,
|
|
1294
1302
|
}
|
|
1295
1303
|
: {
|
|
1296
1304
|
'--memori-inner-content-pad': '0px',
|
|
@@ -1758,12 +1766,12 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1758
1766
|
const headerProps = {
|
|
1759
1767
|
memori: {
|
|
1760
1768
|
...memori,
|
|
1761
|
-
ownerUserID: (
|
|
1769
|
+
ownerUserID: (_z = (_y = memori.ownerUserID) !== null && _y !== void 0 ? _y : ownerUserID) !== null && _z !== void 0 ? _z : undefined,
|
|
1762
1770
|
},
|
|
1763
1771
|
apiClient: client,
|
|
1764
1772
|
tenant,
|
|
1765
1773
|
history,
|
|
1766
|
-
showShare: (
|
|
1774
|
+
showShare: (_0 = showShare !== null && showShare !== void 0 ? showShare : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showShare) !== null && _0 !== void 0 ? _0 : true,
|
|
1767
1775
|
position,
|
|
1768
1776
|
layout: selectedLayout,
|
|
1769
1777
|
additionalSettings,
|
|
@@ -1771,19 +1779,19 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1771
1779
|
setShowSettingsDrawer,
|
|
1772
1780
|
setShowKnownFactsDrawer,
|
|
1773
1781
|
setShowExpertsDrawer,
|
|
1774
|
-
enableAudio: (
|
|
1782
|
+
enableAudio: (_1 = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _1 !== void 0 ? _1 : true,
|
|
1775
1783
|
speakerMuted: speakerMuted !== null && speakerMuted !== void 0 ? speakerMuted : false,
|
|
1776
1784
|
setSpeakerMuted: (mute) => {
|
|
1777
1785
|
toggleMute(mute);
|
|
1778
1786
|
},
|
|
1779
1787
|
setShowChatHistoryDrawer,
|
|
1780
|
-
showSettings: (
|
|
1781
|
-
showChatHistory: (
|
|
1788
|
+
showSettings: (_2 = showSettings !== null && showSettings !== void 0 ? showSettings : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showSettings) !== null && _2 !== void 0 ? _2 : true,
|
|
1789
|
+
showChatHistory: (_3 = showChatHistory !== null && showChatHistory !== void 0 ? showChatHistory : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showChatHistory) !== null && _3 !== void 0 ? _3 : true,
|
|
1782
1790
|
hasUserActivatedSpeak,
|
|
1783
1791
|
showReload: selectedLayout === 'TOTEM',
|
|
1784
|
-
showClear: (
|
|
1792
|
+
showClear: (_4 = showClear !== null && showClear !== void 0 ? showClear : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showClear) !== null && _4 !== void 0 ? _4 : false,
|
|
1785
1793
|
clearHistory: () => setHistory(h => h.slice(-1)),
|
|
1786
|
-
showLogin: (
|
|
1794
|
+
showLogin: (_5 = showLogin !== null && showLogin !== void 0 ? showLogin : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showLogin) !== null && _5 !== void 0 ? _5 : memori.requireLoginToken,
|
|
1787
1795
|
setShowLoginDrawer,
|
|
1788
1796
|
loginToken,
|
|
1789
1797
|
user,
|
|
@@ -1812,7 +1820,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1812
1820
|
hasUserActivatedSpeak,
|
|
1813
1821
|
isPlayingAudio: isPlayingAudio &&
|
|
1814
1822
|
!speakerMuted &&
|
|
1815
|
-
((
|
|
1823
|
+
((_6 = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _6 !== void 0 ? _6 : true),
|
|
1816
1824
|
loading: !!memoriTyping,
|
|
1817
1825
|
baseUrl,
|
|
1818
1826
|
apiUrl: client.constants.BACKEND_URL,
|
|
@@ -1849,7 +1857,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1849
1857
|
tenant,
|
|
1850
1858
|
translateTo: isMultilanguageEnabled &&
|
|
1851
1859
|
userLang.toUpperCase() !==
|
|
1852
|
-
((
|
|
1860
|
+
((_11 = ((_10 = (_9 = (_8 = (_7 = memori.culture) === null || _7 === void 0 ? void 0 : _7.split('-')) === null || _8 === void 0 ? void 0 : _8[0]) !== null && _9 !== void 0 ? _9 : i18n.language) !== null && _10 !== void 0 ? _10 : 'IT')) === null || _11 === void 0 ? void 0 : _11.toUpperCase())
|
|
1853
1861
|
? userLang
|
|
1854
1862
|
: undefined,
|
|
1855
1863
|
baseUrl,
|
|
@@ -1857,9 +1865,9 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1857
1865
|
layout,
|
|
1858
1866
|
memoriTyping,
|
|
1859
1867
|
typingText,
|
|
1860
|
-
showTypingText: (
|
|
1868
|
+
showTypingText: (_12 = showTypingText !== null && showTypingText !== void 0 ? showTypingText : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showTypingText) !== null && _12 !== void 0 ? _12 : false,
|
|
1861
1869
|
history: showFullHistory ? history : history.slice(-2),
|
|
1862
|
-
authToken: (
|
|
1870
|
+
authToken: (_14 = (_13 = loginToken !== null && loginToken !== void 0 ? loginToken : userToken) !== null && _13 !== void 0 ? _13 : additionalInfo === null || additionalInfo === void 0 ? void 0 : additionalInfo.loginToken) !== null && _14 !== void 0 ? _14 : authToken,
|
|
1863
1871
|
dialogState: currentDialogState,
|
|
1864
1872
|
pushMessage,
|
|
1865
1873
|
simulateUserPrompt,
|
|
@@ -1869,8 +1877,8 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1869
1877
|
showUpload: enableUpload,
|
|
1870
1878
|
showReasoning: enableReasoning,
|
|
1871
1879
|
showWhyThisAnswer,
|
|
1872
|
-
showCopyButton: (
|
|
1873
|
-
showTranslationOriginal: (
|
|
1880
|
+
showCopyButton: (_15 = showCopyButton !== null && showCopyButton !== void 0 ? showCopyButton : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showCopyButton) !== null && _15 !== void 0 ? _15 : true,
|
|
1881
|
+
showTranslationOriginal: (_16 = showTranslationOriginal !== null && showTranslationOriginal !== void 0 ? showTranslationOriginal : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showTranslationOriginal) !== null && _16 !== void 0 ? _16 : false,
|
|
1874
1882
|
client,
|
|
1875
1883
|
instruct,
|
|
1876
1884
|
preview,
|
|
@@ -1880,7 +1888,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1880
1888
|
attachmentsMenuOpen,
|
|
1881
1889
|
setAttachmentsMenuOpen,
|
|
1882
1890
|
showInputs,
|
|
1883
|
-
showMicrophone: !!ttsProvider && ((
|
|
1891
|
+
showMicrophone: !!ttsProvider && ((_17 = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _17 !== void 0 ? _17 : true),
|
|
1884
1892
|
showFunctionCache,
|
|
1885
1893
|
userMessage,
|
|
1886
1894
|
onChangeUserMessage,
|
|
@@ -1985,7 +1993,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1985
1993
|
}
|
|
1986
1994
|
throw error;
|
|
1987
1995
|
});
|
|
1988
|
-
}, minimumNumberOfRecoveryTokens: (
|
|
1996
|
+
}, minimumNumberOfRecoveryTokens: (_18 = memori === null || memori === void 0 ? void 0 : memori.minimumNumberOfRecoveryTokens) !== null && _18 !== void 0 ? _18 : 1 })), isClient && ((0, jsx_runtime_1.jsx)(AgeVerificationModal_1.default, { visible: showAgeVerification, minAge: minAge, onClose: birthDate => {
|
|
1989
1997
|
var _a, _b, _c, _d;
|
|
1990
1998
|
if (birthDate) {
|
|
1991
1999
|
setBirthDate(birthDate);
|