@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,240 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { ISandboxError } from 'common';
|
|
3
|
+
|
|
4
|
+
const IconAlertTriangle: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
|
|
5
|
+
<svg
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="none"
|
|
8
|
+
stroke="currentColor"
|
|
9
|
+
strokeWidth="2"
|
|
10
|
+
strokeLinecap="round"
|
|
11
|
+
strokeLinejoin="round"
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
<path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" />
|
|
15
|
+
<line x1="12" y1="9" x2="12" y2="13" />
|
|
16
|
+
<line x1="12" y1="17" x2="12.01" y2="17" />
|
|
17
|
+
</svg>
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
const IconRefreshCw: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
|
|
21
|
+
<svg
|
|
22
|
+
viewBox="0 0 24 24"
|
|
23
|
+
fill="none"
|
|
24
|
+
stroke="currentColor"
|
|
25
|
+
strokeWidth="2"
|
|
26
|
+
strokeLinecap="round"
|
|
27
|
+
strokeLinejoin="round"
|
|
28
|
+
{...props}
|
|
29
|
+
>
|
|
30
|
+
<polyline points="23 4 23 10 17 10" />
|
|
31
|
+
<polyline points="1 20 1 14 7 14" />
|
|
32
|
+
<path d="M3.51 9a9 9 0 0114.13-3.36L23 10" />
|
|
33
|
+
<path d="M20.49 15a9 9 0 01-14.13 3.36L1 14" />
|
|
34
|
+
</svg>
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const IconCode: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
|
|
38
|
+
<svg
|
|
39
|
+
viewBox="0 0 24 24"
|
|
40
|
+
fill="none"
|
|
41
|
+
stroke="currentColor"
|
|
42
|
+
strokeWidth="2"
|
|
43
|
+
strokeLinecap="round"
|
|
44
|
+
strokeLinejoin="round"
|
|
45
|
+
{...props}
|
|
46
|
+
>
|
|
47
|
+
<polyline points="16 18 22 12 16 6" />
|
|
48
|
+
<polyline points="8 6 2 12 8 18" />
|
|
49
|
+
</svg>
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const IconExternalLink: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
|
|
53
|
+
<svg
|
|
54
|
+
viewBox="0 0 24 24"
|
|
55
|
+
fill="none"
|
|
56
|
+
stroke="currentColor"
|
|
57
|
+
strokeWidth="2"
|
|
58
|
+
strokeLinecap="round"
|
|
59
|
+
strokeLinejoin="round"
|
|
60
|
+
{...props}
|
|
61
|
+
>
|
|
62
|
+
<path d="M18 13v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
|
|
63
|
+
<polyline points="15 3 21 3 21 9" />
|
|
64
|
+
<line x1="10" y1="14" x2="21" y2="3" />
|
|
65
|
+
</svg>
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
interface ErrorFixCardProps {
|
|
69
|
+
error: ISandboxError;
|
|
70
|
+
onFixError: (errorMessage: string) => Promise<void>;
|
|
71
|
+
currentFiles?: Record<string, string>;
|
|
72
|
+
isFixing?: boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const ErrorFixCard: React.FC<ErrorFixCardProps> = ({ error, onFixError, currentFiles, isFixing = false }) => {
|
|
76
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
77
|
+
const [isFixingError, setIsFixingError] = useState(false);
|
|
78
|
+
|
|
79
|
+
const handleFixError = async () => {
|
|
80
|
+
setIsFixingError(true);
|
|
81
|
+
try {
|
|
82
|
+
const errorContext = `
|
|
83
|
+
ERROR DETECTED IN SANDBOX:
|
|
84
|
+
|
|
85
|
+
Error Type: ${error.errorType}
|
|
86
|
+
Timestamp: ${error.timestamp}
|
|
87
|
+
Sandbox ID: ${error.sandboxId}
|
|
88
|
+
|
|
89
|
+
Error Message:
|
|
90
|
+
${error.message}
|
|
91
|
+
|
|
92
|
+
${error.stack ? `Stack Trace:\n${error.stack}` : ''}
|
|
93
|
+
|
|
94
|
+
${
|
|
95
|
+
currentFiles && Object.keys(currentFiles).length > 0
|
|
96
|
+
? `
|
|
97
|
+
Current Files in Project:
|
|
98
|
+
${Object.entries(currentFiles)
|
|
99
|
+
.map(
|
|
100
|
+
([path, content]) => `
|
|
101
|
+
--- ${path} ---
|
|
102
|
+
${content}
|
|
103
|
+
`,
|
|
104
|
+
)
|
|
105
|
+
.join('\n')}
|
|
106
|
+
`
|
|
107
|
+
: ''
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
Please analyze this error and fix the code. Make sure to:
|
|
111
|
+
1. Identify the root cause of the error
|
|
112
|
+
2. Update the necessary files to resolve the issue
|
|
113
|
+
3. Ensure the fix maintains the existing functionality
|
|
114
|
+
4. Test that the solution compiles and runs correctly
|
|
115
|
+
`.trim();
|
|
116
|
+
|
|
117
|
+
await onFixError(errorContext);
|
|
118
|
+
} catch (error) {
|
|
119
|
+
console.error('Failed to trigger error fix:', error);
|
|
120
|
+
} finally {
|
|
121
|
+
setIsFixingError(false);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const getErrorTypeColor = (errorType: string) => {
|
|
126
|
+
switch (errorType) {
|
|
127
|
+
case 'COMPILATION_ERROR':
|
|
128
|
+
return 'text-red-600 bg-red-50 border-red-200';
|
|
129
|
+
case 'RUNTIME_ERROR':
|
|
130
|
+
return 'text-orange-600 bg-orange-50 border-orange-200';
|
|
131
|
+
case 'DEPENDENCY_ERROR':
|
|
132
|
+
return 'text-yellow-600 bg-yellow-50 border-yellow-200';
|
|
133
|
+
case 'SERVER_START_ERROR':
|
|
134
|
+
return 'text-purple-600 bg-purple-50 border-purple-200';
|
|
135
|
+
case 'SANDBOX_DISCONNECTED':
|
|
136
|
+
return 'text-gray-600 bg-gray-50 border-gray-200';
|
|
137
|
+
case 'TEST_ERROR':
|
|
138
|
+
return 'text-blue-600 bg-blue-50 border-blue-200';
|
|
139
|
+
default:
|
|
140
|
+
return 'text-red-600 bg-red-50 border-red-200';
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const formatErrorType = (errorType: string) => {
|
|
145
|
+
return errorType
|
|
146
|
+
.replace(/_/g, ' ')
|
|
147
|
+
.toLowerCase()
|
|
148
|
+
.replace(/\b\w/g, (l) => l.toUpperCase());
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
return (
|
|
152
|
+
<div className="flex w-full justify-start mb-2">
|
|
153
|
+
<div
|
|
154
|
+
className={`rounded-lg p-2 border w-fit max-w-[75%] min-w-0 break-all overflow-hidden ${getErrorTypeColor(
|
|
155
|
+
error.errorType,
|
|
156
|
+
)}`}
|
|
157
|
+
>
|
|
158
|
+
<div className="flex items-start justify-between mb-1">
|
|
159
|
+
<div className="flex items-center space-x-1">
|
|
160
|
+
<IconAlertTriangle className="w-3 h-3 text-red-600 flex-shrink-0" />
|
|
161
|
+
<span className="font-semibold text-xs">{formatErrorType(error.errorType)}</span>
|
|
162
|
+
<span className="text-xs opacity-60">{new Date(error.timestamp).toLocaleTimeString()}</span>
|
|
163
|
+
{error.url && (
|
|
164
|
+
<a
|
|
165
|
+
href={error.url}
|
|
166
|
+
target="_blank"
|
|
167
|
+
rel="noopener noreferrer"
|
|
168
|
+
className="text-xs hover:underline flex items-center space-x-1"
|
|
169
|
+
>
|
|
170
|
+
<IconExternalLink className="w-3 h-3" />
|
|
171
|
+
<span>View Sandbox</span>
|
|
172
|
+
</a>
|
|
173
|
+
)}
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<div className="text-sm mb-3">
|
|
178
|
+
<div
|
|
179
|
+
className="break-words whitespace-pre-wrap font-mono text-xs leading-relaxed overflow-hidden"
|
|
180
|
+
style={{
|
|
181
|
+
display: '-webkit-box',
|
|
182
|
+
WebkitLineClamp: isExpanded ? 'none' : 3,
|
|
183
|
+
WebkitBoxOrient: 'vertical',
|
|
184
|
+
maxHeight: isExpanded ? 'none' : '3.6em',
|
|
185
|
+
}}
|
|
186
|
+
>
|
|
187
|
+
{error.message}
|
|
188
|
+
</div>
|
|
189
|
+
{error.message.length > 150 && (
|
|
190
|
+
<button
|
|
191
|
+
onClick={() => setIsExpanded(!isExpanded)}
|
|
192
|
+
className="text-xs hover:underline mt-1 font-sans"
|
|
193
|
+
>
|
|
194
|
+
{isExpanded ? 'Show less' : 'Show more'}
|
|
195
|
+
</button>
|
|
196
|
+
)}
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
{isExpanded && error.stack && (
|
|
200
|
+
<div className="mt-3 p-3 bg-black bg-opacity-10 rounded text-xs font-mono">
|
|
201
|
+
<div className="flex items-center space-x-2 mb-2">
|
|
202
|
+
<IconCode className="w-3 h-3" />
|
|
203
|
+
<span className="font-semibold">Stack Trace</span>
|
|
204
|
+
</div>
|
|
205
|
+
<pre className="whitespace-pre-wrap text-xs break-all">{error.stack}</pre>
|
|
206
|
+
</div>
|
|
207
|
+
)}
|
|
208
|
+
|
|
209
|
+
{error.fixable && (
|
|
210
|
+
<div className="mt-4 flex justify-start">
|
|
211
|
+
<button
|
|
212
|
+
onClick={handleFixError}
|
|
213
|
+
disabled={isFixingError || isFixing}
|
|
214
|
+
className={`
|
|
215
|
+
flex items-center space-x-2 px-4 py-2 rounded-md text-sm font-medium
|
|
216
|
+
transition-colors duration-200
|
|
217
|
+
${
|
|
218
|
+
isFixingError || isFixing
|
|
219
|
+
? 'bg-gray-100 text-gray-400 cursor-not-allowed'
|
|
220
|
+
: 'bg-red-600 text-white hover:bg-red-700 shadow-sm hover:shadow-md'
|
|
221
|
+
}
|
|
222
|
+
`}
|
|
223
|
+
>
|
|
224
|
+
<IconRefreshCw className={`w-4 h-4 ${isFixingError || isFixing ? 'animate-spin' : ''}`} />
|
|
225
|
+
<span>{isFixingError || isFixing ? 'Fixing...' : 'Fix Error'}</span>
|
|
226
|
+
</button>
|
|
227
|
+
</div>
|
|
228
|
+
)}
|
|
229
|
+
|
|
230
|
+
{!error.fixable && (
|
|
231
|
+
<div className="mt-3 text-xs opacity-75">
|
|
232
|
+
This error may require manual intervention or environment changes.
|
|
233
|
+
</div>
|
|
234
|
+
)}
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
);
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
export default ErrorFixCard;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { useNavigate } from '@remix-run/react';
|
|
4
|
+
import { startCase } from 'lodash-es';
|
|
5
|
+
import { AiFillStar } from '@react-icons/all-files/ai/AiFillStar';
|
|
6
|
+
import { IPost } from 'common';
|
|
7
|
+
|
|
8
|
+
export interface IPropertyCardProps {
|
|
9
|
+
message: IPost;
|
|
10
|
+
index: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Custom hook to handle color mode (replace useColorModeValue)
|
|
14
|
+
const useTextColor = () => {
|
|
15
|
+
// You can implement your color mode logic here
|
|
16
|
+
// For now, using a default that works with Tailwind's dark mode
|
|
17
|
+
return 'text-gray-800 dark:text-white';
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Loading skeleton component
|
|
21
|
+
const LoadingSkeleton = ({ index }: { index: number }) => (
|
|
22
|
+
<div className="max-w-sm p-6 bg-gray-200 rounded-lg animate-pulse" key={`${index}`}>
|
|
23
|
+
<div className="h-48 bg-gray-300 rounded mb-4"></div>
|
|
24
|
+
<div className="space-y-3">
|
|
25
|
+
<div className="h-4 bg-gray-300 rounded w-3/4"></div>
|
|
26
|
+
<div className="h-4 bg-gray-300 rounded w-1/2"></div>
|
|
27
|
+
<div className="h-4 bg-gray-300 rounded w-5/6"></div>
|
|
28
|
+
<div className="h-4 bg-gray-300 rounded w-2/3"></div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export const MessageCard = (props: IPropertyCardProps) => {
|
|
34
|
+
const { message, index } = props;
|
|
35
|
+
const textColor = useTextColor();
|
|
36
|
+
const navigate = useNavigate();
|
|
37
|
+
const { t } = useTranslation('translations');
|
|
38
|
+
const id = useMemo(() => message?.propsConfiguration?.contents?.property, [message]);
|
|
39
|
+
const { data, loading, error } = {
|
|
40
|
+
data: {
|
|
41
|
+
property: {
|
|
42
|
+
title: '',
|
|
43
|
+
thumbnailUrl: '',
|
|
44
|
+
totalStar: 4,
|
|
45
|
+
totalReview: 100,
|
|
46
|
+
type: {
|
|
47
|
+
category: 'Indoor',
|
|
48
|
+
},
|
|
49
|
+
serviceConfiguration: {
|
|
50
|
+
contents: {
|
|
51
|
+
property: {
|
|
52
|
+
pricing: {
|
|
53
|
+
price: 10,
|
|
54
|
+
priceType: 'HOUR',
|
|
55
|
+
},
|
|
56
|
+
boarding: {
|
|
57
|
+
maxPeople: 100,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
loading: false,
|
|
65
|
+
error: null,
|
|
66
|
+
};
|
|
67
|
+
const property = useMemo(() => data?.property, [data]);
|
|
68
|
+
const { pricing, boarding } = useMemo(() => property?.serviceConfiguration?.contents?.property, [property]);
|
|
69
|
+
|
|
70
|
+
if (loading || !property) {
|
|
71
|
+
return <LoadingSkeleton index={index} />;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (error || !property) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<div
|
|
80
|
+
className="hover:cursor-pointer m-5 max-w-xs border border-gray-200 rounded-lg overflow-hidden shadow-sm hover:shadow-md transition-shadow duration-200"
|
|
81
|
+
key={`${index}`}
|
|
82
|
+
>
|
|
83
|
+
<img
|
|
84
|
+
onClick={() => navigate(`/property/${id}`)}
|
|
85
|
+
className="w-full h-48 object-cover cursor-pointer hover:opacity-90 transition-opacity duration-200"
|
|
86
|
+
src={property.thumbnailUrl}
|
|
87
|
+
alt={property.title}
|
|
88
|
+
/>
|
|
89
|
+
<div className="mt-4 m-2">
|
|
90
|
+
<div className="flex items-baseline">
|
|
91
|
+
<span className="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-teal-100 text-teal-800 dark:bg-teal-800 dark:text-teal-100">
|
|
92
|
+
{startCase(property.type.category)}
|
|
93
|
+
</span>
|
|
94
|
+
{boarding && (
|
|
95
|
+
<div className="text-gray-500 font-semibold tracking-wide text-xs uppercase ml-2">
|
|
96
|
+
{`${boarding.maxPeople} ${t('tailwind_ui_inbox.max_people')}`}
|
|
97
|
+
</div>
|
|
98
|
+
)}
|
|
99
|
+
</div>
|
|
100
|
+
<div className="mt-3 leading-tight">
|
|
101
|
+
<h4 className={`${textColor} text-sm font-semibold truncate`}>{property.title}</h4>
|
|
102
|
+
</div>
|
|
103
|
+
{pricing && (
|
|
104
|
+
<div className="mt-2">
|
|
105
|
+
<span className="font-semibold">{pricing.price}</span>
|
|
106
|
+
<span className="text-gray-600 text-sm"> / {startCase(pricing.priceType)}</span>
|
|
107
|
+
</div>
|
|
108
|
+
)}
|
|
109
|
+
<div className="flex mt-2 items-center">
|
|
110
|
+
<div className="flex">
|
|
111
|
+
{Array(5)
|
|
112
|
+
.fill('')
|
|
113
|
+
.map((_, i) => (
|
|
114
|
+
<AiFillStar
|
|
115
|
+
key={i}
|
|
116
|
+
className={`w-4 h-4 ${i < property.totalStar ? 'text-teal-500' : 'text-gray-300'}`}
|
|
117
|
+
/>
|
|
118
|
+
))}
|
|
119
|
+
</div>
|
|
120
|
+
<span className="ml-2 text-gray-600 text-sm">
|
|
121
|
+
{t('tailwind_ui_inbox.totalReview_reviews', { totalReview: property.totalReview })}
|
|
122
|
+
</span>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
);
|
|
127
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IAuthUser, IPost, PostTypeEnum } from 'common';
|
|
2
|
+
import { Slot } from '@common-stack/components-pro';
|
|
3
|
+
import { CommonMessage } from './CommonMessage';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { PlainMessage } from './PlainMessage';
|
|
6
|
+
|
|
7
|
+
interface IMessageSliceRendererProps {
|
|
8
|
+
message: IPost;
|
|
9
|
+
index: number;
|
|
10
|
+
onOpen: () => void;
|
|
11
|
+
currentUser: IAuthUser;
|
|
12
|
+
onMessageClick: (msg) => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const MessageSliceRenderer = (props: IMessageSliceRendererProps) => {
|
|
16
|
+
const { message, index, onOpen, currentUser, onMessageClick } = props;
|
|
17
|
+
|
|
18
|
+
if (typeof message === 'string') {
|
|
19
|
+
return <PlainMessage message={message} index={index} />;
|
|
20
|
+
}
|
|
21
|
+
const { type } = message;
|
|
22
|
+
if (!type || type === PostTypeEnum.Simple) {
|
|
23
|
+
return <CommonMessage message={message} index={index} onOpen={onOpen} currentUser={currentUser} />;
|
|
24
|
+
}
|
|
25
|
+
return (
|
|
26
|
+
<Slot
|
|
27
|
+
name={(type as string)?.toLowerCase()}
|
|
28
|
+
fillProps={{
|
|
29
|
+
index,
|
|
30
|
+
active: true,
|
|
31
|
+
message,
|
|
32
|
+
currentUser,
|
|
33
|
+
onOpen,
|
|
34
|
+
onMessageClick,
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
{(item) => <div>{item as any}</div>}
|
|
38
|
+
</Slot>
|
|
39
|
+
);
|
|
40
|
+
};
|