@messenger-box/tailwind-ui-inbox 10.0.3-alpha.100
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 +104 -0
- package/LICENSE +21 -0
- package/jest.config.js +9 -0
- package/lib/cdm-locales/en/translations.json +31 -0
- package/lib/cdm-locales/es/translations.json +31 -0
- package/lib/components/AIAgent/AIAgent.d.ts +21 -0
- package/lib/components/AIAgent/AIAgent.d.ts.map +1 -0
- package/lib/components/AIAgent/AIAgent.js +904 -0
- package/lib/components/AIAgent/AIAgent.js.map +1 -0
- package/lib/components/AIAgent/index.d.ts +2 -0
- package/lib/components/AIAgent/index.d.ts.map +1 -0
- package/lib/components/InboxMessage/CommonMessage.d.ts +8 -0
- package/lib/components/InboxMessage/CommonMessage.d.ts.map +1 -0
- package/lib/components/InboxMessage/CommonMessage.js +35 -0
- package/lib/components/InboxMessage/CommonMessage.js.map +1 -0
- package/lib/components/InboxMessage/ConversationItem.d.ts +14 -0
- package/lib/components/InboxMessage/ConversationItem.d.ts.map +1 -0
- package/lib/components/InboxMessage/ConversationItem.js +200 -0
- package/lib/components/InboxMessage/ConversationItem.js.map +1 -0
- package/lib/components/InboxMessage/InputComponent.d.ts +12 -0
- package/lib/components/InboxMessage/InputComponent.d.ts.map +1 -0
- package/lib/components/InboxMessage/InputComponent.js +359 -0
- package/lib/components/InboxMessage/InputComponent.js.map +1 -0
- package/lib/components/InboxMessage/LeftSidebar.d.ts +20 -0
- package/lib/components/InboxMessage/LeftSidebar.d.ts.map +1 -0
- package/lib/components/InboxMessage/LeftSidebar.js +102 -0
- package/lib/components/InboxMessage/LeftSidebar.js.map +1 -0
- package/lib/components/InboxMessage/MessageInput.d.ts +9 -0
- package/lib/components/InboxMessage/MessageInput.d.ts.map +1 -0
- package/lib/components/InboxMessage/MessageInput.js +154 -0
- package/lib/components/InboxMessage/MessageInput.js.map +1 -0
- package/lib/components/InboxMessage/MessageInputComponent.d.ts +9 -0
- package/lib/components/InboxMessage/MessageInputComponent.d.ts.map +1 -0
- package/lib/components/InboxMessage/Messages.d.ts +17 -0
- package/lib/components/InboxMessage/Messages.d.ts.map +1 -0
- package/lib/components/InboxMessage/Messages.js +99 -0
- package/lib/components/InboxMessage/Messages.js.map +1 -0
- package/lib/components/InboxMessage/MessagesBuilderUi.d.ts +17 -0
- package/lib/components/InboxMessage/MessagesBuilderUi.d.ts.map +1 -0
- package/lib/components/InboxMessage/Popover.d.ts +3 -0
- package/lib/components/InboxMessage/Popover.d.ts.map +1 -0
- package/lib/components/InboxMessage/Popover.js +31 -0
- package/lib/components/InboxMessage/Popover.js.map +1 -0
- package/lib/components/InboxMessage/RightSidebar.d.ts +9 -0
- package/lib/components/InboxMessage/RightSidebar.d.ts.map +1 -0
- package/lib/components/InboxMessage/RightSidebar.js +9 -0
- package/lib/components/InboxMessage/RightSidebar.js.map +1 -0
- package/lib/components/InboxMessage/RightSidebarAi.d.ts +23 -0
- package/lib/components/InboxMessage/RightSidebarAi.d.ts.map +1 -0
- package/lib/components/InboxMessage/RightSidebarAi.js +9 -0
- package/lib/components/InboxMessage/RightSidebarAi.js.map +1 -0
- package/lib/components/InboxMessage/ServiceConversationItem.d.ts +12 -0
- package/lib/components/InboxMessage/ServiceConversationItem.d.ts.map +1 -0
- package/lib/components/InboxMessage/ServiceConversationItem.js +185 -0
- package/lib/components/InboxMessage/ServiceConversationItem.js.map +1 -0
- package/lib/components/InboxMessage/ServiceInboxItem.d.ts +12 -0
- package/lib/components/InboxMessage/ServiceInboxItem.d.ts.map +1 -0
- package/lib/components/InboxMessage/ServiceInboxItem.js +182 -0
- package/lib/components/InboxMessage/ServiceInboxItem.js.map +1 -0
- package/lib/components/InboxMessage/SubscriptionHandler.d.ts +19 -0
- package/lib/components/InboxMessage/SubscriptionHandler.d.ts.map +1 -0
- package/lib/components/InboxMessage/SubscriptionHandler.js +41 -0
- package/lib/components/InboxMessage/SubscriptionHandler.js.map +1 -0
- package/lib/components/InboxMessage/UploadImageButton.d.ts +7 -0
- package/lib/components/InboxMessage/UploadImageButton.d.ts.map +1 -0
- package/lib/components/InboxMessage/UploadImageButton.js +34 -0
- package/lib/components/InboxMessage/UploadImageButton.js.map +1 -0
- package/lib/components/InboxMessage/UserModalContent.d.ts +3 -0
- package/lib/components/InboxMessage/UserModalContent.d.ts.map +1 -0
- package/lib/components/InboxMessage/UserModalContent.js +60 -0
- package/lib/components/InboxMessage/UserModalContent.js.map +1 -0
- package/lib/components/InboxMessage/index.d.ts +17 -0
- package/lib/components/InboxMessage/index.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/CommonMessage.d.ts +11 -0
- package/lib/components/InboxMessage/message-widgets/CommonMessage.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/CommonMessage.js +44 -0
- package/lib/components/InboxMessage/message-widgets/CommonMessage.js.map +1 -0
- package/lib/components/InboxMessage/message-widgets/ErrorFixCard.d.ts +11 -0
- package/lib/components/InboxMessage/message-widgets/ErrorFixCard.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/ErrorFixCard.js +194 -0
- package/lib/components/InboxMessage/message-widgets/ErrorFixCard.js.map +1 -0
- package/lib/components/InboxMessage/message-widgets/MessageCard.d.ts +8 -0
- package/lib/components/InboxMessage/message-widgets/MessageCard.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/MessageSliceRenderer.d.ts +12 -0
- package/lib/components/InboxMessage/message-widgets/MessageSliceRenderer.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/MessageSliceRenderer.js +37 -0
- package/lib/components/InboxMessage/message-widgets/MessageSliceRenderer.js.map +1 -0
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.d.ts +18 -0
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.js +1082 -0
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.js.map +1 -0
- package/lib/components/InboxMessage/message-widgets/PlainMessage.d.ts +8 -0
- package/lib/components/InboxMessage/message-widgets/PlainMessage.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/PlainMessage.js +14 -0
- package/lib/components/InboxMessage/message-widgets/PlainMessage.js.map +1 -0
- package/lib/components/InboxMessage/message-widgets/PropertyMessageWidget.d.ts +9 -0
- package/lib/components/InboxMessage/message-widgets/PropertyMessageWidget.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/SlackLikeMessageGroup.d.ts +14 -0
- package/lib/components/InboxMessage/message-widgets/SlackLikeMessageGroup.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/SlackLikeMessageGroup.js +333 -0
- package/lib/components/InboxMessage/message-widgets/SlackLikeMessageGroup.js.map +1 -0
- package/lib/components/InboxMessage/message-widgets/index.d.ts +4 -0
- package/lib/components/InboxMessage/message-widgets/index.d.ts.map +1 -0
- package/lib/components/ModelConfigPanel.d.ts +37 -0
- package/lib/components/ModelConfigPanel.d.ts.map +1 -0
- package/lib/components/ModelConfigPanel.js +317 -0
- package/lib/components/ModelConfigPanel.js.map +1 -0
- package/lib/components/filler-components/RightSiderBar.d.ts +24 -0
- package/lib/components/filler-components/RightSiderBar.d.ts.map +1 -0
- package/lib/components/filler-components/RightSiderBar.js +335 -0
- package/lib/components/filler-components/RightSiderBar.js.map +1 -0
- package/lib/components/inbox/FilesList.d.ts +20 -0
- package/lib/components/inbox/FilesList.d.ts.map +1 -0
- package/lib/components/inbox/FilesList.js +68 -0
- package/lib/components/inbox/FilesList.js.map +1 -0
- package/lib/components/inbox/MessageItem.d.ts +17 -0
- package/lib/components/inbox/MessageItem.d.ts.map +1 -0
- package/lib/components/inbox/MessageItem.js +50 -0
- package/lib/components/inbox/MessageItem.js.map +1 -0
- package/lib/components/inbox/ThreadItem.d.ts +11 -0
- package/lib/components/inbox/ThreadItem.d.ts.map +1 -0
- package/lib/components/inbox/ThreadItem.js +147 -0
- package/lib/components/inbox/ThreadItem.js.map +1 -0
- package/lib/components/inbox/index.d.ts +4 -0
- package/lib/components/inbox/index.d.ts.map +1 -0
- package/lib/components/index.d.ts +7 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/live-code-editor/hybrid-live-editor.d.ts +20 -0
- package/lib/components/live-code-editor/hybrid-live-editor.d.ts.map +1 -0
- package/lib/components/live-code-editor/hybrid-live-editor.js +68 -0
- package/lib/components/live-code-editor/hybrid-live-editor.js.map +1 -0
- package/lib/components/live-code-editor/index.d.ts +4 -0
- package/lib/components/live-code-editor/index.d.ts.map +1 -0
- package/lib/components/live-code-editor/live-code-editor.d.ts +14 -0
- package/lib/components/live-code-editor/live-code-editor.d.ts.map +1 -0
- package/lib/components/live-code-editor/live-code-editor.js +207 -0
- package/lib/components/live-code-editor/live-code-editor.js.map +1 -0
- package/lib/components/slot-fill/chat-message-filler.d.ts +4 -0
- package/lib/components/slot-fill/chat-message-filler.d.ts.map +1 -0
- package/lib/components/slot-fill/chat-message-filler.js +5 -0
- package/lib/components/slot-fill/chat-message-filler.js.map +1 -0
- package/lib/components/slot-fill/chat-message-slot.d.ts +11 -0
- package/lib/components/slot-fill/chat-message-slot.d.ts.map +1 -0
- package/lib/components/slot-fill/chat-message-slot.js +6 -0
- package/lib/components/slot-fill/chat-message-slot.js.map +1 -0
- package/lib/components/slot-fill/index.d.ts +4 -0
- package/lib/components/slot-fill/index.d.ts.map +1 -0
- package/lib/components/slot-fill/right-sidebar-filler.d.ts +4 -0
- package/lib/components/slot-fill/right-sidebar-filler.d.ts.map +1 -0
- package/lib/components/slot-fill/right-sidebar-filler.js +13 -0
- package/lib/components/slot-fill/right-sidebar-filler.js.map +1 -0
- package/lib/components/ui/button.d.ts +9 -0
- package/lib/components/ui/button.d.ts.map +1 -0
- package/lib/compute.d.ts +8 -0
- package/lib/compute.d.ts.map +1 -0
- package/lib/compute.js +137 -0
- package/lib/compute.js.map +1 -0
- package/lib/config/env-config.d.ts +13 -0
- package/lib/config/env-config.d.ts.map +1 -0
- package/lib/config/env-config.js +34 -0
- package/lib/config/env-config.js.map +1 -0
- package/lib/config/index.d.ts +2 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/constants/breakpoints.d.ts +8 -0
- package/lib/constants/breakpoints.d.ts.map +1 -0
- package/lib/constants/index.d.ts +3 -0
- package/lib/constants/index.d.ts.map +1 -0
- package/lib/container/AiInbox.d.ts +15 -0
- package/lib/container/AiInbox.d.ts.map +1 -0
- package/lib/container/AiInboxWithLoader.d.ts +36 -0
- package/lib/container/AiInboxWithLoader.d.ts.map +1 -0
- package/lib/container/AiLandingInput.d.ts +4 -0
- package/lib/container/AiLandingInput.d.ts.map +1 -0
- package/lib/container/AiLandingInput.js +101 -0
- package/lib/container/AiLandingInput.js.map +1 -0
- package/lib/container/Inbox.d.ts +15 -0
- package/lib/container/Inbox.d.ts.map +1 -0
- package/lib/container/Inbox.js +955 -0
- package/lib/container/Inbox.js.map +1 -0
- package/lib/container/InboxAiMessagesLoader.d.ts +15 -0
- package/lib/container/InboxAiMessagesLoader.d.ts.map +1 -0
- package/lib/container/InboxAiMessagesLoader.js +30 -0
- package/lib/container/InboxAiMessagesLoader.js.map +1 -0
- package/lib/container/InboxContainer.d.ts +12 -0
- package/lib/container/InboxContainer.d.ts.map +1 -0
- package/lib/container/InboxContainer.js +31 -0
- package/lib/container/InboxContainer.js.map +1 -0
- package/lib/container/InboxTemplate1.d.ts +15 -0
- package/lib/container/InboxTemplate1.d.ts.map +1 -0
- package/lib/container/InboxTemplate1WithLoader.d.ts +36 -0
- package/lib/container/InboxTemplate1WithLoader.d.ts.map +1 -0
- package/lib/container/InboxTemplate2.d.ts +15 -0
- package/lib/container/InboxTemplate2.d.ts.map +1 -0
- package/lib/container/InboxWithAiLoader.d.ts +15 -0
- package/lib/container/InboxWithAiLoader.d.ts.map +1 -0
- package/lib/container/InboxWithAiLoader.js +56 -0
- package/lib/container/InboxWithAiLoader.js.map +1 -0
- package/lib/container/InboxWithLoader.d.ts +36 -0
- package/lib/container/InboxWithLoader.d.ts.map +1 -0
- package/lib/container/InboxWithLoader.js +277 -0
- package/lib/container/InboxWithLoader.js.map +1 -0
- package/lib/container/ServiceInbox.d.ts +9 -0
- package/lib/container/ServiceInbox.d.ts.map +1 -0
- package/lib/container/ServiceInbox.js +144 -0
- package/lib/container/ServiceInbox.js.map +1 -0
- package/lib/container/ThreadMessages.d.ts +13 -0
- package/lib/container/ThreadMessages.d.ts.map +1 -0
- package/lib/container/ThreadMessages.js +314 -0
- package/lib/container/ThreadMessages.js.map +1 -0
- package/lib/container/ThreadMessagesInbox.d.ts +14 -0
- package/lib/container/ThreadMessagesInbox.d.ts.map +1 -0
- package/lib/container/ThreadMessagesInbox.js +341 -0
- package/lib/container/ThreadMessagesInbox.js.map +1 -0
- package/lib/container/Threads.d.ts +8 -0
- package/lib/container/Threads.d.ts.map +1 -0
- package/lib/container/Threads.js +231 -0
- package/lib/container/Threads.js.map +1 -0
- package/lib/container/ThreadsInbox.d.ts +21 -0
- package/lib/container/ThreadsInbox.d.ts.map +1 -0
- package/lib/container/ThreadsInbox.js +244 -0
- package/lib/container/ThreadsInbox.js.map +1 -0
- package/lib/container/apply-footer-styles.d.ts +2 -0
- package/lib/container/apply-footer-styles.d.ts.map +1 -0
- package/lib/container/apply-footer-styles.js +16 -0
- package/lib/container/apply-footer-styles.js.map +1 -0
- package/lib/container/index.d.ts +13 -0
- package/lib/container/index.d.ts.map +1 -0
- package/lib/enums/index.d.ts +2 -0
- package/lib/enums/index.d.ts.map +1 -0
- package/lib/enums/messenger-slot-fill-name-enum.d.ts +5 -0
- package/lib/enums/messenger-slot-fill-name-enum.d.ts.map +1 -0
- package/lib/enums/messenger-slot-fill-name-enum.js +5 -0
- package/lib/enums/messenger-slot-fill-name-enum.js.map +1 -0
- package/lib/hooks/index.d.ts +3 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/use-file-sync.d.ts +16 -0
- package/lib/hooks/use-file-sync.d.ts.map +1 -0
- package/lib/hooks/use-file-sync.js +63 -0
- package/lib/hooks/use-file-sync.js.map +1 -0
- package/lib/hooks/usePersistentModelConfig.d.ts +15 -0
- package/lib/hooks/usePersistentModelConfig.d.ts.map +1 -0
- package/lib/hooks/usePersistentModelConfig.js +46 -0
- package/lib/hooks/usePersistentModelConfig.js.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -0
- package/lib/interfaces/index.d.ts +2 -0
- package/lib/interfaces/index.d.ts.map +1 -0
- package/lib/interfaces/message-widgets.interface.d.ts +21 -0
- package/lib/interfaces/message-widgets.interface.d.ts.map +1 -0
- package/lib/machines/aiAgentMachine.d.ts +3 -0
- package/lib/machines/aiAgentMachine.d.ts.map +1 -0
- package/lib/machines/aiAgentMachine.js +1083 -0
- package/lib/machines/aiAgentMachine.js.map +1 -0
- package/lib/machines/aiAgentMachine.simple.d.ts +3 -0
- package/lib/machines/aiAgentMachine.simple.d.ts.map +1 -0
- package/lib/machines/aiAgentMachine.simple.js +108 -0
- package/lib/machines/aiAgentMachine.simple.js.map +1 -0
- package/lib/machines/index.d.ts +3 -0
- package/lib/machines/index.d.ts.map +1 -0
- package/lib/machines/types.d.ts +77 -0
- package/lib/machines/types.d.ts.map +1 -0
- package/lib/module.d.ts +7 -0
- package/lib/module.d.ts.map +1 -0
- package/lib/module.js +26 -0
- package/lib/module.js.map +1 -0
- package/lib/routes.json +98 -0
- package/lib/styles/responsive.css +76 -0
- package/lib/templates/InboxWithAi.d.ts +15 -0
- package/lib/templates/InboxWithAi.d.ts.map +1 -0
- package/lib/templates/InboxWithAi.js +440 -0
- package/lib/templates/InboxWithAi.js.map +1 -0
- package/lib/templates/InboxWithAi.tsx +533 -0
- package/lib/templates/index.d.ts +2 -0
- package/lib/templates/index.d.ts.map +1 -0
- package/lib/templates/index.ts +1 -0
- package/lib/utils/utils.d.ts +2 -0
- package/lib/utils/utils.d.ts.map +1 -0
- package/lib/utils/utils.js +3 -0
- package/lib/utils/utils.js.map +1 -0
- package/package.json +62 -0
- package/rollup.config.mjs +35 -0
- package/src/cdm-locales/en/translations.json +31 -0
- package/src/cdm-locales/es/translations.json +31 -0
- package/src/components/AIAgent/AIAgent.tsx +1103 -0
- package/src/components/AIAgent/AIAgent.tsx.bk +1365 -0
- package/src/components/AIAgent/README.md +82 -0
- package/src/components/AIAgent/index.ts +1 -0
- package/src/components/InboxMessage/CommonMessage.tsx +40 -0
- package/src/components/InboxMessage/ConversationItem.tsx +255 -0
- package/src/components/InboxMessage/InputComponent.tsx +462 -0
- package/src/components/InboxMessage/LeftSidebar.tsx +140 -0
- package/src/components/InboxMessage/MessageInput.tsx +209 -0
- package/src/components/InboxMessage/MessageInputComponent.tsx +245 -0
- package/src/components/InboxMessage/Messages.tsx +137 -0
- package/src/components/InboxMessage/MessagesBuilderUi.tsx +205 -0
- package/src/components/InboxMessage/Popover.tsx +42 -0
- package/src/components/InboxMessage/RightSidebar.tsx +22 -0
- package/src/components/InboxMessage/RightSidebarAi.tsx +37 -0
- package/src/components/InboxMessage/ServiceConversationItem.tsx +234 -0
- package/src/components/InboxMessage/ServiceInboxItem.tsx +223 -0
- package/src/components/InboxMessage/SubscriptionHandler.tsx +55 -0
- package/src/components/InboxMessage/UploadImageButton.tsx +46 -0
- package/src/components/InboxMessage/UserModalContent.tsx +60 -0
- package/src/components/InboxMessage/index.ts +16 -0
- package/src/components/InboxMessage/message-widgets/CommonMessage.tsx +69 -0
- package/src/components/InboxMessage/message-widgets/ErrorFixCard.tsx +240 -0
- package/src/components/InboxMessage/message-widgets/MessageCard.tsx +127 -0
- package/src/components/InboxMessage/message-widgets/MessageSliceRenderer.tsx +40 -0
- package/src/components/InboxMessage/message-widgets/ModernMessageGroup.tsx +1295 -0
- package/src/components/InboxMessage/message-widgets/PlainMessage.tsx +18 -0
- package/src/components/InboxMessage/message-widgets/PropertyMessageWidget.tsx +29 -0
- package/src/components/InboxMessage/message-widgets/SlackLikeMessageGroup.tsx +492 -0
- package/src/components/InboxMessage/message-widgets/index.ts +3 -0
- package/src/components/ModelConfigPanel.tsx +345 -0
- package/src/components/filler-components/RightSiderBar.tsx +408 -0
- package/src/components/inbox/FilesList.tsx +89 -0
- package/src/components/inbox/MessageItem.tsx +50 -0
- package/src/components/inbox/ThreadItem.tsx +295 -0
- package/src/components/inbox/index.ts +3 -0
- package/src/components/index.ts +22 -0
- package/src/components/live-code-editor/hybrid-live-editor.tsx +105 -0
- package/src/components/live-code-editor/index.ts +3 -0
- package/src/components/live-code-editor/live-code-editor.tsx +257 -0
- package/src/components/slot-fill/chat-message-filler.tsx +18 -0
- package/src/components/slot-fill/chat-message-slot.tsx +18 -0
- package/src/components/slot-fill/index.ts +3 -0
- package/src/components/slot-fill/right-sidebar-filler.tsx +39 -0
- package/src/components/ui/button.tsx +32 -0
- package/src/compute.ts +134 -0
- package/src/config/env-config.ts +17 -0
- package/src/config/index.ts +1 -0
- package/src/constants/breakpoints.ts +7 -0
- package/src/constants/index.ts +5 -0
- package/src/container/AiInbox.tsx +1819 -0
- package/src/container/AiInboxWithLoader.tsx +356 -0
- package/src/container/AiLandingInput.tsx +221 -0
- package/src/container/Inbox.tsx +1092 -0
- package/src/container/InboxAiMessagesLoader.tsx +44 -0
- package/src/container/InboxContainer.tsx +35 -0
- package/src/container/InboxTemplate1.tsx +1542 -0
- package/src/container/InboxTemplate1WithLoader.tsx +338 -0
- package/src/container/InboxTemplate2.tsx +1606 -0
- package/src/container/InboxWithAiLoader.tsx +76 -0
- package/src/container/InboxWithLoader.tsx +341 -0
- package/src/container/ServiceInbox.tsx +190 -0
- package/src/container/ThreadMessages.tsx +371 -0
- package/src/container/ThreadMessagesInbox.tsx +450 -0
- package/src/container/Threads.tsx +270 -0
- package/src/container/ThreadsInbox.tsx +354 -0
- package/src/container/apply-footer-styles.ts +17 -0
- package/src/container/index.ts +31 -0
- package/src/enums/index.ts +1 -0
- package/src/enums/messenger-slot-fill-name-enum.ts +4 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/use-file-sync.ts +91 -0
- package/src/hooks/usePersistentModelConfig.ts +63 -0
- package/src/index.ts +37 -0
- package/src/interfaces/index.ts +1 -0
- package/src/interfaces/message-widgets.interface.ts +21 -0
- package/src/machines/aiAgentMachine.simple.ts +89 -0
- package/src/machines/aiAgentMachine.ts +1296 -0
- package/src/machines/aiAgentMachine.ts.bk +1296 -0
- package/src/machines/index.ts +2 -0
- package/src/machines/types.ts +59 -0
- package/src/module.tsx +32 -0
- package/src/styles/responsive.css +76 -0
- package/src/templates/InboxWithAi.tsx +533 -0
- package/src/templates/index.ts +1 -0
- package/src/utils/utils.ts +3 -0
- package/tsconfig.json +14 -0
- package/webpack.config.js +92 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import React, { useState, useCallback, useRef, useEffect } from 'react';
|
|
2
|
+
import { Editor } from '@monaco-editor/react';
|
|
3
|
+
import { BsFileText } from '@react-icons/all-files/bs/BsFileText.js';
|
|
4
|
+
import { BsFolder } from '@react-icons/all-files/bs/BsFolder.js';
|
|
5
|
+
import { BsChevronRight } from '@react-icons/all-files/bs/BsChevronRight.js';
|
|
6
|
+
import { BsChevronDown } from '@react-icons/all-files/bs/BsChevronDown.js';
|
|
7
|
+
|
|
8
|
+
interface LiveCodeEditorProps {
|
|
9
|
+
files?: Record<string, string>;
|
|
10
|
+
className?: string;
|
|
11
|
+
onCopyToClipboard?: (text: string) => void;
|
|
12
|
+
onFileUpdate?: (filePath: string, content: string) => Promise<void>;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
autoSave?: boolean;
|
|
15
|
+
debounceMs?: number;
|
|
16
|
+
showFileExplorer?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface FileNode {
|
|
20
|
+
name: string;
|
|
21
|
+
type: 'file' | 'folder';
|
|
22
|
+
children?: FileNode[];
|
|
23
|
+
path: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// File Explorer Component
|
|
27
|
+
const FileExplorer: React.FC<{
|
|
28
|
+
files: Record<string, string>;
|
|
29
|
+
currentFile: string;
|
|
30
|
+
onFileSelect: (filePath: string) => void;
|
|
31
|
+
}> = ({ files, currentFile, onFileSelect }) => {
|
|
32
|
+
// Simple file list without folder structure
|
|
33
|
+
const fileList = Object.keys(files);
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div className="w-48 bg-gray-50 border-l border-gray-200 flex flex-col">
|
|
37
|
+
<div className="p-3 border-b border-gray-200 bg-white">
|
|
38
|
+
<h3 className="text-sm font-semibold text-gray-700">Files</h3>
|
|
39
|
+
</div>
|
|
40
|
+
<div className="flex-1 overflow-y-auto">
|
|
41
|
+
{fileList.map((filePath) => {
|
|
42
|
+
const fileName = filePath.split('/').pop() || filePath;
|
|
43
|
+
const isSelected = currentFile === filePath;
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
key={filePath}
|
|
48
|
+
className={`flex items-center py-2 px-3 cursor-pointer hover:bg-gray-100 ${
|
|
49
|
+
isSelected ? 'bg-blue-50 text-blue-600' : 'text-gray-700'
|
|
50
|
+
}`}
|
|
51
|
+
onClick={() => onFileSelect(filePath)}
|
|
52
|
+
>
|
|
53
|
+
<BsFileText className="w-4 h-4 mr-2 text-gray-500" />
|
|
54
|
+
<span className="text-sm">{fileName}</span>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
})}
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const LiveCodeEditor: React.FC<LiveCodeEditorProps> = ({
|
|
64
|
+
files = {},
|
|
65
|
+
className = '',
|
|
66
|
+
onCopyToClipboard,
|
|
67
|
+
onFileUpdate,
|
|
68
|
+
readOnly = false,
|
|
69
|
+
autoSave = true,
|
|
70
|
+
debounceMs = 500,
|
|
71
|
+
showFileExplorer = true,
|
|
72
|
+
}) => {
|
|
73
|
+
const [currentFile, setCurrentFile] = useState<string>(Object.keys(files)[0] || '');
|
|
74
|
+
const [fileContent, setFileContent] = useState<string>(files[currentFile] || '');
|
|
75
|
+
const editorRef = useRef<any>(null);
|
|
76
|
+
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
77
|
+
|
|
78
|
+
// Update file content when files prop changes
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (files && Object.keys(files).length > 0) {
|
|
81
|
+
const firstFile = Object.keys(files)[0];
|
|
82
|
+
setCurrentFile(firstFile);
|
|
83
|
+
setFileContent(files[firstFile] || '');
|
|
84
|
+
}
|
|
85
|
+
}, [files]);
|
|
86
|
+
|
|
87
|
+
const handleEditorDidMount = useCallback(
|
|
88
|
+
(editor: any, monaco: any) => {
|
|
89
|
+
editorRef.current = editor;
|
|
90
|
+
|
|
91
|
+
// Configure editor options
|
|
92
|
+
editor.updateOptions({
|
|
93
|
+
readOnly,
|
|
94
|
+
minimap: { enabled: false },
|
|
95
|
+
scrollBeyondLastLine: false,
|
|
96
|
+
wordWrap: 'on',
|
|
97
|
+
lineNumbers: 'on',
|
|
98
|
+
folding: true,
|
|
99
|
+
lineDecorationsWidth: 0,
|
|
100
|
+
lineNumbersMinChars: 0,
|
|
101
|
+
renderLineHighlight: 'none',
|
|
102
|
+
cursorStyle: 'line',
|
|
103
|
+
cursorWidth: 1,
|
|
104
|
+
fontSize: 14,
|
|
105
|
+
fontFamily: "'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace",
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// Add keyboard shortcuts
|
|
109
|
+
editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyC, () => {
|
|
110
|
+
const selection = editor.getSelection();
|
|
111
|
+
const selectedText = editor.getModel()?.getValueInRange(selection) || '';
|
|
112
|
+
if (selectedText && onCopyToClipboard) {
|
|
113
|
+
onCopyToClipboard(selectedText);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
[readOnly, onCopyToClipboard],
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
const handleEditorChange = useCallback(
|
|
121
|
+
(value: string | undefined) => {
|
|
122
|
+
if (value !== undefined) {
|
|
123
|
+
setFileContent(value);
|
|
124
|
+
|
|
125
|
+
// Debounced auto-save
|
|
126
|
+
if (autoSave && onFileUpdate && currentFile) {
|
|
127
|
+
if (timeoutRef.current) {
|
|
128
|
+
clearTimeout(timeoutRef.current);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
timeoutRef.current = setTimeout(() => {
|
|
132
|
+
onFileUpdate(currentFile, value);
|
|
133
|
+
}, debounceMs);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
[autoSave, onFileUpdate, currentFile, debounceMs],
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
const getLanguageFromFileName = (fileName: string): string => {
|
|
141
|
+
const extension = fileName.split('.').pop()?.toLowerCase();
|
|
142
|
+
const languageMap: Record<string, string> = {
|
|
143
|
+
js: 'javascript',
|
|
144
|
+
jsx: 'javascript',
|
|
145
|
+
ts: 'typescript',
|
|
146
|
+
tsx: 'typescript',
|
|
147
|
+
py: 'python',
|
|
148
|
+
java: 'java',
|
|
149
|
+
cpp: 'cpp',
|
|
150
|
+
c: 'c',
|
|
151
|
+
cs: 'csharp',
|
|
152
|
+
php: 'php',
|
|
153
|
+
rb: 'ruby',
|
|
154
|
+
go: 'go',
|
|
155
|
+
rs: 'rust',
|
|
156
|
+
html: 'html',
|
|
157
|
+
css: 'css',
|
|
158
|
+
scss: 'scss',
|
|
159
|
+
sass: 'sass',
|
|
160
|
+
less: 'less',
|
|
161
|
+
json: 'json',
|
|
162
|
+
xml: 'xml',
|
|
163
|
+
yaml: 'yaml',
|
|
164
|
+
yml: 'yaml',
|
|
165
|
+
md: 'markdown',
|
|
166
|
+
sql: 'sql',
|
|
167
|
+
sh: 'shell',
|
|
168
|
+
bash: 'shell',
|
|
169
|
+
dockerfile: 'dockerfile',
|
|
170
|
+
};
|
|
171
|
+
return languageMap[extension || ''] || 'plaintext';
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
// Cleanup timeout on unmount
|
|
175
|
+
useEffect(() => {
|
|
176
|
+
return () => {
|
|
177
|
+
if (timeoutRef.current) {
|
|
178
|
+
clearTimeout(timeoutRef.current);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
}, []);
|
|
182
|
+
|
|
183
|
+
const handleFileSelect = useCallback(
|
|
184
|
+
(filePath: string) => {
|
|
185
|
+
setCurrentFile(filePath);
|
|
186
|
+
setFileContent(files[filePath] || '');
|
|
187
|
+
},
|
|
188
|
+
[files],
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
return (
|
|
192
|
+
<div className={`flex h-full w-full ${className}`}>
|
|
193
|
+
{/* Editor Area - Left Side */}
|
|
194
|
+
<div className="flex-1 flex flex-col">
|
|
195
|
+
{/* File Name Header */}
|
|
196
|
+
<div className="flex items-center justify-between px-4 py-2 bg-gray-100 border-b border-gray-200">
|
|
197
|
+
<div className="flex items-center">
|
|
198
|
+
<BsFileText className="w-4 h-4 mr-2 text-gray-500" />
|
|
199
|
+
<span className="text-sm font-medium text-gray-700">
|
|
200
|
+
{currentFile.split('/').pop() || currentFile}
|
|
201
|
+
</span>
|
|
202
|
+
</div>
|
|
203
|
+
<div className="flex items-center space-x-2">
|
|
204
|
+
<button className="text-gray-400 hover:text-gray-600">
|
|
205
|
+
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
206
|
+
<path
|
|
207
|
+
strokeLinecap="round"
|
|
208
|
+
strokeLinejoin="round"
|
|
209
|
+
strokeWidth={2}
|
|
210
|
+
d="M6 18L18 6M6 6l12 12"
|
|
211
|
+
/>
|
|
212
|
+
</svg>
|
|
213
|
+
</button>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
|
|
217
|
+
{/* Monaco Editor */}
|
|
218
|
+
<div className="flex-1" style={{ height: '100%', minHeight: '400px' }}>
|
|
219
|
+
<Editor
|
|
220
|
+
height="100%"
|
|
221
|
+
language={getLanguageFromFileName(currentFile)}
|
|
222
|
+
value={fileContent}
|
|
223
|
+
onMount={handleEditorDidMount}
|
|
224
|
+
onChange={handleEditorChange}
|
|
225
|
+
options={{
|
|
226
|
+
readOnly,
|
|
227
|
+
minimap: { enabled: false },
|
|
228
|
+
scrollBeyondLastLine: true,
|
|
229
|
+
wordWrap: 'on',
|
|
230
|
+
lineNumbers: 'on',
|
|
231
|
+
folding: true,
|
|
232
|
+
lineDecorationsWidth: 0,
|
|
233
|
+
lineNumbersMinChars: 0,
|
|
234
|
+
renderLineHighlight: 'none',
|
|
235
|
+
cursorStyle: 'line',
|
|
236
|
+
cursorWidth: 1,
|
|
237
|
+
fontSize: 14,
|
|
238
|
+
fontFamily:
|
|
239
|
+
"'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace",
|
|
240
|
+
scrollbar: {
|
|
241
|
+
vertical: 'auto',
|
|
242
|
+
horizontal: 'auto',
|
|
243
|
+
verticalScrollbarSize: 8,
|
|
244
|
+
horizontalScrollbarSize: 8,
|
|
245
|
+
},
|
|
246
|
+
}}
|
|
247
|
+
/>
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
|
|
251
|
+
{/* File Explorer - Right Side */}
|
|
252
|
+
{showFileExplorer && Object.keys(files).length > 0 && (
|
|
253
|
+
<FileExplorer files={files} currentFile={currentFile} onFileSelect={handleFileSelect} />
|
|
254
|
+
)}
|
|
255
|
+
</div>
|
|
256
|
+
);
|
|
257
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ChatMessageFiller } from './chat-message-slot';
|
|
3
|
+
import { MessageSliceRenderer } from '../InboxMessage/message-widgets';
|
|
4
|
+
|
|
5
|
+
export const ChatMessageFill = () => {
|
|
6
|
+
return <ChatMessageFiller>{(props) => <MessageSliceRenderer {...props} />}</ChatMessageFiller>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const ChatMessageFill2 = () => {
|
|
10
|
+
return (
|
|
11
|
+
<ChatMessageFiller>
|
|
12
|
+
{(props) => {
|
|
13
|
+
const { message, index, onOpen, currentUser } = props;
|
|
14
|
+
return <div>{message.message}</div>;
|
|
15
|
+
}}
|
|
16
|
+
</ChatMessageFiller>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { Slot, Fill } from '@common-stack/components-pro';
|
|
3
|
+
import { MESSAGE_SLOT_FILL_NAME } from '@messenger-box/core';
|
|
4
|
+
|
|
5
|
+
type ChatMessageProps = {
|
|
6
|
+
index: number;
|
|
7
|
+
message: any;
|
|
8
|
+
onOpen: any;
|
|
9
|
+
currentUser: any;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const ChatMessageSlot: FunctionComponent<ChatMessageProps> = (props) => {
|
|
13
|
+
return <Slot name={MESSAGE_SLOT_FILL_NAME} fillProps={{ active: true, ...props }} />;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const ChatMessageFiller = (props: any) => {
|
|
17
|
+
return <Fill {...props} name={MESSAGE_SLOT_FILL_NAME} />;
|
|
18
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Fill } from '@common-stack/components-pro';
|
|
3
|
+
import { MessengerSlotFillNameEnum } from '../../enums';
|
|
4
|
+
import { RightSidebarFillComponent } from '../filler-components/RightSiderBar';
|
|
5
|
+
|
|
6
|
+
type RightSidebarProps = {
|
|
7
|
+
channelId: string;
|
|
8
|
+
detailSidebarOptions: {
|
|
9
|
+
isMobileView: boolean;
|
|
10
|
+
isSmallTabletView: boolean;
|
|
11
|
+
isTabletView: boolean;
|
|
12
|
+
isDesktopView: boolean;
|
|
13
|
+
isLargeDesktopView: boolean;
|
|
14
|
+
isSmallScreen: boolean;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
windowWidth: number;
|
|
18
|
+
windowHeight: number;
|
|
19
|
+
activeTab?: string;
|
|
20
|
+
selectedPost?: any;
|
|
21
|
+
messages?: any[];
|
|
22
|
+
setIsLoading?: (isLoading: boolean) => void;
|
|
23
|
+
isLoading?: boolean;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const RightSidebarFiller = (props: any) => {
|
|
28
|
+
return <Fill {...props} name={MessengerSlotFillNameEnum.INBOX_WITH_AI_RIGHT_SIDEBAR} />;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const RightSidebarFill = () => {
|
|
32
|
+
return (
|
|
33
|
+
<RightSidebarFiller>
|
|
34
|
+
{(props: RightSidebarProps) => {
|
|
35
|
+
return <RightSidebarFillComponent {...props} />;
|
|
36
|
+
}}
|
|
37
|
+
</RightSidebarFiller>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { cn } from '../../utils/utils';
|
|
3
|
+
|
|
4
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
variant?: 'default' | 'outline' | 'ghost' | 'link';
|
|
6
|
+
size?: 'default' | 'sm' | 'lg';
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
11
|
+
({ className, variant = 'default', size = 'default', ...props }, ref) => {
|
|
12
|
+
const baseClasses =
|
|
13
|
+
'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background';
|
|
14
|
+
|
|
15
|
+
const variants = {
|
|
16
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
17
|
+
outline: 'border border-input hover:bg-accent hover:text-accent-foreground',
|
|
18
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
19
|
+
link: 'underline-offset-4 hover:underline text-primary',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const sizes = {
|
|
23
|
+
default: 'h-10 py-2 px-4',
|
|
24
|
+
sm: 'h-9 px-3 rounded-md',
|
|
25
|
+
lg: 'h-11 px-8 rounded-md',
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return <button className={cn(baseClasses, variants[variant], sizes[size], className)} ref={ref} {...props} />;
|
|
29
|
+
},
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
Button.displayName = 'Button';
|
package/src/compute.ts
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { PreDefineAccountPermissions } from '@adminide-stack/core';
|
|
4
|
+
import { IMenuPosition } from '@common-stack/client-react';
|
|
5
|
+
import type { IRouteModule } from '@common-stack/core';
|
|
6
|
+
import { getFilteredRoutes, IPageStore } from '@adminide-stack/core';
|
|
7
|
+
|
|
8
|
+
export const messengerPageStore: IRouteModule[] | { [key: string]: any } = [
|
|
9
|
+
{
|
|
10
|
+
exact: false,
|
|
11
|
+
icon: 'AiOutlineInbox',
|
|
12
|
+
key: 'inbox',
|
|
13
|
+
component: () => import('./container/InboxWithLoader'),
|
|
14
|
+
tab: 'Chat App',
|
|
15
|
+
position: IMenuPosition.Middle,
|
|
16
|
+
// authority: [PreDefineAccountPermissions.secureUser],
|
|
17
|
+
name: 'Inbox',
|
|
18
|
+
path: '//inbox/:id?/:postId?',
|
|
19
|
+
// path: '/o/:orgName/inbox',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
exact: false,
|
|
23
|
+
icon: 'AiOutlineInbox',
|
|
24
|
+
key: 'inbox',
|
|
25
|
+
component: () => import('./container/InboxWithLoader'),
|
|
26
|
+
tab: 'Chat App',
|
|
27
|
+
position: IMenuPosition.Middle,
|
|
28
|
+
//authority: [PreDefineAccountPermissions.secureUser],
|
|
29
|
+
name: 'Inbox',
|
|
30
|
+
path: '/o/:orgName/inbox',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
exact: false,
|
|
34
|
+
icon: 'AiOutlineInbox',
|
|
35
|
+
key: 'direct-message',
|
|
36
|
+
component: () => import('./container/InboxWithLoader'),
|
|
37
|
+
tab: 'DM',
|
|
38
|
+
position: IMenuPosition.Middle,
|
|
39
|
+
// authority: [PreDefineAccountPermissions.secureUser],
|
|
40
|
+
name: 'DirectMessage',
|
|
41
|
+
path: '//o/:orgName/direct-message/:id?/:postId?',
|
|
42
|
+
// path: '/o/:orgName/inbox',
|
|
43
|
+
},
|
|
44
|
+
// {
|
|
45
|
+
// exact: false,
|
|
46
|
+
// icon: 'AiOutlineInbox',
|
|
47
|
+
// key: 'ai-messenger',
|
|
48
|
+
// component: () => import('./container/AiInboxWithLoader'),
|
|
49
|
+
// tab: 'DM',
|
|
50
|
+
// position: IMenuPosition.Middle,
|
|
51
|
+
// // authority: [PreDefineAccountPermissions.secureUser],
|
|
52
|
+
// name: 'AiMessenger',
|
|
53
|
+
// path: '//o/:orgName/ai-messenger/:id?/:postId?',
|
|
54
|
+
// // path: '/o/:orgName/inbox',
|
|
55
|
+
// },
|
|
56
|
+
{
|
|
57
|
+
exact: false,
|
|
58
|
+
icon: 'AiOutlineInbox',
|
|
59
|
+
key: 'ai-messenger',
|
|
60
|
+
component: () => import('./container/InboxWithAiLoader'),
|
|
61
|
+
tab: 'Ai Messenger',
|
|
62
|
+
position: IMenuPosition.Middle,
|
|
63
|
+
name: 'AiMessenger',
|
|
64
|
+
path: '/ai-messenger',
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
{
|
|
68
|
+
exact: false,
|
|
69
|
+
icon: 'AiOutlineInbox',
|
|
70
|
+
key: 'ai-messenger-with-message-app',
|
|
71
|
+
component: () => import('./container/InboxAiMessagesLoader'),
|
|
72
|
+
tab: 'Ai Messenger',
|
|
73
|
+
position: IMenuPosition.Middle,
|
|
74
|
+
name: 'AiMessengerWithMessageApp',
|
|
75
|
+
path: '/ai-messenger/app',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
exact: false,
|
|
79
|
+
icon: 'AiOutlineInbox',
|
|
80
|
+
key: 'ai-messenger-with-org-name',
|
|
81
|
+
component: () => import('./container/InboxWithAiLoader'),
|
|
82
|
+
tab: 'Ai Messenger',
|
|
83
|
+
position: IMenuPosition.Middle,
|
|
84
|
+
name: 'AiMessengerWithOrgName',
|
|
85
|
+
path: '//o/:orgName/ai-messenger',
|
|
86
|
+
},
|
|
87
|
+
// {
|
|
88
|
+
// exact: false,
|
|
89
|
+
// icon: 'AiOutlineInbox',
|
|
90
|
+
// key: 'ai-messenger-with-channel-id',
|
|
91
|
+
// component: () => import('./templates/InboxWithAi'),
|
|
92
|
+
// tab: 'Ai Messenger',
|
|
93
|
+
// position: IMenuPosition.Middle,
|
|
94
|
+
// name: 'AiMessengerWithChannelId',
|
|
95
|
+
// path: '//o?/:orgName?/ai-messenger/:id',
|
|
96
|
+
// },
|
|
97
|
+
|
|
98
|
+
// {
|
|
99
|
+
// exact: false,
|
|
100
|
+
// icon: 'AiOutlineInbox',
|
|
101
|
+
// key: 'messenger-ai',
|
|
102
|
+
// component: () => import('./container/InboxAiLoader'),
|
|
103
|
+
// tab: 'Ai Messenger',
|
|
104
|
+
// position: IMenuPosition.Middle,
|
|
105
|
+
// name: 'MessengerAi',
|
|
106
|
+
// path: '/messenger-ai',
|
|
107
|
+
// },
|
|
108
|
+
|
|
109
|
+
// {
|
|
110
|
+
// exact: false,
|
|
111
|
+
// icon: 'AiOutlineInbox',
|
|
112
|
+
// key: 'ai-messenger-with-preview',
|
|
113
|
+
// component: () => import('./container/InboxWithAiLoader'),
|
|
114
|
+
// tab: 'Ai Messenger',
|
|
115
|
+
// position: IMenuPosition.Middle,
|
|
116
|
+
// name: 'AiMessengerWithPreview',
|
|
117
|
+
// path: '//o?/:orgName?/ai-messenger/app/:id/preview',
|
|
118
|
+
// },
|
|
119
|
+
];
|
|
120
|
+
|
|
121
|
+
// get only selected Routes to work
|
|
122
|
+
const selectedRoutes = [
|
|
123
|
+
'inbox',
|
|
124
|
+
'direct-message',
|
|
125
|
+
'ai-messenger',
|
|
126
|
+
'ai-messenger-with-org-name',
|
|
127
|
+
'ai-messenger-with-channel-id',
|
|
128
|
+
'ai-messenger-with-message-app',
|
|
129
|
+
'ai-messenger-with-preview',
|
|
130
|
+
];
|
|
131
|
+
|
|
132
|
+
const filteredRoutes = getFilteredRoutes(messengerPageStore, selectedRoutes);
|
|
133
|
+
|
|
134
|
+
export { filteredRoutes };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cleanEnv, num, str } from 'envalid';
|
|
2
|
+
import { getEnvironment } from '@common-stack/core';
|
|
3
|
+
|
|
4
|
+
const env = getEnvironment();
|
|
5
|
+
|
|
6
|
+
export const config = cleanEnv(env, {
|
|
7
|
+
CLIENT_URL: str({ default: 'http://localhost:3011' }),
|
|
8
|
+
WEB_INBOX_MESSEGE_PATH: str({ default: 'inbox' }),
|
|
9
|
+
WEB_THREAD_MESSEGE_PATH: str({ default: 'thread' }),
|
|
10
|
+
MESSAGES_PER_PAGE: num({ devDefault: 10, default: 10 }),
|
|
11
|
+
FILES_PER_MESSAGE: num({ default: 10 }),
|
|
12
|
+
VITE_OPENAI_API_KEY: str({ default: '' }),
|
|
13
|
+
VITE_ANTHROPIC_API_KEY: str({ default: '' }),
|
|
14
|
+
ANTHROPIC_API_KEY: str({ default: '' }),
|
|
15
|
+
NEWS_API_KEY: str({ default: '' }),
|
|
16
|
+
OPENAI_API_KEY: str({ default: '' }),
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { config } from './env-config';
|