@messenger-box/tailwind-ui-inbox 10.0.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -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 +32 -0
- package/lib/components/AIAgent/AIAgent.d.ts.map +1 -0
- package/lib/components/AIAgent/AIAgent.js +1135 -0
- package/lib/components/AIAgent/AIAgent.js.map +1 -0
- package/lib/components/AIAgent/InputComponent.d.ts +84 -0
- package/lib/components/AIAgent/InputComponent.d.ts.map +1 -0
- package/lib/components/AIAgent/InputComponent.js +417 -0
- package/lib/components/AIAgent/InputComponent.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 +20 -0
- package/lib/components/InboxMessage/InputComponent.d.ts.map +1 -0
- package/lib/components/InboxMessage/InputComponent.js +148 -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 +37 -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/StreamingMessageBubble.d.ts +18 -0
- package/lib/components/InboxMessage/StreamingMessageBubble.d.ts.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/TypingIndicator.d.ts +11 -0
- package/lib/components/InboxMessage/TypingIndicator.d.ts.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 +30 -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 +19 -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 +10 -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 +42 -0
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.js +1339 -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 +74 -0
- package/lib/components/ModelConfigPanel.d.ts.map +1 -0
- package/lib/components/ModelConfigPanel.js +1152 -0
- package/lib/components/ModelConfigPanel.js.map +1 -0
- package/lib/components/filler-components/RightSiderBar.d.ts +3 -0
- package/lib/components/filler-components/RightSiderBar.d.ts.map +1 -0
- package/lib/components/filler-components/RightSiderBar.js +532 -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 +10 -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/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/messages-container-ui/MessagesContainerUI.d.ts +81 -0
- package/lib/components/messages-container-ui/MessagesContainerUI.d.ts.map +1 -0
- package/lib/components/messages-container-ui/MessagesContainerUI.js +77 -0
- package/lib/components/messages-container-ui/MessagesContainerUI.js.map +1 -0
- package/lib/components/messages-container-ui/PlanModeView.d.ts +82 -0
- package/lib/components/messages-container-ui/PlanModeView.d.ts.map +1 -0
- package/lib/components/messages-container-ui/PlanModeView.js +267 -0
- package/lib/components/messages-container-ui/PlanModeView.js.map +1 -0
- package/lib/components/messages-container-ui/index.d.ts +6 -0
- package/lib/components/messages-container-ui/index.d.ts.map +1 -0
- package/lib/components/messages-container-ui/types.d.ts +38 -0
- package/lib/components/messages-container-ui/types.d.ts.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 +264 -0
- package/lib/compute.js.map +1 -0
- package/lib/config/env-config.d.ts +20 -0
- package/lib/config/env-config.d.ts.map +1 -0
- package/lib/config/env-config.js +55 -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 +27 -0
- package/lib/container/AiLandingInput.d.ts.map +1 -0
- package/lib/container/AiLandingInput.js +149 -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 +964 -0
- package/lib/container/Inbox.js.map +1 -0
- package/lib/container/InboxAiMessagesLoader.d.ts +45 -0
- package/lib/container/InboxAiMessagesLoader.d.ts.map +1 -0
- package/lib/container/InboxAiMessagesLoader.js +80 -0
- package/lib/container/InboxAiMessagesLoader.js.map +1 -0
- package/lib/container/InboxContainer.d.ts +41 -0
- package/lib/container/InboxContainer.d.ts.map +1 -0
- package/lib/container/InboxContainer.js +27 -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 +47 -0
- package/lib/container/InboxWithAiLoader.d.ts.map +1 -0
- package/lib/container/InboxWithAiLoader.js +118 -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 +141 -0
- package/lib/container/ServiceInbox.js.map +1 -0
- package/lib/container/TestInboxWithAiLoader.d.ts +7 -0
- package/lib/container/TestInboxWithAiLoader.d.ts.map +1 -0
- package/lib/container/TestInboxWithAiLoader.js +135 -0
- package/lib/container/TestInboxWithAiLoader.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 +320 -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 +347 -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 +243 -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 +11 -0
- package/lib/enums/messenger-slot-fill-name-enum.d.ts.map +1 -0
- package/lib/enums/messenger-slot-fill-name-enum.js +11 -0
- package/lib/enums/messenger-slot-fill-name-enum.js.map +1 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/usePersistentModelConfig.d.ts +33 -0
- package/lib/hooks/usePersistentModelConfig.d.ts.map +1 -0
- package/lib/hooks/usePersistentModelConfig.js +123 -0
- package/lib/hooks/usePersistentModelConfig.js.map +1 -0
- package/lib/hooks/useStreamAssembler.d.ts +8 -0
- package/lib/hooks/useStreamAssembler.d.ts.map +1 -0
- package/lib/hooks/useTemplates.d.ts +14 -0
- package/lib/hooks/useTemplates.d.ts.map +1 -0
- package/lib/hooks/useTemplates.js +59 -0
- package/lib/hooks/useTemplates.js.map +1 -0
- package/lib/index.d.ts +14 -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 +251 -0
- package/lib/styles/responsive.css +76 -0
- package/lib/templates/InboxWithAi.d.ts +44 -0
- package/lib/templates/InboxWithAi.d.ts.map +1 -0
- package/lib/templates/InboxWithAi.js +651 -0
- package/lib/templates/InboxWithAi.js.map +1 -0
- package/lib/templates/InboxWithAi.tsx +844 -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/types/templates.d.ts +35 -0
- package/lib/types/templates.d.ts.map +1 -0
- package/lib/utils/utils.d.ts +2 -0
- package/lib/utils/utils.d.ts.map +1 -0
- package/lib/xstate/index.d.ts +3 -0
- package/lib/xstate/index.d.ts.map +1 -0
- package/lib/xstate/rightSidebar.machine.d.ts +4 -0
- package/lib/xstate/rightSidebar.machine.d.ts.map +1 -0
- package/lib/xstate/rightSidebar.types.d.ts +57 -0
- package/lib/xstate/rightSidebar.types.d.ts.map +1 -0
- package/package.json +69 -0
- package/rollup.config.mjs +47 -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 +1468 -0
- package/src/components/AIAgent/AIAgent.tsx.bk +1365 -0
- package/src/components/AIAgent/InputComponent.tsx +608 -0
- package/src/components/AIAgent/README.md +174 -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 +198 -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 +47 -0
- package/src/components/InboxMessage/ServiceConversationItem.tsx +234 -0
- package/src/components/InboxMessage/ServiceInboxItem.tsx +223 -0
- package/src/components/InboxMessage/StreamingMessageBubble.tsx +270 -0
- package/src/components/InboxMessage/SubscriptionHandler.tsx +55 -0
- package/src/components/InboxMessage/TypingIndicator.tsx +38 -0
- package/src/components/InboxMessage/UploadImageButton.tsx +46 -0
- package/src/components/InboxMessage/UserModalContent.tsx +60 -0
- package/src/components/InboxMessage/index.ts +18 -0
- package/src/components/InboxMessage/message-widgets/CommonMessage.tsx +69 -0
- package/src/components/InboxMessage/message-widgets/ErrorFixCard.tsx +239 -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 +1733 -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 +8 -0
- package/src/components/ModelConfigPanel.tsx +1357 -0
- package/src/components/filler-components/RightSiderBar.tsx +572 -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 +29 -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/messages-container-ui/MessagesContainerUI.tsx +151 -0
- package/src/components/messages-container-ui/PlanModeView.tsx +426 -0
- package/src/components/messages-container-ui/README.md +91 -0
- package/src/components/messages-container-ui/index.ts +5 -0
- package/src/components/messages-container-ui/types.ts +40 -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 +48 -0
- package/src/components/ui/button.tsx +32 -0
- package/src/compute.ts +271 -0
- package/src/config/env-config.ts +24 -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 +1879 -0
- package/src/container/AiInboxWithLoader.tsx +356 -0
- package/src/container/AiLandingInput.tsx +200 -0
- package/src/container/Inbox.tsx +1095 -0
- package/src/container/InboxAiMessagesLoader.tsx +129 -0
- package/src/container/InboxContainer.tsx +61 -0
- package/src/container/InboxTemplate1.tsx +1553 -0
- package/src/container/InboxTemplate1WithLoader.tsx +338 -0
- package/src/container/InboxTemplate2.tsx +1617 -0
- package/src/container/InboxWithAiLoader.tsx +177 -0
- package/src/container/InboxWithLoader.tsx +341 -0
- package/src/container/ServiceInbox.tsx +188 -0
- package/src/container/TestInboxWithAiLoader.tsx +147 -0
- package/src/container/ThreadMessages.tsx +378 -0
- package/src/container/ThreadMessagesInbox.tsx +457 -0
- package/src/container/Threads.tsx +270 -0
- package/src/container/ThreadsInbox.tsx +351 -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 +10 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/usePersistentModelConfig.ts +166 -0
- package/src/hooks/useStreamAssembler.ts +7 -0
- package/src/hooks/useTemplates.ts +75 -0
- package/src/index.ts +49 -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 +844 -0
- package/src/templates/index.ts +1 -0
- package/src/types/templates.ts +35 -0
- package/src/utils/utils.ts +3 -0
- package/src/xstate/index.ts +2 -0
- package/src/xstate/rightSidebar.machine.ts +304 -0
- package/src/xstate/rightSidebar.types.ts +58 -0
- package/tsconfig.json +14 -0
- package/webpack.config.js +92 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import React, { useState, useMemo, useCallback, useLayoutEffect, useEffect } from 'react';
|
|
2
|
+
import { useSupportServiceChannelsQuery } from 'common/graphql';
|
|
3
|
+
import { useNavigate, useLocation, useParams } from '@remix-run/react';
|
|
4
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
5
|
+
import { userSelector } from '@adminide-stack/user-auth0-client';
|
|
6
|
+
import { push } from '@common-stack/remix-router-redux';
|
|
7
|
+
import { ServiceInboxItem } from '../components';
|
|
8
|
+
import { config } from '../config';
|
|
9
|
+
|
|
10
|
+
const { MESSAGES_PER_PAGE, WEB_INBOX_MESSEGE_PATH } = config;
|
|
11
|
+
|
|
12
|
+
type ServiceInboxProps = { role?: any; pathPrefix?: string };
|
|
13
|
+
|
|
14
|
+
// Custom Skeleton component using Tailwind
|
|
15
|
+
const SkeletonLoader = ({ height = 'h-10' }: { height?: string }) => (
|
|
16
|
+
<div className={`${height} bg-gray-200 rounded animate-pulse`}></div>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export const ServiceInboxComponent = React.memo((props: any) => {
|
|
20
|
+
const auth = useSelector(userSelector);
|
|
21
|
+
const dispatch = useDispatch();
|
|
22
|
+
const path: any = useParams();
|
|
23
|
+
const location = useLocation();
|
|
24
|
+
const { id: channelId } = path || {};
|
|
25
|
+
|
|
26
|
+
// const channels = React.useMemo(() => {
|
|
27
|
+
// // if (!props?.serviceChannels?.length) return null;
|
|
28
|
+
// let uChannels: any =
|
|
29
|
+
// props?.serviceChannels?.filter((c: any) =>
|
|
30
|
+
// c.members.some((u: any) => u.user.__typename == 'UserAccount'),
|
|
31
|
+
// ) ?? [];
|
|
32
|
+
// return uChannels || [];
|
|
33
|
+
// }, [props?.serviceChannels]);
|
|
34
|
+
|
|
35
|
+
const users = useMemo(() => {
|
|
36
|
+
return (
|
|
37
|
+
props?.serviceChannels?.reduce((acc, curr) => {
|
|
38
|
+
const newMembers = curr.members.filter(({ user }) => acc.findIndex(({ id }) => id === user.id));
|
|
39
|
+
return [...acc, ...newMembers?.map(({ user }) => user)];
|
|
40
|
+
}, []) || []
|
|
41
|
+
);
|
|
42
|
+
}, [props?.serviceChannels]);
|
|
43
|
+
|
|
44
|
+
const handleSelectChannel = useCallback((channelId: any, postId: any) => {
|
|
45
|
+
if (props?.handleSelectChannel) {
|
|
46
|
+
props?.handleSelectChannel(channelId, postId);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
props?.setChannelId(channelId);
|
|
50
|
+
props?.setPostId(postId);
|
|
51
|
+
props?.setSkip(0);
|
|
52
|
+
props?.clearMessages();
|
|
53
|
+
}, []);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<div className="w-full">
|
|
57
|
+
{props?.serviceChannels?.map((channel, index) => (
|
|
58
|
+
<ServiceInboxItem
|
|
59
|
+
key={`service_channel_${channel.id}`}
|
|
60
|
+
filter={props?.keyword}
|
|
61
|
+
channel={channel}
|
|
62
|
+
currentUser={auth}
|
|
63
|
+
handleSelectChannel={handleSelectChannel}
|
|
64
|
+
users={users}
|
|
65
|
+
selectedChannelId={props?.channelId ?? channelId}
|
|
66
|
+
showBorder={props?.serviceChannels.length == 1 ? true : index != props?.serviceChannels.length - 1}
|
|
67
|
+
role={props?.role ?? null}
|
|
68
|
+
/>
|
|
69
|
+
))}
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const ServiceInbox = (props: ServiceInboxProps) => {
|
|
75
|
+
const path: any = useParams();
|
|
76
|
+
const location = useLocation();
|
|
77
|
+
const { id: channelId } = path || {};
|
|
78
|
+
const auth = useSelector(userSelector);
|
|
79
|
+
const dispatch = useDispatch();
|
|
80
|
+
const [keyword, setKeyword] = useState('');
|
|
81
|
+
// const [channels, setChannels] = useState<any>([]);
|
|
82
|
+
|
|
83
|
+
const {
|
|
84
|
+
data: serviceChannels,
|
|
85
|
+
loading: serviceChannelsLoading,
|
|
86
|
+
refetch: getServiceChannelsRefetch,
|
|
87
|
+
} = useSupportServiceChannelsQuery({
|
|
88
|
+
variables: {
|
|
89
|
+
criteria: { type: 'SERVICE' },
|
|
90
|
+
},
|
|
91
|
+
fetchPolicy: 'cache-and-network',
|
|
92
|
+
onCompleted: (data: any) => {
|
|
93
|
+
//setRefresh(false);
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
getServiceChannelsRefetch({ criteria: { type: 'SERVICE' } });
|
|
99
|
+
}, [location?.pathname]);
|
|
100
|
+
|
|
101
|
+
// useEffect(() => {
|
|
102
|
+
// if (serviceChannels?.supportServiceChannels?.length > 0) {
|
|
103
|
+
// let uChannels: any =
|
|
104
|
+
// serviceChannels?.supportServiceChannels?.filter((c: any) =>
|
|
105
|
+
// c.members.some((u: any) => u.user.__typename == 'UserAccount'),
|
|
106
|
+
// ) ?? [];
|
|
107
|
+
// const sChannels: any = uChannels || [];
|
|
108
|
+
// setChannels(sChannels);
|
|
109
|
+
// }
|
|
110
|
+
// }, [serviceChannels]);
|
|
111
|
+
//..........................old code .....................................//
|
|
112
|
+
// const channels = React.useMemo(() => {
|
|
113
|
+
// if (!serviceChannels?.supportServiceChannels?.length) return null;
|
|
114
|
+
// let uChannels: any =
|
|
115
|
+
// serviceChannels?.supportServiceChannels?.filter((c: any) =>
|
|
116
|
+
// c.members.some((u: any) => u.user.__typename == 'UserAccount'),
|
|
117
|
+
// ) ?? [];
|
|
118
|
+
// return uChannels || [];
|
|
119
|
+
// }, [serviceChannels]);
|
|
120
|
+
|
|
121
|
+
// const users = useMemo(() => {
|
|
122
|
+
// return (
|
|
123
|
+
// channels?.reduce((acc, curr) => {
|
|
124
|
+
// const newMembers = curr.members.filter(({ user }) => acc.findIndex(({ id }) => id === user.id));
|
|
125
|
+
// return [...acc, ...newMembers?.map(({ user }) => user)];
|
|
126
|
+
// }, []) || []
|
|
127
|
+
// );
|
|
128
|
+
// }, [channels]);
|
|
129
|
+
|
|
130
|
+
// const currentUser = useMemo(() => users?.find(({ alias }) => alias.includes(auth?.authUserId)), [users, auth]);
|
|
131
|
+
|
|
132
|
+
const handleSelectChannel = useCallback(
|
|
133
|
+
(channelId: any, postId: any) => {
|
|
134
|
+
if (postId || postId == 0)
|
|
135
|
+
dispatch(
|
|
136
|
+
push(
|
|
137
|
+
`${
|
|
138
|
+
props?.pathPrefix ? props?.pathPrefix : ''
|
|
139
|
+
}/${WEB_INBOX_MESSEGE_PATH}/${channelId}/${postId}`,
|
|
140
|
+
),
|
|
141
|
+
);
|
|
142
|
+
else dispatch(push(`${props?.pathPrefix ? props?.pathPrefix : ''}/${WEB_INBOX_MESSEGE_PATH}/${channelId}`));
|
|
143
|
+
},
|
|
144
|
+
[location, path],
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
//..........................old code .....................................//
|
|
148
|
+
|
|
149
|
+
if (serviceChannelsLoading) {
|
|
150
|
+
return (
|
|
151
|
+
<div className="flex flex-col space-y-4">
|
|
152
|
+
{Array(10)
|
|
153
|
+
.fill(1)
|
|
154
|
+
.map((x, y) => (
|
|
155
|
+
<SkeletonLoader key={y} />
|
|
156
|
+
))}
|
|
157
|
+
</div>
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
return (
|
|
161
|
+
<>
|
|
162
|
+
<ServiceInboxComponent
|
|
163
|
+
serviceChannels={serviceChannels?.supportServiceChannels}
|
|
164
|
+
filter={keyword}
|
|
165
|
+
channelId={channelId}
|
|
166
|
+
handleSelectChannel={handleSelectChannel}
|
|
167
|
+
{...props}
|
|
168
|
+
/>
|
|
169
|
+
{/* <div className="w-full">
|
|
170
|
+
{channels?.map((channel, index) => (
|
|
171
|
+
<ServiceInboxItem
|
|
172
|
+
key={`service_channel_${channel.id}`}
|
|
173
|
+
filter={keyword}
|
|
174
|
+
channel={channel}
|
|
175
|
+
currentUser={auth}
|
|
176
|
+
handleSelectChannel={handleSelectChannel}
|
|
177
|
+
users={users}
|
|
178
|
+
selectedChannelId={channelId}
|
|
179
|
+
showBorder={channels.length == 1 ? true : index != channels.length - 1}
|
|
180
|
+
role={props?.role ?? null}
|
|
181
|
+
/>
|
|
182
|
+
))}
|
|
183
|
+
</div> */}
|
|
184
|
+
</>
|
|
185
|
+
);
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export default React.memo(ServiceInbox);
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import InboxWithAiLoader from './InboxWithAiLoader';
|
|
3
|
+
import { useParams } from '@remix-run/react';
|
|
4
|
+
import { useReCreateSandboxEnvironmentMutation } from 'common/graphql';
|
|
5
|
+
import { usePersistentModelConfig } from '../hooks/usePersistentModelConfig';
|
|
6
|
+
import { useTemplates } from '../hooks/useTemplates';
|
|
7
|
+
import type { TemplateConfig } from '../types/templates';
|
|
8
|
+
|
|
9
|
+
const TestInboxWithAiLoaderOutlet = () => {
|
|
10
|
+
const params = useParams<{ orgName: string }>();
|
|
11
|
+
const orgName = params.orgName as string;
|
|
12
|
+
const { modelConfig } = usePersistentModelConfig();
|
|
13
|
+
const { marketplaceTemplates } = useTemplates();
|
|
14
|
+
const templatesForSelector = React.useMemo(() => marketplaceTemplates ?? [], [marketplaceTemplates]);
|
|
15
|
+
|
|
16
|
+
const [selectedTemplate, setSelectedTemplate] = React.useState<TemplateConfig | null>(null);
|
|
17
|
+
const [suggestedTemplate, setSuggestedTemplate] = React.useState<TemplateConfig | null>(null);
|
|
18
|
+
const [showTemplateModal, setShowTemplateModal] = React.useState(false);
|
|
19
|
+
|
|
20
|
+
const templateModalItems = React.useMemo(
|
|
21
|
+
() =>
|
|
22
|
+
templatesForSelector.map((t) => ({
|
|
23
|
+
id: t.formExtensionId ?? t.formId,
|
|
24
|
+
label: t.displayName ?? t.templateName ?? '',
|
|
25
|
+
description: t.description,
|
|
26
|
+
category: t.category,
|
|
27
|
+
})),
|
|
28
|
+
[templatesForSelector],
|
|
29
|
+
);
|
|
30
|
+
const displayTemplate = selectedTemplate ?? suggestedTemplate;
|
|
31
|
+
const templateSelectedLabel = displayTemplate?.displayName ?? displayTemplate?.templateName ?? null;
|
|
32
|
+
|
|
33
|
+
const handleSelectTemplateById = React.useCallback(
|
|
34
|
+
(id: string) => {
|
|
35
|
+
const t = templatesForSelector.find((x) => (x.formExtensionId ?? x.formId) === id);
|
|
36
|
+
if (t) setSelectedTemplate(t);
|
|
37
|
+
},
|
|
38
|
+
[templatesForSelector],
|
|
39
|
+
);
|
|
40
|
+
const handleSelectTemplate = React.useCallback((template: TemplateConfig | null) => {
|
|
41
|
+
setSelectedTemplate(template ?? null);
|
|
42
|
+
}, []);
|
|
43
|
+
|
|
44
|
+
const [reCreateSandboxEnvironment] = useReCreateSandboxEnvironmentMutation();
|
|
45
|
+
|
|
46
|
+
// Track active recreation calls to prevent duplicates
|
|
47
|
+
const activeRecreationsRef = React.useRef<Map<string, Promise<any>>>(new Map());
|
|
48
|
+
// Track last recreation time to add debounce
|
|
49
|
+
const lastRecreationTimeRef = React.useRef<Map<string, number>>(new Map());
|
|
50
|
+
|
|
51
|
+
const handleRecreateSandbox = React.useCallback(
|
|
52
|
+
async (postId: string) => {
|
|
53
|
+
console.log('🔄 handleRecreateSandbox called for postId:', postId);
|
|
54
|
+
|
|
55
|
+
// Check if we're already recreating this postId
|
|
56
|
+
const existingPromise = activeRecreationsRef.current.get(postId);
|
|
57
|
+
if (existingPromise) {
|
|
58
|
+
console.log('⏭️ Already recreating sandbox for postId:', postId, '- waiting for existing call');
|
|
59
|
+
try {
|
|
60
|
+
return await existingPromise;
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.log('⚠️ Existing recreation call failed, will retry:', error);
|
|
63
|
+
activeRecreationsRef.current.delete(postId);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Debounce: If we just recreated this postId recently (within 2 seconds), skip
|
|
68
|
+
const lastRecreationTime = lastRecreationTimeRef.current.get(postId);
|
|
69
|
+
const now = Date.now();
|
|
70
|
+
if (lastRecreationTime && now - lastRecreationTime < 2000) {
|
|
71
|
+
console.log('⏭️ Skipping recreation - too soon after last recreation:', {
|
|
72
|
+
postId,
|
|
73
|
+
timeSinceLastRecreation: now - lastRecreationTime,
|
|
74
|
+
});
|
|
75
|
+
return { data: { reCreateSandboxEnvironment: { success: true, message: 'Skipped - duplicate call' } } };
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Update last recreation time
|
|
79
|
+
lastRecreationTimeRef.current.set(postId, now);
|
|
80
|
+
|
|
81
|
+
// Create the mutation promise
|
|
82
|
+
const mutationPromise = (async () => {
|
|
83
|
+
try {
|
|
84
|
+
console.log('📞 Calling reCreateSandboxEnvironment mutation for postId:', postId);
|
|
85
|
+
const response = await reCreateSandboxEnvironment({
|
|
86
|
+
variables: {
|
|
87
|
+
postId: postId,
|
|
88
|
+
metadata: modelConfig?.metadata,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
console.log('✅ reCreateSandboxEnvironment mutation completed:', response);
|
|
92
|
+
return response;
|
|
93
|
+
} finally {
|
|
94
|
+
// Clean up the promise reference when done
|
|
95
|
+
activeRecreationsRef.current.delete(postId);
|
|
96
|
+
}
|
|
97
|
+
})();
|
|
98
|
+
|
|
99
|
+
// Store the promise IMMEDIATELY (synchronously) before any async work
|
|
100
|
+
activeRecreationsRef.current.set(postId, mutationPromise);
|
|
101
|
+
|
|
102
|
+
return await mutationPromise;
|
|
103
|
+
},
|
|
104
|
+
[reCreateSandboxEnvironment, modelConfig?.metadata],
|
|
105
|
+
);
|
|
106
|
+
return (
|
|
107
|
+
<InboxWithAiLoader
|
|
108
|
+
orgName={orgName}
|
|
109
|
+
handleRecreateSandbox={handleRecreateSandbox}
|
|
110
|
+
isShowAiLanding={true}
|
|
111
|
+
isShowMeta={true}
|
|
112
|
+
showContextTab={false}
|
|
113
|
+
showModeSelector={true}
|
|
114
|
+
inboxTitle="Chat"
|
|
115
|
+
showStopButton={true}
|
|
116
|
+
onStop={() => {
|
|
117
|
+
console.log('🛑 onStop called');
|
|
118
|
+
}}
|
|
119
|
+
templates={templatesForSelector}
|
|
120
|
+
selectedTemplate={selectedTemplate}
|
|
121
|
+
suggestedTemplate={suggestedTemplate}
|
|
122
|
+
onSelectTemplate={handleSelectTemplate}
|
|
123
|
+
templateSelectedLabel={templateSelectedLabel}
|
|
124
|
+
templateModalItems={templateModalItems}
|
|
125
|
+
showTemplateModal={showTemplateModal}
|
|
126
|
+
onOpenTemplateModal={() => setShowTemplateModal(true)}
|
|
127
|
+
onCloseTemplateModal={() => setShowTemplateModal(false)}
|
|
128
|
+
onSelectTemplateById={handleSelectTemplateById}
|
|
129
|
+
onClearTemplate={() => setSelectedTemplate(null)}
|
|
130
|
+
onAcceptSuggestedTemplate={() => setSelectedTemplate(suggestedTemplate)}
|
|
131
|
+
isAnalyzingQuery={false}
|
|
132
|
+
onQueryChange={() => {}}
|
|
133
|
+
leftItemsOverrides={{ template: { enabled: true }, search: { enabled: false } }}
|
|
134
|
+
rightItemsOverrides={{ projectSettings: { enabled: true } }}
|
|
135
|
+
inputToolBarProps={{
|
|
136
|
+
templateModalClassName: 'max-w-3xl',
|
|
137
|
+
classNames: {
|
|
138
|
+
container: 'rounded-[24px]',
|
|
139
|
+
},
|
|
140
|
+
}}
|
|
141
|
+
/>
|
|
142
|
+
);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export default React.memo(TestInboxWithAiLoaderOutlet);
|
|
146
|
+
|
|
147
|
+
TestInboxWithAiLoaderOutlet.displayName = 'TestInboxWithAiLoaderOutlet';
|