@memori.ai/memori-react 7.32.7 → 7.33.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 +38 -0
- package/README.md +44 -43
- package/dist/components/Chat/Chat.d.ts +1 -0
- package/dist/components/Chat/Chat.js +2 -2
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.d.ts +1 -0
- package/dist/components/ChatBubble/ChatBubble.js +2 -2
- package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
- package/dist/components/ChatHistoryDrawer/ChatHistory.css +19 -0
- package/dist/components/ChatHistoryDrawer/ChatHistory.d.ts +2 -1
- package/dist/components/ChatHistoryDrawer/ChatHistory.js +88 -12
- package/dist/components/ChatHistoryDrawer/ChatHistory.js.map +1 -1
- package/dist/components/Header/Header.js +2 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.d.ts +3 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +5 -3
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/StartPanel/StartPanel.js +3 -3
- package/dist/components/StartPanel/StartPanel.js.map +1 -1
- package/dist/components/icons/ArrowUp.d.ts +6 -0
- package/dist/components/icons/ArrowUp.js +6 -0
- package/dist/components/icons/ArrowUp.js.map +1 -0
- package/dist/components/layouts/HiddenChat.js +8 -5
- package/dist/components/layouts/HiddenChat.js.map +1 -1
- package/dist/components/ui/Card.css +1 -0
- package/dist/helpers/message.d.ts +1 -1
- package/dist/helpers/message.js +4 -2
- package/dist/helpers/message.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/locales/de.json +7 -0
- package/dist/locales/en.json +7 -0
- package/dist/locales/es.json +7 -0
- package/dist/locales/fr.json +13 -0
- package/dist/locales/it.json +7 -0
- package/esm/components/Chat/Chat.d.ts +1 -0
- package/esm/components/Chat/Chat.js +2 -2
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.d.ts +1 -0
- package/esm/components/ChatBubble/ChatBubble.js +2 -2
- package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
- package/esm/components/ChatHistoryDrawer/ChatHistory.css +19 -0
- package/esm/components/ChatHistoryDrawer/ChatHistory.d.ts +2 -1
- package/esm/components/ChatHistoryDrawer/ChatHistory.js +88 -12
- package/esm/components/ChatHistoryDrawer/ChatHistory.js.map +1 -1
- package/esm/components/Header/Header.js +2 -2
- package/esm/components/Header/Header.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.d.ts +3 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +5 -3
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/StartPanel/StartPanel.js +3 -3
- package/esm/components/StartPanel/StartPanel.js.map +1 -1
- package/esm/components/icons/ArrowUp.d.ts +6 -0
- package/esm/components/icons/ArrowUp.js +4 -0
- package/esm/components/icons/ArrowUp.js.map +1 -0
- package/esm/components/layouts/HiddenChat.js +8 -5
- package/esm/components/layouts/HiddenChat.js.map +1 -1
- package/esm/components/ui/Card.css +1 -0
- package/esm/helpers/message.d.ts +1 -1
- package/esm/helpers/message.js +4 -2
- package/esm/helpers/message.js.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +3 -2
- package/esm/index.js.map +1 -1
- package/esm/locales/de.json +7 -0
- package/esm/locales/en.json +7 -0
- package/esm/locales/es.json +7 -0
- package/esm/locales/fr.json +13 -0
- package/esm/locales/it.json +7 -0
- package/package.json +2 -2
- package/src/components/Chat/Chat.tsx +3 -0
- package/src/components/ChatBubble/ChatBubble.stories.tsx +84 -0
- package/src/components/ChatBubble/ChatBubble.test.tsx +17 -0
- package/src/components/ChatBubble/ChatBubble.tsx +4 -1
- package/src/components/ChatBubble/__snapshots__/ChatBubble.test.tsx.snap +104 -1
- package/src/components/ChatHistoryDrawer/ChatHistory.css +19 -0
- package/src/components/ChatHistoryDrawer/ChatHistory.stories.tsx +18 -9
- package/src/components/ChatHistoryDrawer/ChatHistory.test.tsx +4 -0
- package/src/components/ChatHistoryDrawer/ChatHistory.tsx +148 -35
- package/src/components/Header/Header.tsx +2 -2
- package/src/components/MemoriWidget/MemoriWidget.tsx +8 -0
- package/src/components/StartPanel/StartPanel.tsx +7 -4
- package/src/components/StartPanel/__snapshots__/StartPanel.test.tsx.snap +11 -44
- package/src/components/icons/ArrowUp.tsx +28 -0
- package/src/components/icons/icons.stories.tsx +14 -6
- package/src/components/layouts/HiddenChat.tsx +17 -3
- package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +1 -4
- package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +2 -8
- package/src/components/layouts/__snapshots__/HiddenChat.test.tsx.snap +284 -13
- package/src/components/layouts/__snapshots__/Totem.test.tsx.snap +1 -4
- package/src/components/layouts/__snapshots__/ZoomedFullBody.test.tsx.snap +1 -4
- package/src/components/ui/Card.css +1 -0
- package/src/helpers/message.ts +6 -6
- package/src/index.stories.tsx +3 -1
- package/src/index.tsx +5 -1
- package/src/locales/de.json +7 -0
- package/src/locales/en.json +7 -0
- package/src/locales/es.json +7 -0
- package/src/locales/fr.json +13 -0
- package/src/locales/it.json +7 -0
- package/dist/components/ExportHistoryButton/ExportHistoryButton.d.ts +0 -14
- package/dist/components/ExportHistoryButton/ExportHistoryButton.js +0 -38
- package/dist/components/ExportHistoryButton/ExportHistoryButton.js.map +0 -1
- package/esm/components/ExportHistoryButton/ExportHistoryButton.d.ts +0 -14
- package/esm/components/ExportHistoryButton/ExportHistoryButton.js +0 -35
- package/esm/components/ExportHistoryButton/ExportHistoryButton.js.map +0 -1
package/esm/helpers/message.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const needsTruncation: (message: string) => boolean;
|
|
2
2
|
export declare const truncateMessage: (message: string) => string;
|
|
3
|
-
export declare const renderMsg: (text: string, useMathFormatting?: boolean, reasoningText?: string) => {
|
|
3
|
+
export declare const renderMsg: (text: string, useMathFormatting?: boolean, reasoningText?: string, showReasoning?: boolean) => {
|
|
4
4
|
text: string;
|
|
5
5
|
};
|
package/esm/helpers/message.js
CHANGED
|
@@ -43,12 +43,14 @@ export const truncateMessage = (message) => {
|
|
|
43
43
|
}
|
|
44
44
|
return truncatedMessage;
|
|
45
45
|
};
|
|
46
|
-
export const renderMsg = (text, useMathFormatting = false, reasoningText = 'Reasoning...') => {
|
|
46
|
+
export const renderMsg = (text, useMathFormatting = false, reasoningText = 'Reasoning...', showReasoning = false) => {
|
|
47
47
|
try {
|
|
48
48
|
let preprocessedText = text
|
|
49
49
|
.trim()
|
|
50
50
|
.replaceAll(/\[([^\]]+)\]\(([^\)]+)\)/g, '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')
|
|
51
|
-
.replaceAll(/<think>([\s\S]*?)<\/think>/g,
|
|
51
|
+
.replaceAll(/<think>([\s\S]*?)<\/think>/g, showReasoning
|
|
52
|
+
? `<details class="memori-think"><summary>${reasoningText}</summary>$1</details>`
|
|
53
|
+
: '')
|
|
52
54
|
.replaceAll(/<document_attachment filename="([^"]+)" type="([^"]+)">([\s\S]*?)<\/document_attachment>/g, '')
|
|
53
55
|
.replaceAll(/```markdown([^```]+)```/g, '$1')
|
|
54
56
|
.replaceAll('($', '( $')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/helpers/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,oB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ACrB,CAAC,CAAC;QAGH,MAAM,SAAS,GAAG,UAAU;aACzB,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC;aAC3B,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC;aAC5B,OAAO,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;QAEpC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;KAC5B;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,CAAC,CAAC,CAAC;QAC7C,OAAO,EAAE,IAAI,EAAE,CAAC;KACjB;AACH,CAAC,CAAC"}
|
package/esm/index.d.ts
CHANGED
package/esm/index.js
CHANGED
|
@@ -35,7 +35,7 @@ const getParsedContext = (context) => {
|
|
|
35
35
|
}, {});
|
|
36
36
|
return parsedContext;
|
|
37
37
|
};
|
|
38
|
-
const Memori = ({ ownerUserName, ownerUserID, memoriName, memoriID, integration, integrationID, tenantID, secretToken, sessionID, layout, customLayout, showShare, showCopyButton = true, showTranslationOriginal = false, showSettings, showTypingText = false, showClear = false, showOnlyLastMessages, showInputs = true, showDates = false, showContextPerLine = false, showUpload, showLogin, height = '100%', baseURL, apiURL = 'https://backend.memori.ai', engineURL = 'https://engine.memori.ai', tag, pin, context, initialQuestion, showChatHistory = true, uiLang, spokenLang, multilingual, authToken, enableAudio, defaultSpeakerActive = true, disableTextEnteredEvents = false, onStateChange, additionalInfo, customMediaRenderer, additionalSettings, userAvatar, useMathFormatting = false, autoStart = false, applyVarsToRoot = false, }) => {
|
|
38
|
+
const Memori = ({ ownerUserName, ownerUserID, memoriName, memoriID, integration, integrationID, tenantID, secretToken, sessionID, layout, customLayout, showShare, showCopyButton = true, showTranslationOriginal = false, showSettings, showTypingText = false, showClear = false, showOnlyLastMessages, showInputs = true, showDates = false, showContextPerLine = false, showUpload, showLogin, showReasoning, height = '100%', baseURL, apiURL = 'https://backend.memori.ai', engineURL = 'https://engine.memori.ai', tag, pin, context, initialQuestion, showChatHistory = true, uiLang, spokenLang, multilingual, authToken, enableAudio, defaultSpeakerActive = true, disableTextEnteredEvents = false, onStateChange, additionalInfo, customMediaRenderer, additionalSettings, userAvatar, useMathFormatting = false, autoStart = false, applyVarsToRoot = false, }) => {
|
|
39
39
|
var _a, _b, _c, _d;
|
|
40
40
|
const [memori, setMemori] = useState();
|
|
41
41
|
const [tenant, setTenant] = useState();
|
|
@@ -124,7 +124,7 @@ const Memori = ({ ownerUserName, ownerUserID, memoriName, memoriID, integration,
|
|
|
124
124
|
: `https://${tenantID}`), apiURL: apiURL, engineURL: engineURL, memori: {
|
|
125
125
|
...memori,
|
|
126
126
|
secretToken,
|
|
127
|
-
}, ownerUserName: ownerUserName !== null && ownerUserName !== void 0 ? ownerUserName : memori.ownerUserName, ownerUserID: ownerUserID !== null && ownerUserID !== void 0 ? ownerUserID : memori.ownerUserID, tenantID: tenantID, memoriLang: spokenLang !== null && spokenLang !== void 0 ? spokenLang : (_d = (_c = memori.culture) === null || _c === void 0 ? void 0 : _c.split('-')) === null || _d === void 0 ? void 0 : _d[0], multilingual: multilingual, showChatHistory: showChatHistory, tenant: tenant, secret: secretToken, sessionID: sessionID, showShare: showShare, showCopyButton: showCopyButton, showTranslationOriginal: showTranslationOriginal, showSettings: showSettings, showTypingText: showTypingText, showClear: showClear, showOnlyLastMessages: showOnlyLastMessages, showInputs: showInputs, showDates: showDates, showContextPerLine: showContextPerLine, showLogin: showLogin !== null && showLogin !== void 0 ? showLogin : memori === null || memori === void 0 ? void 0 : memori.enableDeepThought, showUpload: showUpload, integration: layoutIntegration, initialContextVars: initialContextVars, initialQuestion: initialQuestionLayout, authToken: authToken, AZURE_COGNITIVE_SERVICES_TTS_KEY: speechKey, autoStart:
|
|
127
|
+
}, ownerUserName: ownerUserName !== null && ownerUserName !== void 0 ? ownerUserName : memori.ownerUserName, ownerUserID: ownerUserID !== null && ownerUserID !== void 0 ? ownerUserID : memori.ownerUserID, tenantID: tenantID, memoriLang: spokenLang !== null && spokenLang !== void 0 ? spokenLang : (_d = (_c = memori.culture) === null || _c === void 0 ? void 0 : _c.split('-')) === null || _d === void 0 ? void 0 : _d[0], multilingual: multilingual, showChatHistory: showChatHistory, tenant: tenant, secret: secretToken, sessionID: sessionID, showShare: showShare, showCopyButton: showCopyButton, showTranslationOriginal: showTranslationOriginal, showSettings: showSettings, showTypingText: showTypingText, showClear: showClear, showOnlyLastMessages: showOnlyLastMessages, showInputs: showInputs, showDates: showDates, showContextPerLine: showContextPerLine, showLogin: showLogin !== null && showLogin !== void 0 ? showLogin : memori === null || memori === void 0 ? void 0 : memori.enableDeepThought, showUpload: showUpload, showReasoning: showReasoning, integration: layoutIntegration, initialContextVars: initialContextVars, initialQuestion: initialQuestionLayout, authToken: authToken, AZURE_COGNITIVE_SERVICES_TTS_KEY: speechKey, autoStart: autoStart, enableAudio: enableAudio && !!speechKey, defaultSpeakerActive: defaultSpeakerActive, disableTextEnteredEvents: disableTextEnteredEvents, onStateChange: onStateChange, additionalInfo: additionalInfo, customMediaRenderer: customMediaRenderer, additionalSettings: additionalSettings, userAvatar: userAvatar, useMathFormatting: useMathFormatting, applyVarsToRoot: applyVarsToRoot, ...(tag && pin ? { personification: { tag, pin } } : {}) })) : (_jsx("div", { style: {
|
|
128
128
|
display: 'flex',
|
|
129
129
|
alignItems: 'center',
|
|
130
130
|
justifyContent: 'center',
|
|
@@ -166,6 +166,7 @@ Memori.propTypes = {
|
|
|
166
166
|
showTypingText: PropTypes.bool,
|
|
167
167
|
showLogin: PropTypes.bool,
|
|
168
168
|
showUpload: PropTypes.bool,
|
|
169
|
+
showReasoning: PropTypes.bool,
|
|
169
170
|
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
170
171
|
baseURL: PropTypes.string,
|
|
171
172
|
apiURL: PropTypes.string,
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,OAA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AAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAClE,iBAAiB,EAAE,SAAS,CAAC,IAAI;IACjC,SAAS,EAAE,SAAS,CAAC,IAAI;IACzB,eAAe,EAAE,SAAS,CAAC,IAAI;CAChC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/esm/locales/de.json
CHANGED
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
"center": "Center",
|
|
19
19
|
"bottom": "Unten",
|
|
20
20
|
"hidden": "Versteckt",
|
|
21
|
+
"all": "Alle",
|
|
22
|
+
"today": "Heute",
|
|
23
|
+
"yesterday": "Gestern",
|
|
24
|
+
"last_7_days": "Letzte 7 Tage",
|
|
25
|
+
"last_30_days": "Letzte 30 Tage",
|
|
21
26
|
"day": "Tag",
|
|
22
27
|
"month": "Monat",
|
|
23
28
|
"year": "Jahr",
|
|
@@ -126,6 +131,8 @@
|
|
|
126
131
|
"allConversations": "Alle Konversationen mit diesem Agenten sind sichtbar von dem Autor des Agenten",
|
|
127
132
|
"anonymousUser": "Für anonyme Benutzer: der Autor wird den Inhalt der Konversation und Ihre IP-Adresse sehen",
|
|
128
133
|
"registeredUser": "Für registrierte Benutzer: der Autor wird den Inhalt der Konversation und Ihren Benutzernamen sehen",
|
|
134
|
+
"contentAndUsername": "Der Autor kann den Inhalt, Ihren Benutzernamen und Ihre IP-Adresse sehen",
|
|
135
|
+
"contentAndIpAddress": "Der Autor kann den Inhalt und Ihre IP-Adresse sehen",
|
|
129
136
|
"authorUsesInfo": "Der Autor verwendet diese Informationen, um die Funktionen des Agenten zu verbessern und Ihnen einen besseren Service anzubieten. Wenn Sie die Konversation fortsetzen, stimmen Sie diesen Bedingungen zu."
|
|
130
137
|
},
|
|
131
138
|
"instructButton": "WEISE MICH AN",
|
package/esm/locales/en.json
CHANGED
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"bottom": "Bottom",
|
|
20
20
|
"hidden": "Hidden",
|
|
21
21
|
"day": "Day",
|
|
22
|
+
"all": "All",
|
|
23
|
+
"today": "Today",
|
|
24
|
+
"yesterday": "Yesterday",
|
|
25
|
+
"last_7_days": "Last 7 days",
|
|
26
|
+
"last_30_days": "Last 30 days",
|
|
22
27
|
"month": "Month",
|
|
23
28
|
"year": "Year",
|
|
24
29
|
"createdAt": "Creation date",
|
|
@@ -126,6 +131,8 @@
|
|
|
126
131
|
"allConversations": "All conversations with this agent are visible to the author of the agent",
|
|
127
132
|
"anonymousUser": "For anonymous users: the author will see the content of the conversation and your IP address",
|
|
128
133
|
"registeredUser": "For registered users: the author will see the content of the conversation and your username",
|
|
134
|
+
"contentAndUsername": "The author can see the content, your username and your IP address",
|
|
135
|
+
"contentAndIpAddress": "The author can see the content and your IP address",
|
|
129
136
|
"authorUsesInfo": "The author uses this information to improve the features of the agent and to provide you with a better service. Continuing the conversation, you accept these conditions."
|
|
130
137
|
},
|
|
131
138
|
"instructButton": "INSTRUCT ME",
|
package/esm/locales/es.json
CHANGED
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"bottom": "Abajo",
|
|
20
20
|
"hidden": "Oculto",
|
|
21
21
|
"day": "Día",
|
|
22
|
+
"all": "Todos",
|
|
23
|
+
"today": "Hoy",
|
|
24
|
+
"yesterday": "Ayer",
|
|
25
|
+
"last_7_days": "Últimos 7 días",
|
|
26
|
+
"last_30_days": "Últimos 30 días",
|
|
22
27
|
"month": "Mes",
|
|
23
28
|
"year": "Año",
|
|
24
29
|
"createdAt": "Fecha de creación",
|
|
@@ -125,6 +130,8 @@
|
|
|
125
130
|
"allConversations": "Todas las conversaciones con este agente son visibles por el autor del agente",
|
|
126
131
|
"anonymousUser": "Para usuarios anónimos: el autor verá el contenido de la conversación y su dirección IP",
|
|
127
132
|
"registeredUser": "Para usuarios registrados: el autor verá el contenido de la conversación y su nombre de usuario",
|
|
133
|
+
"contentAndUsername": "El autor puede ver el contenido, tu nombre de usuario y tu dirección IP",
|
|
134
|
+
"contentAndIpAddress": "El autor puede ver el contenido y tu dirección IP",
|
|
128
135
|
"authorUsesInfo": "El autor utiliza estas informaciones para mejorar las funciones del agente y para ofrecerte un mejor servicio. Continuando la conversación, acepta estas condiciones."
|
|
129
136
|
},
|
|
130
137
|
"instructButton": "INSTRUÍME",
|
package/esm/locales/fr.json
CHANGED
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
"month": "Mois",
|
|
23
23
|
"year": "Année",
|
|
24
24
|
"createdAt": "Date de création",
|
|
25
|
+
"all": "Tous",
|
|
26
|
+
"today": "Aujourd'hui",
|
|
27
|
+
"yesterday": "Hier",
|
|
28
|
+
"last_7_days": "7 derniers jours",
|
|
29
|
+
"last_30_days": "30 derniers jours",
|
|
25
30
|
"selected": "Choisi",
|
|
26
31
|
"page": "page",
|
|
27
32
|
"actions": "Actes",
|
|
@@ -130,6 +135,14 @@
|
|
|
130
135
|
"pageTryMeExplanation": "Pour me parler, cliquez sur le bouton START pour commencer",
|
|
131
136
|
"pagePrivacyExplanation": "Les conversations sont visibles par l'auteur de l'agent",
|
|
132
137
|
"pagePrivacyExplanationTooltip": "En commençant la conversation, nous vous informons que :\n\n- Toutes les conversations avec cet agent sont visibles par l'auteur de l'agent\n- Si vous utilisez la chat comme utilisateur anonyme, l'auteur pourra voir le contenu de la conversation et votre adresse IP\n- Si vous utilisez la chat comme utilisateur enregistré (connecté), l'auteur pourra voir le contenu de la conversation et votre nom d'utilisateur\n- L'auteur utilise ces informations pour améliorer les fonctionnalités de l'agent et pour vous fournir un meilleur service\n- En continuant la conversation, vous acceptez ces conditions.",
|
|
138
|
+
"pagePrivacyExplanationList": {
|
|
139
|
+
"allConversations": "Toutes les conversations avec cet agent sont visibles par l'auteur de l'agent",
|
|
140
|
+
"anonymousUser": "Pour les utilisateurs anonymes : l'auteur verra le contenu de la conversation et votre adresse IP",
|
|
141
|
+
"registeredUser": "Pour les utilisateurs enregistrés : l'auteur verra le contenu de la conversation et votre nom d'utilisateur",
|
|
142
|
+
"contentAndUsername": "L'auteur peut voir le contenu, votre nom d'utilisateur et votre adresse IP",
|
|
143
|
+
"contentAndIpAddress": "L'auteur peut voir le contenu et votre adresse IP",
|
|
144
|
+
"authorUsesInfo": "L'auteur utilise ces informations pour améliorer les fonctionnalités de l'agent et pour vous fournir un meilleur service. En continuant la conversation, vous acceptez ces conditions."
|
|
145
|
+
},
|
|
133
146
|
"downloadChat": "Télécharger le chat",
|
|
134
147
|
"instructButton": "INSTRUCTEZ-MOI",
|
|
135
148
|
"tryMeButton": "COMMENCER",
|
package/esm/locales/it.json
CHANGED
|
@@ -26,6 +26,11 @@
|
|
|
26
26
|
"page": "pagina",
|
|
27
27
|
"actions": "Azioni",
|
|
28
28
|
"next": "Successivo",
|
|
29
|
+
"all": "Tutti",
|
|
30
|
+
"today": "Oggi",
|
|
31
|
+
"yesterday": "Ieri",
|
|
32
|
+
"last_7_days": "Ultimi 7 giorni",
|
|
33
|
+
"last_30_days": "Ultimi 30 giorni",
|
|
29
34
|
"previous": "Precedente",
|
|
30
35
|
"copy": "Copia",
|
|
31
36
|
"copyRawCode": "Copia codice sorgente",
|
|
@@ -126,6 +131,8 @@
|
|
|
126
131
|
"allConversations": "Tutte le conversazioni con questo agente sono visibili all'autore dell'agente",
|
|
127
132
|
"anonymousUser": "Per utenti anonimi: l'autore vedrà il contenuto e l'indirizzo IP",
|
|
128
133
|
"registeredUser": "Per utenti registrati: l'autore vedrà il contenuto e il nome utente",
|
|
134
|
+
"contentAndUsername": "L'autore può vedere il contenuto, il tuo nome utente e il tuo indirizzo IP",
|
|
135
|
+
"contentAndIpAddress": "L'autore può vedere il contenuto e il tuo indirizzo IP",
|
|
129
136
|
"authorUsesInfo": "L'autore utilizza queste informazioni per migliorare le funzionalità dell'agente. Continuando, accetti queste condizioni."
|
|
130
137
|
},
|
|
131
138
|
"instructButton": "ISTRUISCIMI",
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "7.
|
|
2
|
+
"version": "7.33.0",
|
|
3
3
|
"name": "@memori.ai/memori-react",
|
|
4
4
|
"author": "Memori Srl",
|
|
5
5
|
"main": "dist/index.js",
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
},
|
|
293
293
|
"dependencies": {
|
|
294
294
|
"@headlessui/react": "1.7.4",
|
|
295
|
-
"@memori.ai/memori-api-client": "6.7.
|
|
295
|
+
"@memori.ai/memori-api-client": "6.7.8",
|
|
296
296
|
"@react-three/drei": "8.20.2",
|
|
297
297
|
"@react-three/fiber": "7.0.25",
|
|
298
298
|
"classnames": "2.5.1",
|
|
@@ -42,6 +42,7 @@ export interface Props {
|
|
|
42
42
|
showAIicon?: boolean;
|
|
43
43
|
showTranslationOriginal?: boolean;
|
|
44
44
|
showWhyThisAnswer?: boolean;
|
|
45
|
+
showReasoning?: boolean;
|
|
45
46
|
client?: ReturnType<typeof memoriApiClient>;
|
|
46
47
|
preview?: boolean;
|
|
47
48
|
microphoneMode?: 'CONTINUOUS' | 'HOLD_TO_TALK';
|
|
@@ -94,6 +95,7 @@ const Chat: React.FC<Props> = ({
|
|
|
94
95
|
showWhyThisAnswer = true,
|
|
95
96
|
showCopyButton = true,
|
|
96
97
|
showTranslationOriginal = false,
|
|
98
|
+
showReasoning = false,
|
|
97
99
|
preview = false,
|
|
98
100
|
instruct = false,
|
|
99
101
|
showInputs = true,
|
|
@@ -240,6 +242,7 @@ const Chat: React.FC<Props> = ({
|
|
|
240
242
|
showCopyButton={showCopyButton}
|
|
241
243
|
useMathFormatting={useMathFormatting}
|
|
242
244
|
showFunctionCache={showFunctionCache}
|
|
245
|
+
showReasoning={showReasoning}
|
|
243
246
|
/>
|
|
244
247
|
|
|
245
248
|
{showDates && !!message.timestamp && (
|
|
@@ -473,6 +473,90 @@ Questi link ti permettono di creare un materiale visivo coerente e basato su inf
|
|
|
473
473
|
},
|
|
474
474
|
};
|
|
475
475
|
|
|
476
|
+
export const WithReasoningShown = Template.bind({});
|
|
477
|
+
WithReasoningShown.args = {
|
|
478
|
+
memori,
|
|
479
|
+
apiUrl: 'https://backend.memori.ai',
|
|
480
|
+
tenant,
|
|
481
|
+
showReasoning: true,
|
|
482
|
+
message: {
|
|
483
|
+
fromUser: false,
|
|
484
|
+
text: `<think>
|
|
485
|
+
Okay, the user is asking for a couple of relevant links to help them show the product to the girl. Let me think about what they need.
|
|
486
|
+
|
|
487
|
+
First, they want to present the Lenovo tablet and accessories. The user mentioned using visual materials, so links to product pages or guides would be useful. They might need official Lenovo sources for accuracy.
|
|
488
|
+
|
|
489
|
+
I should check if there are official Lenovo pages for the Yoga Tab 10 Pro and ThinkPad X1 Tablet. Those would be the main products. Also, maybe a guide on how to use the tablet for video calls, especially for elderly users.
|
|
490
|
+
|
|
491
|
+
Wait, the user is a girl who wants to give a gift to her grandmother. The links should be trustworthy and in Italian. Let me make sure the links are in Italian and from Lenovo's official site.
|
|
492
|
+
|
|
493
|
+
I remember that Lenovo has a website with product details. The Yoga Tab 10 Pro and ThinkPad X1 Tablet are both available there. Also, there might be a guide or FAQ section on their site that explains how to use the tablet for video calls, which would be helpful for the grandmother.
|
|
494
|
+
|
|
495
|
+
I should also consider if there are any official guides or videos from Lenovo that demonstrate the tablet's features, especially for elderly users. Maybe a video tutorial on setting up the tablet for video calls.
|
|
496
|
+
|
|
497
|
+
Wait, the user might need links that are in Italian. So I should check if Lenovo's Italian site has these resources. If not, maybe a general guide in Italian from a reliable source. But the user wants to use Lenovo's official materials, so sticking to their site is better.
|
|
498
|
+
|
|
499
|
+
Also, the user might need links to the product pages, the accessories, and a guide on using the tablet for video calls. Let me verify the URLs for the Yoga Tab 10 Pro and ThinkPad X1 Tablet on Lenovo's Italian site.
|
|
500
|
+
|
|
501
|
+
Once I have those, I can provide them as the main links. Then, a guide or FAQ that explains how to use the tablet for video calls, especially for elderly users.
|
|
502
|
+
|
|
503
|
+
I should make sure the links are up-to-date and correct. If there's a specific page on Lenovo's site that's relevant, that's the best. If not, maybe a general guide from a trusted source, but the user prefers Lenovo's official resources.
|
|
504
|
+
|
|
505
|
+
So, the two main links would be the product pages for the Yoga Tab 10 Pro and ThinkPad X1 Tablet. Then, a guide or video on using the tablet for video calls.
|
|
506
|
+
|
|
507
|
+
Wait, the user asked for a couple of links. Maybe two main ones: the product pages and a guide. That should cover the essentials.
|
|
508
|
+
|
|
509
|
+
I need to present these links in a clear way, making sure they are from Lenovo's official site and in Italian. Also, mention that they can use these to show the product and its features to the girl.
|
|
510
|
+
|
|
511
|
+
Double-check the URLs to ensure they are correct. If there's a specific page for the accessories, that could be another link, but the user might need the main product pages first.
|
|
512
|
+
|
|
513
|
+
Alright, I think that's it. Provide the product pages and a guide on using the tablet for video calls, both from Lenovo's official site in Italian.
|
|
514
|
+
</think>
|
|
515
|
+
|
|
516
|
+
Ecco due link rilevanti che puoi utilizzare per aiutare la ragazza a mostrare il prodotto e i suoi accessori. Questi link puntano a risorse ufficiali Lenovo in italiano, che forniscono informazioni dettagliate e accurate su i prodotti e le loro funzionalità:
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
520
|
+
### **1. Pagina ufficiale del Lenovo Yoga Tab 10 Pro (10.1" - 2024)**
|
|
521
|
+
**Link**: [https://www.lenovo.com/it/it/products/tablets/yoga-tab-10-pro/](https://www.lenovo.com/it/it/products/tablets/yoga-tab-10-pro/)
|
|
522
|
+
**Descrizione**:
|
|
523
|
+
- Informazioni complete sul tablet, inclusi i dettagli tecnici (display, batteria, sistema operativo), le caratteristiche principali e le opzioni di personalizzazione.
|
|
524
|
+
- Include una sezione dedicata alle videochiamate, con spiegazioni su come utilizzare il tablet per chiamate in alta definizione.
|
|
525
|
+
- Ideale per mostrare la compatibilità con app di videochiamate come Zoom, Skype e FaceTime.
|
|
526
|
+
|
|
527
|
+
**Utilizzo consigliato**:
|
|
528
|
+
- Mostra la pagina per spiegare le caratteristiche tecniche del tablet.
|
|
529
|
+
- Fornisci un'immagine del tablet con il filtro di privacy attivo per illustrare la protezione della privacy.
|
|
530
|
+
|
|
531
|
+
---
|
|
532
|
+
|
|
533
|
+
### **2. Guida ufficiale per l'uso del tablet per videochiamate (in italiano)**
|
|
534
|
+
**Link**: [https://www.lenovo.com/it/it/support/faq/](https://www.lenovo.com/it/it/support/faq/)
|
|
535
|
+
**Descrizione**:
|
|
536
|
+
- Una sezione FAQ (Frequently Asked Questions) che risponde a domande comuni su come utilizzare il tablet per videochiamate, inclusi:
|
|
537
|
+
- Come iniziare una chiamata.
|
|
538
|
+
- Come utilizzare il filtro di privacy.
|
|
539
|
+
- Come gestire la batteria e le connessioni.
|
|
540
|
+
- Include video tutorial e immagini per spiegare passaggi semplici.
|
|
541
|
+
- Adatto per un pubblico non esperto, come la nonna.
|
|
542
|
+
|
|
543
|
+
**Utilizzo consigliato**:
|
|
544
|
+
- Mostra la guida per spiegare come usare il tablet in modo semplice.
|
|
545
|
+
- Usa i video tutorial per dimostrare l'esperienza di videochiamate.
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
### **Altri consigli per il materiale visivo**
|
|
550
|
+
Se vuoi aggiungere ulteriori risorse, puoi consultare:
|
|
551
|
+
- **Pagina ufficiale degli accessori Lenovo**: [https://www.lenovo.com/it/it/products/accessories/](https://www.lenovo.com/it/it/products/accessories/)
|
|
552
|
+
- **Video tutorial ufficiali su YouTube**: Cerca "Lenovo Yoga Tab 10 Pro videochiamate" o "Lenovo ThinkPad X1 Tablet uso per videochiamate".
|
|
553
|
+
|
|
554
|
+
Questi link ti permettono di creare un materiale visivo coerente e basato su informazioni verificate, che aiuterà la ragazza a spiegare il prodotto e gli accessori in modo chiaro e professionale. Se hai bisogno di aiuto per personalizzare ulteriormente il materiale, posso aiutarti! 😊`,
|
|
555
|
+
initial: false,
|
|
556
|
+
generatedByAI: true,
|
|
557
|
+
},
|
|
558
|
+
};
|
|
559
|
+
|
|
476
560
|
export const WithMarkdownTable = Template.bind({});
|
|
477
561
|
WithMarkdownTable.args = {
|
|
478
562
|
memori,
|
|
@@ -263,6 +263,23 @@ it('renders ChatBubble with reasoning unchanged', () => {
|
|
|
263
263
|
expect(container).toMatchSnapshot();
|
|
264
264
|
});
|
|
265
265
|
|
|
266
|
+
it('renders ChatBubble with reasoning shown unchanged', () => {
|
|
267
|
+
const { container } = render(
|
|
268
|
+
<ChatBubble
|
|
269
|
+
memori={memori}
|
|
270
|
+
tenant={tenant}
|
|
271
|
+
sessionID={sessionID}
|
|
272
|
+
showReasoning
|
|
273
|
+
message={{
|
|
274
|
+
fromUser: false,
|
|
275
|
+
text: '<think>Lorem ipsum is a dummy or placeholder text commonly used in graphic design, publishing, and web development. Its purpose is to permit a page layout to be designed, independently of the copy that will subsequently populate it, or to demonstrate various fonts of a typeface without meaningful text that could be distracting. More at WikipediaDicta sequi dignissimos quis earum. Quis vel sint voluptas eos ex assumenda. Similique sed modi deleniti et ut quas cumque. Quaerat quis labore ut asperiores aliquid. Voluptatem similique nostrum neque culpa. Ex et iste voluptas est itaque aut aliquam. Qui error perspiciatis aut fuga maiores sint aut aspernatur. Veritatis ipsam iure voluptas asperiores consequuntur unde consequatur vitae. Sequi doloremque inventore reiciendis doloremque voluptates. Quidem repellendus id maxime. Fuga autem quam reiciendis provident in ad. Quia ut nihil voluptate voluptas ipsa porro. Magnam assumenda earum ipsam quisquam aut perspiciatis officiis. Et totam deleniti sed quisquam repellat. Ducimus nostrum voluptatem deleniti sed. Et accusamus temporibus occaecati. Est explicabo vel eum animi deleniti. Qui vel totam est officiis ducimus eligendi iure. Impedit eum ipsa omnis qui dolorem nobis at inventore. Aliquid aliquam esse neque ut vel magni accusamus. Et quia quas consectetur. Dolor dolorum sunt aut enim et quam ut expedita. Quia ut odio totam mollitia. Qui tempore quia quaerat quis enim. Numquam quasi maiores ipsa qui illo. Ea iste iure in corporis non nihil molestias quisquam. Sed suscipit esse dolorem omnis dolore aut. Enim eos id eligendi doloremque.</think>\nProin libero ante, dignissim sit amet turpis a, pretium condimentum dolor.',
|
|
276
|
+
initial: false,
|
|
277
|
+
}}
|
|
278
|
+
/>
|
|
279
|
+
);
|
|
280
|
+
expect(container).toMatchSnapshot();
|
|
281
|
+
});
|
|
282
|
+
|
|
266
283
|
it('renders ChatBubble with markdown unchanged', () => {
|
|
267
284
|
const { container } = render(
|
|
268
285
|
<ChatBubble
|
|
@@ -62,6 +62,7 @@ export interface Props {
|
|
|
62
62
|
user?: User;
|
|
63
63
|
experts?: ExpertReference[];
|
|
64
64
|
showFunctionCache?: boolean;
|
|
65
|
+
showReasoning?: boolean;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
const ChatBubble: React.FC<Props> = ({
|
|
@@ -84,6 +85,7 @@ const ChatBubble: React.FC<Props> = ({
|
|
|
84
85
|
userAvatar,
|
|
85
86
|
experts,
|
|
86
87
|
showFunctionCache = false,
|
|
88
|
+
showReasoning = false,
|
|
87
89
|
}) => {
|
|
88
90
|
const { t, i18n } = useTranslation();
|
|
89
91
|
const lang = i18n.language || 'en';
|
|
@@ -134,7 +136,8 @@ const ChatBubble: React.FC<Props> = ({
|
|
|
134
136
|
const { text: renderedText } = renderMsg(
|
|
135
137
|
cleanText,
|
|
136
138
|
useMathFormatting,
|
|
137
|
-
t('reasoning') || 'Reasoning...'
|
|
139
|
+
t('reasoning') || 'Reasoning...',
|
|
140
|
+
showReasoning
|
|
138
141
|
);
|
|
139
142
|
const plainText = message.fromUser
|
|
140
143
|
? truncateMessage(cleanText)
|
|
@@ -7944,7 +7944,7 @@ exports[`renders ChatBubble with output code unchanged 1`] = `
|
|
|
7944
7944
|
</div>
|
|
7945
7945
|
`;
|
|
7946
7946
|
|
|
7947
|
-
exports[`renders ChatBubble with reasoning unchanged 1`] = `
|
|
7947
|
+
exports[`renders ChatBubble with reasoning shown unchanged 1`] = `
|
|
7948
7948
|
<div>
|
|
7949
7949
|
<div
|
|
7950
7950
|
class="memori-chat--bubble-container"
|
|
@@ -8054,6 +8054,109 @@ Proin libero ante, dignissim sit amet turpis a, pretium condimentum dolor.
|
|
|
8054
8054
|
</div>
|
|
8055
8055
|
`;
|
|
8056
8056
|
|
|
8057
|
+
exports[`renders ChatBubble with reasoning unchanged 1`] = `
|
|
8058
|
+
<div>
|
|
8059
|
+
<div
|
|
8060
|
+
class="memori-chat--bubble-container"
|
|
8061
|
+
>
|
|
8062
|
+
<picture
|
|
8063
|
+
class="memori-chat--bubble-avatar transition ease-in-out duration-300 opacity-0 scale-075 translate-x--15"
|
|
8064
|
+
title="Memori"
|
|
8065
|
+
>
|
|
8066
|
+
<img
|
|
8067
|
+
alt="Memori"
|
|
8068
|
+
class="memori-chat--bubble-avatar-img"
|
|
8069
|
+
src="https://aisuru.com/images/aisuru/square_logo.png"
|
|
8070
|
+
/>
|
|
8071
|
+
</picture>
|
|
8072
|
+
<div
|
|
8073
|
+
class="memori-chat--bubble memori-chat--with-addon transition ease-in-out duration-300 opacity-0 scale-09 translate-x--30"
|
|
8074
|
+
>
|
|
8075
|
+
<div
|
|
8076
|
+
class="memori-chat--bubble-content"
|
|
8077
|
+
dir="auto"
|
|
8078
|
+
>
|
|
8079
|
+
<p>
|
|
8080
|
+
Proin libero ante, dignissim sit amet turpis a, pretium condimentum dolor.
|
|
8081
|
+
</p>
|
|
8082
|
+
</div>
|
|
8083
|
+
<div
|
|
8084
|
+
class="memori-chat--bubble-addon"
|
|
8085
|
+
>
|
|
8086
|
+
<button
|
|
8087
|
+
class="memori-button memori-button--ghost memori-button--circle memori-button--padded memori-button--icon-only memori-chat--bubble-action-icon"
|
|
8088
|
+
title="copy"
|
|
8089
|
+
>
|
|
8090
|
+
<span
|
|
8091
|
+
class="memori-button--icon"
|
|
8092
|
+
>
|
|
8093
|
+
<svg
|
|
8094
|
+
aria-hidden="true"
|
|
8095
|
+
fill="none"
|
|
8096
|
+
focusable="false"
|
|
8097
|
+
role="img"
|
|
8098
|
+
stroke="currentColor"
|
|
8099
|
+
stroke-linecap="round"
|
|
8100
|
+
stroke-linejoin="round"
|
|
8101
|
+
stroke-width="1.5"
|
|
8102
|
+
viewBox="0 0 24 24"
|
|
8103
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8104
|
+
>
|
|
8105
|
+
<rect
|
|
8106
|
+
height="14"
|
|
8107
|
+
rx="2"
|
|
8108
|
+
ry="2"
|
|
8109
|
+
width="14"
|
|
8110
|
+
x="8"
|
|
8111
|
+
y="8"
|
|
8112
|
+
/>
|
|
8113
|
+
<path
|
|
8114
|
+
d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"
|
|
8115
|
+
/>
|
|
8116
|
+
</svg>
|
|
8117
|
+
</span>
|
|
8118
|
+
</button>
|
|
8119
|
+
<button
|
|
8120
|
+
class="memori-button memori-button--ghost memori-button--circle memori-button--padded memori-button--icon-only memori-chat--bubble-action-icon"
|
|
8121
|
+
title="copyRawCode"
|
|
8122
|
+
>
|
|
8123
|
+
<span
|
|
8124
|
+
class="memori-button--icon"
|
|
8125
|
+
>
|
|
8126
|
+
<svg
|
|
8127
|
+
aria-hidden="true"
|
|
8128
|
+
fill="none"
|
|
8129
|
+
focusable="false"
|
|
8130
|
+
role="img"
|
|
8131
|
+
stroke="currentColor"
|
|
8132
|
+
stroke-linecap="round"
|
|
8133
|
+
stroke-linejoin="round"
|
|
8134
|
+
stroke-width="1.5"
|
|
8135
|
+
viewBox="0 0 24 24"
|
|
8136
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8137
|
+
>
|
|
8138
|
+
<path
|
|
8139
|
+
d="M10 9.5 8 12l2 2.5"
|
|
8140
|
+
/>
|
|
8141
|
+
<path
|
|
8142
|
+
d="m14 9.5 2 2.5-2 2.5"
|
|
8143
|
+
/>
|
|
8144
|
+
<rect
|
|
8145
|
+
height="18"
|
|
8146
|
+
rx="2"
|
|
8147
|
+
width="18"
|
|
8148
|
+
x="3"
|
|
8149
|
+
y="3"
|
|
8150
|
+
/>
|
|
8151
|
+
</svg>
|
|
8152
|
+
</span>
|
|
8153
|
+
</button>
|
|
8154
|
+
</div>
|
|
8155
|
+
</div>
|
|
8156
|
+
</div>
|
|
8157
|
+
</div>
|
|
8158
|
+
`;
|
|
8159
|
+
|
|
8057
8160
|
exports[`renders ChatBubble with translation and original unchanged 1`] = `
|
|
8058
8161
|
<div>
|
|
8059
8162
|
<div
|
|
@@ -145,6 +145,12 @@
|
|
|
145
145
|
fill: var(--memori-primary);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
.memori-chat-history-drawer--toolbar--actions > div > ul {
|
|
149
|
+
z-index: 10;
|
|
150
|
+
right: 0.25rem;
|
|
151
|
+
margin-left: auto;
|
|
152
|
+
}
|
|
153
|
+
|
|
148
154
|
.memori-chat-history-drawer--card--content--messages {
|
|
149
155
|
flex: 1;
|
|
150
156
|
padding: 16px;
|
|
@@ -277,6 +283,7 @@
|
|
|
277
283
|
.memori-chat-history-drawer--toolbar {
|
|
278
284
|
display: flex;
|
|
279
285
|
margin-bottom: 1.5rem;
|
|
286
|
+
margin-left: auto;
|
|
280
287
|
gap: 1rem;
|
|
281
288
|
}
|
|
282
289
|
|
|
@@ -317,6 +324,18 @@
|
|
|
317
324
|
white-space: nowrap;
|
|
318
325
|
}
|
|
319
326
|
|
|
327
|
+
.memori-chat-history-drawer--toolbar--sort-button--icon {
|
|
328
|
+
width: 1.25rem;
|
|
329
|
+
height: 1.25rem;
|
|
330
|
+
margin-right: 0.5rem;
|
|
331
|
+
font-size: 1.25rem;
|
|
332
|
+
transition: transform 0.2s ease-in-out;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.memori-chat-history-drawer--toolbar--sort-button--icon.rotate-180 {
|
|
336
|
+
transform: scaleY(-1);
|
|
337
|
+
}
|
|
338
|
+
|
|
320
339
|
/* Pagination */
|
|
321
340
|
.memori-chat-history-drawer--pagination {
|
|
322
341
|
display: flex;
|