@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,82 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PlanMessage } from './types';
|
|
3
|
+
export interface PlanModeViewInputToolbarProps {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (text: string) => void;
|
|
6
|
+
onSend: () => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface PlanModeViewProps {
|
|
10
|
+
messages: PlanMessage[];
|
|
11
|
+
streamingContent?: string;
|
|
12
|
+
currentUser: {
|
|
13
|
+
id: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
avatar?: string;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
onSend: (text: string) => void;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
onStop?: () => void;
|
|
22
|
+
showDate?: boolean;
|
|
23
|
+
showAvatar?: boolean;
|
|
24
|
+
showMessageBubbleBorder?: boolean;
|
|
25
|
+
/** When false (default), do NOT create an internal scroll container (avoids nested scroll). */
|
|
26
|
+
useInternalScroll?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Optional ref for the scroll container element (defaults to the internal
|
|
29
|
+
* message list wrapper).
|
|
30
|
+
*
|
|
31
|
+
* If provided, it will be attached to the internal scroll container div
|
|
32
|
+
* (so parent code can read/scroll it).
|
|
33
|
+
*/
|
|
34
|
+
scrollContainerRef?: React.Ref<HTMLDivElement>;
|
|
35
|
+
/** Optional className applied to the scroll container element. */
|
|
36
|
+
scrollContainerClassName?: string;
|
|
37
|
+
/** When true, hide the scrollbar visuals but keep it scrollable. */
|
|
38
|
+
hideScrollbar?: boolean;
|
|
39
|
+
contentClassName?: string;
|
|
40
|
+
postContainerClassName?: string;
|
|
41
|
+
/** Optional className applied to the root wrapper element. */
|
|
42
|
+
className?: string;
|
|
43
|
+
/** When true, the built-in input toolbar area is not rendered. */
|
|
44
|
+
hideInputToolbar?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Where to place the input toolbar.
|
|
47
|
+
* - `bottom` (default): render toolbar in the bottom area.
|
|
48
|
+
* - `inlineWhenEmpty`: when there are no messages and no streaming/loading, render the toolbar inline
|
|
49
|
+
* inside the empty state (matches landing UI), otherwise use bottom placement.
|
|
50
|
+
*/
|
|
51
|
+
inputPlacement?: 'bottom' | 'inlineWhenEmpty';
|
|
52
|
+
/** Input is passed from outside; receives value, onChange, onSend, disabled */
|
|
53
|
+
renderInputToolbar: (props: PlanModeViewInputToolbarProps) => React.ReactNode;
|
|
54
|
+
/** Optional: passed to ModernMessageGroupComponent */
|
|
55
|
+
onOpen?: (element?: any) => void;
|
|
56
|
+
onMessageClick?: (msg: any) => void;
|
|
57
|
+
isDesktopView?: boolean;
|
|
58
|
+
isSmallScreen?: boolean;
|
|
59
|
+
sandboxErrors?: any[];
|
|
60
|
+
currentFiles?: Record<string, string>;
|
|
61
|
+
onFixError?: (errorMessage: string) => Promise<void>;
|
|
62
|
+
/** Optional: error message to show above messages; use with onRetry for retry button */
|
|
63
|
+
error?: string | null;
|
|
64
|
+
/** Optional: called when user clicks retry (e.g. after error) */
|
|
65
|
+
onRetry?: () => void;
|
|
66
|
+
/**
|
|
67
|
+
* Optional: custom content when there are no messages and no streaming/loading.
|
|
68
|
+
* Receives input toolbar props so you can render the composer inline (e.g. landing UI).
|
|
69
|
+
*/
|
|
70
|
+
renderEmptyState?: (ctx: {
|
|
71
|
+
inputToolbarProps: PlanModeViewInputToolbarProps;
|
|
72
|
+
}) => React.ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Optional: when provided, scroll to bottom whenever these deps change (e.g. [streamingContent, messages.length]).
|
|
75
|
+
* Lets the parent force scroll on each stream chunk when the internal ResizeObserver/layout effect miss.
|
|
76
|
+
*/
|
|
77
|
+
scrollToBottomDeps?: React.DependencyList;
|
|
78
|
+
/** When true, fenced / raw code blocks show copy and download actions (default: true). */
|
|
79
|
+
showCopyDownloadOnCodeBlock?: boolean;
|
|
80
|
+
}
|
|
81
|
+
export declare function PlanModeView({ messages, streamingContent, currentUser, onSend, disabled, isLoading, onStop, showDate, showAvatar, showMessageBubbleBorder, useInternalScroll, scrollContainerRef, scrollContainerClassName, hideScrollbar, contentClassName, postContainerClassName, className, hideInputToolbar, inputPlacement, renderInputToolbar, onOpen, onMessageClick, isDesktopView, isSmallScreen, sandboxErrors, currentFiles, onFixError, error, onRetry, renderEmptyState, scrollToBottomDeps, showCopyDownloadOnCodeBlock, }: PlanModeViewProps): React.JSX.Element;
|
|
82
|
+
//# sourceMappingURL=PlanModeView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlanModeView.d.ts","sourceRoot":"","sources":["../../../src/components/messages-container-ui/PlanModeView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,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AsB,EACtB,SAAS,EACT,gBAAwB,EACxB,cAAyB,EACzB,kBAAkB,EAClB,MAAiB,EACjB,cAAyB,EACzB,aAAqB,EACrB,aAAqB,EACrB,aAAkB,EAClB,YAAiB,EACjB,UAAU,EACV,KAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,2BAAkC,GACrC,EAAE,iBAAiB,qBAqOnB"}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import React__default,{useState,useRef,useCallback,useMemo,useLayoutEffect,useEffect}from'react';import clsx from'clsx';import {ModernMessageGroupComponent,detectContentType,CodeFormatter,FormattedMessageContent}from'../InboxMessage/message-widgets/ModernMessageGroup.js';import {AiAgentMessageRole,PostTypeEnum}from'common';const ASSISTANT_BUBBLE_BG = 'bg-white';
|
|
2
|
+
const BORDER_COLOR = 'border-gray-200';
|
|
3
|
+
const HIDE_SCROLLBAR_CSS = `
|
|
4
|
+
/* Hide scrollbar while keeping scrollability */
|
|
5
|
+
.ym-hide-scrollbar {
|
|
6
|
+
-ms-overflow-style: none; /* IE/Edge */
|
|
7
|
+
scrollbar-width: none; /* Firefox */
|
|
8
|
+
}
|
|
9
|
+
.ym-hide-scrollbar::-webkit-scrollbar {
|
|
10
|
+
display: none; /* Chrome/Safari */
|
|
11
|
+
width: 0;
|
|
12
|
+
height: 0;
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
const DEFAULT_ASSISTANT_AUTHOR = {
|
|
16
|
+
id: 'ai-assistant',
|
|
17
|
+
givenName: 'AI',
|
|
18
|
+
familyName: 'Assistant',
|
|
19
|
+
fullName: 'AI Assistant',
|
|
20
|
+
username: 'ai-assistant',
|
|
21
|
+
email: 'ai@assistant.com',
|
|
22
|
+
picture: null,
|
|
23
|
+
alias: [],
|
|
24
|
+
tokens: []
|
|
25
|
+
};
|
|
26
|
+
/** Map PlanMessage to the post-like shape expected by ModernMessageGroupComponent */
|
|
27
|
+
function planMessageToPost(msg, currentUser) {
|
|
28
|
+
const isUser = msg.role === 'user';
|
|
29
|
+
const author = msg.author ?? (isUser ? {
|
|
30
|
+
id: currentUser.id,
|
|
31
|
+
givenName: currentUser.givenName ?? currentUser.name ?? 'User',
|
|
32
|
+
familyName: currentUser.familyName ?? '',
|
|
33
|
+
fullName: currentUser.fullName ?? currentUser.name ?? 'User',
|
|
34
|
+
username: currentUser.username ?? currentUser.id,
|
|
35
|
+
email: currentUser.email ?? '',
|
|
36
|
+
picture: currentUser.picture ?? currentUser.avatar ?? null,
|
|
37
|
+
alias: currentUser.alias ?? [],
|
|
38
|
+
tokens: currentUser.tokens ?? []
|
|
39
|
+
} : DEFAULT_ASSISTANT_AUTHOR);
|
|
40
|
+
return {
|
|
41
|
+
id: msg.id,
|
|
42
|
+
message: msg.content,
|
|
43
|
+
author,
|
|
44
|
+
createdAt: msg.createdAt ?? new Date().toISOString(),
|
|
45
|
+
type: msg.type ?? PostTypeEnum.Aiassistant,
|
|
46
|
+
isDelivered: false,
|
|
47
|
+
isRead: false,
|
|
48
|
+
parentId: null,
|
|
49
|
+
fromServer: null,
|
|
50
|
+
updatedAt: msg.createdAt ?? new Date().toISOString(),
|
|
51
|
+
propsConfiguration: {
|
|
52
|
+
...(msg.propsConfiguration ?? {
|
|
53
|
+
contents: {}
|
|
54
|
+
}),
|
|
55
|
+
contents: {
|
|
56
|
+
...(msg.propsConfiguration?.contents ?? {}),
|
|
57
|
+
role: msg.propsConfiguration?.contents?.role ?? (isUser ? AiAgentMessageRole.User : AiAgentMessageRole.Assistant),
|
|
58
|
+
// Plan/build mode: consumers (e.g. ModernMessageBubble) read propsConfiguration.contents.mode
|
|
59
|
+
...(msg.props?.mode != null ? {
|
|
60
|
+
mode: msg.props.mode
|
|
61
|
+
} : {})
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
props: msg.props ?? {},
|
|
65
|
+
files: msg.files ?? [],
|
|
66
|
+
replies: null,
|
|
67
|
+
channel: null,
|
|
68
|
+
isPinned: false
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function PlanModeView({
|
|
72
|
+
messages,
|
|
73
|
+
streamingContent,
|
|
74
|
+
currentUser,
|
|
75
|
+
onSend,
|
|
76
|
+
disabled = false,
|
|
77
|
+
isLoading = false,
|
|
78
|
+
onStop,
|
|
79
|
+
showDate = false,
|
|
80
|
+
showAvatar = false,
|
|
81
|
+
showMessageBubbleBorder = false,
|
|
82
|
+
useInternalScroll = false,
|
|
83
|
+
scrollContainerRef,
|
|
84
|
+
scrollContainerClassName,
|
|
85
|
+
hideScrollbar = false,
|
|
86
|
+
contentClassName,
|
|
87
|
+
postContainerClassName,
|
|
88
|
+
className,
|
|
89
|
+
hideInputToolbar = false,
|
|
90
|
+
inputPlacement = 'bottom',
|
|
91
|
+
renderInputToolbar,
|
|
92
|
+
onOpen = () => {},
|
|
93
|
+
onMessageClick = () => {},
|
|
94
|
+
isDesktopView = false,
|
|
95
|
+
isSmallScreen = false,
|
|
96
|
+
sandboxErrors = [],
|
|
97
|
+
currentFiles = {},
|
|
98
|
+
onFixError,
|
|
99
|
+
error = null,
|
|
100
|
+
onRetry,
|
|
101
|
+
renderEmptyState,
|
|
102
|
+
scrollToBottomDeps,
|
|
103
|
+
showCopyDownloadOnCodeBlock = true
|
|
104
|
+
}) {
|
|
105
|
+
const [inputValue, setInputValue] = useState('');
|
|
106
|
+
const internalListRef = useRef(null);
|
|
107
|
+
const contentRef = useRef(null);
|
|
108
|
+
const shouldAutoScrollRef = useRef(true);
|
|
109
|
+
const setScrollContainerRef = useCallback(node => {
|
|
110
|
+
internalListRef.current = node;
|
|
111
|
+
if (!scrollContainerRef) return;
|
|
112
|
+
if (typeof scrollContainerRef === 'function') {
|
|
113
|
+
scrollContainerRef(node);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
// RefObject / MutableRefObject
|
|
117
|
+
scrollContainerRef.current = node;
|
|
118
|
+
}, [scrollContainerRef]);
|
|
119
|
+
const scrollToBottom = useCallback(() => {
|
|
120
|
+
const el = internalListRef.current;
|
|
121
|
+
if (el && shouldAutoScrollRef.current) {
|
|
122
|
+
el.scrollTop = el.scrollHeight;
|
|
123
|
+
}
|
|
124
|
+
}, []);
|
|
125
|
+
const handleSendFromInput = useCallback(() => {
|
|
126
|
+
const t = inputValue.trim();
|
|
127
|
+
if (!t) return;
|
|
128
|
+
onSend(t);
|
|
129
|
+
setInputValue('');
|
|
130
|
+
}, [inputValue, onSend]);
|
|
131
|
+
const inputToolbarProps = {
|
|
132
|
+
value: inputValue,
|
|
133
|
+
onChange: setInputValue,
|
|
134
|
+
onSend: handleSendFromInput,
|
|
135
|
+
disabled: disabled || isLoading
|
|
136
|
+
};
|
|
137
|
+
const currentUserForGroup = useMemo(() => ({
|
|
138
|
+
id: currentUser.id,
|
|
139
|
+
givenName: currentUser.givenName ?? currentUser.name ?? 'You',
|
|
140
|
+
familyName: currentUser.familyName ?? '',
|
|
141
|
+
fullName: currentUser.fullName ?? currentUser.name ?? 'You',
|
|
142
|
+
username: currentUser.username ?? currentUser.id,
|
|
143
|
+
email: currentUser.email ?? '',
|
|
144
|
+
picture: currentUser.picture ?? currentUser.avatar ?? null,
|
|
145
|
+
alias: currentUser.alias ?? [],
|
|
146
|
+
tokens: currentUser.tokens ?? []
|
|
147
|
+
}), [currentUser]);
|
|
148
|
+
const posts = useMemo(() => messages.map(m => planMessageToPost(m, currentUser)), [messages, currentUser]);
|
|
149
|
+
const isEmpty = posts.length === 0 && !streamingContent?.trim() && !isLoading;
|
|
150
|
+
const shouldInlineToolbar = inputPlacement === 'inlineWhenEmpty' && isEmpty;
|
|
151
|
+
const shouldRenderBottomToolbar = !hideInputToolbar && !shouldInlineToolbar;
|
|
152
|
+
// Auto-scroll to bottom while user stays near bottom.
|
|
153
|
+
useLayoutEffect(() => {
|
|
154
|
+
if (!useInternalScroll) return;
|
|
155
|
+
if (!shouldAutoScrollRef.current) return;
|
|
156
|
+
scrollToBottom();
|
|
157
|
+
const id = requestAnimationFrame(() => {
|
|
158
|
+
scrollToBottom();
|
|
159
|
+
requestAnimationFrame(scrollToBottom);
|
|
160
|
+
});
|
|
161
|
+
return () => cancelAnimationFrame(id);
|
|
162
|
+
}, [useInternalScroll, scrollToBottom, posts.length, streamingContent, isLoading]);
|
|
163
|
+
// When internal scroll is (re)enabled, force follow-to-bottom.
|
|
164
|
+
useEffect(() => {
|
|
165
|
+
if (!useInternalScroll) return;
|
|
166
|
+
shouldAutoScrollRef.current = true;
|
|
167
|
+
scrollToBottom();
|
|
168
|
+
}, [useInternalScroll, scrollToBottom]);
|
|
169
|
+
// When inner content grows (stream chunks, markdown expand), scroll to bottom if user was near bottom.
|
|
170
|
+
// Observing the content wrapper ensures we react to content height changes; the scroll container size often does not change.
|
|
171
|
+
useEffect(() => {
|
|
172
|
+
if (!useInternalScroll) return;
|
|
173
|
+
const el = contentRef.current;
|
|
174
|
+
if (!el) return;
|
|
175
|
+
if (typeof ResizeObserver === 'undefined') return;
|
|
176
|
+
const ro = new ResizeObserver(() => {
|
|
177
|
+
if (!shouldAutoScrollRef.current) return;
|
|
178
|
+
scrollToBottom();
|
|
179
|
+
});
|
|
180
|
+
ro.observe(el);
|
|
181
|
+
return () => ro.disconnect();
|
|
182
|
+
}, [useInternalScroll, scrollToBottom]);
|
|
183
|
+
// Parent-controlled scroll: when scrollToBottomDeps change (e.g. each stream chunk), force scroll to bottom.
|
|
184
|
+
useEffect(() => {
|
|
185
|
+
if (!useInternalScroll || !scrollToBottomDeps?.length) return;
|
|
186
|
+
scrollToBottom();
|
|
187
|
+
const id = requestAnimationFrame(() => {
|
|
188
|
+
scrollToBottom();
|
|
189
|
+
});
|
|
190
|
+
return () => cancelAnimationFrame(id);
|
|
191
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- intentional: parent passes deps
|
|
192
|
+
}, scrollToBottomDeps ?? []);
|
|
193
|
+
const handleScroll = useCallback(() => {
|
|
194
|
+
const el = internalListRef.current;
|
|
195
|
+
if (!el) return;
|
|
196
|
+
const thresholdPx = 160;
|
|
197
|
+
const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
198
|
+
shouldAutoScrollRef.current = distanceFromBottom <= thresholdPx;
|
|
199
|
+
}, []);
|
|
200
|
+
return React__default.createElement("div", {
|
|
201
|
+
className: clsx('flex flex-col flex-1 min-h-0 overflow-hidden', className)
|
|
202
|
+
}, useInternalScroll && hideScrollbar && React__default.createElement("style", null, HIDE_SCROLLBAR_CSS), React__default.createElement("div", {
|
|
203
|
+
ref: setScrollContainerRef,
|
|
204
|
+
onScroll: useInternalScroll ? handleScroll : undefined,
|
|
205
|
+
className: useInternalScroll ? clsx('flex-1 min-h-0 overflow-y-auto', hideScrollbar && 'ym-hide-scrollbar', scrollContainerClassName) : scrollContainerClassName ?? ''
|
|
206
|
+
}, React__default.createElement("div", {
|
|
207
|
+
ref: contentRef,
|
|
208
|
+
className: clsx('w-full pb-4 pt-2 space-y-3 px-4', contentClassName ?? '')
|
|
209
|
+
}, error && React__default.createElement("div", {
|
|
210
|
+
className: "rounded-lg border border-red-200 bg-red-50 px-4 py-3 flex items-center justify-between gap-2"
|
|
211
|
+
}, React__default.createElement("span", {
|
|
212
|
+
className: "text-sm text-red-800"
|
|
213
|
+
}, error), onRetry && React__default.createElement("button", {
|
|
214
|
+
type: "button",
|
|
215
|
+
onClick: onRetry,
|
|
216
|
+
className: "shrink-0 px-3 py-1.5 text-sm font-medium text-red-700 hover:bg-red-100 rounded-md transition-colors"
|
|
217
|
+
}, "Retry")), isEmpty && React__default.createElement("div", {
|
|
218
|
+
className: "px-4 py-8 text-center"
|
|
219
|
+
}, renderEmptyState ? renderEmptyState({
|
|
220
|
+
inputToolbarProps
|
|
221
|
+
}) : React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
222
|
+
className: "text-gray-500 text-lg font-medium mb-2"
|
|
223
|
+
}, "Describe your idea and I'll help you create it step by step"), React__default.createElement("div", {
|
|
224
|
+
className: "text-gray-400 text-sm"
|
|
225
|
+
}, "Start a new conversation by typing your message below")), shouldInlineToolbar && React__default.createElement("div", {
|
|
226
|
+
className: "mt-6 text-left"
|
|
227
|
+
}, renderInputToolbar(inputToolbarProps))), posts.map(post => React__default.createElement("div", {
|
|
228
|
+
key: post.id,
|
|
229
|
+
className: clsx('mb-3', postContainerClassName)
|
|
230
|
+
}, React__default.createElement(ModernMessageGroupComponent, {
|
|
231
|
+
messages: [post],
|
|
232
|
+
currentUser: currentUserForGroup,
|
|
233
|
+
onOpen: onOpen,
|
|
234
|
+
onMessageClick: onMessageClick,
|
|
235
|
+
isDesktopView: isDesktopView,
|
|
236
|
+
isSmallScreen: isSmallScreen,
|
|
237
|
+
showAuthorName: showAvatar,
|
|
238
|
+
showAvatar: showAvatar,
|
|
239
|
+
showTimestamp: showDate,
|
|
240
|
+
sandboxErrors: sandboxErrors,
|
|
241
|
+
currentFiles: currentFiles,
|
|
242
|
+
onFixError: onFixError,
|
|
243
|
+
showCopyDownloadOnCodeBlock: showCopyDownloadOnCodeBlock
|
|
244
|
+
}))), streamingContent?.trim() && React__default.createElement("div", {
|
|
245
|
+
className: "flex justify-start"
|
|
246
|
+
}, React__default.createElement("div", {
|
|
247
|
+
className: `max-w-[85%] rounded-2xl px-4 py-3 ${ASSISTANT_BUBBLE_BG} text-gray-900 ${showMessageBubbleBorder ? `border ${BORDER_COLOR}` : ''}`
|
|
248
|
+
}, React__default.createElement("div", {
|
|
249
|
+
className: "text-[15px] leading-relaxed break-words min-w-0"
|
|
250
|
+
}, detectContentType(streamingContent) === 'code' ? React__default.createElement(CodeFormatter, {
|
|
251
|
+
content: streamingContent,
|
|
252
|
+
showCopyDownload: showCopyDownloadOnCodeBlock
|
|
253
|
+
}) : React__default.createElement(FormattedMessageContent, {
|
|
254
|
+
content: streamingContent,
|
|
255
|
+
showCopyDownloadOnCodeBlock: showCopyDownloadOnCodeBlock
|
|
256
|
+
})))), isLoading && React__default.createElement("div", {
|
|
257
|
+
className: "flex justify-start"
|
|
258
|
+
}, React__default.createElement("div", {
|
|
259
|
+
className: "rounded-2xl px-4 py-3 bg-gray-100 border border-gray-200 flex items-center gap-2"
|
|
260
|
+
}, React__default.createElement("div", {
|
|
261
|
+
className: "w-4 h-4 border-2 border-gray-300 border-t-gray-600 rounded-full animate-spin"
|
|
262
|
+
}), React__default.createElement("span", {
|
|
263
|
+
className: "text-sm text-gray-600"
|
|
264
|
+
}, "Thinking..."))))), shouldRenderBottomToolbar && React__default.createElement("div", {
|
|
265
|
+
className: "border-t border-gray-200 bg-white p-3"
|
|
266
|
+
}, renderInputToolbar(inputToolbarProps)));
|
|
267
|
+
}export{PlanModeView};//# sourceMappingURL=PlanModeView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlanModeView.js","sources":["../../../src/components/messages-container-ui/PlanModeView.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"qUAUA,MAAM,mBAAmB,GAAG,UAAU;AACtC,MAAM,YAAY,GAAG,iBAAiB;AAEtC,MAAM,kBAAkB,GAAG;;;;;;;;;;;CAW1B;AAED,MAAM,wBAAwB,GAAG;AAC7B,EAAA,EAAA,EAAE,cAAE;AACJ,EAAA,SAAA,EAAS,IAAE;AACX,EAAA,UAAA,EAAU,WAAE;AACZ,EAAA,QAAA,EAAQ,cAAE;AACV,EAAA,QAAA,EAAQ,cAAE;AACV,EAAA,KAAA,EAAK,kBAAE;AACP,EAAA,OAAA,EAAO,IAAE;AACT,EAAA,KAAA,EAAK,EAAE;AACP,EAAA,MAAA,EAAM;CACT;AA4ED;AACA,SAAS,iBAAiB,CAAC,GAAgB,EAAE,WAA6C,EAAA;AACtF,EAAA,MAAA,SAAY,GAAG,CAAA,IAAI,KAAI;AACvB,EAAA,MAAA,MAAM,GAAM,GACR,CAAA,MAAI,KAAM,MAAA,GAAA;AACV,IAAA,EAAA,EAAA,WAAO,CAAA,EAAA;AACH,IAAA,SAAC,EAAC,WAAA,CAAA,SAAA,IAAA,WAAA,CAAA,IAAA,IAAA,MAA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CAAA,EAAA,CAAA,iBAAA,EAAA,eACO,CAAA;;kBASO;AAGV,IAAA,IAAA,CAAA,iBAAA,IAAA,CAAA,kBAAU,EAAA,MAAU,EAAE;AACjB,IAAA,cAAA,EAAA;AAEO,IAAA,MAAA,EAAA,GAAA,qBAAA,CAAA,MAAA;AACC,MAAA,cAAA,EAAA;AAWR,IAAA,CAAA,CAAA;AAEQ,IAAA,OAAA,MAAA,oBAAiB,CAAC,EACf;;AAMI,EAAA,CAAA,EAAA,kBAAA,IAAA,EAAA,CAAA;AAKP,EAAA,MAAA,YAAA,GAAA,WAAA,CAAA,MAAmB;+BAMZ,OACZ;;qBAmBH,GAAA,GAAA;AAEO,IAAA,MAAA,kBAAA,GAAA,EAAA,CAAA,YAAA,GACI,YAAW,GAAA,EAAA,CAAA,YAAA;wBAIX,OAAA,GAAA,kBAAA,IAAK,WAAU;AAiB1B,EAAA,CAAA,EAAA,EAAA,CAAA;qCAEO,CAAA,KAAA,EAAA;kEACmB,EAAA,SAAA;0BACf,aAAA,IAAAA,cAAA,CAAA,aAAM,CAAS,OAAC,EAAA,IAAA,EAAA,kBAAuB,CAAA,EAAAA,cAAA,CAAA,aAKrD,CAAA,KAAA,EAAA;AACL,IAAA,GAAA,EAAA,qBAAA;AAKb,IAAC,QAAA,EAAA,iBAAA,GAAA,YAAA,GAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { MessagesContainerUI } from './MessagesContainerUI';
|
|
2
|
+
export { PlanModeView } from './PlanModeView';
|
|
3
|
+
export type { MessagesContainerUIProps } from './MessagesContainerUI';
|
|
4
|
+
export type { PlanModeViewProps, PlanModeViewInputToolbarProps } from './PlanModeView';
|
|
5
|
+
export type { PlanMessage, CurrentUser } from './types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/messages-container-ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtE,YAAY,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AACvF,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Messages container UI – types for plan mode (chat / search / research).
|
|
3
|
+
* Messages can be simple PlanMessage or full post-like shape for ModernMessageGroupComponent.
|
|
4
|
+
*/
|
|
5
|
+
export interface PlanMessage {
|
|
6
|
+
id: string;
|
|
7
|
+
role: 'user' | 'assistant' | 'system';
|
|
8
|
+
content: string;
|
|
9
|
+
createdAt?: Date | string;
|
|
10
|
+
/** Optional: pass through to ModernMessageGroupComponent (propsConfiguration, props, files, etc.) */
|
|
11
|
+
propsConfiguration?: any;
|
|
12
|
+
props?: any;
|
|
13
|
+
files?: any;
|
|
14
|
+
author?: any;
|
|
15
|
+
type?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Props passed to the input toolbar render function. */
|
|
18
|
+
export interface PlanModeViewInputToolbarProps {
|
|
19
|
+
value: string;
|
|
20
|
+
onChange: (text: string) => void;
|
|
21
|
+
onSend: () => void;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface CurrentUser {
|
|
25
|
+
id: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
avatar?: string;
|
|
28
|
+
/** Optional: full author shape for ModernMessageGroupComponent (givenName, familyName, username, etc.) */
|
|
29
|
+
givenName?: string;
|
|
30
|
+
familyName?: string;
|
|
31
|
+
fullName?: string;
|
|
32
|
+
username?: string;
|
|
33
|
+
email?: string;
|
|
34
|
+
picture?: string | null;
|
|
35
|
+
alias?: any[];
|
|
36
|
+
tokens?: any[];
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/messages-container-ui/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,qGAAqG;IACrG,kBAAkB,CAAC,EAAE,GAAG,CAAC;IACzB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,yDAAyD;AACzD,MAAM,WAAW,6BAA6B;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0GAA0G;IAC1G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-message-filler.d.ts","sourceRoot":"","sources":["../../../src/components/slot-fill/chat-message-filler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,eAAO,MAAM,eAAe,yBAE3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,yBAS5B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import*as React from'react';import {ChatMessageFiller}from'./chat-message-slot.js';import {MessageSliceRenderer}from'../InboxMessage/message-widgets/MessageSliceRenderer.js';import'date-fns';import'../inbox/FilesList.js';import'../inbox/MessageItem.js';import'../inbox/ThreadItem.js';import'../InboxMessage/message-widgets/ModernMessageGroup.js';const ChatMessageFill = () => {
|
|
2
|
+
return React.createElement(ChatMessageFiller, null, props => React.createElement(MessageSliceRenderer, {
|
|
3
|
+
...props
|
|
4
|
+
}));
|
|
5
|
+
};export{ChatMessageFill};//# sourceMappingURL=chat-message-filler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-message-filler.js","sources":["../../../src/components/slot-fill/chat-message-filler.tsx"],"sourcesContent":[null],"names":[],"mappings":"0VAIO,MAAM,eAAe,GAAG,MAAK;AAChC,EAAA,OAAA,KAAO,CAAA,aAAA,CAAA,iBAAC,EAAiB,IAAA,EAAA,SAAQ,KAAK,CAAA,aAAA,CAAA,oBAAC,EAAA;AAC3C,IAAE,GAAA;AAEF,GAAA,CAAA,CAAA;AACI"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
type ChatMessageProps = {
|
|
3
|
+
index: number;
|
|
4
|
+
message: any;
|
|
5
|
+
onOpen: any;
|
|
6
|
+
currentUser: any;
|
|
7
|
+
};
|
|
8
|
+
export declare const ChatMessageSlot: FunctionComponent<ChatMessageProps>;
|
|
9
|
+
export declare const ChatMessageFiller: (props: any) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=chat-message-slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-message-slot.d.ts","sourceRoot":"","sources":["../../../src/components/slot-fill/chat-message-slot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAIjD,KAAK,gBAAgB,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,EAAE,GAAG,CAAC;IACZ,WAAW,EAAE,GAAG,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,gBAAgB,CAE/D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,GAAG,sBAE3C,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React__default from'react';import {Fill}from'@common-stack/components-pro';import {MESSAGE_SLOT_FILL_NAME}from'@messenger-box/core';const ChatMessageFiller = props => {
|
|
2
|
+
return React__default.createElement(Fill, {
|
|
3
|
+
...props,
|
|
4
|
+
name: MESSAGE_SLOT_FILL_NAME
|
|
5
|
+
});
|
|
6
|
+
};export{ChatMessageFiller};//# sourceMappingURL=chat-message-slot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-message-slot.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/slot-fill/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"right-sidebar-filler.d.ts","sourceRoot":"","sources":["../../../src/components/slot-fill/right-sidebar-filler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmC/B,eAAO,MAAM,kBAAkB,GAAI,OAAO,GAAG,sBAE5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,yBAQ5B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import*as React from'react';import {Fill}from'@common-stack/components-pro';import {MessengerSlotFillNameEnum}from'../../enums/messenger-slot-fill-name-enum.js';import {RightSidebarFillComponent}from'../filler-components/RightSiderBar.js';const RightSidebarFiller = props => {
|
|
2
|
+
return React.createElement(Fill, {
|
|
3
|
+
...props,
|
|
4
|
+
name: MessengerSlotFillNameEnum.INBOX_WITH_AI_RIGHT_SIDEBAR
|
|
5
|
+
});
|
|
6
|
+
};
|
|
7
|
+
const RightSidebarFill = () => {
|
|
8
|
+
return React.createElement(RightSidebarFiller, null, props => {
|
|
9
|
+
return React.createElement(RightSidebarFillComponent, {
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
};export{RightSidebarFill,RightSidebarFiller};//# sourceMappingURL=right-sidebar-filler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"right-sidebar-filler.js","sources":["../../../src/components/slot-fill/right-sidebar-filler.tsx"],"sourcesContent":[null],"names":[],"mappings":"+OAmCO,MAAM,kBAAkB,GAAG,KAAC,IAAY;SAC3C,KAAO,CAAA,aAAA,CAAA,IAAC,EAAI;AAChB,IAAE,GAAA,KAAA;AAEF,IAAA,IAAO,EAAA,yBAA4B,CAAA;AAC/B,GAAA,CAAA;AAGY;AAGV,MAAA,gBAAA,GAAA,MAAA;AACN,EAAE,OAAA,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA,IAAA,EAAA,KAAA,IAAA;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
variant?: 'default' | 'outline' | 'ghost' | 'link';
|
|
4
|
+
size?: 'default' | 'sm' | 'lg';
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACvE,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;IACnD,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,MAAM,uFAoBlB,CAAC"}
|
package/lib/compute.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import type { IRouteModule } from '@common-stack/core';
|
|
3
|
+
export declare const messengerPageStore: IRouteModule[] | {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
declare const filteredRoutes: any;
|
|
7
|
+
export { filteredRoutes };
|
|
8
|
+
//# sourceMappingURL=compute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../src/compute.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAK1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,eAAO,MAAM,kBAAkB,EAAE,YAAY,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAuPrE,CAAC;AAaF,QAAA,MAAM,cAAc,KAAwD,CAAC;AAE7E,OAAO,EAAE,cAAc,EAAE,CAAC"}
|