@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,295 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { format, isToday, isYesterday } from 'date-fns';
|
|
4
|
+
import { startCase } from 'lodash-es';
|
|
5
|
+
import { useLocation } from '@remix-run/react';
|
|
6
|
+
|
|
7
|
+
const createdAtText = (value: string) => {
|
|
8
|
+
if (!value) return '';
|
|
9
|
+
let date = new Date(value);
|
|
10
|
+
if (isToday(date)) return 'Today';
|
|
11
|
+
if (isYesterday(date)) return 'Yesterday';
|
|
12
|
+
return format(new Date(value), 'MMM dd, yyyy');
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export interface IThreadItemProps {
|
|
16
|
+
currentUser?: any;
|
|
17
|
+
users?: any;
|
|
18
|
+
thread?: any;
|
|
19
|
+
onOpen: (channelId: any, postId: any) => void;
|
|
20
|
+
role?: any;
|
|
21
|
+
setData?: any;
|
|
22
|
+
//subscribeToNewMessages: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* TODO:
|
|
27
|
+
* - Get Reservation info: reservation date, status
|
|
28
|
+
* - Add ability to get property information: name, logo
|
|
29
|
+
*/
|
|
30
|
+
const ThreadItemComponent: React.FC<IThreadItemProps> = function DialogsListItem({
|
|
31
|
+
currentUser,
|
|
32
|
+
// users,
|
|
33
|
+
thread,
|
|
34
|
+
onOpen,
|
|
35
|
+
role,
|
|
36
|
+
setData,
|
|
37
|
+
//subscribeToNewMessages,
|
|
38
|
+
}) {
|
|
39
|
+
const location = useLocation();
|
|
40
|
+
const { t } = useTranslation('translations');
|
|
41
|
+
|
|
42
|
+
// React.useEffect(() => subscribeToNewMessages(), []);
|
|
43
|
+
|
|
44
|
+
const threadPostReply = React.useMemo(() => {
|
|
45
|
+
if (!thread?.replies) return null;
|
|
46
|
+
return thread?.replies;
|
|
47
|
+
}, [thread]);
|
|
48
|
+
|
|
49
|
+
// const { data: threadCreatedUpdated } = useOnThreadCreatedUpdatedSubscription({
|
|
50
|
+
// variables: {
|
|
51
|
+
// channelId: thread?.channel?.id?.toString(),
|
|
52
|
+
// postParentId: thread?.post?.id?.toString(),
|
|
53
|
+
// },
|
|
54
|
+
// });
|
|
55
|
+
|
|
56
|
+
// React.useEffect(() => {
|
|
57
|
+
// if (threadCreatedUpdated?.threadCreatedUpdated?.data) setData(threadCreatedUpdated?.threadCreatedUpdated?.data);
|
|
58
|
+
// }, [threadCreatedUpdated?.threadCreatedUpdated]);
|
|
59
|
+
|
|
60
|
+
// const threadPostReply = React.useMemo(() => {
|
|
61
|
+
// if (!thread?.replies) return null;
|
|
62
|
+
// if (threadCreatedUpdated?.threadCreatedUpdated?.data?.replies?.length) {
|
|
63
|
+
// return threadCreatedUpdated?.threadCreatedUpdated?.data?.replies;
|
|
64
|
+
// } else return thread?.replies;
|
|
65
|
+
// }, [thread, threadCreatedUpdated, location?.pathname]);
|
|
66
|
+
|
|
67
|
+
// const lastMessage = useMemo(() => {
|
|
68
|
+
// if (!thread) {
|
|
69
|
+
// return null;
|
|
70
|
+
// }
|
|
71
|
+
// const replies = thread?.replies?.filter((p: any) => p?.message !== '') ?? [];
|
|
72
|
+
// if (replies?.length) {
|
|
73
|
+
// return replies[0];
|
|
74
|
+
// // return replies[replies.length - 1];
|
|
75
|
+
// } else {
|
|
76
|
+
// const post = thread?.post ?? null;
|
|
77
|
+
// return post ? post?.post : null;
|
|
78
|
+
// }
|
|
79
|
+
// }, [thread]);
|
|
80
|
+
|
|
81
|
+
// const participants: any = React.useMemo(() => {
|
|
82
|
+
// if (!thread?.participants?.length) return null;
|
|
83
|
+
// return thread?.participants?.filter((u: any) => u?.user?.id !== currentUser?.id) ?? [];
|
|
84
|
+
// }, [thread]);
|
|
85
|
+
|
|
86
|
+
// const allParticipantsNames: any = React.useMemo(() => {
|
|
87
|
+
// if (!participants?.length) return null;
|
|
88
|
+
// return (
|
|
89
|
+
// participants
|
|
90
|
+
// ?.map((p: any) => {
|
|
91
|
+
// return p?.user?.username ?? '';
|
|
92
|
+
// })
|
|
93
|
+
// ?.join(', ') ?? ''
|
|
94
|
+
// );
|
|
95
|
+
// }, [participants]);
|
|
96
|
+
|
|
97
|
+
// if (!threadPostReply || threadPostReply?.length == 0) {
|
|
98
|
+
// return <></>;
|
|
99
|
+
// }
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<div className="flex-1 py-2 my-2 flex flex-col space-y-4 items-stretch">
|
|
103
|
+
<div className="border-b border-gray-200 pb-4">
|
|
104
|
+
<div className="flex space-x-6">
|
|
105
|
+
<div className="w-full">
|
|
106
|
+
{/* <div className="flex items-center space-x-2">
|
|
107
|
+
<div>
|
|
108
|
+
<div className="w-5 h-5 bg-green-500 rounded-full" />
|
|
109
|
+
</div>
|
|
110
|
+
<div>
|
|
111
|
+
<p className="text-lg text-gray-900 font-semibold">
|
|
112
|
+
{allParticipantsNames || ''}
|
|
113
|
+
</p>
|
|
114
|
+
</div>
|
|
115
|
+
</div> */}
|
|
116
|
+
|
|
117
|
+
<div className="flex flex-col items-start pt-5 pb-5 pl-5 pr-2 space-y-5 shadow-sm p-6 rounded-md bg-white">
|
|
118
|
+
{!threadPostReply ||
|
|
119
|
+
((threadPostReply?.length == 0 || threadPostReply?.length == 1) && (
|
|
120
|
+
<div className="flex w-full items-start space-x-4">
|
|
121
|
+
<div>
|
|
122
|
+
<img
|
|
123
|
+
className="w-9 h-9 object-cover rounded"
|
|
124
|
+
src={thread?.post?.author?.picture}
|
|
125
|
+
alt={startCase(thread?.post?.author?.username?.charAt(0))}
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
<div className="leading-3">
|
|
129
|
+
<div className="flex-1 flex flex-col space-y-3 items-start">
|
|
130
|
+
<div className="flex items-center space-x-2">
|
|
131
|
+
<p className="text-lg text-gray-900 font-semibold">
|
|
132
|
+
{thread?.post?.author?.givenName ?? ''}{' '}
|
|
133
|
+
{thread?.post?.author?.familyName ?? ''}
|
|
134
|
+
</p>
|
|
135
|
+
<p className="text-sm text-gray-500 font-semibold">
|
|
136
|
+
{thread?.post ? createdAtText(thread?.post?.createdAt) : ''}
|
|
137
|
+
</p>
|
|
138
|
+
</div>
|
|
139
|
+
<div className="flex flex-col space-y-2">
|
|
140
|
+
<p className="text-sm text-gray-500 font-semibold">
|
|
141
|
+
{thread?.post?.message
|
|
142
|
+
? thread?.post?.message.length < 70
|
|
143
|
+
? `${thread?.post?.message}`
|
|
144
|
+
: `${thread?.post?.message.substring(0, 68)}....`
|
|
145
|
+
: ''}
|
|
146
|
+
</p>
|
|
147
|
+
|
|
148
|
+
{thread?.post?.files?.data?.length > 0 &&
|
|
149
|
+
thread?.post?.files?.data?.map((f: any, index: number) => (
|
|
150
|
+
<div key={index}>
|
|
151
|
+
<img
|
|
152
|
+
className="w-12 h-12 object-cover rounded"
|
|
153
|
+
src={f?.url}
|
|
154
|
+
alt={'Image'}
|
|
155
|
+
/>
|
|
156
|
+
</div>
|
|
157
|
+
))}
|
|
158
|
+
</div>
|
|
159
|
+
{threadPostReply?.length == 0 && (
|
|
160
|
+
<button
|
|
161
|
+
onClick={() =>
|
|
162
|
+
onOpen(
|
|
163
|
+
thread?.channel?.id?.toString(),
|
|
164
|
+
thread?.post?.id?.toString(),
|
|
165
|
+
)
|
|
166
|
+
}
|
|
167
|
+
className="py-2 px-4 border border-gray-300 text-gray-700 bg-white hover:bg-gray-50 rounded text-sm font-medium w-36 transition-colors"
|
|
168
|
+
>
|
|
169
|
+
{t('tailwind_ui_inbox.reply')}
|
|
170
|
+
</button>
|
|
171
|
+
)}
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
))}
|
|
176
|
+
|
|
177
|
+
{threadPostReply?.length > 0 && (
|
|
178
|
+
<>
|
|
179
|
+
{threadPostReply
|
|
180
|
+
?.slice(0, 2)
|
|
181
|
+
?.reverse()
|
|
182
|
+
?.map((reply: any, index: any) => (
|
|
183
|
+
<div
|
|
184
|
+
key={'thread-post-reply-item-' + index}
|
|
185
|
+
className="flex w-full items-start space-x-4"
|
|
186
|
+
>
|
|
187
|
+
<div>
|
|
188
|
+
<img
|
|
189
|
+
className="w-9 h-9 object-cover rounded"
|
|
190
|
+
src={reply?.author?.picture}
|
|
191
|
+
alt={startCase(reply?.author?.username?.charAt(0))}
|
|
192
|
+
/>
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
<div className="leading-3">
|
|
196
|
+
<div className="flex-1 flex flex-col space-y-3 items-start">
|
|
197
|
+
<div className="flex items-center space-x-2">
|
|
198
|
+
<p className="text-lg text-gray-900 font-semibold">
|
|
199
|
+
{reply?.author?.givenName ?? ''}{' '}
|
|
200
|
+
{reply?.author?.familyName ?? ''}
|
|
201
|
+
</p>
|
|
202
|
+
<p className="text-sm text-gray-500 font-semibold">
|
|
203
|
+
{reply?.createdAt
|
|
204
|
+
? createdAtText(reply?.createdAt)
|
|
205
|
+
: ''}
|
|
206
|
+
</p>
|
|
207
|
+
</div>
|
|
208
|
+
<div className="flex flex-col space-y-2">
|
|
209
|
+
<p className="text-sm text-gray-500 font-semibold">
|
|
210
|
+
{reply?.message
|
|
211
|
+
? reply?.message.length < 70
|
|
212
|
+
? `${reply?.message}`
|
|
213
|
+
: `${reply?.message.substring(0, 68)}....`
|
|
214
|
+
: ''}
|
|
215
|
+
</p>
|
|
216
|
+
|
|
217
|
+
{reply?.files?.data?.length > 0 &&
|
|
218
|
+
reply?.files?.data?.map((f: any, fileIndex: number) => (
|
|
219
|
+
<div key={fileIndex}>
|
|
220
|
+
<img
|
|
221
|
+
className="w-12 h-12 object-cover rounded"
|
|
222
|
+
src={f?.url}
|
|
223
|
+
alt={'Image'}
|
|
224
|
+
/>
|
|
225
|
+
</div>
|
|
226
|
+
))}
|
|
227
|
+
</div>
|
|
228
|
+
{(threadPostReply?.length == 1 || index !== 0) && (
|
|
229
|
+
<button
|
|
230
|
+
onClick={() =>
|
|
231
|
+
onOpen(
|
|
232
|
+
thread?.channel?.id?.toString(),
|
|
233
|
+
thread?.post?.id?.toString(),
|
|
234
|
+
)
|
|
235
|
+
}
|
|
236
|
+
className="py-2 px-4 border border-gray-300 text-gray-700 bg-white hover:bg-gray-50 rounded text-sm font-medium w-36 transition-colors"
|
|
237
|
+
>
|
|
238
|
+
{t('tailwind_ui_inbox.reply')}
|
|
239
|
+
</button>
|
|
240
|
+
)}
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
))}
|
|
245
|
+
{/* <div className="flex w-full items-start space-x-4">
|
|
246
|
+
<div>
|
|
247
|
+
<img
|
|
248
|
+
className="w-9 h-9 object-cover rounded"
|
|
249
|
+
src={lastMessage?.author?.picture}
|
|
250
|
+
alt={startCase(lastMessage?.author?.username?.charAt(0))}
|
|
251
|
+
/>
|
|
252
|
+
</div>
|
|
253
|
+
|
|
254
|
+
<div className="leading-3">
|
|
255
|
+
<div className="flex-1 flex flex-col space-y-3 items-start">
|
|
256
|
+
<div className="flex items-center space-x-2">
|
|
257
|
+
<p className="text-lg text-gray-900 font-semibold">
|
|
258
|
+
{lastMessage?.author?.username ?? ''}
|
|
259
|
+
</p>
|
|
260
|
+
<p className="text-sm text-gray-500 font-semibold">
|
|
261
|
+
{lastMessage ? createdAtText(lastMessage?.createdAt) : ''}
|
|
262
|
+
</p>
|
|
263
|
+
</div>
|
|
264
|
+
<p className="text-sm text-gray-500 font-semibold">
|
|
265
|
+
{lastMessage?.message
|
|
266
|
+
? lastMessage?.message.length < 70
|
|
267
|
+
? `${lastMessage?.message}`
|
|
268
|
+
: `${lastMessage?.message.substring(0, 68)}....`
|
|
269
|
+
: ''}
|
|
270
|
+
</p>
|
|
271
|
+
<button
|
|
272
|
+
onClick={() =>
|
|
273
|
+
onOpen(
|
|
274
|
+
thread?.channel?.id?.toString(),
|
|
275
|
+
thread?.post?.id?.toString(),
|
|
276
|
+
)
|
|
277
|
+
}
|
|
278
|
+
className="py-2 px-4 border border-gray-300 text-gray-700 bg-white hover:bg-gray-50 rounded text-sm font-medium w-36 transition-colors"
|
|
279
|
+
>
|
|
280
|
+
{t('tailwind_ui_inbox.reply')}
|
|
281
|
+
</button>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
</div> */}
|
|
285
|
+
</>
|
|
286
|
+
)}
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
</div>
|
|
292
|
+
);
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
export const ThreadItem = React.memo(ThreadItemComponent);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { MessageItem, FilesList, ThreadItem } from './inbox';
|
|
2
|
+
export {
|
|
3
|
+
LeftSidebar,
|
|
4
|
+
RightSidebar,
|
|
5
|
+
MessageInput,
|
|
6
|
+
MessageInputComponent,
|
|
7
|
+
InputComponent,
|
|
8
|
+
Messages,
|
|
9
|
+
CommonMessage,
|
|
10
|
+
MessageSliceRenderer,
|
|
11
|
+
Popover,
|
|
12
|
+
ConversationItem,
|
|
13
|
+
UploadImageButton,
|
|
14
|
+
UserModalContent,
|
|
15
|
+
ServiceInboxItem,
|
|
16
|
+
MessagesBuilderUi,
|
|
17
|
+
RightSidebarAi,
|
|
18
|
+
} from './InboxMessage';
|
|
19
|
+
export { ChatMessageFiller, ChatMessageFill2, RightSidebarFillDefault } from './slot-fill';
|
|
20
|
+
export { AIAgent } from './AIAgent';
|
|
21
|
+
export { ModelConfigPanel } from './ModelConfigPanel';
|
|
22
|
+
export { usePersistentModelConfig } from '../hooks/usePersistentModelConfig';
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React, { useState, useCallback, useEffect, forwardRef, useImperativeHandle } from 'react';
|
|
2
|
+
import { cn } from '../../utils/utils';
|
|
3
|
+
import { Button } from '../ui/button';
|
|
4
|
+
import { LiveCodeEditor } from './live-code-editor';
|
|
5
|
+
|
|
6
|
+
interface HybridLiveEditorProps {
|
|
7
|
+
projectId: string;
|
|
8
|
+
fragmentId?: string;
|
|
9
|
+
files?: Record<string, string>;
|
|
10
|
+
className?: string;
|
|
11
|
+
sandboxUrl?: string;
|
|
12
|
+
onCopyToClipboard?: (text: string) => void;
|
|
13
|
+
onFileUpdate?: (filePath: string, content: string) => Promise<void>;
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
autoSave?: boolean;
|
|
16
|
+
debounceMs?: number;
|
|
17
|
+
showFileExplorer?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface HybridLiveEditorRef {
|
|
21
|
+
openVSCode: () => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const HybridLiveEditor = forwardRef<HybridLiveEditorRef, HybridLiveEditorProps>(
|
|
25
|
+
(
|
|
26
|
+
{
|
|
27
|
+
projectId,
|
|
28
|
+
fragmentId,
|
|
29
|
+
files = {},
|
|
30
|
+
className,
|
|
31
|
+
sandboxUrl,
|
|
32
|
+
onCopyToClipboard,
|
|
33
|
+
onFileUpdate,
|
|
34
|
+
readOnly = false,
|
|
35
|
+
autoSave = true,
|
|
36
|
+
debounceMs = 500,
|
|
37
|
+
showFileExplorer = true,
|
|
38
|
+
},
|
|
39
|
+
ref,
|
|
40
|
+
) => {
|
|
41
|
+
const handleOpenVSCodeInTab = useCallback(async () => {
|
|
42
|
+
if (sandboxUrl) {
|
|
43
|
+
try {
|
|
44
|
+
// Start VS Code sync first
|
|
45
|
+
if (projectId && fragmentId) {
|
|
46
|
+
console.log('HybridLiveEditor - Starting VSCode sync for:', { projectId, fragmentId });
|
|
47
|
+
// Note: You'll need to implement the VSCode sync mutation based on your GraphQL setup
|
|
48
|
+
// await startVSCodeSyncMutation({
|
|
49
|
+
// variables: { projectId, fragmentId }
|
|
50
|
+
// });
|
|
51
|
+
console.log('HybridLiveEditor - VSCode sync started successfully');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const url = new URL(sandboxUrl);
|
|
55
|
+
let codeServerUrl: string;
|
|
56
|
+
|
|
57
|
+
// Handle different URL formats
|
|
58
|
+
if (url.hostname.includes('yarntra.ai')) {
|
|
59
|
+
// Format: https://3000-{sandboxId}.yarntra.ai -> https://8080-{sandboxId}.yarntra.ai
|
|
60
|
+
codeServerUrl = `${url.protocol}//${url.hostname.replace('3000-', '8080-')}${url.pathname}`;
|
|
61
|
+
} else if (url.hostname.includes('e2b.dev')) {
|
|
62
|
+
// Format: https://{sandboxId}.e2b.dev -> https://{sandboxId}-8080.e2b.dev
|
|
63
|
+
codeServerUrl = `${url.protocol}//${url.hostname}-8080${url.pathname}`;
|
|
64
|
+
} else {
|
|
65
|
+
// Fallback: try port-based approach
|
|
66
|
+
const port = url.port || '3000';
|
|
67
|
+
codeServerUrl = sandboxUrl.replace(`:${port}`, ':8080');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
window.open(codeServerUrl, '_blank');
|
|
71
|
+
} catch (err) {
|
|
72
|
+
console.error('Error opening VSCode in new tab:', err);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}, [sandboxUrl, projectId, fragmentId]);
|
|
76
|
+
|
|
77
|
+
// Expose the openVSCode function via ref
|
|
78
|
+
useImperativeHandle(
|
|
79
|
+
ref,
|
|
80
|
+
() => ({
|
|
81
|
+
openVSCode: handleOpenVSCodeInTab,
|
|
82
|
+
}),
|
|
83
|
+
[handleOpenVSCodeInTab],
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
// Return Monaco Editor without header/footer, exposing VSCode function
|
|
87
|
+
return (
|
|
88
|
+
<div className={cn('flex flex-col h-full w-full', className)}>
|
|
89
|
+
{/* Monaco Editor - Full height */}
|
|
90
|
+
<div className="flex-1 overflow-hidden">
|
|
91
|
+
<LiveCodeEditor
|
|
92
|
+
files={files}
|
|
93
|
+
onCopyToClipboard={onCopyToClipboard}
|
|
94
|
+
onFileUpdate={onFileUpdate}
|
|
95
|
+
readOnly={readOnly}
|
|
96
|
+
autoSave={autoSave}
|
|
97
|
+
debounceMs={debounceMs}
|
|
98
|
+
showFileExplorer={showFileExplorer}
|
|
99
|
+
className="h-full"
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
);
|
|
104
|
+
},
|
|
105
|
+
);
|