@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.
- package/CHANGELOG.md +53 -0
- package/dist/components/AccountForm/AccountForm.d.ts +1 -0
- package/dist/components/AgeVerificationModal/AgeVerificationModal.d.ts +1 -0
- package/dist/components/AttachmentLinkModal/AttachmentLinkModal.d.ts +1 -0
- package/dist/components/Auth/Auth.d.ts +1 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/Shadow/DynamicShadow.d.ts +1 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/fullbodyAvatar.d.ts +1 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.d.ts +38 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js +181 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js.map +1 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.d.ts +1 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/loader.d.ts +1 -0
- package/dist/components/Blob/Blob.d.ts +1 -0
- package/dist/components/BlockedMemoriBadge/BlockedMemoriBadge.d.ts +1 -0
- package/dist/components/Chat/Chat.d.ts +1 -0
- package/dist/components/Chat/Chat.js +5 -3
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatBubble/VirtualizedContent/VirtualizedContent.d.ts +7 -0
- package/dist/components/ChatBubble/VirtualizedContent/VirtualizedContent.js +69 -0
- package/dist/components/ChatBubble/VirtualizedContent/VirtualizedContent.js.map +1 -0
- package/dist/components/ChatHistoryDrawer/ChatHistory.css +321 -0
- package/dist/components/ChatHistoryDrawer/ChatHistory.d.ts +15 -0
- package/dist/components/ChatHistoryDrawer/ChatHistory.js +109 -0
- package/dist/components/ChatHistoryDrawer/ChatHistory.js.map +1 -0
- package/dist/components/CompletionProviderStatus/CompletionProviderStatus.d.ts +1 -0
- package/dist/components/CustomGLBModelViewer/ModelViewer.d.ts +1 -0
- package/dist/components/ExpertsDrawer/ExpertsDrawer.d.ts +1 -0
- package/dist/components/FeedbackButtons/FeedbackButtons.d.ts +1 -0
- package/dist/components/FilePreview/FilePreview.d.ts +1 -0
- package/dist/components/Header/Header.d.ts +2 -0
- package/dist/components/Header/Header.js +4 -3
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/KnownFacts/KnownFacts.d.ts +1 -0
- package/dist/components/LoginDrawer/LoginDrawer.d.ts +1 -0
- package/dist/components/MemoriWidget/MemoriWidget.d.ts +2 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +173 -21
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/MicrophoneButton/MicrophoneButton.d.ts +1 -0
- package/dist/components/PositionDrawer/PositionDrawer.d.ts +1 -0
- package/dist/components/PoweredBy/PoweredBy.d.ts +1 -0
- package/dist/components/SettingsDrawer/SettingsDrawer.d.ts +1 -0
- package/dist/components/SignupForm/SignupForm.d.ts +1 -0
- package/dist/components/Snippet/Snippet.d.ts +1 -0
- package/dist/components/StartPanel/StartPanel.css +20 -21
- package/dist/components/StartPanel/StartPanel.js.map +1 -1
- package/dist/components/Typing/Typing.d.ts +1 -0
- package/dist/components/VenueWidget/VenueWidget.css +7 -0
- package/dist/components/VenueWidget/VenueWidget.d.ts +1 -0
- package/dist/components/VenueWidget/VenueWidget.js +1 -1
- package/dist/components/VenueWidget/VenueWidget.js.map +1 -1
- package/dist/components/WhyThisAnswer/WhyThisAnswer.d.ts +1 -0
- package/dist/components/icons/AI.d.ts +1 -0
- package/dist/components/icons/Alert.d.ts +1 -0
- package/dist/components/icons/Bug.d.ts +1 -0
- package/dist/components/icons/Chat.d.ts +6 -0
- package/dist/components/icons/Chat.js +6 -0
- package/dist/components/icons/Chat.js.map +1 -0
- package/dist/components/icons/ChevronLeft.d.ts +1 -0
- package/dist/components/icons/ChevronRight.d.ts +1 -0
- package/dist/components/icons/Clear.d.ts +1 -0
- package/dist/components/icons/Close.d.ts +1 -0
- package/dist/components/icons/Code.d.ts +1 -0
- package/dist/components/icons/Copy.d.ts +1 -0
- package/dist/components/icons/DeepThought.d.ts +1 -0
- package/dist/components/icons/Delete.d.ts +1 -0
- package/dist/components/icons/Download.d.ts +1 -0
- package/dist/components/icons/Edit.d.ts +1 -0
- package/dist/components/icons/Expand.d.ts +1 -0
- package/dist/components/icons/Eye.d.ts +1 -0
- package/dist/components/icons/EyeInvisible.d.ts +1 -0
- package/dist/components/icons/Facebook.d.ts +1 -0
- package/dist/components/icons/Feedback.d.ts +1 -0
- package/dist/components/icons/File.d.ts +1 -0
- package/dist/components/icons/FileExcel.d.ts +1 -0
- package/dist/components/icons/FilePdf.d.ts +1 -0
- package/dist/components/icons/FileWord.d.ts +1 -0
- package/dist/components/icons/Fullscreen.d.ts +1 -0
- package/dist/components/icons/FullscreenExit.d.ts +1 -0
- package/dist/components/icons/Group.d.ts +1 -0
- package/dist/components/icons/History.d.ts +7 -0
- package/dist/components/icons/History.js +6 -0
- package/dist/components/icons/History.js.map +1 -0
- package/dist/components/icons/Info.d.ts +1 -0
- package/dist/components/icons/Link.d.ts +1 -0
- package/dist/components/icons/Linkedin.d.ts +1 -0
- package/dist/components/icons/Loading.d.ts +1 -0
- package/dist/components/icons/Mail.d.ts +1 -0
- package/dist/components/icons/MapMarker.d.ts +1 -0
- package/dist/components/icons/Message.d.ts +1 -0
- package/dist/components/icons/Microphone.d.ts +1 -0
- package/dist/components/icons/Minus.d.ts +1 -0
- package/dist/components/icons/MinusCircle.d.ts +1 -0
- package/dist/components/icons/PaperClip.d.ts +1 -0
- package/dist/components/icons/Picture.d.ts +1 -0
- package/dist/components/icons/Plus.d.ts +1 -0
- package/dist/components/icons/QuestionHelp.d.ts +1 -0
- package/dist/components/icons/Refresh.d.ts +1 -0
- package/dist/components/icons/SelectIcon.d.ts +1 -0
- package/dist/components/icons/Send.d.ts +1 -0
- package/dist/components/icons/Setting.d.ts +1 -0
- package/dist/components/icons/Share.d.ts +1 -0
- package/dist/components/icons/Sound.d.ts +1 -0
- package/dist/components/icons/SoundDeactivated.d.ts +1 -0
- package/dist/components/icons/Telegram.d.ts +1 -0
- package/dist/components/icons/ThumbDown.d.ts +1 -0
- package/dist/components/icons/ThumbUp.d.ts +1 -0
- package/dist/components/icons/Translation.d.ts +1 -0
- package/dist/components/icons/Twitter.d.ts +1 -0
- package/dist/components/icons/User.d.ts +1 -0
- package/dist/components/icons/Warning.d.ts +1 -0
- package/dist/components/icons/WhatsApp.d.ts +1 -0
- package/dist/components/ui/Card.css +4 -0
- package/dist/components/ui/Card.js +3 -2
- package/dist/components/ui/Card.js.map +1 -1
- package/dist/components/ui/Select.d.ts +1 -0
- package/dist/helpers/message.js +1 -4
- package/dist/helpers/message.js.map +1 -1
- package/dist/helpers/utils.d.ts +1 -0
- package/dist/helpers/utils.js +18 -1
- package/dist/helpers/utils.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/locales/de.json +11 -1
- package/dist/locales/en.json +11 -1
- package/dist/locales/es.json +11 -1
- package/dist/locales/fr.json +14 -2
- package/dist/locales/it.json +11 -1
- package/dist/styles.css +1 -0
- package/esm/components/AccountForm/AccountForm.d.ts +1 -0
- package/esm/components/AgeVerificationModal/AgeVerificationModal.d.ts +1 -0
- package/esm/components/AttachmentLinkModal/AttachmentLinkModal.d.ts +1 -0
- package/esm/components/Auth/Auth.d.ts +1 -0
- package/esm/components/Avatar/AvatarView/AvatarComponent/Shadow/DynamicShadow.d.ts +1 -0
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/fullbodyAvatar.d.ts +1 -0
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.d.ts +38 -0
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js +177 -0
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js.map +1 -0
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.d.ts +1 -0
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/loader.d.ts +1 -0
- package/esm/components/Blob/Blob.d.ts +1 -0
- package/esm/components/BlockedMemoriBadge/BlockedMemoriBadge.d.ts +1 -0
- package/esm/components/Chat/Chat.d.ts +1 -0
- package/esm/components/Chat/Chat.js +5 -3
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatBubble/VirtualizedContent/VirtualizedContent.d.ts +7 -0
- package/esm/components/ChatBubble/VirtualizedContent/VirtualizedContent.js +67 -0
- package/esm/components/ChatBubble/VirtualizedContent/VirtualizedContent.js.map +1 -0
- package/esm/components/ChatHistoryDrawer/ChatHistory.css +321 -0
- package/esm/components/ChatHistoryDrawer/ChatHistory.d.ts +15 -0
- package/esm/components/ChatHistoryDrawer/ChatHistory.js +106 -0
- package/esm/components/ChatHistoryDrawer/ChatHistory.js.map +1 -0
- package/esm/components/CompletionProviderStatus/CompletionProviderStatus.d.ts +1 -0
- package/esm/components/CustomGLBModelViewer/ModelViewer.d.ts +1 -0
- package/esm/components/ExpertsDrawer/ExpertsDrawer.d.ts +1 -0
- package/esm/components/FeedbackButtons/FeedbackButtons.d.ts +1 -0
- package/esm/components/FilePreview/FilePreview.d.ts +1 -0
- package/esm/components/Header/Header.d.ts +2 -0
- package/esm/components/Header/Header.js +4 -3
- package/esm/components/Header/Header.js.map +1 -1
- package/esm/components/KnownFacts/KnownFacts.d.ts +1 -0
- package/esm/components/LoginDrawer/LoginDrawer.d.ts +1 -0
- package/esm/components/MemoriWidget/MemoriWidget.d.ts +2 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +173 -21
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/MicrophoneButton/MicrophoneButton.d.ts +1 -0
- package/esm/components/PositionDrawer/PositionDrawer.d.ts +1 -0
- package/esm/components/PoweredBy/PoweredBy.d.ts +1 -0
- package/esm/components/SettingsDrawer/SettingsDrawer.d.ts +1 -0
- package/esm/components/SignupForm/SignupForm.d.ts +1 -0
- package/esm/components/Snippet/Snippet.d.ts +1 -0
- package/esm/components/StartPanel/StartPanel.css +20 -21
- package/esm/components/StartPanel/StartPanel.js.map +1 -1
- package/esm/components/Typing/Typing.d.ts +1 -0
- package/esm/components/VenueWidget/VenueWidget.css +7 -0
- package/esm/components/VenueWidget/VenueWidget.d.ts +1 -0
- package/esm/components/VenueWidget/VenueWidget.js +1 -1
- package/esm/components/VenueWidget/VenueWidget.js.map +1 -1
- package/esm/components/WhyThisAnswer/WhyThisAnswer.d.ts +1 -0
- package/esm/components/icons/AI.d.ts +1 -0
- package/esm/components/icons/Alert.d.ts +1 -0
- package/esm/components/icons/Bug.d.ts +1 -0
- package/esm/components/icons/Chat.d.ts +6 -0
- package/esm/components/icons/Chat.js +4 -0
- package/esm/components/icons/Chat.js.map +1 -0
- package/esm/components/icons/ChevronLeft.d.ts +1 -0
- package/esm/components/icons/ChevronRight.d.ts +1 -0
- package/esm/components/icons/Clear.d.ts +1 -0
- package/esm/components/icons/Close.d.ts +1 -0
- package/esm/components/icons/Code.d.ts +1 -0
- package/esm/components/icons/Copy.d.ts +1 -0
- package/esm/components/icons/DeepThought.d.ts +1 -0
- package/esm/components/icons/Delete.d.ts +1 -0
- package/esm/components/icons/Download.d.ts +1 -0
- package/esm/components/icons/Edit.d.ts +1 -0
- package/esm/components/icons/Expand.d.ts +1 -0
- package/esm/components/icons/Eye.d.ts +1 -0
- package/esm/components/icons/EyeInvisible.d.ts +1 -0
- package/esm/components/icons/Facebook.d.ts +1 -0
- package/esm/components/icons/Feedback.d.ts +1 -0
- package/esm/components/icons/File.d.ts +1 -0
- package/esm/components/icons/FileExcel.d.ts +1 -0
- package/esm/components/icons/FilePdf.d.ts +1 -0
- package/esm/components/icons/FileWord.d.ts +1 -0
- package/esm/components/icons/Fullscreen.d.ts +1 -0
- package/esm/components/icons/FullscreenExit.d.ts +1 -0
- package/esm/components/icons/Group.d.ts +1 -0
- package/esm/components/icons/History.d.ts +7 -0
- package/esm/components/icons/History.js +4 -0
- package/esm/components/icons/History.js.map +1 -0
- package/esm/components/icons/Info.d.ts +1 -0
- package/esm/components/icons/Link.d.ts +1 -0
- package/esm/components/icons/Linkedin.d.ts +1 -0
- package/esm/components/icons/Loading.d.ts +1 -0
- package/esm/components/icons/Mail.d.ts +1 -0
- package/esm/components/icons/MapMarker.d.ts +1 -0
- package/esm/components/icons/Message.d.ts +1 -0
- package/esm/components/icons/Microphone.d.ts +1 -0
- package/esm/components/icons/Minus.d.ts +1 -0
- package/esm/components/icons/MinusCircle.d.ts +1 -0
- package/esm/components/icons/PaperClip.d.ts +1 -0
- package/esm/components/icons/Picture.d.ts +1 -0
- package/esm/components/icons/Plus.d.ts +1 -0
- package/esm/components/icons/QuestionHelp.d.ts +1 -0
- package/esm/components/icons/Refresh.d.ts +1 -0
- package/esm/components/icons/SelectIcon.d.ts +1 -0
- package/esm/components/icons/Send.d.ts +1 -0
- package/esm/components/icons/Setting.d.ts +1 -0
- package/esm/components/icons/Share.d.ts +1 -0
- package/esm/components/icons/Sound.d.ts +1 -0
- package/esm/components/icons/SoundDeactivated.d.ts +1 -0
- package/esm/components/icons/Telegram.d.ts +1 -0
- package/esm/components/icons/ThumbDown.d.ts +1 -0
- package/esm/components/icons/ThumbUp.d.ts +1 -0
- package/esm/components/icons/Translation.d.ts +1 -0
- package/esm/components/icons/Twitter.d.ts +1 -0
- package/esm/components/icons/User.d.ts +1 -0
- package/esm/components/icons/Warning.d.ts +1 -0
- package/esm/components/icons/WhatsApp.d.ts +1 -0
- package/esm/components/ui/Card.css +4 -0
- package/esm/components/ui/Card.js +3 -2
- package/esm/components/ui/Card.js.map +1 -1
- package/esm/components/ui/Select.d.ts +1 -0
- package/esm/helpers/message.js +1 -4
- package/esm/helpers/message.js.map +1 -1
- package/esm/helpers/utils.d.ts +1 -0
- package/esm/helpers/utils.js +16 -0
- package/esm/helpers/utils.js.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -2
- package/esm/index.js.map +1 -1
- package/esm/locales/de.json +11 -1
- package/esm/locales/en.json +11 -1
- package/esm/locales/es.json +11 -1
- package/esm/locales/fr.json +14 -2
- package/esm/locales/it.json +11 -1
- package/esm/styles.css +1 -0
- package/package.json +1 -1
- package/src/components/Chat/Chat.tsx +5 -2
- package/src/components/ChatHistoryDrawer/ChatHistory.css +321 -0
- package/src/components/ChatHistoryDrawer/ChatHistory.stories.tsx +290 -0
- package/src/components/ChatHistoryDrawer/ChatHistory.test.tsx +91 -0
- package/src/components/ChatHistoryDrawer/ChatHistory.tsx +369 -0
- package/src/components/ChatHistoryDrawer/__snapshots__/ChatHistory.test.tsx.snap +27 -0
- package/src/components/Header/Header.test.tsx +16 -1
- package/src/components/Header/Header.tsx +20 -0
- package/src/components/Header/__snapshots__/Header.test.tsx.snap +140 -0
- package/src/components/MemoriWidget/MemoriWidget.tsx +249 -16
- package/src/components/StartPanel/StartPanel.css +20 -21
- package/src/components/StartPanel/StartPanel.tsx +1 -0
- package/src/components/VenueWidget/VenueWidget.css +7 -0
- package/src/components/VenueWidget/VenueWidget.tsx +4 -4
- package/src/components/icons/Chat.tsx +30 -0
- package/src/components/icons/History.tsx +33 -0
- package/src/components/ui/Card.css +4 -0
- package/src/components/ui/Card.tsx +2 -1
- package/src/helpers/message.ts +0 -2
- package/src/helpers/utils.ts +23 -0
- package/src/index.stories.tsx +36 -9
- package/src/index.tsx +3 -0
- package/src/locales/de.json +11 -1
- package/src/locales/en.json +11 -1
- package/src/locales/es.json +11 -1
- package/src/locales/fr.json +14 -2
- package/src/locales/it.json +11 -1
- 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
|
|
@@ -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>}
|
package/src/helpers/message.ts
CHANGED
package/src/helpers/utils.ts
CHANGED
|
@@ -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 => {
|
package/src/index.stories.tsx
CHANGED
|
@@ -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: '
|
|
121
|
-
ownerUserName: '
|
|
122
|
-
memoriID: '
|
|
123
|
-
ownerUserID: '
|
|
124
|
-
tenantID: '
|
|
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: '
|
|
129
|
-
|
|
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
|
-
|
|
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}
|
package/src/locales/de.json
CHANGED
|
@@ -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 "{{searchText}}"",
|
|
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",
|
package/src/locales/en.json
CHANGED
|
@@ -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 "{{searchText}}"",
|
|
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",
|
package/src/locales/es.json
CHANGED
|
@@ -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 "{{searchText}}"",
|
|
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",
|
package/src/locales/fr.json
CHANGED
|
@@ -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 "{{searchText}}""
|
|
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",
|
package/src/locales/it.json
CHANGED
|
@@ -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 "{{searchText}}"",
|
|
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');
|