@memori.ai/memori-react 7.28.0 → 7.29.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.
Files changed (286) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/components/AccountForm/AccountForm.d.ts +1 -0
  3. package/dist/components/AgeVerificationModal/AgeVerificationModal.d.ts +1 -0
  4. package/dist/components/AttachmentLinkModal/AttachmentLinkModal.d.ts +1 -0
  5. package/dist/components/Auth/Auth.d.ts +1 -0
  6. package/dist/components/Avatar/AvatarView/AvatarComponent/Shadow/DynamicShadow.d.ts +1 -0
  7. package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/fullbodyAvatar.d.ts +1 -0
  8. package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.d.ts +38 -0
  9. package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js +181 -0
  10. package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js.map +1 -0
  11. package/dist/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.d.ts +1 -0
  12. package/dist/components/Avatar/AvatarView/AvatarComponent/components/loader.d.ts +1 -0
  13. package/dist/components/Blob/Blob.d.ts +1 -0
  14. package/dist/components/BlockedMemoriBadge/BlockedMemoriBadge.d.ts +1 -0
  15. package/dist/components/Chat/Chat.d.ts +1 -0
  16. package/dist/components/Chat/Chat.js +5 -3
  17. package/dist/components/Chat/Chat.js.map +1 -1
  18. package/dist/components/ChatBubble/VirtualizedContent/VirtualizedContent.d.ts +7 -0
  19. package/dist/components/ChatBubble/VirtualizedContent/VirtualizedContent.js +69 -0
  20. package/dist/components/ChatBubble/VirtualizedContent/VirtualizedContent.js.map +1 -0
  21. package/dist/components/ChatHistoryDrawer/ChatHistory.css +321 -0
  22. package/dist/components/ChatHistoryDrawer/ChatHistory.d.ts +15 -0
  23. package/dist/components/ChatHistoryDrawer/ChatHistory.js +109 -0
  24. package/dist/components/ChatHistoryDrawer/ChatHistory.js.map +1 -0
  25. package/dist/components/CompletionProviderStatus/CompletionProviderStatus.d.ts +1 -0
  26. package/dist/components/CustomGLBModelViewer/ModelViewer.d.ts +1 -0
  27. package/dist/components/ExpertsDrawer/ExpertsDrawer.d.ts +1 -0
  28. package/dist/components/FeedbackButtons/FeedbackButtons.d.ts +1 -0
  29. package/dist/components/FilePreview/FilePreview.d.ts +1 -0
  30. package/dist/components/Header/Header.d.ts +2 -0
  31. package/dist/components/Header/Header.js +4 -3
  32. package/dist/components/Header/Header.js.map +1 -1
  33. package/dist/components/KnownFacts/KnownFacts.d.ts +1 -0
  34. package/dist/components/LoginDrawer/LoginDrawer.d.ts +1 -0
  35. package/dist/components/MemoriWidget/MemoriWidget.d.ts +2 -1
  36. package/dist/components/MemoriWidget/MemoriWidget.js +173 -21
  37. package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
  38. package/dist/components/MicrophoneButton/MicrophoneButton.d.ts +1 -0
  39. package/dist/components/PositionDrawer/PositionDrawer.d.ts +1 -0
  40. package/dist/components/PoweredBy/PoweredBy.d.ts +1 -0
  41. package/dist/components/SettingsDrawer/SettingsDrawer.d.ts +1 -0
  42. package/dist/components/SignupForm/SignupForm.d.ts +1 -0
  43. package/dist/components/Snippet/Snippet.d.ts +1 -0
  44. package/dist/components/StartPanel/StartPanel.css +20 -21
  45. package/dist/components/StartPanel/StartPanel.js.map +1 -1
  46. package/dist/components/Typing/Typing.d.ts +1 -0
  47. package/dist/components/VenueWidget/VenueWidget.css +7 -0
  48. package/dist/components/VenueWidget/VenueWidget.d.ts +1 -0
  49. package/dist/components/VenueWidget/VenueWidget.js +1 -1
  50. package/dist/components/VenueWidget/VenueWidget.js.map +1 -1
  51. package/dist/components/WhyThisAnswer/WhyThisAnswer.d.ts +1 -0
  52. package/dist/components/icons/AI.d.ts +1 -0
  53. package/dist/components/icons/Alert.d.ts +1 -0
  54. package/dist/components/icons/Bug.d.ts +1 -0
  55. package/dist/components/icons/Chat.d.ts +6 -0
  56. package/dist/components/icons/Chat.js +6 -0
  57. package/dist/components/icons/Chat.js.map +1 -0
  58. package/dist/components/icons/ChevronLeft.d.ts +1 -0
  59. package/dist/components/icons/ChevronRight.d.ts +1 -0
  60. package/dist/components/icons/Clear.d.ts +1 -0
  61. package/dist/components/icons/Close.d.ts +1 -0
  62. package/dist/components/icons/Code.d.ts +1 -0
  63. package/dist/components/icons/Copy.d.ts +1 -0
  64. package/dist/components/icons/DeepThought.d.ts +1 -0
  65. package/dist/components/icons/Delete.d.ts +1 -0
  66. package/dist/components/icons/Download.d.ts +1 -0
  67. package/dist/components/icons/Edit.d.ts +1 -0
  68. package/dist/components/icons/Expand.d.ts +1 -0
  69. package/dist/components/icons/Eye.d.ts +1 -0
  70. package/dist/components/icons/EyeInvisible.d.ts +1 -0
  71. package/dist/components/icons/Facebook.d.ts +1 -0
  72. package/dist/components/icons/Feedback.d.ts +1 -0
  73. package/dist/components/icons/File.d.ts +1 -0
  74. package/dist/components/icons/FileExcel.d.ts +1 -0
  75. package/dist/components/icons/FilePdf.d.ts +1 -0
  76. package/dist/components/icons/FileWord.d.ts +1 -0
  77. package/dist/components/icons/Fullscreen.d.ts +1 -0
  78. package/dist/components/icons/FullscreenExit.d.ts +1 -0
  79. package/dist/components/icons/Group.d.ts +1 -0
  80. package/dist/components/icons/History.d.ts +7 -0
  81. package/dist/components/icons/History.js +6 -0
  82. package/dist/components/icons/History.js.map +1 -0
  83. package/dist/components/icons/Info.d.ts +1 -0
  84. package/dist/components/icons/Link.d.ts +1 -0
  85. package/dist/components/icons/Linkedin.d.ts +1 -0
  86. package/dist/components/icons/Loading.d.ts +1 -0
  87. package/dist/components/icons/Mail.d.ts +1 -0
  88. package/dist/components/icons/MapMarker.d.ts +1 -0
  89. package/dist/components/icons/Message.d.ts +1 -0
  90. package/dist/components/icons/Microphone.d.ts +1 -0
  91. package/dist/components/icons/Minus.d.ts +1 -0
  92. package/dist/components/icons/MinusCircle.d.ts +1 -0
  93. package/dist/components/icons/PaperClip.d.ts +1 -0
  94. package/dist/components/icons/Picture.d.ts +1 -0
  95. package/dist/components/icons/Plus.d.ts +1 -0
  96. package/dist/components/icons/QuestionHelp.d.ts +1 -0
  97. package/dist/components/icons/Refresh.d.ts +1 -0
  98. package/dist/components/icons/SelectIcon.d.ts +1 -0
  99. package/dist/components/icons/Send.d.ts +1 -0
  100. package/dist/components/icons/Setting.d.ts +1 -0
  101. package/dist/components/icons/Share.d.ts +1 -0
  102. package/dist/components/icons/Sound.d.ts +1 -0
  103. package/dist/components/icons/SoundDeactivated.d.ts +1 -0
  104. package/dist/components/icons/Telegram.d.ts +1 -0
  105. package/dist/components/icons/ThumbDown.d.ts +1 -0
  106. package/dist/components/icons/ThumbUp.d.ts +1 -0
  107. package/dist/components/icons/Translation.d.ts +1 -0
  108. package/dist/components/icons/Twitter.d.ts +1 -0
  109. package/dist/components/icons/User.d.ts +1 -0
  110. package/dist/components/icons/Warning.d.ts +1 -0
  111. package/dist/components/icons/WhatsApp.d.ts +1 -0
  112. package/dist/components/ui/Card.css +4 -0
  113. package/dist/components/ui/Card.js +3 -2
  114. package/dist/components/ui/Card.js.map +1 -1
  115. package/dist/components/ui/Select.d.ts +1 -0
  116. package/dist/helpers/message.js +1 -4
  117. package/dist/helpers/message.js.map +1 -1
  118. package/dist/helpers/utils.d.ts +1 -0
  119. package/dist/helpers/utils.js +18 -1
  120. package/dist/helpers/utils.js.map +1 -1
  121. package/dist/index.d.ts +1 -0
  122. package/dist/index.js +2 -2
  123. package/dist/index.js.map +1 -1
  124. package/dist/locales/de.json +11 -1
  125. package/dist/locales/en.json +11 -1
  126. package/dist/locales/es.json +11 -1
  127. package/dist/locales/fr.json +14 -2
  128. package/dist/locales/it.json +11 -1
  129. package/dist/styles.css +1 -0
  130. package/esm/components/AccountForm/AccountForm.d.ts +1 -0
  131. package/esm/components/AgeVerificationModal/AgeVerificationModal.d.ts +1 -0
  132. package/esm/components/AttachmentLinkModal/AttachmentLinkModal.d.ts +1 -0
  133. package/esm/components/Auth/Auth.d.ts +1 -0
  134. package/esm/components/Avatar/AvatarView/AvatarComponent/Shadow/DynamicShadow.d.ts +1 -0
  135. package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/fullbodyAvatar.d.ts +1 -0
  136. package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.d.ts +38 -0
  137. package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js +177 -0
  138. package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js.map +1 -0
  139. package/esm/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.d.ts +1 -0
  140. package/esm/components/Avatar/AvatarView/AvatarComponent/components/loader.d.ts +1 -0
  141. package/esm/components/Blob/Blob.d.ts +1 -0
  142. package/esm/components/BlockedMemoriBadge/BlockedMemoriBadge.d.ts +1 -0
  143. package/esm/components/Chat/Chat.d.ts +1 -0
  144. package/esm/components/Chat/Chat.js +5 -3
  145. package/esm/components/Chat/Chat.js.map +1 -1
  146. package/esm/components/ChatBubble/VirtualizedContent/VirtualizedContent.d.ts +7 -0
  147. package/esm/components/ChatBubble/VirtualizedContent/VirtualizedContent.js +67 -0
  148. package/esm/components/ChatBubble/VirtualizedContent/VirtualizedContent.js.map +1 -0
  149. package/esm/components/ChatHistoryDrawer/ChatHistory.css +321 -0
  150. package/esm/components/ChatHistoryDrawer/ChatHistory.d.ts +15 -0
  151. package/esm/components/ChatHistoryDrawer/ChatHistory.js +106 -0
  152. package/esm/components/ChatHistoryDrawer/ChatHistory.js.map +1 -0
  153. package/esm/components/CompletionProviderStatus/CompletionProviderStatus.d.ts +1 -0
  154. package/esm/components/CustomGLBModelViewer/ModelViewer.d.ts +1 -0
  155. package/esm/components/ExpertsDrawer/ExpertsDrawer.d.ts +1 -0
  156. package/esm/components/FeedbackButtons/FeedbackButtons.d.ts +1 -0
  157. package/esm/components/FilePreview/FilePreview.d.ts +1 -0
  158. package/esm/components/Header/Header.d.ts +2 -0
  159. package/esm/components/Header/Header.js +4 -3
  160. package/esm/components/Header/Header.js.map +1 -1
  161. package/esm/components/KnownFacts/KnownFacts.d.ts +1 -0
  162. package/esm/components/LoginDrawer/LoginDrawer.d.ts +1 -0
  163. package/esm/components/MemoriWidget/MemoriWidget.d.ts +2 -1
  164. package/esm/components/MemoriWidget/MemoriWidget.js +173 -21
  165. package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
  166. package/esm/components/MicrophoneButton/MicrophoneButton.d.ts +1 -0
  167. package/esm/components/PositionDrawer/PositionDrawer.d.ts +1 -0
  168. package/esm/components/PoweredBy/PoweredBy.d.ts +1 -0
  169. package/esm/components/SettingsDrawer/SettingsDrawer.d.ts +1 -0
  170. package/esm/components/SignupForm/SignupForm.d.ts +1 -0
  171. package/esm/components/Snippet/Snippet.d.ts +1 -0
  172. package/esm/components/StartPanel/StartPanel.css +20 -21
  173. package/esm/components/StartPanel/StartPanel.js.map +1 -1
  174. package/esm/components/Typing/Typing.d.ts +1 -0
  175. package/esm/components/VenueWidget/VenueWidget.css +7 -0
  176. package/esm/components/VenueWidget/VenueWidget.d.ts +1 -0
  177. package/esm/components/VenueWidget/VenueWidget.js +1 -1
  178. package/esm/components/VenueWidget/VenueWidget.js.map +1 -1
  179. package/esm/components/WhyThisAnswer/WhyThisAnswer.d.ts +1 -0
  180. package/esm/components/icons/AI.d.ts +1 -0
  181. package/esm/components/icons/Alert.d.ts +1 -0
  182. package/esm/components/icons/Bug.d.ts +1 -0
  183. package/esm/components/icons/Chat.d.ts +6 -0
  184. package/esm/components/icons/Chat.js +4 -0
  185. package/esm/components/icons/Chat.js.map +1 -0
  186. package/esm/components/icons/ChevronLeft.d.ts +1 -0
  187. package/esm/components/icons/ChevronRight.d.ts +1 -0
  188. package/esm/components/icons/Clear.d.ts +1 -0
  189. package/esm/components/icons/Close.d.ts +1 -0
  190. package/esm/components/icons/Code.d.ts +1 -0
  191. package/esm/components/icons/Copy.d.ts +1 -0
  192. package/esm/components/icons/DeepThought.d.ts +1 -0
  193. package/esm/components/icons/Delete.d.ts +1 -0
  194. package/esm/components/icons/Download.d.ts +1 -0
  195. package/esm/components/icons/Edit.d.ts +1 -0
  196. package/esm/components/icons/Expand.d.ts +1 -0
  197. package/esm/components/icons/Eye.d.ts +1 -0
  198. package/esm/components/icons/EyeInvisible.d.ts +1 -0
  199. package/esm/components/icons/Facebook.d.ts +1 -0
  200. package/esm/components/icons/Feedback.d.ts +1 -0
  201. package/esm/components/icons/File.d.ts +1 -0
  202. package/esm/components/icons/FileExcel.d.ts +1 -0
  203. package/esm/components/icons/FilePdf.d.ts +1 -0
  204. package/esm/components/icons/FileWord.d.ts +1 -0
  205. package/esm/components/icons/Fullscreen.d.ts +1 -0
  206. package/esm/components/icons/FullscreenExit.d.ts +1 -0
  207. package/esm/components/icons/Group.d.ts +1 -0
  208. package/esm/components/icons/History.d.ts +7 -0
  209. package/esm/components/icons/History.js +4 -0
  210. package/esm/components/icons/History.js.map +1 -0
  211. package/esm/components/icons/Info.d.ts +1 -0
  212. package/esm/components/icons/Link.d.ts +1 -0
  213. package/esm/components/icons/Linkedin.d.ts +1 -0
  214. package/esm/components/icons/Loading.d.ts +1 -0
  215. package/esm/components/icons/Mail.d.ts +1 -0
  216. package/esm/components/icons/MapMarker.d.ts +1 -0
  217. package/esm/components/icons/Message.d.ts +1 -0
  218. package/esm/components/icons/Microphone.d.ts +1 -0
  219. package/esm/components/icons/Minus.d.ts +1 -0
  220. package/esm/components/icons/MinusCircle.d.ts +1 -0
  221. package/esm/components/icons/PaperClip.d.ts +1 -0
  222. package/esm/components/icons/Picture.d.ts +1 -0
  223. package/esm/components/icons/Plus.d.ts +1 -0
  224. package/esm/components/icons/QuestionHelp.d.ts +1 -0
  225. package/esm/components/icons/Refresh.d.ts +1 -0
  226. package/esm/components/icons/SelectIcon.d.ts +1 -0
  227. package/esm/components/icons/Send.d.ts +1 -0
  228. package/esm/components/icons/Setting.d.ts +1 -0
  229. package/esm/components/icons/Share.d.ts +1 -0
  230. package/esm/components/icons/Sound.d.ts +1 -0
  231. package/esm/components/icons/SoundDeactivated.d.ts +1 -0
  232. package/esm/components/icons/Telegram.d.ts +1 -0
  233. package/esm/components/icons/ThumbDown.d.ts +1 -0
  234. package/esm/components/icons/ThumbUp.d.ts +1 -0
  235. package/esm/components/icons/Translation.d.ts +1 -0
  236. package/esm/components/icons/Twitter.d.ts +1 -0
  237. package/esm/components/icons/User.d.ts +1 -0
  238. package/esm/components/icons/Warning.d.ts +1 -0
  239. package/esm/components/icons/WhatsApp.d.ts +1 -0
  240. package/esm/components/ui/Card.css +4 -0
  241. package/esm/components/ui/Card.js +3 -2
  242. package/esm/components/ui/Card.js.map +1 -1
  243. package/esm/components/ui/Select.d.ts +1 -0
  244. package/esm/helpers/message.js +1 -4
  245. package/esm/helpers/message.js.map +1 -1
  246. package/esm/helpers/utils.d.ts +1 -0
  247. package/esm/helpers/utils.js +16 -0
  248. package/esm/helpers/utils.js.map +1 -1
  249. package/esm/index.d.ts +1 -0
  250. package/esm/index.js +2 -2
  251. package/esm/index.js.map +1 -1
  252. package/esm/locales/de.json +11 -1
  253. package/esm/locales/en.json +11 -1
  254. package/esm/locales/es.json +11 -1
  255. package/esm/locales/fr.json +14 -2
  256. package/esm/locales/it.json +11 -1
  257. package/esm/styles.css +1 -0
  258. package/package.json +1 -1
  259. package/src/components/Chat/Chat.tsx +5 -2
  260. package/src/components/ChatHistoryDrawer/ChatHistory.css +321 -0
  261. package/src/components/ChatHistoryDrawer/ChatHistory.stories.tsx +290 -0
  262. package/src/components/ChatHistoryDrawer/ChatHistory.test.tsx +91 -0
  263. package/src/components/ChatHistoryDrawer/ChatHistory.tsx +369 -0
  264. package/src/components/ChatHistoryDrawer/__snapshots__/ChatHistory.test.tsx.snap +27 -0
  265. package/src/components/Header/Header.test.tsx +16 -1
  266. package/src/components/Header/Header.tsx +20 -0
  267. package/src/components/Header/__snapshots__/Header.test.tsx.snap +140 -0
  268. package/src/components/MemoriWidget/MemoriWidget.tsx +249 -16
  269. package/src/components/StartPanel/StartPanel.css +20 -21
  270. package/src/components/StartPanel/StartPanel.tsx +1 -0
  271. package/src/components/VenueWidget/VenueWidget.css +7 -0
  272. package/src/components/VenueWidget/VenueWidget.tsx +4 -4
  273. package/src/components/icons/Chat.tsx +30 -0
  274. package/src/components/icons/History.tsx +33 -0
  275. package/src/components/ui/Card.css +4 -0
  276. package/src/components/ui/Card.tsx +2 -1
  277. package/src/helpers/message.ts +0 -2
  278. package/src/helpers/utils.ts +23 -0
  279. package/src/index.stories.tsx +36 -9
  280. package/src/index.tsx +3 -0
  281. package/src/locales/de.json +11 -1
  282. package/src/locales/en.json +11 -1
  283. package/src/locales/es.json +11 -1
  284. package/src/locales/fr.json +14 -2
  285. package/src/locales/it.json +11 -1
  286. package/src/styles.css +1 -0
