@memori.ai/memori-react 8.45.1 → 8.45.4
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 +27 -0
- package/dist/components/Chat/Chat.js +4 -1
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +4 -1
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js +7 -57
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.d.ts +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +2 -1
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/PositionPopover/PositionPopover.js +38 -25
- package/dist/components/PositionPopover/PositionPopover.js.map +1 -1
- package/dist/components/UploadButton/UploadButton.js +3 -0
- package/dist/components/UploadButton/UploadButton.js.map +1 -1
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js +14 -2
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/dist/components/layouts/chat.css +27 -4
- package/dist/context/widgetSurfaceContext.js +2 -2
- package/dist/context/widgetSurfaceContext.js.map +1 -1
- package/dist/helpers/constants.d.ts +3 -2
- package/dist/helpers/constants.js +19 -20
- package/dist/helpers/constants.js.map +1 -1
- package/dist/helpers/positionPopover.d.ts +2 -1
- package/dist/helpers/positionPopover.js +12 -3
- package/dist/helpers/positionPopover.js.map +1 -1
- package/dist/helpers/tts/muteSpeaker.js +4 -3
- package/dist/helpers/tts/muteSpeaker.js.map +1 -1
- package/dist/helpers/usePressTooltip.js +2 -1
- package/dist/helpers/usePressTooltip.js.map +1 -1
- package/dist/helpers/utils.d.ts +2 -1
- package/dist/helpers/utils.js +7 -1
- package/dist/helpers/utils.js.map +1 -1
- package/dist/icons/MemoriIcon.js +1 -1
- package/dist/icons/MemoriIcon.js.map +1 -1
- package/dist/styles.css +1 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/components/Chat/Chat.js +4 -1
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.d.ts +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +2 -1
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/UploadButton/UploadButton.js +4 -1
- package/esm/components/UploadButton/UploadButton.js.map +1 -1
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js +16 -4
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/esm/components/layouts/chat.css +27 -4
- package/esm/helpers/constants.d.ts +3 -2
- package/esm/helpers/constants.js +18 -19
- package/esm/helpers/constants.js.map +1 -1
- package/esm/helpers/utils.d.ts +2 -1
- package/esm/helpers/utils.js +6 -1
- package/esm/helpers/utils.js.map +1 -1
- package/esm/styles.css +1 -2
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +6 -7
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.d.ts +0 -3
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.js +0 -64
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.js.map +0 -1
- package/dist/testUtils.d.ts +0 -5
- package/dist/testUtils.js +0 -18
- package/dist/testUtils.js.map +0 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.d.ts +0 -3
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.js +0 -62
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.js.map +0 -1
- package/src/I18nWrapper.tsx +0 -13
- package/src/__snapshots__/index.test.tsx.snap +0 -96
- package/src/components/AgeVerificationModal/AgeVerificationModal.css +0 -95
- package/src/components/AgeVerificationModal/AgeVerificationModal.stories.tsx +0 -46
- package/src/components/AgeVerificationModal/AgeVerificationModal.test.tsx +0 -33
- package/src/components/AgeVerificationModal/AgeVerificationModal.tsx +0 -99
- package/src/components/AgeVerificationModal/__snapshots__/AgeVerificationModal.test.tsx.snap +0 -19
- package/src/components/Auth/Auth.css +0 -57
- package/src/components/Auth/Auth.stories.tsx +0 -90
- package/src/components/Auth/Auth.test.tsx +0 -63
- package/src/components/Auth/Auth.tsx +0 -201
- package/src/components/Auth/__snapshots__/Auth.test.tsx.snap +0 -143
- package/src/components/Avatar/Avatar.css +0 -151
- package/src/components/Avatar/Avatar.stories.tsx +0 -160
- package/src/components/Avatar/Avatar.test.tsx +0 -158
- package/src/components/Avatar/Avatar.tsx +0 -245
- package/src/components/Avatar/AvatarView/AvatarComponent/Shadow/DynamicShadow.tsx +0 -103
- package/src/components/Avatar/AvatarView/AvatarComponent/avatarComponent.tsx +0 -105
- package/src/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/fullbodyAvatar.tsx +0 -338
- package/src/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/types.ts +0 -44
- package/src/components/Avatar/AvatarView/AvatarComponent/components/controllers/AvatarAnimator.ts +0 -1091
- package/src/components/Avatar/AvatarView/AvatarComponent/components/controllers/AvatarPositionController.ts +0 -83
- package/src/components/Avatar/AvatarView/AvatarComponent/components/controllers/MorphTargetController.ts +0 -301
- package/src/components/Avatar/AvatarView/AvatarComponent/components/controls.tsx +0 -100
- package/src/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.tsx +0 -152
- package/src/components/Avatar/AvatarView/AvatarComponent/components/loader.tsx +0 -31
- package/src/components/Avatar/AvatarView/AvatarComponent/constants.ts +0 -141
- package/src/components/Avatar/AvatarView/AvatarComponent/lights/Lights.tsx +0 -145
- package/src/components/Avatar/AvatarView/AvatarComponent/positionControls/positionControls.css +0 -111
- package/src/components/Avatar/AvatarView/AvatarComponent/positionControls/positionControls.tsx +0 -201
- package/src/components/Avatar/AvatarView/AvatarView.stories.tsx +0 -254
- package/src/components/Avatar/AvatarView/index.tsx +0 -194
- package/src/components/Avatar/AvatarView/utils/hideHands.ts +0 -11
- package/src/components/Avatar/AvatarView/utils/useEyeBlink.ts +0 -100
- package/src/components/Avatar/AvatarView/utils/useHeadMovement.ts +0 -72
- package/src/components/Avatar/AvatarView/utils/useLoadingMorphAnim.ts +0 -38
- package/src/components/Avatar/AvatarView/utils/useMouthAnimation.ts +0 -93
- package/src/components/Avatar/AvatarView/utils/useSmile.ts +0 -39
- package/src/components/Avatar/AvatarView/utils/utils.ts +0 -55
- package/src/components/Avatar/__snapshots__/Avatar.test.tsx.snap +0 -246
- package/src/components/Blob/Blob.css +0 -286
- package/src/components/Blob/Blob.stories.tsx +0 -53
- package/src/components/Blob/Blob.test.tsx +0 -18
- package/src/components/Blob/Blob.tsx +0 -26
- package/src/components/Blob/__snapshots__/Blob.test.tsx.snap +0 -80
- package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.css +0 -40
- package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.stories.tsx +0 -58
- package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.test.tsx +0 -53
- package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.tsx +0 -74
- package/src/components/BlockedMemoriBadge/__snapshots__/BlockedMemoriBadge.test.tsx.snap +0 -181
- package/src/components/ChangeMode/ChangeMode.css +0 -22
- package/src/components/ChangeMode/ChangeMode.stories.tsx +0 -50
- package/src/components/ChangeMode/ChangeMode.test.tsx +0 -24
- package/src/components/ChangeMode/ChangeMode.tsx +0 -51
- package/src/components/ChangeMode/__snapshots__/ChangeMode.test.tsx.snap +0 -107
- package/src/components/Chat/Chat.css +0 -285
- package/src/components/Chat/Chat.stories.tsx +0 -1684
- package/src/components/Chat/Chat.test.tsx +0 -372
- package/src/components/Chat/Chat.tsx +0 -778
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +0 -6816
- package/src/components/ChatBubble/ChatBubble.css +0 -430
- package/src/components/ChatBubble/ChatBubble.stories.tsx +0 -1192
- package/src/components/ChatBubble/ChatBubble.test.tsx +0 -481
- package/src/components/ChatBubble/ChatBubble.tsx +0 -776
- package/src/components/ChatBubble/__snapshots__/ChatBubble.test.tsx.snap +0 -8734
- package/src/components/ChatHistoryDrawer/ChatHistory.css +0 -587
- package/src/components/ChatHistoryDrawer/ChatHistory.stories.tsx +0 -410
- package/src/components/ChatHistoryDrawer/ChatHistory.test.tsx +0 -107
- package/src/components/ChatHistoryDrawer/ChatHistory.tsx +0 -1298
- package/src/components/ChatHistoryDrawer/__snapshots__/ChatHistory.test.tsx.snap +0 -27
- package/src/components/ChatInputs/ChatInputs.css +0 -340
- package/src/components/ChatInputs/ChatInputs.stories.tsx +0 -251
- package/src/components/ChatInputs/ChatInputs.tsx +0 -487
- package/src/components/ChatTextArea/ChatTextArea.css +0 -185
- package/src/components/ChatTextArea/ChatTextArea.stories.tsx +0 -55
- package/src/components/ChatTextArea/ChatTextArea.test.tsx +0 -28
- package/src/components/ChatTextArea/ChatTextArea.tsx +0 -171
- package/src/components/ChatTextArea/__snapshots__/ChatTextArea.test.tsx.snap +0 -68
- package/src/components/CompletionProviderStatus/CompletionProviderStatus.css +0 -36
- package/src/components/CompletionProviderStatus/CompletionProviderStatus.stories.tsx +0 -296
- package/src/components/CompletionProviderStatus/CompletionProviderStatus.test.tsx +0 -31
- package/src/components/CompletionProviderStatus/CompletionProviderStatus.tsx +0 -232
- package/src/components/CompletionProviderStatus/__snapshots__/CompletionProviderStatus.test.tsx.snap +0 -96
- package/src/components/ContentPreviewModal/ContentPreviewModal.css +0 -128
- package/src/components/ContentPreviewModal/ContentPreviewModal.tsx +0 -67
- package/src/components/ContentPreviewModal/index.ts +0 -2
- package/src/components/CustomGLBModelViewer/ModelViewer.css +0 -11
- package/src/components/CustomGLBModelViewer/ModelViewer.stories.tsx +0 -58
- package/src/components/CustomGLBModelViewer/ModelViewer.test.tsx +0 -13
- package/src/components/CustomGLBModelViewer/ModelViewer.tsx +0 -37
- package/src/components/CustomGLBModelViewer/__snapshots__/ModelViewer.test.tsx.snap +0 -20
- package/src/components/DateSelector/DateSelector.css +0 -158
- package/src/components/DateSelector/DateSelector.stories.tsx +0 -47
- package/src/components/DateSelector/DateSelector.test.tsx +0 -149
- package/src/components/DateSelector/DateSelector.tsx +0 -251
- package/src/components/DateSelector/__snapshots__/DateSelector.test.tsx.snap +0 -1954
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +0 -54
- package/src/components/ExpertsDrawer/ExpertsDrawer.css +0 -67
- package/src/components/ExpertsDrawer/ExpertsDrawer.stories.tsx +0 -54
- package/src/components/ExpertsDrawer/ExpertsDrawer.test.tsx +0 -53
- package/src/components/ExpertsDrawer/ExpertsDrawer.tsx +0 -69
- package/src/components/ExpertsDrawer/__snapshots__/ExpertsDrawer.test.tsx.snap +0 -11
- package/src/components/ExportHistoryButton/ExportHistoryButton.css +0 -22
- package/src/components/FeedbackButtons/FeedbackButtons.css +0 -107
- package/src/components/FeedbackButtons/FeedbackButtons.stories.tsx +0 -52
- package/src/components/FeedbackButtons/FeedbackButtons.test.tsx +0 -11
- package/src/components/FeedbackButtons/FeedbackButtons.tsx +0 -152
- package/src/components/FeedbackButtons/__snapshots__/FeedbackButtons.test.tsx.snap +0 -42
- package/src/components/FilePreview/FilePreview.css +0 -358
- package/src/components/FilePreview/FilePreview.stories.tsx +0 -63
- package/src/components/FilePreview/FilePreview.test.tsx +0 -26
- package/src/components/FilePreview/FilePreview.tsx +0 -277
- package/src/components/FilePreview/__snapshots__/FilePreview.test.tsx.snap +0 -185
- package/src/components/Header/ChatConsumptionDropdown.test.tsx +0 -117
- package/src/components/Header/ChatConsumptionDropdown.tsx +0 -275
- package/src/components/Header/Header.css +0 -282
- package/src/components/Header/Header.stories.tsx +0 -338
- package/src/components/Header/Header.test.tsx +0 -371
- package/src/components/Header/Header.tsx +0 -442
- package/src/components/Header/__snapshots__/Header.test.tsx.snap +0 -964
- package/src/components/KnownFacts/KnownFacts.css +0 -19
- package/src/components/KnownFacts/KnownFacts.stories.tsx +0 -80
- package/src/components/KnownFacts/KnownFacts.test.tsx +0 -57
- package/src/components/KnownFacts/KnownFacts.tsx +0 -376
- package/src/components/KnownFacts/__snapshots__/KnownFacts.test.tsx.snap +0 -19
- package/src/components/LoginDrawer/LoginDrawer.css +0 -1616
- package/src/components/LoginDrawer/LoginDrawer.stories.tsx +0 -102
- package/src/components/LoginDrawer/LoginDrawer.test.tsx +0 -199
- package/src/components/LoginDrawer/LoginDrawer.tsx +0 -600
- package/src/components/LoginDrawer/__snapshots__/LoginDrawer.test.tsx.snap +0 -91
- package/src/components/MediaWidget/DocumentCard.test.tsx +0 -45
- package/src/components/MediaWidget/DocumentCard.tsx +0 -19
- package/src/components/MediaWidget/MediaItemWidget.css +0 -1398
- package/src/components/MediaWidget/MediaItemWidget.stories.tsx +0 -423
- package/src/components/MediaWidget/MediaItemWidget.test.tsx +0 -248
- package/src/components/MediaWidget/MediaItemWidget.tsx +0 -997
- package/src/components/MediaWidget/MediaItemWidget.types.ts +0 -65
- package/src/components/MediaWidget/MediaItemWidget.utils.test.ts +0 -367
- package/src/components/MediaWidget/MediaItemWidget.utils.ts +0 -227
- package/src/components/MediaWidget/MediaPreviewModal.test.tsx +0 -271
- package/src/components/MediaWidget/MediaPreviewModal.tsx +0 -425
- package/src/components/MediaWidget/MediaWidget.css +0 -131
- package/src/components/MediaWidget/MediaWidget.stories.tsx +0 -319
- package/src/components/MediaWidget/MediaWidget.test.tsx +0 -41
- package/src/components/MediaWidget/MediaWidget.tsx +0 -107
- package/src/components/MediaWidget/__snapshots__/DocumentCard.test.tsx.snap +0 -24
- package/src/components/MediaWidget/__snapshots__/MediaItemWidget.test.tsx.snap +0 -791
- package/src/components/MediaWidget/__snapshots__/MediaWidget.test.tsx.snap +0 -154
- package/src/components/MemoriArtifactSystem/ArtifactDrawer.stories.tsx +0 -2299
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.css +0 -163
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.tsx +0 -250
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/CopyButton.stories.tsx +0 -30
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.tsx +0 -467
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.tsx +0 -89
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/hooks/useCopyArtifact.ts +0 -619
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/index.ts +0 -9
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/styles.css +0 -489
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.tsx +0 -90
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/types.ts +0 -73
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/utils/PDFExporter.ts +0 -454
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +0 -1059
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.tsx +0 -431
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/components/TabSwitch.css +0 -150
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/components/TabSwitch.tsx +0 -79
- package/src/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.css +0 -253
- package/src/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.tsx +0 -561
- package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +0 -355
- package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.tsx +0 -160
- package/src/components/MemoriArtifactSystem/context/ArtifactContext.tsx +0 -167
- package/src/components/MemoriArtifactSystem/types/artifact.types.ts +0 -35
- package/src/components/MemoriArtifactSystem/utils/ArtifactAPI.test.tsx +0 -308
- package/src/components/MemoriArtifactSystem/utils/ArtifactAPI.tsx +0 -379
- package/src/components/MemoriArtifactSystem/utils/applyEdits.test.ts +0 -85
- package/src/components/MemoriArtifactSystem/utils/applyEdits.ts +0 -173
- package/src/components/MemoriWidget/MemoriWidget.css +0 -220
- package/src/components/MemoriWidget/MemoriWidget.stories.tsx +0 -274
- package/src/components/MemoriWidget/MemoriWidget.tsx +0 -3930
- package/src/components/MicrophoneButton/MicrophoneButton.css +0 -142
- package/src/components/MicrophoneButton/MicrophoneButton.stories.tsx +0 -52
- package/src/components/MicrophoneButton/MicrophoneButton.tsx +0 -128
- package/src/components/PositionDrawer/PositionDrawer.stories.tsx +0 -51
- package/src/components/PositionDrawer/PositionDrawer.test.tsx +0 -39
- package/src/components/PositionDrawer/PositionDrawer.tsx +0 -50
- package/src/components/PositionDrawer/__snapshots__/PositionDrawer.test.tsx.snap +0 -17
- package/src/components/PoweredBy/PoweredBy.css +0 -47
- package/src/components/PoweredBy/PoweredBy.stories.tsx +0 -75
- package/src/components/PoweredBy/PoweredBy.test.tsx +0 -15
- package/src/components/PoweredBy/PoweredBy.tsx +0 -44
- package/src/components/PoweredBy/__snapshots__/PoweredBy.test.tsx.snap +0 -55
- package/src/components/SendOnEnterMenu/SendOnEnterMenu.css +0 -47
- package/src/components/SendOnEnterMenu/SendOnEnterMenu.stories.tsx +0 -58
- package/src/components/SendOnEnterMenu/SendOnEnterMenu.test.tsx +0 -17
- package/src/components/SendOnEnterMenu/SendOnEnterMenu.tsx +0 -82
- package/src/components/SendOnEnterMenu/__snapshots__/SendOnEnterMenu.test.tsx.snap +0 -57
- package/src/components/SettingsDrawer/SettingsDrawer.css +0 -24
- package/src/components/SettingsDrawer/SettingsDrawer.stories.tsx +0 -94
- package/src/components/SettingsDrawer/SettingsDrawer.test.tsx +0 -202
- package/src/components/SettingsDrawer/SettingsDrawer.tsx +0 -255
- package/src/components/SettingsDrawer/__snapshots__/SettingsDrawer.test.tsx.snap +0 -59
- package/src/components/ShareButton/ShareButton.css +0 -73
- package/src/components/ShareButton/ShareButton.stories.tsx +0 -98
- package/src/components/ShareButton/ShareButton.test.tsx +0 -53
- package/src/components/ShareButton/ShareButton.tsx +0 -395
- package/src/components/ShareButton/__snapshots__/ShareButton.test.tsx.snap +0 -316
- package/src/components/Snippet/Snippet.css +0 -142
- package/src/components/Snippet/Snippet.stories.tsx +0 -286
- package/src/components/Snippet/Snippet.test.tsx +0 -176
- package/src/components/Snippet/Snippet.tsx +0 -148
- package/src/components/Snippet/__snapshots__/Snippet.test.tsx.snap +0 -603
- package/src/components/StartPanel/StartPanel.css +0 -273
- package/src/components/StartPanel/StartPanel.stories.tsx +0 -404
- package/src/components/StartPanel/StartPanel.test.tsx +0 -360
- package/src/components/StartPanel/StartPanel.tsx +0 -426
- package/src/components/StartPanel/__snapshots__/StartPanel.test.tsx.snap +0 -1986
- package/src/components/Typing/Typing.stories.tsx +0 -130
- package/src/components/Typing/Typing.test.tsx +0 -62
- package/src/components/Typing/Typing.tsx +0 -154
- package/src/components/Typing/__snapshots__/Typing.test.tsx.snap +0 -133
- package/src/components/UploadButton/UploadButton.css +0 -542
- package/src/components/UploadButton/UploadButton.stories.tsx +0 -376
- package/src/components/UploadButton/UploadButton.test.tsx +0 -11
- package/src/components/UploadButton/UploadButton.tsx +0 -684
- package/src/components/UploadButton/UploadDocuments/UploadDocuments.tsx +0 -405
- package/src/components/UploadButton/UploadImages/UploadImages.tsx +0 -538
- package/src/components/UploadButton/__snapshots__/UploadButton.test.tsx.snap +0 -165
- package/src/components/VenueWidget/VenueWidget.css +0 -163
- package/src/components/VenueWidget/VenueWidget.stories.tsx +0 -66
- package/src/components/VenueWidget/VenueWidget.test.tsx +0 -49
- package/src/components/VenueWidget/VenueWidget.tsx +0 -458
- package/src/components/VenueWidget/__snapshots__/VenueWidget.test.tsx.snap +0 -370
- package/src/components/WhyThisAnswer/WhyThisAnswer.css +0 -171
- package/src/components/WhyThisAnswer/WhyThisAnswer.stories.tsx +0 -285
- package/src/components/WhyThisAnswer/WhyThisAnswer.test.tsx +0 -245
- package/src/components/WhyThisAnswer/WhyThisAnswer.tsx +0 -233
- package/src/components/WhyThisAnswer/__snapshots__/WhyThisAnswer.test.tsx.snap +0 -27
- package/src/components/icons/AI.tsx +0 -34
- package/src/components/icons/Alert.tsx +0 -31
- package/src/components/icons/ArrowUp.tsx +0 -28
- package/src/components/icons/Bug.tsx +0 -81
- package/src/components/icons/Chat.tsx +0 -30
- package/src/components/icons/ChevronDown.tsx +0 -26
- package/src/components/icons/ChevronLeft.tsx +0 -28
- package/src/components/icons/ChevronRight.tsx +0 -28
- package/src/components/icons/ChevronUp.tsx +0 -24
- package/src/components/icons/Clear.tsx +0 -23
- package/src/components/icons/Close.tsx +0 -30
- package/src/components/icons/Code.tsx +0 -24
- package/src/components/icons/Copy.tsx +0 -23
- package/src/components/icons/DeepThought.tsx +0 -38
- package/src/components/icons/Delete.tsx +0 -23
- package/src/components/icons/Document.tsx +0 -50
- package/src/components/icons/Download.tsx +0 -23
- package/src/components/icons/Edit.tsx +0 -17
- package/src/components/icons/Expand.tsx +0 -23
- package/src/components/icons/Eye.tsx +0 -17
- package/src/components/icons/EyeInvisible.tsx +0 -24
- package/src/components/icons/Facebook.tsx +0 -23
- package/src/components/icons/Feedback.tsx +0 -24
- package/src/components/icons/File.tsx +0 -17
- package/src/components/icons/FileExcel.tsx +0 -23
- package/src/components/icons/FilePdf.tsx +0 -23
- package/src/components/icons/FileWord.tsx +0 -23
- package/src/components/icons/Fullscreen.tsx +0 -23
- package/src/components/icons/FullscreenExit.tsx +0 -23
- package/src/components/icons/GasStation.tsx +0 -36
- package/src/components/icons/Group.tsx +0 -30
- package/src/components/icons/History.tsx +0 -33
- package/src/components/icons/Image.tsx +0 -37
- package/src/components/icons/Info.tsx +0 -31
- package/src/components/icons/Link.tsx +0 -17
- package/src/components/icons/Linkedin.tsx +0 -23
- package/src/components/icons/Loading.tsx +0 -28
- package/src/components/icons/Logout.tsx +0 -27
- package/src/components/icons/Mail.tsx +0 -17
- package/src/components/icons/MapMarker.tsx +0 -26
- package/src/components/icons/MenuHorizontal.tsx +0 -29
- package/src/components/icons/MenuVertical.tsx +0 -29
- package/src/components/icons/Message.tsx +0 -23
- package/src/components/icons/Microphone.tsx +0 -23
- package/src/components/icons/Minus.tsx +0 -23
- package/src/components/icons/MinusCircle.tsx +0 -24
- package/src/components/icons/PaperClip.tsx +0 -23
- package/src/components/icons/Picture.tsx +0 -23
- package/src/components/icons/Plus.tsx +0 -18
- package/src/components/icons/Preview.tsx +0 -29
- package/src/components/icons/Print.tsx +0 -38
- package/src/components/icons/QuestionHelp.tsx +0 -30
- package/src/components/icons/Refresh.tsx +0 -30
- package/src/components/icons/SelectIcon.tsx +0 -28
- package/src/components/icons/Send.tsx +0 -17
- package/src/components/icons/Setting.tsx +0 -23
- package/src/components/icons/Share.tsx +0 -23
- package/src/components/icons/Sound.tsx +0 -23
- package/src/components/icons/SoundDeactivated.tsx +0 -27
- package/src/components/icons/Telegram.tsx +0 -26
- package/src/components/icons/ThumbDown.tsx +0 -29
- package/src/components/icons/ThumbUp.tsx +0 -29
- package/src/components/icons/Translation.tsx +0 -24
- package/src/components/icons/Twitter.tsx +0 -23
- package/src/components/icons/Upload.tsx +0 -34
- package/src/components/icons/User.tsx +0 -17
- package/src/components/icons/Warning.tsx +0 -24
- package/src/components/icons/WhatsApp.tsx +0 -24
- package/src/components/icons/icons.stories.css +0 -5
- package/src/components/icons/icons.stories.tsx +0 -81
- package/src/components/icons/loading.css +0 -14
- package/src/components/layouts/Chat.test.tsx +0 -40
- package/src/components/layouts/Chat.tsx +0 -69
- package/src/components/layouts/FullBody/FullBody.stories.tsx +0 -110
- package/src/components/layouts/FullPage.test.tsx +0 -65
- package/src/components/layouts/FullPage.tsx +0 -80
- package/src/components/layouts/HiddenChat.test.tsx +0 -40
- package/src/components/layouts/HiddenChat.tsx +0 -233
- package/src/components/layouts/Totem/Totem.stories.tsx +0 -131
- package/src/components/layouts/Totem.test.tsx +0 -40
- package/src/components/layouts/Totem.tsx +0 -49
- package/src/components/layouts/WebsiteAssistant.test.tsx +0 -40
- package/src/components/layouts/WebsiteAssistant.tsx +0 -132
- package/src/components/layouts/ZoomedFullBody/ZoomedFullBody.stories.tsx +0 -131
- package/src/components/layouts/ZoomedFullBody.test.tsx +0 -40
- package/src/components/layouts/ZoomedFullBody.tsx +0 -81
- package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +0 -457
- package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +0 -1045
- package/src/components/layouts/__snapshots__/HiddenChat.test.tsx.snap +0 -460
- package/src/components/layouts/__snapshots__/Totem.test.tsx.snap +0 -566
- package/src/components/layouts/__snapshots__/WebsiteAssistant.test.tsx.snap +0 -59
- package/src/components/layouts/__snapshots__/ZoomedFullBody.test.tsx.snap +0 -523
- package/src/components/layouts/chat.css +0 -451
- package/src/components/layouts/hidden-chat.css +0 -276
- package/src/components/layouts/layouts.stories.tsx +0 -231
- package/src/components/layouts/totem.css +0 -221
- package/src/components/layouts/website-assistant.css +0 -677
- package/src/components/layouts/zoomed-full-body.css +0 -18
- package/src/components/ui/Alert.css +0 -93
- package/src/components/ui/Alert.stories.tsx +0 -137
- package/src/components/ui/Alert.test.tsx +0 -129
- package/src/components/ui/Alert.tsx +0 -123
- package/src/components/ui/Button.css +0 -167
- package/src/components/ui/Button.stories.tsx +0 -156
- package/src/components/ui/Button.test.tsx +0 -74
- package/src/components/ui/Button.tsx +0 -107
- package/src/components/ui/Card.css +0 -65
- package/src/components/ui/Card.stories.tsx +0 -95
- package/src/components/ui/Card.test.tsx +0 -47
- package/src/components/ui/Card.tsx +0 -48
- package/src/components/ui/Checkbox.css +0 -116
- package/src/components/ui/Checkbox.stories.tsx +0 -74
- package/src/components/ui/Checkbox.test.tsx +0 -28
- package/src/components/ui/Checkbox.tsx +0 -58
- package/src/components/ui/ConfirmDialog.css +0 -42
- package/src/components/ui/ConfirmDialog.stories.tsx +0 -216
- package/src/components/ui/ConfirmDialog.test.tsx +0 -124
- package/src/components/ui/ConfirmDialog.tsx +0 -58
- package/src/components/ui/Details.css +0 -66
- package/src/components/ui/Drawer.css +0 -270
- package/src/components/ui/Drawer.stories.tsx +0 -267
- package/src/components/ui/Drawer.test.tsx +0 -130
- package/src/components/ui/Drawer.tsx +0 -293
- package/src/components/ui/Dropdown.css +0 -173
- package/src/components/ui/Dropdown.tsx +0 -63
- package/src/components/ui/Expandable.css +0 -15
- package/src/components/ui/Expandable.stories.tsx +0 -180
- package/src/components/ui/Expandable.test.tsx +0 -107
- package/src/components/ui/Expandable.tsx +0 -121
- package/src/components/ui/Modal.css +0 -98
- package/src/components/ui/Modal.stories.tsx +0 -171
- package/src/components/ui/Modal.test.tsx +0 -111
- package/src/components/ui/Modal.tsx +0 -117
- package/src/components/ui/Select.css +0 -138
- package/src/components/ui/Select.stories.tsx +0 -79
- package/src/components/ui/Select.test.tsx +0 -84
- package/src/components/ui/Select.tsx +0 -79
- package/src/components/ui/Slider.css +0 -192
- package/src/components/ui/Slider.stories.tsx +0 -63
- package/src/components/ui/Slider.tsx +0 -142
- package/src/components/ui/Spin.css +0 -31
- package/src/components/ui/Spin.stories.tsx +0 -64
- package/src/components/ui/Spin.test.tsx +0 -41
- package/src/components/ui/Spin.tsx +0 -31
- package/src/components/ui/Table.css +0 -132
- package/src/components/ui/Tooltip.css +0 -171
- package/src/components/ui/Tooltip.stories.tsx +0 -109
- package/src/components/ui/Tooltip.test.tsx +0 -102
- package/src/components/ui/Tooltip.tsx +0 -163
- package/src/components/ui/__snapshots__/Alert.test.tsx.snap +0 -59
- package/src/components/ui/__snapshots__/Button.test.tsx.snap +0 -204
- package/src/components/ui/__snapshots__/Card.test.tsx.snap +0 -321
- package/src/components/ui/__snapshots__/Checkbox.test.tsx.snap +0 -131
- package/src/components/ui/__snapshots__/ConfirmDialog.test.tsx.snap +0 -35
- package/src/components/ui/__snapshots__/Drawer.test.tsx.snap +0 -67
- package/src/components/ui/__snapshots__/Expandable.test.tsx.snap +0 -159
- package/src/components/ui/__snapshots__/Modal.test.tsx.snap +0 -59
- package/src/components/ui/__snapshots__/Select.test.tsx.snap +0 -254
- package/src/components/ui/__snapshots__/Spin.test.tsx.snap +0 -193
- package/src/components/ui/__snapshots__/Tooltip.test.tsx.snap +0 -113
- package/src/components/ui/definitions.stories.tsx +0 -139
- package/src/context/visemeContext.tsx +0 -384
- package/src/helpers/chatPdfExport.ts +0 -544
- package/src/helpers/configuration.ts +0 -42
- package/src/helpers/constants.ts +0 -267
- package/src/helpers/convertDocument.test.ts +0 -67
- package/src/helpers/convertDocument.ts +0 -35
- package/src/helpers/credits.ts +0 -54
- package/src/helpers/error.test.ts +0 -29
- package/src/helpers/error.ts +0 -278
- package/src/helpers/imageCompression.ts +0 -230
- package/src/helpers/llmUsage.ts +0 -328
- package/src/helpers/markedExtendedTables.js +0 -217
- package/src/helpers/media.test.ts +0 -169
- package/src/helpers/media.ts +0 -81
- package/src/helpers/message.test.ts +0 -126
- package/src/helpers/message.ts +0 -219
- package/src/helpers/nats/getNatsConfig.ts +0 -148
- package/src/helpers/nats/isSessionExpiredError.test.ts +0 -38
- package/src/helpers/nats/isSessionExpiredError.ts +0 -51
- package/src/helpers/nats/useNats.test.tsx +0 -81
- package/src/helpers/nats/useNats.ts +0 -204
- package/src/helpers/nats/useNatsSession.test.ts +0 -16
- package/src/helpers/nats/useNatsSession.ts +0 -460
- package/src/helpers/piiDetection.test.ts +0 -186
- package/src/helpers/piiDetection.ts +0 -91
- package/src/helpers/sanitizer.ts +0 -17
- package/src/helpers/statistics.ts +0 -58
- package/src/helpers/stt/useSTT.ts +0 -515
- package/src/helpers/translations.ts +0 -39
- package/src/helpers/tts/ttsVoiceUtility.ts +0 -275
- package/src/helpers/tts/useTTS.ts +0 -621
- package/src/helpers/utils.test.ts +0 -321
- package/src/helpers/utils.ts +0 -586
- package/src/helpers/venue.ts +0 -36
- package/src/i18n.ts +0 -39
- package/src/index.stories.tsx +0 -220
- package/src/index.test.tsx +0 -156
- package/src/index.tsx +0 -592
- package/src/locales/de.json +0 -680
- package/src/locales/en.json +0 -754
- package/src/locales/es.json +0 -682
- package/src/locales/fr.json +0 -682
- package/src/locales/it.json +0 -750
- package/src/mocks/data.ts +0 -790
- package/src/styles.css +0 -126
- package/src/types/integration.test.ts +0 -32
- package/src/types/integration.ts +0 -31
- package/src/types/layout.ts +0 -50
- package/src/version.ts +0 -2
package/src/helpers/error.ts
DELETED
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
const errors = {
|
|
2
|
-
TENANT_NOT_FOUND: -1,
|
|
3
|
-
TENANT_REGISTRATION_DISABLED: -2,
|
|
4
|
-
TENANT_MISSING_NAME: -3,
|
|
5
|
-
TENANT_MAX_USERS_REACHED: -4,
|
|
6
|
-
TENANT_MAX_ADMINS_REACHED: -5,
|
|
7
|
-
TENANT_ALREADY_EXISTS: -6,
|
|
8
|
-
TENANT_MISSING_DESCRIPTION: -7,
|
|
9
|
-
TENANT_CANT_SET_COMPLETION_PROVIDER: -8,
|
|
10
|
-
TENANT_INVALID_TYPE: -9,
|
|
11
|
-
|
|
12
|
-
USER_NOT_CONFIRMED: -11,
|
|
13
|
-
USER_NOT_FOUND: -12,
|
|
14
|
-
USER_OR_PASSWORD_INVALID: -13,
|
|
15
|
-
USER_MUST_CHANGE_PASSWORD: -14,
|
|
16
|
-
USER_MUST_ENTER_VERIFICATION_CODE: -15,
|
|
17
|
-
|
|
18
|
-
USER_MISSING_TENANT: -21,
|
|
19
|
-
USER_MISSING_NAME: -22,
|
|
20
|
-
USER_MISSING_PASSWORD: -23,
|
|
21
|
-
USER_MISSING_EMAIL: -24,
|
|
22
|
-
USER_MISSING_VERIFICATION_CODE: -25,
|
|
23
|
-
USER_NAME_ALREADY_USED: -26,
|
|
24
|
-
USER_PASSWORD_NOT_CONFORMING_TO_POLICY: -27,
|
|
25
|
-
USER_EMAIL_ALREADY_USED: -28,
|
|
26
|
-
USER_EMAIL_INVALID: -29,
|
|
27
|
-
USER_VERIFICATION_CODE_INVALID: -30,
|
|
28
|
-
USER_MISSING_NAME_OR_EMAIL: -31,
|
|
29
|
-
USER_NAME_INVALID: -32,
|
|
30
|
-
USER_HAS_ONE_OR_MORE_MEMORI: -33,
|
|
31
|
-
USER_MISSING_NEW_PASSWORD: -34,
|
|
32
|
-
USER_CANT_CREATE_MEMORI: -35,
|
|
33
|
-
USER_MAX_MEMORI_REACHED: -36,
|
|
34
|
-
USER_TOO_MANY_ATTEMPTS: -38,
|
|
35
|
-
USER_MUST_ACCEPT_TNC_AND_PP: -39,
|
|
36
|
-
USER_BIRTH_DATE_CANT_BE_CHANGED: -40,
|
|
37
|
-
USER_CANT_SET_COMPLETION_PROVIDER: -41,
|
|
38
|
-
USER_CANT_ENABLE_DEEP_THOUGHT: -42,
|
|
39
|
-
USER_CANT_ENABLE_DCM_INTEGRATION: -43,
|
|
40
|
-
USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS: -44,
|
|
41
|
-
USER_CREATION_BILLING_DENIED_PERMISSION: -46,
|
|
42
|
-
USER_HAS_ONE_OR_MORE_COMPLETION_CONFIGS: -47,
|
|
43
|
-
USER_CANT_BE_DELETED: -48,
|
|
44
|
-
USER_ORDER_BY_INVALID: -49,
|
|
45
|
-
|
|
46
|
-
MEMORI_NOT_FOUND: -51,
|
|
47
|
-
MEMORI_NOT_ACCESSIBLE: -52,
|
|
48
|
-
MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN: -53,
|
|
49
|
-
|
|
50
|
-
SESSION_NOT_FOUND: -101,
|
|
51
|
-
SESSION_IS_NOT_ADMINISTRATIVE: -102,
|
|
52
|
-
SESSION_EXPIRED: -103,
|
|
53
|
-
SESSION_OTP_NOT_FOUND: -107,
|
|
54
|
-
SESSION_OTP_EXPIRED: -108,
|
|
55
|
-
SESSION_MISSING_TEMPORARY_TOKEN: -109,
|
|
56
|
-
|
|
57
|
-
MEMORI_MISSING_CONFIGURATION: -201,
|
|
58
|
-
MEMORI_CONFIGURATION_NOT_FOUND: -202,
|
|
59
|
-
MEMORI_INVALID_PRIVACY_TYPE: -203,
|
|
60
|
-
MEMORI_MISSING_PASSWORD: -204,
|
|
61
|
-
MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS: -205,
|
|
62
|
-
MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS: -206,
|
|
63
|
-
MEMORI_INVALID_VOICE_TYPE: -207,
|
|
64
|
-
MEMORI_MISSING_NAME: -208,
|
|
65
|
-
MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS: -209,
|
|
66
|
-
MEMORI_INVALID_ID: -210,
|
|
67
|
-
MEMORI_NAME_ALREADY_USED: -211,
|
|
68
|
-
MEMORI_INVALID_PIN: -212,
|
|
69
|
-
MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION: -213,
|
|
70
|
-
MEMORI_NO_PASSWORD_WHEN_PUBLIC: -214,
|
|
71
|
-
MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS: -215,
|
|
72
|
-
MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS: -216,
|
|
73
|
-
MEMORI_INVALID_COMPLETION_CONFIG: -217,
|
|
74
|
-
MEMORI_MACRO_FUNCTIONS_REQUIRES_COMPLETIONS: -218,
|
|
75
|
-
MEMORI_BLOCKING_DATE_MISSING_OR_WRONG: -219,
|
|
76
|
-
MEMORI_LIST_FILTER_NOT_SPECIFIED: -220,
|
|
77
|
-
|
|
78
|
-
MEMORI_TRANSFER_MISSING_DESTINATION_USER: -231,
|
|
79
|
-
MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID: -232,
|
|
80
|
-
MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT: -233,
|
|
81
|
-
MEMORI_TRANSFER_NOTHING_TO_DO: -234,
|
|
82
|
-
|
|
83
|
-
MEMORI_CONFIGURATION_CANT_BE_CHANGED: -251,
|
|
84
|
-
MEMORI_MISSING_NEW_PASSWORD: -252,
|
|
85
|
-
|
|
86
|
-
MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT: -261,
|
|
87
|
-
MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT: -262,
|
|
88
|
-
MEMORI_SESSION_NOT_FOUND: -263,
|
|
89
|
-
MEMORI_SESSION_DOESNT_ACCEPT_MEDIA: -264,
|
|
90
|
-
|
|
91
|
-
MEMORI_FEATURE_REQUIRES_SUBSCRIPTION: -271,
|
|
92
|
-
|
|
93
|
-
INTEGRATION_NOT_FOUND: -301,
|
|
94
|
-
|
|
95
|
-
INTEGRATION_INVALID_TYPE: -401,
|
|
96
|
-
INTEGRATION_ALREADY_EXISTS: -402,
|
|
97
|
-
INTEGRATION_MEMORI_IS_NOT_PUBLIC: -403,
|
|
98
|
-
INTEGRATION_MISSING_INVOCATION_TEXT: -404,
|
|
99
|
-
INTEGRATION_MISSING_DEVICE_EMAILS: -405,
|
|
100
|
-
INTEGRATION_MEMORI_IS_EMPTY: -406,
|
|
101
|
-
INTEGRATION_MISSING_PRIVACY_POLICY: -407,
|
|
102
|
-
INTEGRATION_MISSING_CATEGORY: -408,
|
|
103
|
-
INTEGRATION_MISSING_DESCRIPTION: -409,
|
|
104
|
-
INTEGRATION_INVALID_INVOCATION_TEXT: -410,
|
|
105
|
-
INTEGRATION_GOOGLE_NO_MORE_AVAILABLE: -411,
|
|
106
|
-
|
|
107
|
-
UPLOAD_REQUIRES_MULTIPART_ENCODING: -501,
|
|
108
|
-
UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY: -502,
|
|
109
|
-
UPLOAD_MAX_LENGTH_EXCEEDED: -503,
|
|
110
|
-
UPLOAD_FILE_IS_EMPTY: -504,
|
|
111
|
-
UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE: -505,
|
|
112
|
-
UPLOAD_MISSING_FILE_NAME: -506,
|
|
113
|
-
UPLOAD_INVALID_MEMORY_ID: -507,
|
|
114
|
-
UPLOAD_MISSING_FILE_CONTENT: -508,
|
|
115
|
-
|
|
116
|
-
ASSET_NOT_FOUND: -601,
|
|
117
|
-
ASSET_NOT_ACCESSIBLE: -602,
|
|
118
|
-
ASSET_MISSING_SESSION_ID: -603,
|
|
119
|
-
ASSET_INVALID_FILE_NAME: -604,
|
|
120
|
-
ASSET_MALWARE_SCAN_THREATS_FOUND: -605,
|
|
121
|
-
|
|
122
|
-
INVITATION_NOT_FOUND: -701,
|
|
123
|
-
INVITATION_NOT_ACCESSIBLE: -702,
|
|
124
|
-
INVITATION_ALREADY_ACCEPTED: -703,
|
|
125
|
-
INVITATION_ALREADY_REJECTED: -704,
|
|
126
|
-
INVITATION_MISSING_DESTINATION_EMAIL: -705,
|
|
127
|
-
INVITATION_DESTINATION_EMAIL_INVALID: -706,
|
|
128
|
-
INVITATION_MISSING_TAG: -707,
|
|
129
|
-
INVITATION_MISSING_PIN: -708,
|
|
130
|
-
INVITATION_INVALID_PIN: -709,
|
|
131
|
-
INVITATION_INVALID_TYPE: -710,
|
|
132
|
-
INVITATION_MISSING_DESTINATION_NAME: -711,
|
|
133
|
-
INVITATION_TAG_PIN_CANT_BE_CHANGED: -712,
|
|
134
|
-
INVITATION_CANT_BE_CHANGED: -713,
|
|
135
|
-
|
|
136
|
-
ACTIONLOG_INVALID_USER_ID: -801,
|
|
137
|
-
ACTIONLOG_INVALID_DATE_FROM_FORMAT: -802,
|
|
138
|
-
ACTIONLOG_INVALID_DATE_TO_FORMAT: -803,
|
|
139
|
-
ACTIONLOG_INVALID_MEMORI_ID: -804,
|
|
140
|
-
|
|
141
|
-
CONSUMPTIONLOG_INVALID_TYPE: -901,
|
|
142
|
-
CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT: -902,
|
|
143
|
-
CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT: -903,
|
|
144
|
-
CONSUMPTIONLOG_INVALID_USER_ID: -904,
|
|
145
|
-
CONSUMPTIONLOG_INVALID_MEMORI_ID: -905,
|
|
146
|
-
|
|
147
|
-
NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD: -1001,
|
|
148
|
-
BROADCAST_NOT_ALLOWED: -1002,
|
|
149
|
-
INVALID_NOTIFICATION_TYPE: -1003,
|
|
150
|
-
NOTIFICATION_NOT_FOUND: -1004,
|
|
151
|
-
INVALID_NOTIFICATION_FILTER: -1005,
|
|
152
|
-
INVALID_NOTIFICATION_PERIOD: -1006,
|
|
153
|
-
|
|
154
|
-
PROCESS_INVALID_TYPE: -1401,
|
|
155
|
-
PROCESS_ALREADY_RUNNING: -1401,
|
|
156
|
-
PROCESS_NOT_FOUND: -1402,
|
|
157
|
-
|
|
158
|
-
IMPORTCSV_MISSING_CSV: -1502,
|
|
159
|
-
IMPORTCSV_MISSING_SEPARATOR: -1503,
|
|
160
|
-
IMPORTCSV_INVALID_SEPARATOR: -1504,
|
|
161
|
-
IMPORTCSV_MISSING_HEADERS: -1505,
|
|
162
|
-
IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR: -1506,
|
|
163
|
-
IMPORTCSV_INVALID_RECEIVER_ID: -1507,
|
|
164
|
-
IMPORTCSV_INVALID_MEDIA_LINK: -1508,
|
|
165
|
-
IMPORTCSV_INVALID_LINK_TITLE_HANDLING: -1509,
|
|
166
|
-
IMPORTCSV_UNDETECTABLE_CHAR_ENCODING: -1521,
|
|
167
|
-
|
|
168
|
-
IMPORTTXT_INVALID_GRANULARITY: -1602,
|
|
169
|
-
IMPORTTXT_INVALID_RECEIVER_ID: -1603,
|
|
170
|
-
IMPORTTXT_INVALID_MEDIA_LINK: -1604,
|
|
171
|
-
IMPORTTXT_INVALID_LINK_TITLE_HANDLING: -1605,
|
|
172
|
-
IMPORTTXT_UNDETECTABLE_CHAR_ENCODING: -1621,
|
|
173
|
-
IMPORTTXT_IMPORT_LIMIT_EXCEEDED: -1632,
|
|
174
|
-
IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY: -1633,
|
|
175
|
-
IMPORTTXT_IMPORT_REQUIRES_PAYING: -1634,
|
|
176
|
-
IMPORTTXT_BILLING_DENIED_PERMISSION: -1635,
|
|
177
|
-
|
|
178
|
-
IMPORT_MISSING_ROWS: -1701,
|
|
179
|
-
IMPORT_CANT_IMPORT_TO_SECRET_MEMORI: -1702,
|
|
180
|
-
|
|
181
|
-
IMPORTMEMORI_INVALID_MEMORI_SPECS: -1711,
|
|
182
|
-
IMPORT_MISSING_JSONL: -1712,
|
|
183
|
-
IMPORTMEMORI_INVALID_SPECS: -1713,
|
|
184
|
-
|
|
185
|
-
EXPORT_MISSING_PASSWORD: 1711,
|
|
186
|
-
|
|
187
|
-
EXPORTCSV_MISSING_CSV_SPECS: -1801,
|
|
188
|
-
EXPORTCSV_MISSING_SEPARATOR: -1802,
|
|
189
|
-
EXPORTCSV_INVALID_SEPARATOR: -1803,
|
|
190
|
-
EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR: -1804,
|
|
191
|
-
EXPORTCSV_MISSING_NEW_LINE_CHAR: -1805,
|
|
192
|
-
EXPORTCSV_INVALID_NEW_LINE_CHAR: -1806,
|
|
193
|
-
|
|
194
|
-
EXPORTJSONL_MISSING_JSONL_SPECS: -1821,
|
|
195
|
-
EXPORTJSONL_MISSING_PLATFORM: -1822,
|
|
196
|
-
EXPORTJSONL_INVALID_PLATFORM: -1823,
|
|
197
|
-
EXPORTJSONL_EXPORT_REQUIRES_PAYING: -1832,
|
|
198
|
-
|
|
199
|
-
ANALYSIS_MISSING_QUERY: -1901,
|
|
200
|
-
ANALYSIS_CANT_ANALYZE_SECRET_MEMORI: -1902,
|
|
201
|
-
ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT: -1903,
|
|
202
|
-
|
|
203
|
-
BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS: -2001,
|
|
204
|
-
BADGE_ASSIGNMENT_MISSING_REF_ID: -2002,
|
|
205
|
-
BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND: -2003,
|
|
206
|
-
BADGE_ASSIGNMENT_MISSING_ASSERTION_URL: -2004,
|
|
207
|
-
BADGE_ASSIGNMENT_MISSING_BADGE_URL: -2005,
|
|
208
|
-
BADGE_ASSIGNMENT_MISSING_ISSUER_URL: -2006,
|
|
209
|
-
BADGE_ASSIGNMENT_INVALID_URL: -2007,
|
|
210
|
-
|
|
211
|
-
BADGE_ASSIGNMENT_MISSING_RECIPIENT: -2021,
|
|
212
|
-
BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE: -2022,
|
|
213
|
-
BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY: -2023,
|
|
214
|
-
BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE: -2024,
|
|
215
|
-
BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE: -2025,
|
|
216
|
-
BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY: -2026,
|
|
217
|
-
|
|
218
|
-
BADGE_NOT_FOUND: -2051,
|
|
219
|
-
|
|
220
|
-
OUTCOME_NO_DCM_CONFIGURED: -2071,
|
|
221
|
-
OUTCOME_USER_BADGES_DISABLED: -2072,
|
|
222
|
-
|
|
223
|
-
COMPLETION_CONFIG_MISSING_NAME: -2401,
|
|
224
|
-
COMPLETION_CONFIG_MISSING_PROVIDER: -2402,
|
|
225
|
-
COMPLETION_CONFIG_MISSING_ENDPOINT: -2403,
|
|
226
|
-
COMPLETION_CONFIG_MISSING_API_KEY: -2404,
|
|
227
|
-
COMPLETION_CONFIG_MISSING_MODEL: -2405,
|
|
228
|
-
COMPLETION_CONFIG_NO_PURPOSE_SPECIFIED: -2406,
|
|
229
|
-
COMPLETION_CONFIG_INVALID_NAME: -2407,
|
|
230
|
-
COMPLETION_CONFIG_INVALID_PURPOSE: -2411,
|
|
231
|
-
COMPLETION_CONFIG_INVALID_ENDPOINT: -2412,
|
|
232
|
-
COMPLETION_CONFIG_INCONSISTENT_ENDPOINT: -2413,
|
|
233
|
-
COMPLETION_CONFIG_INVALID_PROVIDER: -2414,
|
|
234
|
-
COMPLETION_CONFIG_NOT_FOUND: -2421,
|
|
235
|
-
COMPLETION_CONFIG_NOT_ACCESSIBLE: -2422,
|
|
236
|
-
COMPLETION_CONFIG_NAME_RESERVED: -2441,
|
|
237
|
-
COMPLETION_CONFIG_NAME_ALREADY_EXISTS: -2442,
|
|
238
|
-
COMPLETION_CONFIG_VISIBILITY_CHANGE_NOT_ALLOWED: -2443,
|
|
239
|
-
COMPLETION_CONFIG_MISSING_MANDATORY_PREFIX: -2444,
|
|
240
|
-
COMPLETION_CONFIG_VISIBILITY_NOT_PERMITTED: -2445,
|
|
241
|
-
COMPLETION_CONFIG_USE_AS_DEFAULT_NOT_PERMITTED: -2446,
|
|
242
|
-
COMPLETION_CONFIG_USE_AS_DEFAULT_REQUIRES_TENANT_VISIBILITY: -2447,
|
|
243
|
-
COMPLETION_CONFIG_CHARGEABLE_NOT_PERMITTED: -2448,
|
|
244
|
-
COMPLETION_CONFIG_INVALID_APPLY_TO: -2449,
|
|
245
|
-
COMPLETION_CONFIG_APPLY_TO_TENANT_NOT_ALLOWED: -2450,
|
|
246
|
-
|
|
247
|
-
TRUSTED_APPLICATION_NOT_FOUND: -2501,
|
|
248
|
-
TRUSTED_APPLICATION_NOT_ACCESSIBLE: -2502,
|
|
249
|
-
TRUSTED_APPLICATION_NAME_REQUIRED: -2503,
|
|
250
|
-
TRUSTED_APPLICATION_TOKEN_REQUIRED: -2504,
|
|
251
|
-
TRUSTED_APPLICATION_NAME_ALREADY_EXISTS: -2505,
|
|
252
|
-
TRUSTED_APPLICATION_INVALID_TOKEN: -2506,
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
export const BACKEND_ERRORS = new Map<number, string>(
|
|
256
|
-
Object.entries(errors).map(([key, value]) => [value, key])
|
|
257
|
-
);
|
|
258
|
-
|
|
259
|
-
export const getErrori18nKey = (errorCode: number) => {
|
|
260
|
-
if (!errorCode) return 'error.generic';
|
|
261
|
-
|
|
262
|
-
if (errorCode === 401 || errorCode === 403) {
|
|
263
|
-
return 'error.unauthorized';
|
|
264
|
-
} else if (errorCode === 404) {
|
|
265
|
-
return 'error.notFound';
|
|
266
|
-
} else if (errorCode === 422) {
|
|
267
|
-
return 'error.unprocessableEntity';
|
|
268
|
-
} else if (errorCode === 500) {
|
|
269
|
-
return 'internal server error';
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
let error = BACKEND_ERRORS.get(errorCode);
|
|
273
|
-
if (!error) {
|
|
274
|
-
return 'error.generic';
|
|
275
|
-
} else {
|
|
276
|
-
return `errors.${error}`;
|
|
277
|
-
}
|
|
278
|
-
};
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image compression utility using HTML5 Canvas API
|
|
3
|
-
* Compresses images before upload to reduce file size and LLM context usage
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export interface CompressionOptions {
|
|
7
|
-
maxWidth?: number;
|
|
8
|
-
maxHeight?: number;
|
|
9
|
-
quality?: number;
|
|
10
|
-
maxSizeMB?: number;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const DEFAULT_OPTIONS: Required<CompressionOptions> = {
|
|
14
|
-
maxWidth: 1920,
|
|
15
|
-
maxHeight: 1920,
|
|
16
|
-
quality: 0.75,
|
|
17
|
-
maxSizeMB: 2,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Apply EXIF orientation to canvas context
|
|
23
|
-
*/
|
|
24
|
-
const applyOrientation = (
|
|
25
|
-
ctx: CanvasRenderingContext2D,
|
|
26
|
-
orientation: number,
|
|
27
|
-
width: number,
|
|
28
|
-
height: number
|
|
29
|
-
) => {
|
|
30
|
-
switch (orientation) {
|
|
31
|
-
case 2:
|
|
32
|
-
// Horizontal flip
|
|
33
|
-
ctx.transform(-1, 0, 0, 1, width, 0);
|
|
34
|
-
break;
|
|
35
|
-
case 3:
|
|
36
|
-
// 180° rotation
|
|
37
|
-
ctx.transform(-1, 0, 0, -1, width, height);
|
|
38
|
-
break;
|
|
39
|
-
case 4:
|
|
40
|
-
// Vertical flip
|
|
41
|
-
ctx.transform(1, 0, 0, -1, 0, height);
|
|
42
|
-
break;
|
|
43
|
-
case 5:
|
|
44
|
-
// Vertical flip + 90° rotation
|
|
45
|
-
ctx.transform(0, 1, 1, 0, 0, 0);
|
|
46
|
-
break;
|
|
47
|
-
case 6:
|
|
48
|
-
// 90° rotation
|
|
49
|
-
ctx.transform(0, 1, -1, 0, height, 0);
|
|
50
|
-
break;
|
|
51
|
-
case 7:
|
|
52
|
-
// Horizontal flip + 90° rotation
|
|
53
|
-
ctx.transform(0, -1, -1, 0, height, width);
|
|
54
|
-
break;
|
|
55
|
-
case 8:
|
|
56
|
-
// 270° rotation
|
|
57
|
-
ctx.transform(0, -1, 1, 0, 0, width);
|
|
58
|
-
break;
|
|
59
|
-
default:
|
|
60
|
-
// No transformation needed
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Load image from File and return HTMLImageElement
|
|
67
|
-
*/
|
|
68
|
-
const loadImage = (file: File): Promise<HTMLImageElement> => {
|
|
69
|
-
return new Promise((resolve, reject) => {
|
|
70
|
-
const img = new Image();
|
|
71
|
-
const url = URL.createObjectURL(file);
|
|
72
|
-
|
|
73
|
-
img.onload = () => {
|
|
74
|
-
URL.revokeObjectURL(url);
|
|
75
|
-
resolve(img);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
img.onerror = () => {
|
|
79
|
-
URL.revokeObjectURL(url);
|
|
80
|
-
reject(new Error('Failed to load image'));
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
img.src = url;
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Calculate new dimensions maintaining aspect ratio
|
|
89
|
-
*/
|
|
90
|
-
const calculateDimensions = (
|
|
91
|
-
width: number,
|
|
92
|
-
height: number,
|
|
93
|
-
maxWidth: number,
|
|
94
|
-
maxHeight: number
|
|
95
|
-
): { width: number; height: number } => {
|
|
96
|
-
// If image is already smaller than max dimensions, return original
|
|
97
|
-
if (width <= maxWidth && height <= maxHeight) {
|
|
98
|
-
return { width, height };
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Calculate scale factor
|
|
102
|
-
const scaleWidth = maxWidth / width;
|
|
103
|
-
const scaleHeight = maxHeight / height;
|
|
104
|
-
const scale = Math.min(scaleWidth, scaleHeight, 1);
|
|
105
|
-
|
|
106
|
-
return {
|
|
107
|
-
width: Math.round(width * scale),
|
|
108
|
-
height: Math.round(height * scale),
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Compress image using Canvas API
|
|
114
|
-
* @param file - Original image file
|
|
115
|
-
* @param options - Compression options
|
|
116
|
-
* @returns Compressed File object
|
|
117
|
-
*/
|
|
118
|
-
export const compressImage = async (
|
|
119
|
-
file: File,
|
|
120
|
-
options: CompressionOptions = {}
|
|
121
|
-
): Promise<File> => {
|
|
122
|
-
const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
123
|
-
|
|
124
|
-
// Check if compression is needed
|
|
125
|
-
const fileSizeMB = file.size / (1024 * 1024);
|
|
126
|
-
const shouldCompress = fileSizeMB > 1; // Compress if > 1 MB
|
|
127
|
-
|
|
128
|
-
if (!shouldCompress) {
|
|
129
|
-
// Load image to check dimensions
|
|
130
|
-
try {
|
|
131
|
-
const img = await loadImage(file);
|
|
132
|
-
const needsResize =
|
|
133
|
-
img.width > opts.maxWidth || img.height > opts.maxHeight;
|
|
134
|
-
|
|
135
|
-
if (!needsResize) {
|
|
136
|
-
// File is already small enough, return original
|
|
137
|
-
return file;
|
|
138
|
-
}
|
|
139
|
-
} catch (error) {
|
|
140
|
-
// If we can't load the image, return original
|
|
141
|
-
return file;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
try {
|
|
146
|
-
// Load image
|
|
147
|
-
const img = await loadImage(file);
|
|
148
|
-
|
|
149
|
-
// Get orientation (simplified - full EXIF parsing would require a library)
|
|
150
|
-
const orientation = 1;
|
|
151
|
-
|
|
152
|
-
// Calculate new dimensions
|
|
153
|
-
const { width, height } = calculateDimensions(
|
|
154
|
-
img.width,
|
|
155
|
-
img.height,
|
|
156
|
-
opts.maxWidth,
|
|
157
|
-
opts.maxHeight
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
// Create canvas
|
|
161
|
-
const canvas = document.createElement('canvas');
|
|
162
|
-
canvas.width = width;
|
|
163
|
-
canvas.height = height;
|
|
164
|
-
|
|
165
|
-
const ctx = canvas.getContext('2d');
|
|
166
|
-
if (!ctx) {
|
|
167
|
-
throw new Error('Failed to get canvas context');
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// Apply orientation transformation
|
|
171
|
-
applyOrientation(ctx, orientation, width, height);
|
|
172
|
-
|
|
173
|
-
// Draw image to canvas
|
|
174
|
-
ctx.drawImage(img, 0, 0, width, height);
|
|
175
|
-
|
|
176
|
-
// Convert canvas to blob
|
|
177
|
-
return new Promise((resolve, reject) => {
|
|
178
|
-
canvas.toBlob(
|
|
179
|
-
(blob) => {
|
|
180
|
-
if (!blob) {
|
|
181
|
-
reject(new Error('Failed to compress image'));
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// Check if compressed size is acceptable
|
|
186
|
-
const compressedSizeMB = blob.size / (1024 * 1024);
|
|
187
|
-
|
|
188
|
-
if (compressedSizeMB > opts.maxSizeMB) {
|
|
189
|
-
// If still too large, try lower quality
|
|
190
|
-
canvas.toBlob(
|
|
191
|
-
(lowerQualityBlob) => {
|
|
192
|
-
if (!lowerQualityBlob) {
|
|
193
|
-
// Fallback to original blob
|
|
194
|
-
const compressedFile = new File(
|
|
195
|
-
[blob],
|
|
196
|
-
file.name.replace(/\.[^/.]+$/, '.jpg'),
|
|
197
|
-
{ type: 'image/jpeg' }
|
|
198
|
-
);
|
|
199
|
-
resolve(compressedFile);
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
const compressedFile = new File(
|
|
203
|
-
[lowerQualityBlob],
|
|
204
|
-
file.name.replace(/\.[^/.]+$/, '.jpg'),
|
|
205
|
-
{ type: 'image/jpeg' }
|
|
206
|
-
);
|
|
207
|
-
resolve(compressedFile);
|
|
208
|
-
},
|
|
209
|
-
'image/jpeg',
|
|
210
|
-
Math.max(0.5, opts.quality - 0.2) // Reduce quality by 0.2, min 0.5
|
|
211
|
-
);
|
|
212
|
-
} else {
|
|
213
|
-
// Create new File with JPEG extension
|
|
214
|
-
const compressedFile = new File(
|
|
215
|
-
[blob],
|
|
216
|
-
file.name.replace(/\.[^/.]+$/, '.jpg'),
|
|
217
|
-
{ type: 'image/jpeg' }
|
|
218
|
-
);
|
|
219
|
-
resolve(compressedFile);
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
'image/jpeg', // Always convert to JPEG for better compression
|
|
223
|
-
opts.quality
|
|
224
|
-
);
|
|
225
|
-
});
|
|
226
|
-
} catch (error) {
|
|
227
|
-
// If compression fails, return original file
|
|
228
|
-
return file;
|
|
229
|
-
}
|
|
230
|
-
};
|