@admin-layout/ai-chat-ext-browser 12.2.4-alpha.103
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/LICENSE +21 -0
- package/lib/components/ChatSettingsPanel/ChatSettingsPanel.d.ts +39 -0
- package/lib/components/ChatSettingsPanel/ChatSettingsPanel.d.ts.map +1 -0
- package/lib/components/ChatSettingsPanel/ChatSettingsPanel.js +1191 -0
- package/lib/components/ChatSettingsPanel/ChatSettingsPanel.js.map +1 -0
- package/lib/components/ChatSettingsPanel/ConnectedChatSettingsPanel.d.ts +19 -0
- package/lib/components/ChatSettingsPanel/ConnectedChatSettingsPanel.d.ts.map +1 -0
- package/lib/components/ChatSettingsPanel/ConnectedChatSettingsPanel.js +83 -0
- package/lib/components/ChatSettingsPanel/ConnectedChatSettingsPanel.js.map +1 -0
- package/lib/components/ChatSettingsPanel/index.d.ts +5 -0
- package/lib/components/ChatSettingsPanel/index.d.ts.map +1 -0
- package/lib/components/MessageWidgets/MessageAiAssistant.d.ts +13 -0
- package/lib/components/MessageWidgets/MessageAiAssistant.d.ts.map +1 -0
- package/lib/components/MessageWidgets/MessageAiAssistant.js +79 -0
- package/lib/components/MessageWidgets/MessageAiAssistant.js.map +1 -0
- package/lib/components/MessageWidgets/MessageCodeBlock.d.ts +14 -0
- package/lib/components/MessageWidgets/MessageCodeBlock.d.ts.map +1 -0
- package/lib/components/MessageWidgets/MessageCodeBlock.js +78 -0
- package/lib/components/MessageWidgets/MessageCodeBlock.js.map +1 -0
- package/lib/components/MessageWidgets/MessageConnector.d.ts +13 -0
- package/lib/components/MessageWidgets/MessageConnector.d.ts.map +1 -0
- package/lib/components/MessageWidgets/MessageConnector.js +71 -0
- package/lib/components/MessageWidgets/MessageConnector.js.map +1 -0
- package/lib/components/MessageWidgets/MessageGeneric.d.ts +20 -0
- package/lib/components/MessageWidgets/MessageGeneric.d.ts.map +1 -0
- package/lib/components/MessageWidgets/MessageGeneric.js +74 -0
- package/lib/components/MessageWidgets/MessageGeneric.js.map +1 -0
- package/lib/components/MessageWidgets/MessageMedia.d.ts +17 -0
- package/lib/components/MessageWidgets/MessageMedia.d.ts.map +1 -0
- package/lib/components/MessageWidgets/MessageMedia.js +91 -0
- package/lib/components/MessageWidgets/MessageMedia.js.map +1 -0
- package/lib/components/MessageWidgets/MessageService.d.ts +13 -0
- package/lib/components/MessageWidgets/MessageService.d.ts.map +1 -0
- package/lib/components/MessageWidgets/MessageService.js +74 -0
- package/lib/components/MessageWidgets/MessageService.js.map +1 -0
- package/lib/components/MessageWidgets/MessageThinking.d.ts +13 -0
- package/lib/components/MessageWidgets/MessageThinking.d.ts.map +1 -0
- package/lib/components/MessageWidgets/MessageThinking.js +41 -0
- package/lib/components/MessageWidgets/MessageThinking.js.map +1 -0
- package/lib/components/MessageWidgets/MessageToolUse.d.ts +14 -0
- package/lib/components/MessageWidgets/MessageToolUse.d.ts.map +1 -0
- package/lib/components/MessageWidgets/MessageToolUse.js +92 -0
- package/lib/components/MessageWidgets/MessageToolUse.js.map +1 -0
- package/lib/components/MessageWidgets/MessageTravel.d.ts +14 -0
- package/lib/components/MessageWidgets/MessageTravel.d.ts.map +1 -0
- package/lib/components/MessageWidgets/MessageTravel.js +110 -0
- package/lib/components/MessageWidgets/MessageTravel.js.map +1 -0
- package/lib/components/MessageWidgets/MessageWorkflow.d.ts +17 -0
- package/lib/components/MessageWidgets/MessageWorkflow.d.ts.map +1 -0
- package/lib/components/MessageWidgets/MessageWorkflow.js +82 -0
- package/lib/components/MessageWidgets/MessageWorkflow.js.map +1 -0
- package/lib/components/MessageWidgets/index.d.ts +21 -0
- package/lib/components/MessageWidgets/index.d.ts.map +1 -0
- package/lib/components/MessageWidgets/workflowUtils.d.ts +10 -0
- package/lib/components/MessageWidgets/workflowUtils.d.ts.map +1 -0
- package/lib/components/MessageWidgets/workflowUtils.js +15 -0
- package/lib/components/MessageWidgets/workflowUtils.js.map +1 -0
- package/lib/components/index.d.ts +4 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/index.d.ts +3 -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/ai-chat.interface.d.ts +266 -0
- package/lib/interfaces/ai-chat.interface.d.ts.map +1 -0
- package/lib/interfaces/index.d.ts +2 -0
- package/lib/interfaces/index.d.ts.map +1 -0
- package/lib/module.d.ts +3 -0
- package/lib/module.d.ts.map +1 -0
- package/lib/module.js +36 -0
- package/lib/module.js.map +1 -0
- package/lib/routes.json +1 -0
- package/lib/slot-fill/chat-settings-fill.d.ts +3 -0
- package/lib/slot-fill/chat-settings-fill.d.ts.map +1 -0
- package/lib/slot-fill/chat-settings-fill.js +22 -0
- package/lib/slot-fill/chat-settings-fill.js.map +1 -0
- package/lib/slot-fill/index.d.ts +12 -0
- package/lib/slot-fill/index.d.ts.map +1 -0
- package/lib/slot-fill/message-ai-assistant-fill.d.ts +3 -0
- package/lib/slot-fill/message-ai-assistant-fill.d.ts.map +1 -0
- package/lib/slot-fill/message-ai-assistant-fill.js +12 -0
- package/lib/slot-fill/message-ai-assistant-fill.js.map +1 -0
- package/lib/slot-fill/message-codeblock-fill.d.ts +3 -0
- package/lib/slot-fill/message-codeblock-fill.d.ts.map +1 -0
- package/lib/slot-fill/message-codeblock-fill.js +18 -0
- package/lib/slot-fill/message-codeblock-fill.js.map +1 -0
- package/lib/slot-fill/message-connector-fill.d.ts +5 -0
- package/lib/slot-fill/message-connector-fill.d.ts.map +1 -0
- package/lib/slot-fill/message-connector-fill.js +14 -0
- package/lib/slot-fill/message-connector-fill.js.map +1 -0
- package/lib/slot-fill/message-generic-fill.d.ts +3 -0
- package/lib/slot-fill/message-generic-fill.d.ts.map +1 -0
- package/lib/slot-fill/message-generic-fill.js +21 -0
- package/lib/slot-fill/message-generic-fill.js.map +1 -0
- package/lib/slot-fill/message-media-fill.d.ts +3 -0
- package/lib/slot-fill/message-media-fill.d.ts.map +1 -0
- package/lib/slot-fill/message-media-fill.js +18 -0
- package/lib/slot-fill/message-media-fill.js.map +1 -0
- package/lib/slot-fill/message-service-fill.d.ts +3 -0
- package/lib/slot-fill/message-service-fill.d.ts.map +1 -0
- package/lib/slot-fill/message-service-fill.js +12 -0
- package/lib/slot-fill/message-service-fill.js.map +1 -0
- package/lib/slot-fill/message-thinking-fill.d.ts +3 -0
- package/lib/slot-fill/message-thinking-fill.d.ts.map +1 -0
- package/lib/slot-fill/message-thinking-fill.js +18 -0
- package/lib/slot-fill/message-thinking-fill.js.map +1 -0
- package/lib/slot-fill/message-tooluse-fill.d.ts +3 -0
- package/lib/slot-fill/message-tooluse-fill.d.ts.map +1 -0
- package/lib/slot-fill/message-tooluse-fill.js +18 -0
- package/lib/slot-fill/message-tooluse-fill.js.map +1 -0
- package/lib/slot-fill/message-travel-fill.d.ts +3 -0
- package/lib/slot-fill/message-travel-fill.d.ts.map +1 -0
- package/lib/slot-fill/message-travel-fill.js +18 -0
- package/lib/slot-fill/message-travel-fill.js.map +1 -0
- package/lib/slot-fill/message-workflow-fill.d.ts +3 -0
- package/lib/slot-fill/message-workflow-fill.d.ts.map +1 -0
- package/lib/slot-fill/message-workflow-fill.js +19 -0
- package/lib/slot-fill/message-workflow-fill.js.map +1 -0
- package/lib/utils/parseWidgetPost.d.ts +14 -0
- package/lib/utils/parseWidgetPost.d.ts.map +1 -0
- package/lib/utils/parseWidgetPost.js +68 -0
- package/lib/utils/parseWidgetPost.js.map +1 -0
- package/lib/utils/parseWidgetPost.spec.d.ts +2 -0
- package/lib/utils/parseWidgetPost.spec.d.ts.map +1 -0
- package/package.json +43 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-media-fill.d.ts","sourceRoot":"","sources":["../../src/slot-fill/message-media-fill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,eAAO,MAAM,gBAAgB,yBAW5B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from'react';import {Fill}from'@common-stack/components-pro';import'@react-icons/all-files/fi/FiCpu.js';import'@react-icons/all-files/fi/FiChevronDown.js';import'@react-icons/all-files/fi/FiCopy.js';import'@react-icons/all-files/fi/FiCheck.js';import'@react-icons/all-files/fi/FiExternalLink.js';import'@react-icons/all-files/fi/FiCode.js';import'@react-icons/all-files/fi/FiFile.js';import'@react-icons/all-files/fi/FiTool.js';import'@react-icons/all-files/fi/FiAlertCircle.js';import'@react-icons/all-files/fi/FiLoader.js';import'@react-icons/all-files/fi/FiInfo.js';import'@react-icons/all-files/fi/FiAlertTriangle.js';import'@react-icons/all-files/fi/FiCheckCircle.js';import'html-react-parser';import {MessageMedia}from'../components/MessageWidgets/MessageMedia.js';import'@react-icons/all-files/fi/FiMapPin.js';import'@react-icons/all-files/fi/FiStar.js';import'@react-icons/all-files/fi/FiChevronRight.js';import'@react-icons/all-files/fi/FiGitBranch.js';import'@react-icons/all-files/fi/FiArrowRight.js';import'@react-icons/all-files/fi/FiBox.js';import'@react-icons/all-files/fi/FiZap.js';import'@react-icons/all-files/fi/FiSearch.js';import'@react-icons/all-files/fi/FiX.js';import'@react-icons/all-files/fi/FiRefreshCw.js';import'@react-icons/all-files/fi/FiEdit2.js';import'@react-icons/all-files/fi/FiPlus.js';import'@react-icons/all-files/fi/FiTrash2.js';import'../components/ChatSettingsPanel/ConnectedChatSettingsPanel.js';/**
|
|
2
|
+
* Fill name: "media"
|
|
3
|
+
* Note: PostTypeEnum has no "Media" yet — we use a custom string.
|
|
4
|
+
* When added to the enum, switch to PostTypeEnum.Media.toLowerCase().
|
|
5
|
+
*/
|
|
6
|
+
const MEDIA_FILL_NAME = 'media';
|
|
7
|
+
const MessageMediaFill = () => {
|
|
8
|
+
return React.createElement(Fill, {
|
|
9
|
+
name: MEDIA_FILL_NAME
|
|
10
|
+
}, props => {
|
|
11
|
+
if (props.active) {
|
|
12
|
+
return React.createElement(MessageMedia, {
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
});
|
|
18
|
+
};export{MessageMediaFill};//# sourceMappingURL=message-media-fill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-media-fill.js","sources":["../../src/slot-fill/message-media-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"26CAKA;;;;AAIG;AACH,MAAM,eAAe,GAAG,OAAO;AAExB,MAAM,gBAAgB,GAAG,MAAK;SACjC,KACI,CAAA,aAAA,CAAA,IAAC,EAAA;AAEO,IAAA,IAAA,EAAA;AACI,GAAA,EAAA,KAAA,IAAA;QACJ,KAAC,CAAA,MAAA,EAAA;AACD,MAAA,OAAA,MAAW,aAAC,CAAA,YAAA,EAAA;QAGtB,GAAA;AACN,OAAE,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-service-fill.d.ts","sourceRoot":"","sources":["../../src/slot-fill/message-service-fill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,kBAAkB,yBAW9B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from'react';import {Fill}from'@common-stack/components-pro';import {PostTypeEnum}from'common';import'@react-icons/all-files/fi/FiCpu.js';import'@react-icons/all-files/fi/FiChevronDown.js';import'@react-icons/all-files/fi/FiCopy.js';import'@react-icons/all-files/fi/FiCheck.js';import'@react-icons/all-files/fi/FiExternalLink.js';import'@react-icons/all-files/fi/FiCode.js';import'@react-icons/all-files/fi/FiFile.js';import'@react-icons/all-files/fi/FiTool.js';import'@react-icons/all-files/fi/FiAlertCircle.js';import'@react-icons/all-files/fi/FiLoader.js';import {MessageService}from'../components/MessageWidgets/MessageService.js';import'../components/MessageWidgets/MessageMedia.js';import'@react-icons/all-files/fi/FiMapPin.js';import'@react-icons/all-files/fi/FiStar.js';import'@react-icons/all-files/fi/FiChevronRight.js';import'@react-icons/all-files/fi/FiGitBranch.js';import'@react-icons/all-files/fi/FiArrowRight.js';import'@react-icons/all-files/fi/FiBox.js';import'@react-icons/all-files/fi/FiZap.js';import'@react-icons/all-files/fi/FiSearch.js';import'@react-icons/all-files/fi/FiX.js';import'@react-icons/all-files/fi/FiRefreshCw.js';import'@react-icons/all-files/fi/FiEdit2.js';import'@react-icons/all-files/fi/FiPlus.js';import'@react-icons/all-files/fi/FiTrash2.js';import'../components/ChatSettingsPanel/ConnectedChatSettingsPanel.js';const MessageServiceFill = () => {
|
|
2
|
+
return React.createElement(Fill, {
|
|
3
|
+
name: PostTypeEnum.Service.toLowerCase()
|
|
4
|
+
}, props => {
|
|
5
|
+
if (props.active) {
|
|
6
|
+
return React.createElement(MessageService, {
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
return null;
|
|
11
|
+
});
|
|
12
|
+
};export{MessageServiceFill};//# sourceMappingURL=message-service-fill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-service-fill.js","sources":["../../src/slot-fill/message-service-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"w1CAMO,MAAM,kBAAkB,GAAG,MAAK;AACnC,EAAA,OAAA,KACI,CAAA,aAAA,CAAA,IAAC,EAAA;AAEO,IAAA,IAAA,EAAA,YAAU,CAAA,OAAS,CAAA,WAAA;AACf,GAAA,EAAA,KAAA,IAAA;QACJ,KAAC,CAAA,MAAA,EAAA;AACD,MAAA,OAAA,MAAW,aAAC,CAAA,cAAA,EAAA;QAGtB,GAAA;AACN,OAAE,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-thinking-fill.d.ts","sourceRoot":"","sources":["../../src/slot-fill/message-thinking-fill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,eAAO,MAAM,mBAAmB,yBAW/B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from'react';import {Fill}from'@common-stack/components-pro';import'@react-icons/all-files/fi/FiCpu.js';import'@react-icons/all-files/fi/FiChevronDown.js';import'@react-icons/all-files/fi/FiCopy.js';import'@react-icons/all-files/fi/FiCheck.js';import'@react-icons/all-files/fi/FiExternalLink.js';import {MessageThinking}from'../components/MessageWidgets/MessageThinking.js';import'@react-icons/all-files/fi/FiCode.js';import'@react-icons/all-files/fi/FiFile.js';import'@react-icons/all-files/fi/FiTool.js';import'@react-icons/all-files/fi/FiAlertCircle.js';import'@react-icons/all-files/fi/FiLoader.js';import'@react-icons/all-files/fi/FiInfo.js';import'@react-icons/all-files/fi/FiAlertTriangle.js';import'@react-icons/all-files/fi/FiCheckCircle.js';import'html-react-parser';import'../components/MessageWidgets/MessageMedia.js';import'@react-icons/all-files/fi/FiMapPin.js';import'@react-icons/all-files/fi/FiStar.js';import'@react-icons/all-files/fi/FiChevronRight.js';import'@react-icons/all-files/fi/FiGitBranch.js';import'@react-icons/all-files/fi/FiArrowRight.js';import'@react-icons/all-files/fi/FiBox.js';import'@react-icons/all-files/fi/FiZap.js';import'@react-icons/all-files/fi/FiSearch.js';import'@react-icons/all-files/fi/FiX.js';import'@react-icons/all-files/fi/FiRefreshCw.js';import'@react-icons/all-files/fi/FiEdit2.js';import'@react-icons/all-files/fi/FiPlus.js';import'@react-icons/all-files/fi/FiTrash2.js';import'../components/ChatSettingsPanel/ConnectedChatSettingsPanel.js';/**
|
|
2
|
+
* Fill name: "thinking"
|
|
3
|
+
* Note: PostTypeEnum doesn't have "Thinking" yet — we use a custom string.
|
|
4
|
+
* When added to the enum, switch to PostTypeEnum.Thinking.toLowerCase().
|
|
5
|
+
*/
|
|
6
|
+
const THINKING_FILL_NAME = 'thinking';
|
|
7
|
+
const MessageThinkingFill = () => {
|
|
8
|
+
return React.createElement(Fill, {
|
|
9
|
+
name: THINKING_FILL_NAME
|
|
10
|
+
}, props => {
|
|
11
|
+
if (props.active) {
|
|
12
|
+
return React.createElement(MessageThinking, {
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
});
|
|
18
|
+
};export{MessageThinkingFill};//# sourceMappingURL=message-thinking-fill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-thinking-fill.js","sources":["../../src/slot-fill/message-thinking-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"s+CAKA;;;;AAIG;AACH,MAAM,kBAAkB,GAAG,UAAU;AAE9B,MAAM,mBAAmB,GAAG,MAAK;SACpC,KACI,CAAA,aAAA,CAAA,IAAC,EAAA;AAEO,IAAA,IAAA,EAAA;AACI,GAAA,EAAA,KAAA,IAAA;QACJ,KAAC,CAAA,MAAA,EAAA;AACD,MAAA,OAAA,MAAW,aAAC,CAAA,eAAA,EAAA;QAGtB,GAAA;AACN,OAAE,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-tooluse-fill.d.ts","sourceRoot":"","sources":["../../src/slot-fill/message-tooluse-fill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,eAAO,MAAM,kBAAkB,yBAW9B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from'react';import {Fill}from'@common-stack/components-pro';import'@react-icons/all-files/fi/FiCpu.js';import'@react-icons/all-files/fi/FiChevronDown.js';import'@react-icons/all-files/fi/FiCopy.js';import'@react-icons/all-files/fi/FiCheck.js';import'@react-icons/all-files/fi/FiExternalLink.js';import'@react-icons/all-files/fi/FiCode.js';import'@react-icons/all-files/fi/FiFile.js';import {MessageToolUse}from'../components/MessageWidgets/MessageToolUse.js';import'@react-icons/all-files/fi/FiInfo.js';import'@react-icons/all-files/fi/FiAlertTriangle.js';import'@react-icons/all-files/fi/FiAlertCircle.js';import'@react-icons/all-files/fi/FiCheckCircle.js';import'html-react-parser';import'../components/MessageWidgets/MessageMedia.js';import'@react-icons/all-files/fi/FiMapPin.js';import'@react-icons/all-files/fi/FiStar.js';import'@react-icons/all-files/fi/FiChevronRight.js';import'@react-icons/all-files/fi/FiGitBranch.js';import'@react-icons/all-files/fi/FiArrowRight.js';import'@react-icons/all-files/fi/FiBox.js';import'@react-icons/all-files/fi/FiZap.js';import'@react-icons/all-files/fi/FiSearch.js';import'@react-icons/all-files/fi/FiX.js';import'@react-icons/all-files/fi/FiRefreshCw.js';import'@react-icons/all-files/fi/FiEdit2.js';import'@react-icons/all-files/fi/FiPlus.js';import'@react-icons/all-files/fi/FiTrash2.js';import'../components/ChatSettingsPanel/ConnectedChatSettingsPanel.js';/**
|
|
2
|
+
* Fill name: "tooluse"
|
|
3
|
+
* Note: PostTypeEnum doesn't have "ToolUse" yet — we use a custom string.
|
|
4
|
+
* When added to the enum, switch to PostTypeEnum.Tooluse.toLowerCase().
|
|
5
|
+
*/
|
|
6
|
+
const TOOLUSE_FILL_NAME = 'tooluse';
|
|
7
|
+
const MessageToolUseFill = () => {
|
|
8
|
+
return React.createElement(Fill, {
|
|
9
|
+
name: TOOLUSE_FILL_NAME
|
|
10
|
+
}, props => {
|
|
11
|
+
if (props.active) {
|
|
12
|
+
return React.createElement(MessageToolUse, {
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
});
|
|
18
|
+
};export{MessageToolUseFill};//# sourceMappingURL=message-tooluse-fill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-tooluse-fill.js","sources":["../../src/slot-fill/message-tooluse-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"04CAKA;;;;AAIG;AACH,MAAM,iBAAiB,GAAG,SAAS;AAE5B,MAAM,kBAAkB,GAAG,MAAK;SACnC,KACI,CAAA,aAAA,CAAA,IAAC,EAAA;AAEO,IAAA,IAAA,EAAA;AACI,GAAA,EAAA,KAAA,IAAA;QACJ,KAAC,CAAA,MAAA,EAAA;AACD,MAAA,OAAA,MAAW,aAAC,CAAA,cAAA,EAAA;QAGtB,GAAA;AACN,OAAE,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-travel-fill.d.ts","sourceRoot":"","sources":["../../src/slot-fill/message-travel-fill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,eAAO,MAAM,iBAAiB,yBAW7B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from'react';import {Fill}from'@common-stack/components-pro';import'@react-icons/all-files/fi/FiCpu.js';import'@react-icons/all-files/fi/FiChevronDown.js';import'@react-icons/all-files/fi/FiCopy.js';import'@react-icons/all-files/fi/FiCheck.js';import'@react-icons/all-files/fi/FiExternalLink.js';import'@react-icons/all-files/fi/FiCode.js';import'@react-icons/all-files/fi/FiFile.js';import'@react-icons/all-files/fi/FiTool.js';import'@react-icons/all-files/fi/FiAlertCircle.js';import'@react-icons/all-files/fi/FiLoader.js';import'@react-icons/all-files/fi/FiInfo.js';import'@react-icons/all-files/fi/FiAlertTriangle.js';import'@react-icons/all-files/fi/FiCheckCircle.js';import'html-react-parser';import'../components/MessageWidgets/MessageMedia.js';import {MessageTravel}from'../components/MessageWidgets/MessageTravel.js';import'@react-icons/all-files/fi/FiGitBranch.js';import'@react-icons/all-files/fi/FiArrowRight.js';import'@react-icons/all-files/fi/FiChevronRight.js';import'@react-icons/all-files/fi/FiBox.js';import'@react-icons/all-files/fi/FiZap.js';import'@react-icons/all-files/fi/FiSearch.js';import'@react-icons/all-files/fi/FiX.js';import'@react-icons/all-files/fi/FiRefreshCw.js';import'@react-icons/all-files/fi/FiEdit2.js';import'@react-icons/all-files/fi/FiPlus.js';import'@react-icons/all-files/fi/FiTrash2.js';import'../components/ChatSettingsPanel/ConnectedChatSettingsPanel.js';/**
|
|
2
|
+
* Fill name: "travel"
|
|
3
|
+
* Note: PostTypeEnum doesn't have "Travel" yet — we use a custom string.
|
|
4
|
+
* When added to the enum, switch to PostTypeEnum.Travel.toLowerCase().
|
|
5
|
+
*/
|
|
6
|
+
const TRAVEL_FILL_NAME = 'travel';
|
|
7
|
+
const MessageTravelFill = () => {
|
|
8
|
+
return React.createElement(Fill, {
|
|
9
|
+
name: TRAVEL_FILL_NAME
|
|
10
|
+
}, props => {
|
|
11
|
+
if (props.active) {
|
|
12
|
+
return React.createElement(MessageTravel, {
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
});
|
|
18
|
+
};export{MessageTravelFill};//# sourceMappingURL=message-travel-fill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-travel-fill.js","sources":["../../src/slot-fill/message-travel-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"w4CAKA;;;;AAIG;AACH,MAAM,gBAAgB,GAAG,QAAQ;AAE1B,MAAM,iBAAiB,GAAG,MAAK;SAClC,KACI,CAAA,aAAA,CAAA,IAAC,EAAA;AAEO,IAAA,IAAA,EAAA;AACI,GAAA,EAAA,KAAA,IAAA;QACJ,KAAC,CAAA,MAAA,EAAA;AACD,MAAA,OAAA,MAAW,aAAC,CAAA,aAAA,EAAA;QAGtB,GAAA;AACN,OAAE,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-workflow-fill.d.ts","sourceRoot":"","sources":["../../src/slot-fill/message-workflow-fill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,eAAO,MAAM,mBAAmB,yBAW/B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from'react';import {Fill}from'@common-stack/components-pro';import'@react-icons/all-files/fi/FiCpu.js';import'@react-icons/all-files/fi/FiChevronDown.js';import'@react-icons/all-files/fi/FiCopy.js';import'@react-icons/all-files/fi/FiCheck.js';import'@react-icons/all-files/fi/FiExternalLink.js';import'@react-icons/all-files/fi/FiCode.js';import'@react-icons/all-files/fi/FiFile.js';import'@react-icons/all-files/fi/FiTool.js';import'@react-icons/all-files/fi/FiAlertCircle.js';import'@react-icons/all-files/fi/FiLoader.js';import'@react-icons/all-files/fi/FiInfo.js';import'@react-icons/all-files/fi/FiAlertTriangle.js';import'@react-icons/all-files/fi/FiCheckCircle.js';import'html-react-parser';import'../components/MessageWidgets/MessageMedia.js';import'@react-icons/all-files/fi/FiMapPin.js';import'@react-icons/all-files/fi/FiStar.js';import'@react-icons/all-files/fi/FiChevronRight.js';import {MessageWorkflow}from'../components/MessageWidgets/MessageWorkflow.js';import'@react-icons/all-files/fi/FiBox.js';import'@react-icons/all-files/fi/FiZap.js';import'@react-icons/all-files/fi/FiSearch.js';import'@react-icons/all-files/fi/FiX.js';import'@react-icons/all-files/fi/FiRefreshCw.js';import'@react-icons/all-files/fi/FiEdit2.js';import'@react-icons/all-files/fi/FiPlus.js';import'@react-icons/all-files/fi/FiTrash2.js';import'../components/ChatSettingsPanel/ConnectedChatSettingsPanel.js';/**
|
|
2
|
+
* Fill name: "workflow"
|
|
3
|
+
* PostTypeEnum has no "Workflow" yet — we use a custom string. ModernMessageBubble
|
|
4
|
+
* maps a post of type "workflow" → <Slot name="workflow"> (see tailwind-ui-inbox
|
|
5
|
+
* getMessageSlotName + MessengerSlotFillNameEnum.WORKFLOW_NAME).
|
|
6
|
+
*/
|
|
7
|
+
const WORKFLOW_FILL_NAME = 'workflow';
|
|
8
|
+
const MessageWorkflowFill = () => {
|
|
9
|
+
return React.createElement(Fill, {
|
|
10
|
+
name: WORKFLOW_FILL_NAME
|
|
11
|
+
}, props => {
|
|
12
|
+
if (props.active) {
|
|
13
|
+
return React.createElement(MessageWorkflow, {
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
});
|
|
19
|
+
};export{MessageWorkflowFill};//# sourceMappingURL=message-workflow-fill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-workflow-fill.js","sources":["../../src/slot-fill/message-workflow-fill.tsx"],"sourcesContent":[null],"names":[],"mappings":"m4CAKA;;;;;AAKG;AACH,MAAM,kBAAkB,GAAG,UAAU;AAE9B,MAAM,mBAAmB,GAAG,MAAK;SACpC,KACI,CAAA,aAAA,CAAA,IAAC,EAAA;AAEO,IAAA,IAAA,EAAA;AACI,GAAA,EAAA,KAAA,IAAA;QACJ,KAAC,CAAA,MAAA,EAAA;AACD,MAAA,OAAA,MAAW,aAAC,CAAA,eAAA,EAAA;QAGtB,GAAA;AACN,OAAE,CAAA;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IPost } from 'common';
|
|
2
|
+
/**
|
|
3
|
+
* Promote an AI message that embeds a widget JSON block into a typed widget post.
|
|
4
|
+
*
|
|
5
|
+
* Our AI returns `{ propsComponent, propsConfiguration: { contents: { attachment } } }` as a
|
|
6
|
+
* fenced JSON block inside the message text. The messenger-box inbox selects a widget by
|
|
7
|
+
* `post.type` and reads data from `post.propsConfiguration.contents.attachment`, so we lift the
|
|
8
|
+
* block onto those fields and strip it from the visible text. Posts with no widget block (the
|
|
9
|
+
* common case) are returned unchanged.
|
|
10
|
+
*
|
|
11
|
+
* Apply at the inbox's post-list boundary, e.g. `userMessagesList={posts.map(parseWidgetPost)}`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function parseWidgetPost(post: IPost): IPost;
|
|
14
|
+
//# sourceMappingURL=parseWidgetPost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseWidgetPost.d.ts","sourceRoot":"","sources":["../../src/utils/parseWidgetPost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AA8C/B;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,GAAG,KAAK,CAgClD"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fill names ai-chat-ext registers (see module.ts). A widget block's `propsComponent`
|
|
3
|
+
* must match one of these for the post to be promoted into a typed widget.
|
|
4
|
+
*/
|
|
5
|
+
const KNOWN_FILL_NAMES = new Set(['media', 'travel', 'workflow', 'aiassistant', 'thinking', 'codeblock', 'tooluse', 'service', 'connector']);
|
|
6
|
+
/** Matches a fenced code block, capturing its inner body. Language tag (```json) optional. */
|
|
7
|
+
const FENCED_BLOCK = /```(?:[a-zA-Z]+)?\s*([\s\S]*?)```/g;
|
|
8
|
+
/**
|
|
9
|
+
* Find the first fenced block whose JSON has a string `propsComponent`. Returns the parsed
|
|
10
|
+
* envelope and the exact matched block text (so the caller can strip it from the message).
|
|
11
|
+
*/
|
|
12
|
+
function findWidgetBlock(message) {
|
|
13
|
+
FENCED_BLOCK.lastIndex = 0;
|
|
14
|
+
let match;
|
|
15
|
+
while ((match = FENCED_BLOCK.exec(message)) !== null) {
|
|
16
|
+
try {
|
|
17
|
+
const parsed = JSON.parse(match[1]);
|
|
18
|
+
if (parsed && typeof parsed.propsComponent === 'string') {
|
|
19
|
+
return {
|
|
20
|
+
envelope: parsed,
|
|
21
|
+
block: match[0]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
} catch {
|
|
25
|
+
// not JSON — skip this block
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Promote an AI message that embeds a widget JSON block into a typed widget post.
|
|
32
|
+
*
|
|
33
|
+
* Our AI returns `{ propsComponent, propsConfiguration: { contents: { attachment } } }` as a
|
|
34
|
+
* fenced JSON block inside the message text. The messenger-box inbox selects a widget by
|
|
35
|
+
* `post.type` and reads data from `post.propsConfiguration.contents.attachment`, so we lift the
|
|
36
|
+
* block onto those fields and strip it from the visible text. Posts with no widget block (the
|
|
37
|
+
* common case) are returned unchanged.
|
|
38
|
+
*
|
|
39
|
+
* Apply at the inbox's post-list boundary, e.g. `userMessagesList={posts.map(parseWidgetPost)}`.
|
|
40
|
+
*/
|
|
41
|
+
function parseWidgetPost(post) {
|
|
42
|
+
const message = post?.message;
|
|
43
|
+
// Fast path: skip the regex for ordinary replies.
|
|
44
|
+
if (!message || message.indexOf('propsComponent') === -1) return post;
|
|
45
|
+
const found = findWidgetBlock(message);
|
|
46
|
+
if (!found) return post;
|
|
47
|
+
const {
|
|
48
|
+
envelope,
|
|
49
|
+
block
|
|
50
|
+
} = found;
|
|
51
|
+
if (!KNOWN_FILL_NAMES.has(envelope.propsComponent.toLowerCase())) return post;
|
|
52
|
+
const contents = envelope.propsConfiguration?.contents;
|
|
53
|
+
// Defensive: MessageMedia returns null without a top-level url — backfill from the first item.
|
|
54
|
+
const attachment = contents?.attachment;
|
|
55
|
+
if (attachment && !attachment.url && attachment.items?.[0]?.url) {
|
|
56
|
+
attachment.url = attachment.items[0].url;
|
|
57
|
+
}
|
|
58
|
+
const strippedMessage = message.replace(block, '').replace(/\n{3,}/g, '\n\n').trim();
|
|
59
|
+
return {
|
|
60
|
+
...post,
|
|
61
|
+
type: envelope.propsComponent.toLowerCase(),
|
|
62
|
+
propsConfiguration: {
|
|
63
|
+
...(post.propsConfiguration ?? {}),
|
|
64
|
+
contents
|
|
65
|
+
},
|
|
66
|
+
message: strippedMessage
|
|
67
|
+
};
|
|
68
|
+
}export{parseWidgetPost};//# sourceMappingURL=parseWidgetPost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseWidgetPost.js","sources":["../../src/utils/parseWidgetPost.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEA;;;AAGG;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,aAAA,EAAA,UAAA,EAAA,WAAA,EAAA,SAAA,EAAA,SAAA,EAAA,WAAA,CAAA,CAAA;;MAE7B,YAAQ,GAAA,oCAAA;;;;;SAKR,eAAS,CAAA,OAAA,EAAA;cACA,CAAA,SAAA,GAAA,CAAA;MACT,KAAA;AACH,EAAC,OAAC,CAAA,KAAA,GAAA,YAAA,CAAA,IAAA,CAAA,OAAA,CAAA,MAAA,IAAA,EAAA;AAEH,IAAA,IAAA;AACA,MAAM,MAAA,MAAY,GAAG,IAAA,CAAA,KAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AAOrB,MAAA,IAAA,MAAA,IAAA,OAAA,MAAA,CAAA,cAAA,KAAA,QAAA,EAAA;;;AAGG,UAAA,KAAA,EAAA,KAAA,CAAA,CAAA;AACH,SAAS;AACL,MAAA;AACA,IAAA,CAAA,CAAA;AACA;AACI,IAAA;;aAEI;AACI;;;AAEN;;;;AAIN;AACJ;AAEA;;;;;;;;;;AAUG,IAAA,QAAA;AACH,IAAA;AACI,GAAA,GAAA,KAAM;MACN,CAAA,gBAAA,CAAA,GAAA,CAAA,QAAA,CAAA,cAAA,CAAA,WAAkD,EAAA,CAAA,EAAA,OAAA,IAAA;QAC9C,QAAQ,GAAA,QAAW,CAAC,kBAAQ,EAAA,QAAiB;AAAS;AAE1D,EAAA,MAAA,UAAc,GAAA,QAAA,EAAA,UAAuB;AACrC,EAAA,IAAA,UAAU,IAAA,CAAA,UAAA,CAAA,GAAA,IAAA,UAAA,CAAA,KAAA,GAAA,CAAA,CAAA,EAAA,GAAA,EAAA;AAAE,IAAA,UAAA,CAAO,MAAK,UAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,GAAA;AAExB,EAAA;QACI,eAAC,GAAiB,OAAI,CAAA,OAAS,CAAA,KAAA,EAAA,EAAA,CAAA,CAAc,OAAC,CAAA,SAAc,EAAA,MAAA,CAAA,CAAA,IAAA,EAAA;AAAE,EAAA,OAAA;AAElE,IAAA,GAAA;IACA,IAAA,EAAA,QAAA,CAAA,cAAA,CAAA,WAAA,EAAA;AACA,IAAA,kBAAgB,EAAG;AACnB,MAAA,2BAA6B,IAAI,EAAA,CAAA;;KAEhC;IAED,OAAM,EAAA;AACD,GAAA;AACA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseWidgetPost.spec.d.ts","sourceRoot":"","sources":["../../src/utils/parseWidgetPost.spec.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@admin-layout/ai-chat-ext-browser",
|
|
3
|
+
"version": "12.2.4-alpha.103",
|
|
4
|
+
"description": "AI Chat extension for Messenger - supports AI assistant, thinking, code blocks, tool use, and service messages",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"author": "CDMBase LLC",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "lib/index.js",
|
|
9
|
+
"module": "lib/index.js",
|
|
10
|
+
"typings": "lib/index.d.ts",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "npm run build:clean && npm run build:lib",
|
|
13
|
+
"build:clean": "rimraf lib",
|
|
14
|
+
"build:lib": "rollup -c rollup.config.mjs",
|
|
15
|
+
"build:lib:watch": "npm run build:lib -- --watch",
|
|
16
|
+
"jest": "./node_modules/.bin/jest",
|
|
17
|
+
"prepublish": "npm run build",
|
|
18
|
+
"test": "cross-env ENV_FILE=../../config/test/test.env jest",
|
|
19
|
+
"test:debug": "npm test -- --runInBand",
|
|
20
|
+
"test:watch": "npm test -- --watch",
|
|
21
|
+
"watch": "npm run build:lib:watch"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@admin-layout/connector-widgets-browser": "12.2.4-alpha.103",
|
|
25
|
+
"html-react-parser": "^3.0.1"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"common": "link:../../../packages/common"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@common-stack/client-react": "*",
|
|
32
|
+
"@common-stack/components-pro": "*",
|
|
33
|
+
"lodash-es": "*",
|
|
34
|
+
"react": ">=18"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"gitHead": "2fe65c48f3d39ef929660fd4c10535e48357f428",
|
|
40
|
+
"typescript": {
|
|
41
|
+
"definition": "lib/index.d.ts"
|
|
42
|
+
}
|
|
43
|
+
}
|