@@ -0,0 +1,33 @@
1
+ import * as React from "react"
2
+ const History = ({
3
+ className,
4
+ title,
5
+ disabled,
6
+ }: {
7
+ className?: string;
8
+ title?: string;
9
+ disabled?: boolean;
10
+ }) => (
11
+ <svg
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ width={800}
14
+ height={800}
15
+ fill="none"
16
+ viewBox="0 0 24 24"
17
+ className={className}
18
+ aria-label={title}
19
+ >
20
+ <path
21
+ stroke={disabled ? '#000000' : '#ffff'}
22
+ strokeLinecap="round"
23
+ strokeLinejoin="round"
24
+ strokeWidth={2}
25
+ d="M12 8v4l2.5 2.5"
26
+ />
27
+ <path
28
+ fill={disabled ? '#000000' : '#ffff'}
29
+ d="m5.604 5.604-.53-.53.53.53ZM4.338 6.871l-.75.003a.75.75 0 0 0 .746.747l.004-.75Zm2.542.762a.75.75 0 1 0 .007-1.5l-.007 1.5ZM5.075 4.321a.75.75 0 0 0-1.5.008l1.5-.008ZM3.75 12a.75.75 0 0 0-1.5 0h1.5Zm13.125 8.445a.75.75 0 1 0-.75-1.298l.75 1.298Zm2.272-4.32a.75.75 0 1 0 1.298.75l-1.298-.75ZM5.14 5.07a.75.75 0 1 0 1.056 1.066L5.14 5.071Zm13.722.067c-3.82-3.82-9.993-3.859-13.788-.064l1.06 1.06c3.2-3.199 8.423-3.18 11.668.065l1.06-1.061ZM5.074 5.074 3.808 6.34l1.06 1.06 1.267-1.265-1.061-1.061Zm-.74 2.547 2.546.012.007-1.5-2.545-.012-.008 1.5Zm.754-.754L5.075 4.32l-1.5.008.013 2.545 1.5-.007ZM12 3.75A8.25 8.25 0 0 1 20.25 12h1.5c0-5.385-4.365-9.75-9.75-9.75v1.5Zm0 16.5A8.25 8.25 0 0 1 3.75 12h-1.5c0 5.385 4.365 9.75 9.75 9.75v-1.5Zm4.125-1.103A8.209 8.209 0 0 1 12 20.25v1.5c1.775 0 3.44-.475 4.875-1.305l-.75-1.298ZM20.25 12a8.209 8.209 0 0 1-1.103 4.125l1.298.75A9.708 9.708 0 0 0 21.75 12h-1.5ZM6.196 6.137A8.221 8.221 0 0 1 12 3.75v-1.5a9.721 9.721 0 0 0-6.86 2.821l1.056 1.066Z"
30
+ />
31
+ </svg>
32
+ )
33
+ export default History
@@ -58,3 +58,7 @@
58
58
  font-size: 0.875rem;
