@messenger-box/tailwind-ui-inbox 10.0.3-alpha.107 → 10.0.3-alpha.109
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 +8 -0
- package/lib/components/AIAgent/AIAgent.d.ts.map +1 -1
- package/lib/components/AIAgent/AIAgent.js +19 -195
- package/lib/components/AIAgent/AIAgent.js.map +1 -1
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.d.ts.map +1 -1
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.js +16 -9
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.js.map +1 -1
- package/lib/components/slot-fill/chat-message-filler.js +1 -1
- package/lib/components/slot-fill/chat-message-filler.js.map +1 -1
- package/lib/compute.d.ts.map +1 -1
- package/lib/compute.js +18 -8
- package/lib/compute.js.map +1 -1
- package/lib/container/AiLandingInput.d.ts.map +1 -1
- package/lib/container/AiLandingInput.js +7 -2
- package/lib/container/AiLandingInput.js.map +1 -1
- package/lib/container/InboxAiMessagesLoader.d.ts.map +1 -1
- package/lib/container/InboxAiMessagesLoader.js +5 -2
- package/lib/container/InboxAiMessagesLoader.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/module.js +7 -7
- package/lib/module.js.map +1 -1
- package/lib/routes.json +22 -9
- package/lib/templates/InboxWithAi.d.ts.map +1 -1
- package/lib/templates/InboxWithAi.js +0 -1
- package/lib/templates/InboxWithAi.js.map +1 -1
- package/lib/templates/InboxWithAi.tsx +0 -1
- package/package.json +4 -4
- package/src/components/AIAgent/AIAgent.tsx +18 -215
- package/src/components/InboxMessage/message-widgets/ModernMessageGroup.tsx +24 -12
- package/src/compute.ts +20 -10
- package/src/container/AiLandingInput.tsx +12 -3
- package/src/container/InboxAiMessagesLoader.tsx +2 -1
- package/src/module.tsx +4 -4
- package/src/templates/InboxWithAi.tsx +0 -1
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import React__default from'react';import {useNavigate}from'@remix-run/react';import {AiAgentMessageRole,PostTypeEnum,RoomType}from'common';import'date-fns';import'@react-icons/all-files/bs/BsFlag.js';import'../components/inbox/FilesList.js';import'../components/inbox/MessageItem.js';import'../components/inbox/ThreadItem.js';import'../components/InboxMessage/ConversationItem.js';import'../components/InboxMessage/ServiceConversationItem.js';import'../components/InboxMessage/LeftSidebar.js';import'react-i18next';import {config}from'../config/env-config.js';import'@react-icons/all-files/bi/BiImage.js';import'@react-icons/all-files/ai/AiOutlineSecurityScan.js';import'@react-icons/all-files/fi/FiCheck.js';import'@react-icons/all-files/bs/BsFillStarFill.js';import'@common-stack/components-pro';import'react-markdown';import'remark-gfm';import'../enums/messenger-slot-fill-name-enum.js';import'../components/InboxMessage/ServiceInboxItem.js';import {InputComponent}from'../components/InboxMessage/InputComponent.js';import {objectId}from'@messenger-box/core';import {useCreateChannelWorkflowJobMutation,useAddChannelMutation,useSendMessagesMutation}from'common/graphql';import {usePersistentModelConfig}from'../hooks/usePersistentModelConfig.js';const TailwindOverlaySpinner = React__default.memo(() => React__default.createElement("div", {
|
|
1
|
+
import React__default from'react';import {useParams,useNavigate}from'@remix-run/react';import {AiAgentMessageRole,PostTypeEnum,RoomType}from'common';import'date-fns';import'@react-icons/all-files/bs/BsFlag.js';import'../components/inbox/FilesList.js';import'../components/inbox/MessageItem.js';import'../components/inbox/ThreadItem.js';import'../components/InboxMessage/ConversationItem.js';import'../components/InboxMessage/ServiceConversationItem.js';import'../components/InboxMessage/LeftSidebar.js';import'react-i18next';import {config}from'../config/env-config.js';import'@react-icons/all-files/bi/BiImage.js';import'@react-icons/all-files/ai/AiOutlineSecurityScan.js';import'@react-icons/all-files/fi/FiCheck.js';import'@react-icons/all-files/bs/BsFillStarFill.js';import'@common-stack/components-pro';import'react-markdown';import'remark-gfm';import'../enums/messenger-slot-fill-name-enum.js';import'../components/InboxMessage/ServiceInboxItem.js';import {InputComponent}from'../components/InboxMessage/InputComponent.js';import {objectId}from'@messenger-box/core';import {useCreateChannelWorkflowJobMutation,useAddChannelMutation,useSendMessagesMutation}from'common/graphql';import {usePersistentModelConfig}from'../hooks/usePersistentModelConfig.js';const TailwindOverlaySpinner = React__default.memo(() => React__default.createElement("div", {
|
|
2
2
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-30"
|
|
3
3
|
}, React__default.createElement("div", {
|
|
4
4
|
className: "animate-spin rounded-full h-10 w-10 border-2 border-white border-t-transparent"
|
|
5
5
|
})));
|
|
6
6
|
const AiLandingInput = () => {
|
|
7
|
+
const {
|
|
8
|
+
orgName
|
|
9
|
+
} = useParams();
|
|
7
10
|
const [createChannelWorkflowJob] = useCreateChannelWorkflowJobMutation();
|
|
8
11
|
const [addChannel] = useAddChannelMutation();
|
|
9
12
|
const [sendMessage] = useSendMessagesMutation();
|
|
@@ -98,7 +101,9 @@ const AiLandingInput = () => {
|
|
|
98
101
|
setIsCreatingChannel(false);
|
|
99
102
|
return;
|
|
100
103
|
}
|
|
101
|
-
|
|
104
|
+
const basePath = orgName ? config.AI_MESSENGER_PATH.replace(':orgName', orgName) : config.AI_MESSENGER_PATH;
|
|
105
|
+
const targetPath = basePath.includes(':id') ? basePath.replace(':id', channelId) : `${basePath.replace(/\/+$/, '')}/${channelId}`;
|
|
106
|
+
navigate(targetPath, {
|
|
102
107
|
replace: true
|
|
103
108
|
});
|
|
104
109
|
setIsCreatingChannel(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiLandingInput.js","sources":["../../src/container/AiLandingInput.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AiLandingInput.js","sources":["../../src/container/AiLandingInput.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"2uCASA,MAAM,sBAAsB,GAAGA,cAAK,CAAC,IAAI,CAAC,MAAMA,cAC5C,CAAA,aAAA,CAAA,KAAA,EAAA;AACI,EAAA,SAAA,EAAA;AAIR,CAAA,EAAAA,cAAM,CAAA,aAAc,CA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A;AAEJ,gBAAA;;AAEI,aAAA;gCAEJ,EAAA;;;AAGJ,WAAA;AACI,UAAA,cAAA,EAAA;oCACA,EAAA,WAAA,IAAqB,MAAM,CAAC,+BAAA;gDAC/B;AACJ,YAAA,MAAA,EAAA,oBAAE;AACP,YAAA,UAAC,EACD,yBAAY;AA8FhB,YAAA,QAAA,EAAA,EAAA;AAKP,YAAA,MAAA,EAAA;AAGb;AAEA,SAAA;AAEA,QAAA,aAAqB,IAAI,IAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InboxAiMessagesLoader.d.ts","sourceRoot":"","sources":["../../src/container/InboxAiMessagesLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,UAAU,4BAA4B;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;;YAEuC,4BAA4B;;;
|
|
1
|
+
{"version":3,"file":"InboxAiMessagesLoader.d.ts","sourceRoot":"","sources":["../../src/container/InboxAiMessagesLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,UAAU,4BAA4B;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;;YAEuC,4BAA4B;;;AA4BpE,wBAAmD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default from'react';import {useLocation,useOutletContext}from'@remix-run/react';import {AIAgent}from'../components/AIAgent/AIAgent.js';import {useSelector,shallowEqual}from'react-redux';import {userSelector}from'@adminide-stack/user-auth0-client';const InboxWithAiLoaderOutlet = props => {
|
|
1
|
+
import React__default from'react';import {useLocation,useOutletContext,useParams}from'@remix-run/react';import {AIAgent}from'../components/AIAgent/AIAgent.js';import {useSelector,shallowEqual}from'react-redux';import {userSelector}from'@adminide-stack/user-auth0-client';const InboxWithAiLoaderOutlet = props => {
|
|
2
2
|
const location = useLocation();
|
|
3
3
|
const {
|
|
4
4
|
messages,
|
|
@@ -9,7 +9,10 @@ import React__default from'react';import {useLocation,useOutletContext}from'@rem
|
|
|
9
9
|
isLoading
|
|
10
10
|
} = useOutletContext();
|
|
11
11
|
const urlParams = location?.search ? new URLSearchParams(location.search) : null;
|
|
12
|
-
const
|
|
12
|
+
const {
|
|
13
|
+
id: pathChannelId
|
|
14
|
+
} = useParams();
|
|
15
|
+
const channelId = urlParams?.get('id') || pathChannelId;
|
|
13
16
|
const user = useSelector(userSelector, shallowEqual);
|
|
14
17
|
return React__default.createElement(AIAgent, {
|
|
15
18
|
channelId: channelId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InboxAiMessagesLoader.js","sources":["../../src/container/InboxAiMessagesLoader.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InboxAiMessagesLoader.js","sources":["../../src/container/InboxAiMessagesLoader.tsx"],"sourcesContent":[null],"names":[],"mappings":"+QAgBA,MAAM,uBAAuB,GAAG,KAAC,IAAqC;AAClE,EAAA,MAAA,QAAM,GAAQ,WAAG,EAAW;AAC5B,EAAA,MAAA;AACA,IAAA;IACA,WAAU;IACV,YAAM;IACN,eAAkB;IAElB;AAeJ,IAAE;AAEF,GAAA,GAAA,gBAAA,EAAA;AACA,EAAA,MAAA,SAAA,GAAA,QAAwB,EAAA,MAAW,GAAG,IAAA,eAAA,CAAA,QAA0B,CAAA,MAAA,CAAA,GAAA,IAAA;AAEhE,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default}from'./module.js';export{default as Inbox}from'./container/Inbox.js';export{default as InboxWithLoader}from'./container/InboxWithLoader.js';export{default as Threads}from'./container/Threads.js';export{default as ThreadMessages}from'./container/ThreadMessages.js';export{default as ServiceInbox}from'./container/ServiceInbox.js';import'./container/ThreadsInbox.js';import'./container/ThreadMessagesInbox.js';export{default as InboxWithAiLoader}from'./container/InboxWithAiLoader.js';export{default as InboxAiMessagesLoader}from'./container/InboxAiMessagesLoader.js';export{default as InboxContainer}from'./container/InboxContainer.js';export{default as AiLandingInput}from'./container/AiLandingInput.js';export{FilesList}from'./components/inbox/FilesList.js';export{MessageItem}from'./components/inbox/MessageItem.js';import'./components/inbox/ThreadItem.js';export{CommonMessage}from'./components/InboxMessage/CommonMessage.js';export{ConversationItem}from'./components/InboxMessage/ConversationItem.js';import'./components/InboxMessage/ServiceConversationItem.js';export{LeftSidebar}from'./components/InboxMessage/LeftSidebar.js';export{MessageInput}from'./components/InboxMessage/MessageInput.js';export{Messages}from'./components/InboxMessage/Messages.js';export{Popover}from'./components/InboxMessage/Popover.js';export{UploadImageButton}from'./components/InboxMessage/UploadImageButton.js';export{UserModalContent}from'./components/InboxMessage/UserModalContent.js';export{MessageSliceRenderer}from'./components/InboxMessage/message-widgets/MessageSliceRenderer.js';import'react';import'date-fns';import'react-markdown';import'remark-gfm';import'@common-stack/components-pro';export{MessengerSlotFillNameEnum}from'./enums/messenger-slot-fill-name-enum.js';export{ServiceInboxItem}from'./components/InboxMessage/ServiceInboxItem.js';import'react-i18next';import'./config/env-config.js';export{InputComponent}from'./components/InboxMessage/InputComponent.js';export{RightSidebarAi}from'./components/InboxMessage/RightSidebarAi.js';import'@messenger-box/core';export{ChatMessageFill}from'./components/slot-fill/chat-message-filler.js';export{RightSidebarFill as RightSidebarFillDefault}from'./components/slot-fill/right-sidebar-filler.js';export{AIAgent}from'./components/AIAgent/AIAgent.js';export{ModelConfigPanel}from'./components/ModelConfigPanel.js';export{usePersistentModelConfig}from'./hooks/usePersistentModelConfig.js';export{default as InboxWithAi}from'./templates/InboxWithAi.js';export{aiAgentMachine}from'./machines/aiAgentMachine.js';export{useFileSync}from'./hooks/use-file-sync.js';//# sourceMappingURL=index.js.map
|
|
1
|
+
export{default}from'./module.js';export{default as Inbox}from'./container/Inbox.js';export{default as InboxWithLoader}from'./container/InboxWithLoader.js';export{default as Threads}from'./container/Threads.js';export{default as ThreadMessages}from'./container/ThreadMessages.js';export{default as ServiceInbox}from'./container/ServiceInbox.js';import'./container/ThreadsInbox.js';import'./container/ThreadMessagesInbox.js';export{default as InboxWithAiLoader}from'./container/InboxWithAiLoader.js';export{default as InboxAiMessagesLoader}from'./container/InboxAiMessagesLoader.js';export{default as InboxContainer}from'./container/InboxContainer.js';export{default as AiLandingInput}from'./container/AiLandingInput.js';export{FilesList}from'./components/inbox/FilesList.js';export{MessageItem}from'./components/inbox/MessageItem.js';import'./components/inbox/ThreadItem.js';export{CommonMessage}from'./components/InboxMessage/CommonMessage.js';export{ConversationItem}from'./components/InboxMessage/ConversationItem.js';import'./components/InboxMessage/ServiceConversationItem.js';export{LeftSidebar}from'./components/InboxMessage/LeftSidebar.js';export{MessageInput}from'./components/InboxMessage/MessageInput.js';export{Messages}from'./components/InboxMessage/Messages.js';export{Popover}from'./components/InboxMessage/Popover.js';export{UploadImageButton}from'./components/InboxMessage/UploadImageButton.js';export{UserModalContent}from'./components/InboxMessage/UserModalContent.js';export{MessageSliceRenderer}from'./components/InboxMessage/message-widgets/MessageSliceRenderer.js';import'react';import'date-fns';import'common';import'react-markdown';import'remark-gfm';import'@common-stack/components-pro';export{MessengerSlotFillNameEnum}from'./enums/messenger-slot-fill-name-enum.js';export{ServiceInboxItem}from'./components/InboxMessage/ServiceInboxItem.js';import'react-i18next';import'./config/env-config.js';export{InputComponent}from'./components/InboxMessage/InputComponent.js';export{RightSidebarAi}from'./components/InboxMessage/RightSidebarAi.js';import'@messenger-box/core';export{ChatMessageFill}from'./components/slot-fill/chat-message-filler.js';export{RightSidebarFill as RightSidebarFillDefault}from'./components/slot-fill/right-sidebar-filler.js';export{AIAgent}from'./components/AIAgent/AIAgent.js';export{ModelConfigPanel}from'./components/ModelConfigPanel.js';export{usePersistentModelConfig}from'./hooks/usePersistentModelConfig.js';export{default as InboxWithAi}from'./templates/InboxWithAi.js';export{aiAgentMachine}from'./machines/aiAgentMachine.js';export{useFileSync}from'./hooks/use-file-sync.js';//# sourceMappingURL=index.js.map
|
package/lib/module.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {Feature}from'@common-stack/client-react';import {typePolicies,schema,dataIdFromObject}from'@messenger-box/platform-client';import {MESSAGE_SLOT_FILL_NAME}from'@messenger-box/core';import {filteredRoutes}from'./compute.js';import {ChatMessageFill}from'./components/slot-fill/chat-message-filler.js';import
|
|
1
|
+
import {Feature}from'@common-stack/client-react';import {typePolicies,schema,dataIdFromObject}from'@messenger-box/platform-client';import {MESSAGE_SLOT_FILL_NAME}from'@messenger-box/core';import {filteredRoutes}from'./compute.js';import {ChatMessageFill}from'./components/slot-fill/chat-message-filler.js';import'react';import'@common-stack/components-pro';import'./enums/messenger-slot-fill-name-enum.js';import'./components/live-code-editor/hybrid-live-editor.js';import'common/graphql';var module = new Feature({
|
|
2
2
|
routeConfig: filteredRoutes,
|
|
3
3
|
dataIdFromObject,
|
|
4
4
|
clientStateParams: {
|
|
@@ -9,18 +9,18 @@ import {Feature}from'@common-stack/client-react';import {typePolicies,schema,dat
|
|
|
9
9
|
componentFillPlugins: [{
|
|
10
10
|
name: `${MESSAGE_SLOT_FILL_NAME}1`,
|
|
11
11
|
render: ChatMessageFill
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
// {
|
|
14
14
|
// name: `${MESSAGE_SLOT_FILL_NAME}2`,
|
|
15
15
|
// render: ChatMessageFill2,
|
|
16
16
|
// },
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
17
|
+
// {
|
|
18
|
+
// name: 'inbox-with-ai-right-sidebar-1',
|
|
19
|
+
// render: RightSidebarFill,
|
|
20
|
+
// },
|
|
21
21
|
// {
|
|
22
22
|
// name: 'inbox-with-ai-right-sidebar-2',
|
|
23
23
|
// render: RightSidebarFill2,
|
|
24
24
|
// },
|
|
25
25
|
]
|
|
26
|
-
});export{ChatMessageFill,
|
|
26
|
+
});export{ChatMessageFill,module as default};//# sourceMappingURL=module.js.map
|
package/lib/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../src/module.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/module.tsx"],"sourcesContent":[null],"names":[],"mappings":"yeAQA,aAAe,IAAI,OAAO,CAAC;AACvB,EAAA,WAAA,EAAW,cAAE;kBACb;AACA,EAAA,iBAAA,EAAiB;IACjB,QAAA,EAAA,MAAe;AACf,IAAA;AACI,GAAA;cACI,EAAI,CAAA,2DAA8B,CAAA;AAClC,EAAA,oBAAQ,EAAA,CAAA;AACX,IAAA,IAAA,EAAA,CAAA,EAAA,sBAAA,CAAA,CAAA,CAAA;UACD,EAAI;;;;;;;;;;;;AAYP;AACJ;;"}
|
package/lib/routes.json
CHANGED
|
@@ -70,28 +70,41 @@
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
|
-
"/ai-messenger
|
|
73
|
+
"//o/:orgName/ai-messenger": {
|
|
74
74
|
"exact": false,
|
|
75
75
|
"icon": "AiOutlineInbox",
|
|
76
|
-
"key": "ai-messenger-with-
|
|
76
|
+
"key": "ai-messenger-with-org-name",
|
|
77
77
|
"tab": "Ai Messenger",
|
|
78
78
|
"position": "MIDDLE",
|
|
79
|
-
"name": "
|
|
80
|
-
"path": "/ai-messenger
|
|
79
|
+
"name": "AiMessengerWithOrgName",
|
|
80
|
+
"path": "//o/:orgName/ai-messenger",
|
|
81
|
+
"componentPath": "@messenger-box/tailwind-ui-inbox/lib/container/InboxWithAiLoader.js",
|
|
82
|
+
"hasComponent": true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"/ai-messenger/app/:id": {
|
|
87
|
+
"exact": false,
|
|
88
|
+
"icon": "AiOutlineInbox",
|
|
89
|
+
"key": "ai-messenger-app-with-channel-id",
|
|
90
|
+
"tab": "Ai Messenger",
|
|
91
|
+
"position": "MIDDLE",
|
|
92
|
+
"name": "AiMessengerAppWithChannelId",
|
|
93
|
+
"path": "/ai-messenger/app/:id",
|
|
81
94
|
"componentPath": "@messenger-box/tailwind-ui-inbox/lib/container/InboxAiMessagesLoader.js",
|
|
82
95
|
"hasComponent": true
|
|
83
96
|
}
|
|
84
97
|
},
|
|
85
98
|
{
|
|
86
|
-
"//o/:orgName/ai-messenger": {
|
|
99
|
+
"//o/:orgName/ai-messenger/app/:id": {
|
|
87
100
|
"exact": false,
|
|
88
101
|
"icon": "AiOutlineInbox",
|
|
89
|
-
"key": "ai-messenger-with-org-
|
|
102
|
+
"key": "ai-messenger-app-with-org-and-channel-id",
|
|
90
103
|
"tab": "Ai Messenger",
|
|
91
104
|
"position": "MIDDLE",
|
|
92
|
-
"name": "
|
|
93
|
-
"path": "//o/:orgName/ai-messenger",
|
|
94
|
-
"componentPath": "@messenger-box/tailwind-ui-inbox/lib/container/
|
|
105
|
+
"name": "AiMessengerAppWithOrgAndChannelId",
|
|
106
|
+
"path": "//o/:orgName/ai-messenger/app/:id",
|
|
107
|
+
"componentPath": "@messenger-box/tailwind-ui-inbox/lib/container/InboxAiMessagesLoader.js",
|
|
95
108
|
"hasComponent": true
|
|
96
109
|
}
|
|
97
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InboxWithAi.d.ts","sourceRoot":"","sources":["../../src/templates/InboxWithAi.tsx"],"names":[],"mappings":"AAAA,OAAO,KAUN,MAAM,OAAO,CAAC;AAgBf,MAAM,WAAW,UAAU;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;;YA0D2B,UAAU;;;
|
|
1
|
+
{"version":3,"file":"InboxWithAi.d.ts","sourceRoot":"","sources":["../../src/templates/InboxWithAi.tsx"],"names":[],"mappings":"AAAA,OAAO,KAUN,MAAM,OAAO,CAAC;AAgBf,MAAM,WAAW,UAAU;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;;YA0D2B,UAAU;;;AAwbtC,wBAAuC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InboxWithAi.js","sources":["../../src/templates/InboxWithAi.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"6WAiBA;AACA,MAAM,UAAU,GAAG,aAAa,CAG7B;AACC,EAAA,SAAA,EAAS,SAAE;AACX,EAAA,YAAA,EAAY,MAAK,CAAE;AACtB,CAAA,CAAC;AAWF;AACA,MAAM,aAAa,GAAG,KAAC,IAAe;AAClC,EAAA,MAAA,CAAA,OAAO,EAAO,UAAE,CAAA,GAAWA,cAA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A,IAAA,WAAA;AACH,IAAA,YAAA;AAED,IAAA,eAAA;AAYZ,IACF,YAAA;AAEF,IAAA;AACI,GAAA,GAAA,KAAO;AACX,EAAE,OAACA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAEH,IAAA,SAAA,EAAA;AACA,GAAA,EAAAA,cAAA,CAAW,aAAY,CAAA,KAAG,EAAA;AAC1B,IAAA,SAAA,EAAA;AACA,GAAA,EAAAA,cAAA,CAAA,aAAiB,CAAA,KAAW,EAAG;AAC/B,IAAA,SAAA,EAAA;AACA,GAAA,EAAA,SAAA,IAAAA,cAAoB,CAAA,aAAc,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAsB,EAAAA,cAAA,CAAA,aAAA,CAAA,iBAAA,EAAA;AACxD,IAAA,GAAA,KAAA;AAEA,IAAA,SAAA,EAAe,SAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@messenger-box/tailwind-ui-inbox",
|
|
3
|
-
"version": "10.0.3-alpha.
|
|
3
|
+
"version": "10.0.3-alpha.109",
|
|
4
4
|
"description": "Inbox UI components built with TailwindCSS",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"watch": "npm run build:lib:watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@messenger-box/core": "10.0.3-alpha.
|
|
25
|
-
"@messenger-box/platform-client": "10.0.3-alpha.
|
|
24
|
+
"@messenger-box/core": "10.0.3-alpha.109",
|
|
25
|
+
"@messenger-box/platform-client": "10.0.3-alpha.109",
|
|
26
26
|
"@monaco-editor/react": "^4.7.0",
|
|
27
27
|
"date-fns": "^4.1.0",
|
|
28
28
|
"date-fns-tz": "^3.2.0",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"typescript": {
|
|
59
59
|
"definition": "lib/index.d.ts"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "185cf6e156c96ef13f2b4fd1b8d68cf55ca3450a"
|
|
62
62
|
}
|
|
@@ -6,7 +6,7 @@ import { format, isToday, isYesterday, formatDistanceToNow } from 'date-fns';
|
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { ModernMessageGroupComponent } from '../InboxMessage/message-widgets/ModernMessageGroup';
|
|
8
8
|
import { useUploadFiles } from '@messenger-box/platform-client';
|
|
9
|
-
import { IFileInfo, PostTypeEnum, ISandboxError } from 'common';
|
|
9
|
+
import { IFileInfo, PostTypeEnum, ISandboxError, AiAgentMessageRole } from 'common';
|
|
10
10
|
import { useSelector, shallowEqual } from 'react-redux';
|
|
11
11
|
import { Store, userSelector } from '@adminide-stack/user-auth0-client';
|
|
12
12
|
import { IUserState } from '@adminide-stack/core';
|
|
@@ -18,10 +18,8 @@ import {
|
|
|
18
18
|
useMessagesQuery,
|
|
19
19
|
OnChatMessageAddedDocument as CHAT_MESSAGE_ADDED,
|
|
20
20
|
useCreateChannelWorkflowJobMutation,
|
|
21
|
-
useGenerateAiCodeMutation,
|
|
22
21
|
useOnChatMessageAddedSubscription,
|
|
23
22
|
useSandboxErrorSubscription,
|
|
24
|
-
useRecreateSandboxMutation,
|
|
25
23
|
} from 'common/graphql';
|
|
26
24
|
import { config } from '../../config';
|
|
27
25
|
import { orderBy, uniqBy } from 'lodash-es';
|
|
@@ -78,8 +76,7 @@ export const AIAgent: React.FC<AIAgentProps> = ({
|
|
|
78
76
|
const [errorData, setError] = useState<string | null>(null);
|
|
79
77
|
// Get channelId from props or path params
|
|
80
78
|
const actualChannelId = channelId || pathChannelId;
|
|
81
|
-
|
|
82
|
-
const [recreateSandbox] = useRecreateSandboxMutation();
|
|
79
|
+
|
|
83
80
|
const { data: chatMessageAddedData } = useOnChatMessageAddedSubscription({
|
|
84
81
|
variables: { channelId: actualChannelId?.toString() || '' },
|
|
85
82
|
skip: !actualChannelId,
|
|
@@ -94,9 +91,10 @@ export const AIAgent: React.FC<AIAgentProps> = ({
|
|
|
94
91
|
// Direct message query from InboxWithAiLoader.tsx
|
|
95
92
|
const messagesQuery = useMessagesQuery({
|
|
96
93
|
variables: {
|
|
97
|
-
props: {
|
|
98
|
-
|
|
99
|
-
},
|
|
94
|
+
// props: {
|
|
95
|
+
// projectId: actualChannelId?.toString(),
|
|
96
|
+
// },
|
|
97
|
+
channelId: actualChannelId?.toString(),
|
|
100
98
|
parentId: null,
|
|
101
99
|
limit: MESSAGES_PER_PAGE,
|
|
102
100
|
},
|
|
@@ -138,9 +136,10 @@ export const AIAgent: React.FC<AIAgentProps> = ({
|
|
|
138
136
|
if (actualChannelId) {
|
|
139
137
|
refetchMessages({
|
|
140
138
|
limit: MESSAGES_PER_PAGE,
|
|
141
|
-
props: {
|
|
142
|
-
|
|
143
|
-
},
|
|
139
|
+
// props: {
|
|
140
|
+
// projectId: actualChannelId?.toString(),
|
|
141
|
+
// },
|
|
142
|
+
channelId: actualChannelId?.toString(),
|
|
144
143
|
});
|
|
145
144
|
}
|
|
146
145
|
}, [actualChannelId, refetchMessages]);
|
|
@@ -280,198 +279,6 @@ export const AIAgent: React.FC<AIAgentProps> = ({
|
|
|
280
279
|
}, delay);
|
|
281
280
|
}, []);
|
|
282
281
|
|
|
283
|
-
const recreateSandboxForFragment = useCallback(
|
|
284
|
-
async (messageId: string) => {
|
|
285
|
-
if (!actualChannelId) {
|
|
286
|
-
console.error('No project ID available for sandbox recreation');
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
try {
|
|
291
|
-
setIsLoading(true);
|
|
292
|
-
setError(null);
|
|
293
|
-
|
|
294
|
-
const response = await recreateSandbox({
|
|
295
|
-
variables: {
|
|
296
|
-
projectId: actualChannelId,
|
|
297
|
-
messageId,
|
|
298
|
-
},
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
if (response.data?.recreateSandbox?.success) {
|
|
302
|
-
console.log('Sandbox recreation initiated successfully');
|
|
303
|
-
// The subscription will handle updating the UI with the new sandbox URL
|
|
304
|
-
} else {
|
|
305
|
-
const errorMsg = response.data?.recreateSandbox?.message || 'Failed to recreate sandbox';
|
|
306
|
-
throw new Error(errorMsg);
|
|
307
|
-
}
|
|
308
|
-
} catch (err) {
|
|
309
|
-
console.error('Error recreating sandbox:', err);
|
|
310
|
-
setError(err instanceof Error ? err.message : 'Failed to recreate sandbox');
|
|
311
|
-
setIsLoading(false);
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
[recreateSandbox, actualChannelId],
|
|
315
|
-
);
|
|
316
|
-
|
|
317
|
-
// Updated handleSend function from InboxWithAi.tsx
|
|
318
|
-
// const handleSend = useCallback(
|
|
319
|
-
// async (message: string, files: any[] = []) => {
|
|
320
|
-
// // Allow sending if there's either a message or files
|
|
321
|
-
// if ((!message || !message.trim()) && (!files || files.length === 0)) return;
|
|
322
|
-
|
|
323
|
-
// const validated = getValidatedConfig();
|
|
324
|
-
// if (!validated && !hasApiKey) {
|
|
325
|
-
// // No API key/config; do nothing (AiLandingInput would prompt config UI)
|
|
326
|
-
// return;
|
|
327
|
-
// }
|
|
328
|
-
|
|
329
|
-
// // Start the AI thinking loader immediately on send
|
|
330
|
-
// if (successThinkingTimeoutRef.current) {
|
|
331
|
-
// clearTimeout(successThinkingTimeoutRef.current);
|
|
332
|
-
// successThinkingTimeoutRef.current = null;
|
|
333
|
-
// }
|
|
334
|
-
// setIsSuccessThinking(true);
|
|
335
|
-
// setIsLoading(true);
|
|
336
|
-
// // Safety auto-stop in case no event arrives
|
|
337
|
-
// successThinkingTimeoutRef.current = setTimeout(() => {
|
|
338
|
-
// setIsSuccessThinking(false);
|
|
339
|
-
// successThinkingTimeoutRef.current = null;
|
|
340
|
-
// }, 15000);
|
|
341
|
-
|
|
342
|
-
// // If we already have a channel, send message (with optional file upload) similar to Inbox
|
|
343
|
-
// if (actualChannelId) {
|
|
344
|
-
// try {
|
|
345
|
-
// const postId = objectId();
|
|
346
|
-
// const channelId = objectId();
|
|
347
|
-
// const currentDate = new Date();
|
|
348
|
-
|
|
349
|
-
// const createOptimisticMessage = (uploadedFiles?: any[]) => ({
|
|
350
|
-
// __typename: 'Post' as const,
|
|
351
|
-
// id: postId,
|
|
352
|
-
// message,
|
|
353
|
-
// createdAt: currentDate.toISOString(),
|
|
354
|
-
// updatedAt: currentDate.toISOString(),
|
|
355
|
-
// author: {
|
|
356
|
-
// __typename: 'UserAccount' as const,
|
|
357
|
-
// id: auth?.id,
|
|
358
|
-
// givenName: auth?.profile?.given_name || '',
|
|
359
|
-
// familyName: auth?.profile?.family_name || '',
|
|
360
|
-
// email: auth?.profile?.email || '',
|
|
361
|
-
// username: auth?.profile?.nickname || '',
|
|
362
|
-
// fullName: auth?.profile?.name || '',
|
|
363
|
-
// picture: auth?.profile?.picture || '',
|
|
364
|
-
// alias: [auth?.authUserId ?? ''],
|
|
365
|
-
// tokens: [],
|
|
366
|
-
// },
|
|
367
|
-
// isDelivered: false,
|
|
368
|
-
// isRead: false,
|
|
369
|
-
// type: 'TEXT' as PostTypeEnum,
|
|
370
|
-
// parentId: null,
|
|
371
|
-
// fromServer: false,
|
|
372
|
-
// channel: {
|
|
373
|
-
// __typename: 'Channel' as const,
|
|
374
|
-
// id: actualChannelId,
|
|
375
|
-
// },
|
|
376
|
-
// propsConfiguration: {
|
|
377
|
-
// __typename: 'MachineConfiguration' as const,
|
|
378
|
-
// id: null,
|
|
379
|
-
// resource: '' as any,
|
|
380
|
-
// contents: null,
|
|
381
|
-
// keys: null,
|
|
382
|
-
// target: null,
|
|
383
|
-
// overrides: null,
|
|
384
|
-
// },
|
|
385
|
-
// props: {},
|
|
386
|
-
// files: {
|
|
387
|
-
// __typename: 'FilesInfo' as const,
|
|
388
|
-
// data: uploadedFiles || [],
|
|
389
|
-
// totalCount: uploadedFiles?.length || 0,
|
|
390
|
-
// },
|
|
391
|
-
// replies: {
|
|
392
|
-
// __typename: 'Messages' as const,
|
|
393
|
-
// data: [],
|
|
394
|
-
// totalCount: 0,
|
|
395
|
-
// },
|
|
396
|
-
// });
|
|
397
|
-
|
|
398
|
-
// const cacheMessagesQuery = {
|
|
399
|
-
// query: MessagesDocument,
|
|
400
|
-
// variables: {
|
|
401
|
-
// // Match variables used in useMessagesQuery above
|
|
402
|
-
// props: { projectId: actualChannelId.toString() },
|
|
403
|
-
// parentId: null,
|
|
404
|
-
// limit: MESSAGES_PER_PAGE,
|
|
405
|
-
// },
|
|
406
|
-
// } as const;
|
|
407
|
-
|
|
408
|
-
// const extraProps = {
|
|
409
|
-
// projectId: actualChannelId,
|
|
410
|
-
// template: modelConfig?.template || 'vite-react',
|
|
411
|
-
// role: 'USER',
|
|
412
|
-
// sendNotificationWithProjectId: true,
|
|
413
|
-
// } as any;
|
|
414
|
-
|
|
415
|
-
// if (files?.length > 0) {
|
|
416
|
-
// const uploadResponse = await startUpload({
|
|
417
|
-
// file: files,
|
|
418
|
-
// saveUploadedFile: { variables: { postId } },
|
|
419
|
-
// createUploadLink: { variables: { postId } },
|
|
420
|
-
// });
|
|
421
|
-
|
|
422
|
-
// const uploadedFiles = uploadResponse.data as unknown as IFileInfo[];
|
|
423
|
-
// const fileIds = (uploadedFiles || []).map((f: any) => f.id);
|
|
424
|
-
|
|
425
|
-
// await sendMsg({
|
|
426
|
-
// variables: {
|
|
427
|
-
// postId,
|
|
428
|
-
// channelId: actualChannelId,
|
|
429
|
-
// content: message,
|
|
430
|
-
// files: fileIds,
|
|
431
|
-
// extraProps,
|
|
432
|
-
// },
|
|
433
|
-
// optimisticResponse: {
|
|
434
|
-
// __typename: 'Mutation',
|
|
435
|
-
// sendMessage: createOptimisticMessage(uploadedFiles),
|
|
436
|
-
// },
|
|
437
|
-
// update: (cache, { data: mutationData }) => {
|
|
438
|
-
// if (!mutationData?.sendMessage) return;
|
|
439
|
-
// // if (mutationData?.sendMessage?.id) {
|
|
440
|
-
// // handleGenerateAiCode(mutationData.sendMessage.id);
|
|
441
|
-
// // }
|
|
442
|
-
// },
|
|
443
|
-
// });
|
|
444
|
-
// } else {
|
|
445
|
-
// await sendMsg({
|
|
446
|
-
// variables: { channelId: actualChannelId, content: message, extraProps },
|
|
447
|
-
// optimisticResponse: {
|
|
448
|
-
// __typename: 'Mutation',
|
|
449
|
-
// sendMessage: createOptimisticMessage(),
|
|
450
|
-
// },
|
|
451
|
-
// update: (cache, { data: mutationData }) => {
|
|
452
|
-
// if (!mutationData?.sendMessage) return;
|
|
453
|
-
// console.log('mutationData', JSON.stringify(mutationData, null, 2));
|
|
454
|
-
// // if (mutationData?.sendMessage?.id) {
|
|
455
|
-
// // handleGenerateAiCode(mutationData.sendMessage.id);
|
|
456
|
-
// // }
|
|
457
|
-
// },
|
|
458
|
-
// });
|
|
459
|
-
// }
|
|
460
|
-
|
|
461
|
-
// // Scroll to bottom after send
|
|
462
|
-
// scrollToBottom('smooth', 0);
|
|
463
|
-
// } catch (error) {
|
|
464
|
-
// console.error('Error sending message from AIAgent:', error);
|
|
465
|
-
// setIsLoading(false);
|
|
466
|
-
// }
|
|
467
|
-
|
|
468
|
-
// return;
|
|
469
|
-
// }
|
|
470
|
-
// // If no channelId, we skip sending here.
|
|
471
|
-
// },
|
|
472
|
-
// [actualChannelId, auth, startUpload, sendMsg, scrollToBottom, getValidatedConfig, hasApiKey, modelConfig],
|
|
473
|
-
// );
|
|
474
|
-
|
|
475
282
|
const handleSend = useCallback(
|
|
476
283
|
async (message: string, files: any[] = []) => {
|
|
477
284
|
// Allow sending if there's either a message or files
|
|
@@ -497,10 +304,7 @@ export const AIAgent: React.FC<AIAgentProps> = ({
|
|
|
497
304
|
}, 15000);
|
|
498
305
|
// If no channelId, mirror AiLandingInput: create channel+project, seed first post, then navigate
|
|
499
306
|
try {
|
|
500
|
-
const projectId = actualChannelId;
|
|
501
307
|
const postId = objectId();
|
|
502
|
-
const channelId = objectId();
|
|
503
|
-
|
|
504
308
|
// Do not include extensionId inside modelConfig when sending additionalProperties
|
|
505
309
|
const { extensionId: _omitExtensionId, ...modelConfigWithoutExtensionId } =
|
|
506
310
|
(modelConfig as any) || ({} as any);
|
|
@@ -508,24 +312,22 @@ export const AIAgent: React.FC<AIAgentProps> = ({
|
|
|
508
312
|
await createChannelWorkflowJob({
|
|
509
313
|
variables: {
|
|
510
314
|
createChannelInput: {
|
|
511
|
-
channelId,
|
|
315
|
+
channelId: actualChannelId,
|
|
512
316
|
title: 'AI Assistant',
|
|
513
317
|
description: 'AI Assistant',
|
|
514
318
|
displayName: 'AI Assistant',
|
|
515
319
|
topic: 'AI Assistant',
|
|
516
|
-
projectId: projectId,
|
|
320
|
+
// projectId: projectId,
|
|
517
321
|
type: RoomType.Aiassistant,
|
|
518
322
|
postData: {
|
|
519
323
|
postId: postId,
|
|
520
324
|
type: PostTypeEnum.Aiassistant,
|
|
521
325
|
content: message,
|
|
522
326
|
props: {
|
|
523
|
-
generateAiCode: true,
|
|
524
327
|
template: modelConfig?.template || 'vite-react',
|
|
525
|
-
projectId: projectId,
|
|
526
|
-
role:
|
|
328
|
+
//projectId: projectId,
|
|
329
|
+
role: AiAgentMessageRole.User,
|
|
527
330
|
fragment: {},
|
|
528
|
-
sendNotificationWithProjectId: true,
|
|
529
331
|
},
|
|
530
332
|
},
|
|
531
333
|
additionalProperties: {
|
|
@@ -913,7 +715,8 @@ export const AIAgent: React.FC<AIAgentProps> = ({
|
|
|
913
715
|
tokens: [],
|
|
914
716
|
},
|
|
915
717
|
createdAt: msg.createdAt,
|
|
916
|
-
type: 'Simple' as any,
|
|
718
|
+
//type: 'Simple' as any,
|
|
719
|
+
type: PostTypeEnum.Aiassistant,
|
|
917
720
|
isDelivered: false,
|
|
918
721
|
isRead: false,
|
|
919
722
|
parentId: null,
|
|
@@ -1057,7 +860,8 @@ export const AIAgent: React.FC<AIAgentProps> = ({
|
|
|
1057
860
|
tokens: [],
|
|
1058
861
|
},
|
|
1059
862
|
createdAt: msg.createdAt,
|
|
1060
|
-
type: 'Simple' as any,
|
|
863
|
+
//type: 'Simple' as any,
|
|
864
|
+
type: PostTypeEnum.Aiassistant,
|
|
1061
865
|
isDelivered: false,
|
|
1062
866
|
isRead: false,
|
|
1063
867
|
parentId: null,
|
|
@@ -1079,7 +883,6 @@ export const AIAgent: React.FC<AIAgentProps> = ({
|
|
|
1079
883
|
sandboxErrors={sandboxErrors}
|
|
1080
884
|
currentFiles={currentFiles}
|
|
1081
885
|
onFixError={fixError}
|
|
1082
|
-
onRecreateSandbox={recreateSandboxForFragment}
|
|
1083
886
|
/>
|
|
1084
887
|
)}
|
|
1085
888
|
</div>
|