59
59
  font-weight: 400;
60
60
  }
61
+
62
+ .memori-card--pointer {
63
+ cursor: pointer;
64
+ }
@@ -24,12 +24,13 @@ const Card: FC<Props> = ({
24
24
  onClick,
25
25
  }) => (
26
26
  <div
27
+ onClick={onClick}
27
28
  className={cx('memori-card', className, {
28
29
  'memori-card--loading': loading,
29
30
  'memori-card--with-cover': cover,
30
31
  'memori-card--hoverable': hoverable,
32
+ 'memori-card--pointer': !!onClick,
31
33
  })}
32
- onClick={onClick}
33
34
  >
34
35
  <Spin spinning={loading}>
35
36
  {cover && <div className="memori-card--cover">{cover}</div>}
@@ -91,8 +91,6 @@ export const renderMsg = (
91
91
  // Abilita il supporto per KaTeX
92
92
  marked.use(
93
93
  markedKatex({
94
- throwOnError: false,
95
- output: 'htmlAndMathml',
96
94
  })
97
95
  );
98
96
 
@@ -228,6 +228,29 @@ export const getFieldFromCustomData = (
228
228
  }
229
229
  };
230
230
 
231
+ const MAX_MSG_CHARS = 4000;
232
+
233
+ const MAX_MSG_WORDS = 300;
234
+
235
+ export const truncateMessage = (message: string) => {
236
+
237
+ let truncatedMessage = message;
238
+
239
+ if (message.length > MAX_MSG_CHARS) {
240
+ truncatedMessage = `${message.slice(0, MAX_MSG_CHARS)}\n<br />...`;
241
+ }
242
+
243
+ if (truncatedMessage.split(' ').length > MAX_MSG_WORDS) {
244
+ truncatedMessage = truncatedMessage
245
+ .split(' ')
246
+ .slice(0, MAX_MSG_WORDS)
247
+ .join(' ')
248
+ .concat('\n<br/>...');
249
+ }
250
+
251
+ return truncatedMessage;
252
+ };
253
+
231
254
  export const stripObjNulls = (obj: { [key: string]: any }) => {
232
255
  const newObj = { ...obj };
233
256
  Object.keys(newObj).forEach(key => {
@@ -36,6 +36,7 @@ Anonymous.args = {
36
36
  spokenLang: 'IT',
37
37
  enableAudio: true,
38
38
  autoStart: true,
39
+ showChatHistory: true,
39
40
  };
40
41
 
41
42
  export const WithInitialContextAndQuestion = Template.bind({});
@@ -88,6 +89,19 @@ WithPreviousSession.args = {
88
89
  spokenLang: 'IT',
89
90
  };
90
91
 
92
+ export const WithChatHistory = Template.bind({});
93
+ WithChatHistory.args = {
94
+ ownerUserName: 'nzambello',
95
+ memoriName: 'Nicola',
96
+ tenantID: 'www.aisuru.com',
97
+ engineURL: 'https://engine.memori.ai',
98
+ apiURL: 'https://backend.memori.ai',
99
+ baseURL: 'https://www.aisuru.com',
100
+ uiLang: 'IT',
101
+ spokenLang: 'IT',
102
+ showChatHistory: true,
103
+ };
104
+
91
105
  export const WithUpload = Template.bind({});
92
106
  WithUpload.args = {
93
107
  ownerUserName: 'nzambello',
@@ -117,19 +131,32 @@ Nunzio.args = {
117
131
 
118
132
  export const Localhost = Template.bind({});
119
133
  Localhost.args = {
120
- memoriName: 'test memori',
121
- ownerUserName: 'nicola',
122
- memoriID: '1a9c75e8-57aa-4ce3-8ea5-256185fa79a7',
123
- ownerUserID: '04a8cff9-13d6-4367-9cb2-72b9af9ee494',
124
- tenantID: 'www.aisuru.com',
125
- apiURL: 'http://localhost:7778',
134
+ memoriName: 'test9',
135
+ ownerUserName: 'andrea.patini',
136
+ memoriID: 'e31aa393-08c4-469a-b2e8-971eb45f4925',
137
+ ownerUserID: '9266e23e-6822-4658-bbb0-4bebbc232bd4',
138
+ tenantID: 'localhost:3000',
126
139
  engineURL: 'http://localhost:7778',
140
+ apiURL: 'http://localhost:7778',
127
141
  baseURL: 'http://localhost:3000',
128
- uiLang: 'EN',
129
- lang: 'IT',
142
+ uiLang: 'IT',
143
+ spokenLang: 'IT',
130
144
  layout: 'FULLPAGE',
145
+ showInstruct: false,
146
+ showSettings: true,
147
+ showChatHistory: true,
148
+ showClear: false,
149
+ showTypingText: false,
150
+ showOnlyLastMessages: false,
151
+ showTranslationOriginal: false,
152
+ showCopyButton: false,
131
153
  showShare: true,
132
- integrationID: '82f017cc-450b-4c47-acf5-47910d336ce9',
154
+ showLogin: true,
155
+ useMathFormatting: false,
156
+ showUpload: false,
157
+ autoStart: false,
158
+ enableAudio: true,
159
+ integrationID: 'c13fe42a-2d25-4bde-a502-f34824cd4ff1',
133
160
  };
134
161
 
135
162
  export const LocalhostBoE = Template.bind({});
package/src/index.tsx CHANGED
@@ -34,6 +34,7 @@ export interface Props {
34
34
  layout?: WidgetProps['layout'];
35
35
  customLayout?: WidgetProps['customLayout'];
36
36
  showShare?: boolean;
37
+ showChatHistory?: boolean;
37
38
  showCopyButton?: boolean;
38
39
  showTranslationOriginal?: boolean;
39
40
  showInputs?: boolean;
@@ -128,6 +129,7 @@ const Memori: React.FC<Props> = ({
128
129
  pin,
129
130
  context,
130
131
  initialQuestion,
132
+ showChatHistory = true,
131
133
  uiLang,
132
134
  spokenLang,
133
135
  multilingual,
@@ -285,6 +287,7 @@ const Memori: React.FC<Props> = ({
285
287
  tenantID={tenantID}
286
288
  memoriLang={spokenLang ?? memori.culture?.split('-')?.[0]}
287
289
  multilingual={multilingual}
290
+ showChatHistory={showChatHistory}
288
291
  tenant={tenant}
289
292
  secret={secretToken}
290
293
  sessionID={sessionID}
@@ -113,6 +113,11 @@
113
113
  "boardOfExperts": "Expertengremium",
114
114
  "showExpertsInTheBoard": "Experten in diesem Forum anzeigen",
115
115
  "expertsInTheBoard": "Experten in diesem Forum",
116
+ "chatHistory": "Chatverlauf",
117
+ "chatHistoryDescription": "Zeige den Chatverlauf mit diesem Agenten",
118
+ "loadingChatHistory": "Chatverlauf wird geladen...",
119
+ "noChatHistoryAvailable": "Kein Chatverlauf verfügbar",
120
+ "noResultsFound": "Keine Ergebnisse gefunden für &quot;{{searchText}}&quot;",
116
121
  "goToIntegrationsToCustomizeAvatar": "Um den Avatar anzupassen, gehen Sie zu „Teilen“ und passen Sie die öffentliche Seite an"
117
122
  },
118
123
  "write_and_speak": {
@@ -156,7 +161,12 @@
156
161
  "requirePositionHelp": "Zum Reden {{name}} Sie müssen entscheiden, ob Sie Ihre Position angeben oder nicht. ",
157
162
  "dontWantToProvidePosition": "Ich möchte meine Position nicht bekannt geben",
158
163
  "attachmentsLabel": "Bereichern Sie Ihre Botschaft",
159
- "iWantToTalkToIn": "Ich möchte mit reden {{name}} In"
164
+ "iWantToTalkToIn": "Ich möchte mit reden {{name}} In",
165
+ "message": "nachricht",
166
+ "messages": "nachrichten",
167
+ "latestFirst": "Neueste zuerst",
168
+ "oldestFirst": "Älteste zuerst",
169
+ "page": "Seite {{current}} von {{total}}"
160
170
  },
161
171
  "upload": {
162
172
  "loginRequired": "Login erforderlich",
@@ -113,6 +113,11 @@
113
113
  "boardOfExperts": "Board of experts",
114
114
  "showExpertsInTheBoard": "Show experts in this board",
115
115
  "expertsInTheBoard": "Experts in this board",
116
+ "chatHistory": "Chat history",
117
+ "chatHistoryDescription": "Show the chat history with this agent",
118
+ "loadingChatHistory": "Loading chat history...",
119
+ "noChatHistoryAvailable": "No chat history available",
120
+ "noResultsFound": "No results found for &quot;{{searchText}}&quot;",
116
121
  "goToIntegrationsToCustomizeAvatar": "To customize the avatar, go to Share and customize the public page"
117
122
  },
118
123
  "write_and_speak": {
@@ -168,7 +173,12 @@
168
173
  "requirePositionHelp": "To talk to {{name}} you have to decide whether to provide your position or not. This is because different answers that it can provide you may depend on where you are.",
169
174
  "dontWantToProvidePosition": "I don't want to provide my position",
170
175
  "attachmentsLabel": "Enrich your message",
171
- "iWantToTalkToIn": "I want to talk to {{name}} in"
176
+ "iWantToTalkToIn": "I want to talk to {{name}} in",
177
+ "message": "message",
178
+ "messages": "messages",
179
+ "latestFirst": "Latest first",
180
+ "oldestFirst": "Oldest first",
181
+ "page": "Page {{current}} of {{total}}"
172
182
  },
173
183
  "upload": {
174
184
  "loginRequired": "Login required",
@@ -113,6 +113,11 @@
113
113
  "boardOfExperts": "junta de expertos",
114
114
  "showExpertsInTheBoard": "Mostrar expertos en este foro",
115
115
  "expertsInTheBoard": "Expertos en este foro",
116
+ "chatHistory": "Historial de chat",
117
+ "chatHistoryDescription": "Mostrar el historial de chat con este agente",
118
+ "loadingChatHistory": "Cargando historial de chat...",
119
+ "noChatHistoryAvailable": "No hay historial de chat disponible",
120
+ "noResultsFound": "No se encontraron resultados para &quot;{{searchText}}&quot;",
116
121
  "goToIntegrationsToCustomizeAvatar": "Para personalizar el avatar, vaya a Compartir y personalice la página pública."
117
122
  },
118
123
  "write_and_speak": {
@@ -156,7 +161,12 @@
156
161
  "requirePositionHelp": "para hablar con {{name}} usted tiene que decidir si proporciona su puesto o no. ",
157
162
  "dontWantToProvidePosition": "No quiero proporcionar mi puesto.",
158
163
  "attachmentsLabel": "Enriquece tu mensaje",
159
- "iWantToTalkToIn": "quiero hablar con {{name}} en"
164
+ "iWantToTalkToIn": "quiero hablar con {{name}} en",
165
+ "message": "mensaje",
166
+ "messages": "mensajes",
167
+ "latestFirst": "Más recientes",
168
+ "oldestFirst": "Más antiguos",
169
+ "page": "Página {{current}} de {{total}}"
160
170
  },
161
171
  "upload": {
162
172
  "loginRequired": "Connexion requise",
@@ -112,13 +112,20 @@
112
112
  "boardOfExperts": "Conseil d'experts",
113
113
  "showExpertsInTheBoard": "Afficher les experts dans ce forum",
114
114
  "expertsInTheBoard": "Experts dans ce forum",
115
- "goToIntegrationsToCustomizeAvatar": "Pour personnaliser l'avatar, allez dans Partager et personnalisez la page publique"
115
+ "goToIntegrationsToCustomizeAvatar": "Pour personnaliser l'avatar, allez dans Partager et personnalisez la page publique",
116
+ "chatHistory": "Historique des discussions",
117
+ "chatHistoryDescription": "Afficher l'historique des discussions avec cet agent",
118
+ "loadingChatHistory": "Chargement de l'historique des discussions...",
119
+ "noChatHistoryAvailable": "Aucun historique des discussions disponible",
120
+ "noResultsFound": "Aucun résultat trouvé pour &quot;{{searchText}}&quot;"
116
121
  },
117
122
  "write_and_speak": {
118
123
  "micButtonPopover": "Cliquez sur le bouton pour parler",
119
124
  "micButtonPopoverListening": "Cliquez sur le bouton pour arrêter de parler",
120
125
  "pageInstructExplanation": "Pour m'apprendre de nouvelles choses, cliquez sur le bouton INSTRUCTEZ-MOI pour commencer",
121
126
  "pageTryMeExplanation": "Pour me parler, cliquez sur le bouton START pour commencer",
127
+ "pagePrivacyExplanation": "Les conversations sont visibles par l'auteur de l'agent",
128
+ "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.",
122
129
  "instructButton": "INSTRUCTEZ-MOI",
123
130
  "tryMeButton": "COMMENCER",
124
131
  "chatHistory": "Historique des discussions",
@@ -148,7 +155,12 @@
148
155
  "requirePositionHelp": "Pour parler à {{name}} vous devez décider si vous souhaitez ou non fournir votre poste. ",
149
156
  "dontWantToProvidePosition": "Je ne veux pas donner ma position",
150
157
  "attachmentsLabel": "Enrichissez votre message",
151
- "iWantToTalkToIn": "je veux parler à {{name}} dans"
158
+ "iWantToTalkToIn": "je veux parler à {{name}} dans",
159
+ "message": "message",
160
+ "messages": "messages",
161
+ "latestFirst": "Plus récent",
162
+ "oldestFirst": "Plus ancien",
163
+ "page": "Page {{current}} de {{total}}"
152
164
  },
153
165
  "upload": {
154
166
  "loginRequired": "Connexion requise",
@@ -113,6 +113,11 @@
113
113
  "boardOfExperts": "Gruppo di esperti",
114
114
  "showExpertsInTheBoard": "Mostra gli esperti di questo gruppo",
115
115
  "expertsInTheBoard": "Esperti di questo gruppo",
116
+ "chatHistory": "Cronologia chat",
117
+ "chatHistoryDescription": "Visualizza la cronologia delle chat con questo agente",
118
+ "loadingChatHistory": "Caricamento cronologia chat...",
119
+ "noChatHistoryAvailable": "Nessuna cronologia chat disponibile",
120
+ "noResultsFound": "Nessun risultato trovato per &quot;{{searchText}}&quot;",
116
121
  "goToIntegrationsToCustomizeAvatar": "Per personalizzare l'avatar, vai a Condividimi e configura la pagina pubblica"
117
122
  },
118
123
  "write_and_speak": {
@@ -167,7 +172,12 @@
167
172
  "requirePositionHelp": "Per parlare con {{name}} devi decidere se fornire o meno la tua posizione. Questo perchè diverse risposte che potrà fornirti potrebbero dipendere da dove ti trovi.",
168
173
  "dontWantToProvidePosition": "Non voglio fornire la mia posizione",
169
174
  "attachmentsLabel": "Arricchisci il tuo messaggio",
170
- "iWantToTalkToIn": "Voglio parlare con {{name}} in"
175
+ "iWantToTalkToIn": "Voglio parlare con {{name}} in",
176
+ "message": "messaggio",
177
+ "messages": "messaggi",
178
+ "latestFirst": "Più recenti",
179
+ "oldestFirst": "Più vecchi",
180
+ "page": "Pagina {{current}} di {{total}}"
171
181
  },
172
182
  "media": {
173
183
  "title": "Titolo",
package/src/styles.css CHANGED
@@ -29,6 +29,7 @@
29
29
  @import url('./components/ChatTextArea/ChatTextArea.css');
30
30
  @import url('./components/CustomGLBModelViewer/ModelViewer.css');
31
31
  @import url('./components/SettingsDrawer/SettingsDrawer.css');
32
+ @import url('./components/ChatHistoryDrawer/ChatHistory.css');
32
33
  @import url('./components/ExpertsDrawer/ExpertsDrawer.css');
33
34
  @import url('./components/ExportHistoryButton/ExportHistoryButton.css');
34
35
  @import url('./components/FeedbackButtons/FeedbackButtons.css');