cmcts-c-agent-embedding 1.0.19-cagent → 1.0.19-vpcp
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/.env.example +12 -6
- package/.eslintrc.cjs +0 -1
- package/.idea/flowise-chatbox.iml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/AGENTS.md +166 -0
- package/README.md +19 -19
- package/auggie_shell.ps1 +8 -0
- package/auggie_shell_conversation.txt +23 -0
- package/auggie_shell_user_request.txt +21 -0
- package/dist/BubbleChat.d.ts +10 -0
- package/dist/BubbleChat.d.ts.map +1 -0
- package/dist/FullPageChat.d.ts +18 -0
- package/dist/FullPageChat.d.ts.map +1 -0
- package/dist/components/Badge.d.ts.map +1 -1
- package/dist/components/Bot.d.ts +0 -19
- package/dist/components/Bot.d.ts.map +1 -1
- package/dist/components/FeedbackContentDialog.d.ts.map +1 -1
- package/dist/components/avatars/DefaultAvatar.d.ts.map +1 -1
- package/dist/components/bubbles/AgentReasoningBubble.d.ts +0 -2
- package/dist/components/bubbles/AgentReasoningBubble.d.ts.map +1 -1
- package/dist/components/bubbles/BotBubble.d.ts +1 -0
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -1
- package/dist/components/bubbles/ChartBubble.d.ts +73 -0
- package/dist/components/bubbles/ChartBubble.d.ts.map +1 -0
- package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts +8 -0
- package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPlaceholder.d.ts +20 -0
- package/dist/components/bubbles/ChartPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPopupModal.d.ts +4 -0
- package/dist/components/bubbles/ChartPopupModal.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPortalContainer.d.ts +12 -0
- package/dist/components/bubbles/ChartPortalContainer.d.ts.map +1 -0
- package/dist/components/bubbles/GuestBubble.d.ts.map +1 -1
- package/dist/components/bubbles/LeadCaptureBubble.d.ts.map +1 -1
- package/dist/components/bubbles/LoadingBubble.d.ts +1 -7
- package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -1
- package/dist/components/bubbles/SourceBubble.d.ts.map +1 -1
- package/dist/components/bubbles/StableChartWrapper.d.ts +18 -0
- package/dist/components/bubbles/StableChartWrapper.d.ts.map +1 -0
- package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -1
- package/dist/components/buttons/SendButton.d.ts +0 -1
- package/dist/components/buttons/SendButton.d.ts.map +1 -1
- package/dist/components/icons/AddImageIcon.d.ts.map +1 -1
- package/dist/components/icons/CmcIcon.d.ts +3 -0
- package/dist/components/icons/CmcIcon.d.ts.map +1 -0
- package/dist/components/icons/ResetBtn.d.ts +3 -0
- package/dist/components/icons/ResetBtn.d.ts.map +1 -0
- package/dist/components/icons/ResetZoomIcon.d.ts +3 -0
- package/dist/components/icons/ResetZoomIcon.d.ts.map +1 -0
- package/dist/components/icons/SendIconOff.d.ts +3 -0
- package/dist/components/icons/SendIconOff.d.ts.map +1 -0
- package/dist/components/icons/SendIconOn.d.ts +3 -0
- package/dist/components/icons/SendIconOn.d.ts.map +1 -0
- package/dist/components/icons/ZoomInIcon.d.ts +3 -0
- package/dist/components/icons/ZoomInIcon.d.ts.map +1 -0
- package/dist/components/icons/ZoomOutIcon.d.ts +3 -0
- package/dist/components/icons/ZoomOutIcon.d.ts.map +1 -0
- package/dist/components/icons/index.d.ts +1 -5
- package/dist/components/icons/index.d.ts.map +1 -1
- package/dist/components/image/PreviewImage.d.ts.map +1 -1
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts +0 -1
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -1
- package/dist/components/inputs/textInput/components/TextInput.d.ts +2 -17
- package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -1
- package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -1
- package/dist/features/full/components/Full.d.ts.map +1 -1
- package/dist/features/popup/components/DisclaimerPopup.d.ts.map +1 -1
- package/dist/features/popup/components/Popup.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/queries/sendMessageQuery.d.ts +1 -33
- package/dist/queries/sendMessageQuery.d.ts.map +1 -1
- package/dist/types/chart.d.ts +86 -0
- package/dist/types/chart.d.ts.map +1 -0
- package/dist/utils/chartConfigManager.d.ts +54 -0
- package/dist/utils/chartConfigManager.d.ts.map +1 -0
- package/dist/utils/chartInstanceManager.d.ts +43 -0
- package/dist/utils/chartInstanceManager.d.ts.map +1 -0
- package/dist/utils/chartPopupManager.d.ts +43 -0
- package/dist/utils/chartPopupManager.d.ts.map +1 -0
- package/dist/utils/chartPortalManager.d.ts +76 -0
- package/dist/utils/chartPortalManager.d.ts.map +1 -0
- package/dist/utils/chartTagParser.d.ts +39 -0
- package/dist/utils/chartTagParser.d.ts.map +1 -0
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/isMobileSignal.d.ts +3 -1
- package/dist/utils/isMobileSignal.d.ts.map +1 -1
- package/dist/utils/security.d.ts +50 -0
- package/dist/utils/security.d.ts.map +1 -0
- package/dist/utils/textStreamSmoother.d.ts +40 -0
- package/dist/utils/textStreamSmoother.d.ts.map +1 -0
- package/dist/web.d.ts +2 -4
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +1 -1
- package/dist/window.d.ts +1 -2
- package/dist/window.d.ts.map +1 -1
- package/package.json +20 -15
- package/public/Chat_Mobile_Header_BG.png +0 -0
- package/public/HuyHieuBoCongAn.png +0 -0
- package/public/Logo_VNeID.png +0 -0
- package/public/People_TroLy.png +0 -0
- package/public/People_TroLy_Icon.png +0 -0
- package/public/TroLyAI_Icon.png +0 -0
- package/public/icon_bot.png +0 -0
- package/public/index.html +39 -43
- package/public/logo.png +0 -0
- package/public/robots.txt +16 -0
- package/public/sitemap.xml +9 -0
- package/server.js +171 -49
- package/.augment-guidelines +0 -43
- package/dist/_basePickBy-1057a1b4.js +0 -1
- package/dist/_basePickBy-cbf78fb3.js +0 -1
- package/dist/_baseUniq-38ea2195.js +0 -1
- package/dist/_baseUniq-52a47b7b.js +0 -1
- package/dist/arc-6b847bc0.js +0 -1
- package/dist/arc-8928af28.js +0 -1
- package/dist/architecture-O4VJ6CD3-42323263.js +0 -1
- package/dist/architecture-O4VJ6CD3-b506967f.js +0 -1
- package/dist/architectureDiagram-VXUJARFQ-1bd867b6.js +0 -1
- package/dist/architectureDiagram-VXUJARFQ-2b851c59.js +0 -1
- package/dist/blockDiagram-VD42YOAC-5cea96b0.js +0 -1
- package/dist/blockDiagram-VD42YOAC-a909b757.js +0 -1
- package/dist/c4Diagram-YG6GDRKO-24d24519.js +0 -1
- package/dist/c4Diagram-YG6GDRKO-54783ab3.js +0 -1
- package/dist/channel-2af69aa2.js +0 -1
- package/dist/channel-f240e622.js +0 -1
- package/dist/chunk-4BX2VUAB-7747ae72.js +0 -1
- package/dist/chunk-4BX2VUAB-d05d937e.js +0 -1
- package/dist/chunk-55IACEB6-5a7b1be3.js +0 -1
- package/dist/chunk-55IACEB6-78729976.js +0 -1
- package/dist/chunk-B4BG7PRW-a97e69ff.js +0 -1
- package/dist/chunk-B4BG7PRW-cbf800c4.js +0 -1
- package/dist/chunk-DI55MBZ5-5dc4f926.js +0 -1
- package/dist/chunk-DI55MBZ5-95d71f6f.js +0 -1
- package/dist/chunk-FMBD7UC4-2c653fda.js +0 -1
- package/dist/chunk-FMBD7UC4-d75ed695.js +0 -1
- package/dist/chunk-QN33PNHL-0bf10733.js +0 -1
- package/dist/chunk-QN33PNHL-b00655c9.js +0 -1
- package/dist/chunk-QZHKN3VN-a979a9fe.js +0 -1
- package/dist/chunk-QZHKN3VN-d57979be.js +0 -1
- package/dist/chunk-TZMSLE5B-6755c559.js +0 -1
- package/dist/chunk-TZMSLE5B-ed6d6d7e.js +0 -1
- package/dist/classDiagram-2ON5EDUG-8b5a2a93.js +0 -1
- package/dist/classDiagram-2ON5EDUG-fa9ecfbb.js +0 -1
- package/dist/classDiagram-v2-WZHVMYZB-8b5a2a93.js +0 -1
- package/dist/classDiagram-v2-WZHVMYZB-fa9ecfbb.js +0 -1
- package/dist/clone-6cd174cf.js +0 -1
- package/dist/clone-8494eb3f.js +0 -1
- package/dist/components/buttons/ConsultationButton.d.ts +0 -13
- package/dist/components/buttons/ConsultationButton.d.ts.map +0 -1
- package/dist/components/buttons/ZaloChatButton.d.ts +0 -16
- package/dist/components/buttons/ZaloChatButton.d.ts.map +0 -1
- package/dist/components/demo/ZaloChatDemo.d.ts +0 -2
- package/dist/components/demo/ZaloChatDemo.d.ts.map +0 -1
- package/dist/components/icons/SupportIcon.d.ts +0 -3
- package/dist/components/icons/SupportIcon.d.ts.map +0 -1
- package/dist/components/modals/QuickChatModal.d.ts +0 -10
- package/dist/components/modals/QuickChatModal.d.ts.map +0 -1
- package/dist/components/modals/ZaloHybridWidget.d.ts +0 -9
- package/dist/components/modals/ZaloHybridWidget.d.ts.map +0 -1
- package/dist/components/modals/ZaloOfficialWidget.d.ts +0 -12
- package/dist/components/modals/ZaloOfficialWidget.d.ts.map +0 -1
- package/dist/components/modals/ZaloQRModal.d.ts +0 -8
- package/dist/components/modals/ZaloQRModal.d.ts.map +0 -1
- package/dist/components/modals/ZaloSmartWidget.d.ts +0 -9
- package/dist/components/modals/ZaloSmartWidget.d.ts.map +0 -1
- package/dist/components/modals/ZaloWebChatWidget.d.ts +0 -9
- package/dist/components/modals/ZaloWebChatWidget.d.ts.map +0 -1
- package/dist/components/quickchat/AlwaysOpenChat.d.ts +0 -13
- package/dist/components/quickchat/AlwaysOpenChat.d.ts.map +0 -1
- package/dist/components/quickchat/QuickChatButton.d.ts +0 -10
- package/dist/components/quickchat/QuickChatButton.d.ts.map +0 -1
- package/dist/components/quickchat/QuickChatConfig.d.ts +0 -9
- package/dist/components/quickchat/QuickChatConfig.d.ts.map +0 -1
- package/dist/components/quickchat/QuickChatPanel.d.ts +0 -10
- package/dist/components/quickchat/QuickChatPanel.d.ts.map +0 -1
- package/dist/components/quickchat/QuickChatWidget.d.ts +0 -32
- package/dist/components/quickchat/QuickChatWidget.d.ts.map +0 -1
- package/dist/components/quickchat/index.d.ts +0 -7
- package/dist/components/quickchat/index.d.ts.map +0 -1
- package/dist/cose-bilkent-S5V4N54A-2f5eb275.js +0 -1
- package/dist/cose-bilkent-S5V4N54A-3cda82b5.js +0 -1
- package/dist/cytoscape.esm-9acb9bfe.js +0 -1
- package/dist/dagre-6UL2VRFP-9b648c54.js +0 -1
- package/dist/dagre-6UL2VRFP-e997588d.js +0 -1
- package/dist/defaultLocale-1fe70b7d.js +0 -1
- package/dist/diagram-PSM6KHXK-1234d08d.js +0 -1
- package/dist/diagram-PSM6KHXK-15013de5.js +0 -1
- package/dist/diagram-QEK2KX5R-489b9505.js +0 -1
- package/dist/diagram-QEK2KX5R-9e94df2a.js +0 -1
- package/dist/diagram-S2PKOQOG-6fef3823.js +0 -1
- package/dist/diagram-S2PKOQOG-c943ed25.js +0 -1
- package/dist/erDiagram-Q2GNP2WA-2b1823f2.js +0 -1
- package/dist/erDiagram-Q2GNP2WA-7e6c6a04.js +0 -1
- package/dist/flowDiagram-NV44I4VS-709c6479.js +0 -1
- package/dist/flowDiagram-NV44I4VS-98a84da9.js +0 -1
- package/dist/ganttDiagram-LVOFAZNH-1d379d6a.js +0 -1
- package/dist/ganttDiagram-LVOFAZNH-d8342586.js +0 -1
- package/dist/gitGraph-ZV4HHKMB-788776f3.js +0 -1
- package/dist/gitGraph-ZV4HHKMB-ba420dcc.js +0 -1
- package/dist/gitGraphDiagram-NY62KEGX-804d1363.js +0 -1
- package/dist/gitGraphDiagram-NY62KEGX-919097ea.js +0 -1
- package/dist/graph-834f6046.js +0 -1
- package/dist/graph-db4953aa.js +0 -1
- package/dist/info-63CPKGFF-2dccc483.js +0 -1
- package/dist/info-63CPKGFF-ef40f1c4.js +0 -1
- package/dist/infoDiagram-F6ZHWCRC-579d50b4.js +0 -1
- package/dist/infoDiagram-F6ZHWCRC-c9877bad.js +0 -1
- package/dist/init-cf76ae07.js +0 -1
- package/dist/journeyDiagram-XKPGCS4Q-25d3c922.js +0 -1
- package/dist/journeyDiagram-XKPGCS4Q-2d2cda1c.js +0 -1
- package/dist/kanban-definition-3W4ZIXB7-c556bee0.js +0 -1
- package/dist/kanban-definition-3W4ZIXB7-cdb93ec0.js +0 -1
- package/dist/katex-0a18b0df.js +0 -1
- package/dist/layout-40652dba.js +0 -1
- package/dist/layout-54ffc604.js +0 -1
- package/dist/linear-2f639b72.js +0 -1
- package/dist/linear-ed2367ff.js +0 -1
- package/dist/mermaid-parser.core-0cfa7d2a.js +0 -1
- package/dist/mermaid-parser.core-10bed742.js +0 -1
- package/dist/mindmap-definition-VGOIOE7T-169f5fe5.js +0 -1
- package/dist/mindmap-definition-VGOIOE7T-dea1c792.js +0 -1
- package/dist/ordinal-221e41d7.js +0 -1
- package/dist/packet-HUATNLJX-6f2471ea.js +0 -1
- package/dist/packet-HUATNLJX-c69e28eb.js +0 -1
- package/dist/pie-WTHONI2E-4143e44b.js +0 -1
- package/dist/pie-WTHONI2E-82b1fe3f.js +0 -1
- package/dist/pieDiagram-ADFJNKIX-499eec78.js +0 -1
- package/dist/pieDiagram-ADFJNKIX-657effd5.js +0 -1
- package/dist/quadrantDiagram-AYHSOK5B-138a0c93.js +0 -1
- package/dist/quadrantDiagram-AYHSOK5B-91137c4d.js +0 -1
- package/dist/radar-NJJJXTRR-5e934a95.js +0 -1
- package/dist/radar-NJJJXTRR-94d77527.js +0 -1
- package/dist/requirementDiagram-UZGBJVZJ-a5d9fb39.js +0 -1
- package/dist/requirementDiagram-UZGBJVZJ-d7aeec99.js +0 -1
- package/dist/sankeyDiagram-TZEHDZUN-15053ae0.js +0 -1
- package/dist/sankeyDiagram-TZEHDZUN-aadd2125.js +0 -1
- package/dist/sequenceDiagram-WL72ISMW-12e778ef.js +0 -1
- package/dist/sequenceDiagram-WL72ISMW-9330a98a.js +0 -1
- package/dist/stateDiagram-FKZM4ZOC-01225f0f.js +0 -1
- package/dist/stateDiagram-FKZM4ZOC-af4836d7.js +0 -1
- package/dist/stateDiagram-v2-4FDKWEC3-4774cc10.js +0 -1
- package/dist/stateDiagram-v2-4FDKWEC3-5ef8e019.js +0 -1
- package/dist/timeline-definition-IT6M3QCI-9921f937.js +0 -1
- package/dist/timeline-definition-IT6M3QCI-a7a9bbec.js +0 -1
- package/dist/treemap-75Q7IDZK-100ddeb7.js +0 -1
- package/dist/treemap-75Q7IDZK-851117b4.js +0 -1
- package/dist/utils/redisAndQueue.d.ts +0 -32
- package/dist/utils/redisAndQueue.d.ts.map +0 -1
- package/dist/web-0016ac81.js +0 -1
- package/dist/web-4e6d8ea9.js +0 -1
- package/dist/xychartDiagram-PRI3JC2R-003630a4.js +0 -1
- package/dist/xychartDiagram-PRI3JC2R-df869780.js +0 -1
package/.env.example
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
# ==============================================
|
|
4
4
|
|
|
5
5
|
# API Host URL (required)
|
|
6
|
-
# This should be the URL where your
|
|
7
|
-
# Example: https://your-
|
|
6
|
+
# This should be the URL where your CAgent instance is running
|
|
7
|
+
# Example: https://your-cagent-instance.com
|
|
8
8
|
API_HOST=
|
|
9
9
|
|
|
10
|
-
#
|
|
11
|
-
# Generate this from your
|
|
10
|
+
# CAgent API Key (required)
|
|
11
|
+
# Generate this from your CAgent instance settings page
|
|
12
12
|
# Example: OxxGE-h_LaH7ZYorStjTOik1XY999RxxoHpCSYl8BXxc
|
|
13
|
-
|
|
13
|
+
CAGENT_API_KEY=
|
|
14
14
|
|
|
15
15
|
# ==============================================
|
|
16
16
|
# CHATFLOWS CONFIGURATION (required)
|
|
@@ -20,7 +20,7 @@ FLOWISE_API_KEY=
|
|
|
20
20
|
#
|
|
21
21
|
# Each entry consists of:
|
|
22
22
|
# - identifier: Any name you choose (e.g., agent1, support, salesbot)
|
|
23
|
-
# - chatflowId: The UUID of your
|
|
23
|
+
# - chatflowId: The UUID of your CAgent chatflow
|
|
24
24
|
# - allowedDomains: Comma-separated list of domains where this chat can be embedded
|
|
25
25
|
# Note: Wildcard domains (*) are not supported for security reasons
|
|
26
26
|
#
|
|
@@ -32,3 +32,9 @@ FLOWISE_API_KEY=
|
|
|
32
32
|
# Add your chatflows below:
|
|
33
33
|
chatflow_1=
|
|
34
34
|
chatflow_2=
|
|
35
|
+
|
|
36
|
+
# ==============================================
|
|
37
|
+
# OPTIONAL CONFIGURATION
|
|
38
|
+
# ==============================================
|
|
39
|
+
|
|
40
|
+
|
package/.eslintrc.cjs
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="inheritedJdk" />
|
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
+
</component>
|
|
12
|
+
</module>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/flowise-chatbox.iml" filepath="$PROJECT_DIR$/.idea/flowise-chatbox.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/.idea/vcs.xml
ADDED
package/AGENTS.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# AGENTS.md - Coding Guidelines
|
|
2
|
+
|
|
3
|
+
> **Purpose:** Guidelines for code quality, development process, and decision-making
|
|
4
|
+
> **Target Audience:** AI coding assistants and developers
|
|
5
|
+
> **Version:** 1.0
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Code Quality Standards
|
|
10
|
+
|
|
11
|
+
### Core Principles
|
|
12
|
+
|
|
13
|
+
#### No Unused Code
|
|
14
|
+
- **Rule:** Don't write unused code
|
|
15
|
+
- **Requirement:** Ensure everything written is utilized in the project
|
|
16
|
+
- **Priority:** Critical
|
|
17
|
+
|
|
18
|
+
#### Readability First
|
|
19
|
+
- **Rule:** Prioritize readability for human understanding over execution efficiency
|
|
20
|
+
- **Priority:** Critical
|
|
21
|
+
|
|
22
|
+
#### Maintainability
|
|
23
|
+
- **Rule:** Maintain long-term maintainability over short-term optimization
|
|
24
|
+
- **Priority:** High
|
|
25
|
+
|
|
26
|
+
#### Simplicity
|
|
27
|
+
- **Rule:** Avoid unnecessary complexity
|
|
28
|
+
- **Approach:** Implement simple solutions unless complexity is truly required
|
|
29
|
+
- **Priority:** High
|
|
30
|
+
|
|
31
|
+
#### Clean Code Philosophy
|
|
32
|
+
- **Rule:** Follow Linus Torvalds' clean code principles
|
|
33
|
+
- **Priority:** High
|
|
34
|
+
- **Guidelines:**
|
|
35
|
+
1. Keep it simple
|
|
36
|
+
2. Make code readable like prose
|
|
37
|
+
3. Avoid premature optimization
|
|
38
|
+
4. Express intent clearly
|
|
39
|
+
5. Minimize abstraction layers
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### Documentation Standards
|
|
44
|
+
|
|
45
|
+
#### Comment Purpose
|
|
46
|
+
- **Rule:** Comments must explain "what" (business logic/purpose) and "why" (reasoning/decisions), not "how"
|
|
47
|
+
- **Priority:** High
|
|
48
|
+
|
|
49
|
+
#### Avoid Over-Commenting
|
|
50
|
+
- **Rule:** Avoid over-commenting
|
|
51
|
+
- **Rationale:** Excessive comments indicate poor code quality
|
|
52
|
+
- **Priority:** Medium
|
|
53
|
+
|
|
54
|
+
#### Function Comments
|
|
55
|
+
- **Rule:** Function comments must explain purpose and reasoning
|
|
56
|
+
- **Placement:** Placed at function beginnings
|
|
57
|
+
- **Priority:** Medium
|
|
58
|
+
|
|
59
|
+
#### Self-Explanatory Code
|
|
60
|
+
- **Rule:** Well-written code should be self-explanatory
|
|
61
|
+
- **Method:** Through meaningful names and clear structure
|
|
62
|
+
- **Priority:** High
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Development Process
|
|
67
|
+
|
|
68
|
+
> **Description:** Follow these steps in order for effective development
|
|
69
|
+
> **Priority:** Critical
|
|
70
|
+
|
|
71
|
+
| Step | Name | Action/Rationale | Importance |
|
|
72
|
+
|------|------|------------------|------------|
|
|
73
|
+
| 1 | Understand First | Use available tools to understand data structures before implementation | Critical |
|
|
74
|
+
| 2 | Design Data Structures | Good data structures lead to good code | Critical |
|
|
75
|
+
| 3 | Define Interfaces | Specify all input/output structures before writing logic | High |
|
|
76
|
+
| 4 | Define Functions | Create all function signatures before implementation | High |
|
|
77
|
+
| 5 | Implement Logic | Write implementation only after structures and definitions are complete | High |
|
|
78
|
+
| 6 | Validate Code Quality | Always run lint and typecheck after writing code. Fix all linting errors and type errors before considering the task complete. Zero tolerance for lint and typecheck errors | Critical |
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Quality Guidelines
|
|
83
|
+
|
|
84
|
+
#### Avoid Over-Engineering
|
|
85
|
+
- **Rule:** Avoid over-engineering
|
|
86
|
+
- **Focus:** Focus on minimal viable solutions meeting acceptance criteria
|
|
87
|
+
- **Priority:** High
|
|
88
|
+
|
|
89
|
+
#### Testing Approach
|
|
90
|
+
- **Rule:** Only create automated tests if explicitly required
|
|
91
|
+
- **Priority:** Medium
|
|
92
|
+
|
|
93
|
+
#### Feature Scope
|
|
94
|
+
- **Rule:** Never add functionality "just in case"
|
|
95
|
+
- **Requirement:** Implement only what's needed now
|
|
96
|
+
- **Priority:** High
|
|
97
|
+
|
|
98
|
+
#### Code Validation
|
|
99
|
+
- **Rule:** Always run lint and typecheck after code changes
|
|
100
|
+
- **Requirement:** Must fix all linting and type checking errors before completion
|
|
101
|
+
- **Process:** Run lint command, then typecheck command. Address all errors and warnings
|
|
102
|
+
- **Tolerance:** Zero tolerance for lint or typecheck errors
|
|
103
|
+
- **Priority:** Critical
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Decision Making Framework
|
|
108
|
+
|
|
109
|
+
> **Description:** Apply these principles systematically for all decisions
|
|
110
|
+
> **Priority:** High
|
|
111
|
+
|
|
112
|
+
| Step | Principle | Importance |
|
|
113
|
+
|------|-----------|------------|
|
|
114
|
+
| 1 | Gather Complete Information | Critical |
|
|
115
|
+
| 2 | Multi-Perspective Analysis | High |
|
|
116
|
+
| 3 | Consider All Stakeholders | High |
|
|
117
|
+
| 4 | Evaluate Alternatives | High |
|
|
118
|
+
| 5 | Assess Impact & Consequences | High |
|
|
119
|
+
| 6 | Apply Ethical Framework | Medium |
|
|
120
|
+
| 7 | Take Responsibility | High |
|
|
121
|
+
| 8 | Learn & Adapt | High |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Code Validation Workflow
|
|
126
|
+
|
|
127
|
+
> **Description:** Mandatory validation process after writing or modifying code
|
|
128
|
+
> **Priority:** Critical
|
|
129
|
+
|
|
130
|
+
#### Validation Commands
|
|
131
|
+
- **Lint Fix Command:** `yarn run lint-fix`
|
|
132
|
+
- **Type Check Command:** `yarn run type-check`
|
|
133
|
+
- **Combined Command:** `yarn run lint-fix && yarn run type-check`
|
|
134
|
+
|
|
135
|
+
#### Required Workflow
|
|
136
|
+
| Step | Action | Description |
|
|
137
|
+
|------|--------|-------------|
|
|
138
|
+
| 1 | Write/Edit Code | Make your code changes |
|
|
139
|
+
| 2 | Run Validation | Execute `yarn run lint-fix && yarn run type-check` |
|
|
140
|
+
| 3 | Review Results | Check for any remaining errors |
|
|
141
|
+
| 4 | Fix Errors | Address all lint and type errors |
|
|
142
|
+
| 5 | Repeat | Run validation again until all errors are resolved |
|
|
143
|
+
|
|
144
|
+
#### Rules
|
|
145
|
+
- **Rule:** Always run validation commands after every code change
|
|
146
|
+
- **Requirement:** Must run both lint-fix and type-check before considering task complete
|
|
147
|
+
- **Tolerance:** Zero errors allowed - all lint and type errors must be fixed
|
|
148
|
+
- **Priority:** Critical
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Package Manager
|
|
153
|
+
|
|
154
|
+
#### Required Package Manager
|
|
155
|
+
- **Rule:** Use `yarn` as the package manager for this project
|
|
156
|
+
- **Requirement:** All package installations and script executions must use `yarn`
|
|
157
|
+
- **Prohibited:** Do NOT use `npm`, `pnpm`, or `bun`
|
|
158
|
+
- **Priority:** Critical
|
|
159
|
+
|
|
160
|
+
#### Examples
|
|
161
|
+
| Action | Correct | Incorrect |
|
|
162
|
+
|--------|---------|-----------|
|
|
163
|
+
| Install dependencies | `yarn install` | `npm install`, `pnpm install` |
|
|
164
|
+
| Add package | `yarn add <package>` | `npm install <package>` |
|
|
165
|
+
| Run script | `yarn run <script>` | `npm run <script>` |
|
|
166
|
+
| Remove package | `yarn remove <package>` | `npm uninstall <package>` |
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- markdownlint-disable MD030 -->
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# CAgent Embed
|
|
4
4
|
|
|
5
|
-
Javascript library to display
|
|
5
|
+
Javascript library to display cagent chatbot on your website
|
|
6
6
|
|
|
7
|
-

|
|
8
8
|
|
|
9
9
|
Install:
|
|
10
10
|
|
|
@@ -18,15 +18,15 @@ Dev:
|
|
|
18
18
|
yarn dev
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
A development server will be running on http://localhost:5678 automatically. Update `public/index.html` to connect directly to
|
|
21
|
+
A development server will be running on http://localhost:5678 automatically. Update `public/index.html` to connect directly to CAgent:
|
|
22
22
|
|
|
23
23
|
```html
|
|
24
24
|
<!-- public/index.html -->
|
|
25
25
|
<script type="module">
|
|
26
26
|
import Chatbot from 'https://localhost:5678/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
|
|
27
27
|
Chatbot.init({
|
|
28
|
-
chatflowid: '91e9c803-5169-4db9-8207-3c0915d71c5f', // Add your
|
|
29
|
-
apiHost: 'https://your-
|
|
28
|
+
chatflowid: '91e9c803-5169-4db9-8207-3c0915d71c5f', // Add your CAgent chatflowid
|
|
29
|
+
apiHost: 'https://your-cagent-instance.com', // Add your CAgent apiHost
|
|
30
30
|
});
|
|
31
31
|
</script>
|
|
32
32
|
```
|
|
@@ -61,7 +61,7 @@ yarn build
|
|
|
61
61
|
apiHost: 'http://localhost:3000',
|
|
62
62
|
});
|
|
63
63
|
</script>
|
|
64
|
-
<
|
|
64
|
+
<cagent-fullchatbot></cagent-fullchatbot>
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
To enable full screen, add `margin: 0` to <code>body</code> style, and confirm you don't set height and width
|
|
@@ -136,7 +136,7 @@ You can also customize chatbot with different configuration
|
|
|
136
136
|
},
|
|
137
137
|
disclaimer: {
|
|
138
138
|
title: 'Disclaimer',
|
|
139
|
-
message: 'By using this chatbot, you agree to the <a target="_blank" href="https://
|
|
139
|
+
message: 'By using this chatbot, you agree to the <a target="_blank" href="https://cagentai.com/terms">Terms & Condition</a>',
|
|
140
140
|
textColor: 'black',
|
|
141
141
|
buttonColor: '#3b82f6',
|
|
142
142
|
buttonText: 'Start Chatting',
|
|
@@ -148,7 +148,7 @@ You can also customize chatbot with different configuration
|
|
|
148
148
|
chatWindow: {
|
|
149
149
|
showTitle: true,
|
|
150
150
|
showAgentMessages: true,
|
|
151
|
-
title: '
|
|
151
|
+
title: 'CAgent Bot',
|
|
152
152
|
titleAvatarSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
|
|
153
153
|
welcomeMessage: 'Hello! This is custom welcome message',
|
|
154
154
|
errorMessage: 'This is a custom error message',
|
|
@@ -208,13 +208,13 @@ You can also customize chatbot with different configuration
|
|
|
208
208
|
|
|
209
209
|
## (Experimental) Proxy Server Setup
|
|
210
210
|
|
|
211
|
-
The
|
|
211
|
+
The CAgent Embed Proxy Server enhances the security of your chatbot implementation by acting as a protective intermediary layer. This server eliminates the need to expose sensitive CAgent instance details in your frontend code and provides several key security benefits:
|
|
212
212
|
|
|
213
|
-

|
|
214
214
|
|
|
215
|
-
- **Enhanced Security**: Conceals your
|
|
215
|
+
- **Enhanced Security**: Conceals your CAgent API host and chatflow IDs from client-side exposure
|
|
216
216
|
- **Access Control**: Implements strict domain-based restrictions for chatbot embedding
|
|
217
|
-
- **Secure Communication**: Acts as a secure gateway for all interactions between your website and
|
|
217
|
+
- **Secure Communication**: Acts as a secure gateway for all interactions between your website and CAgent instance
|
|
218
218
|
- **Authentication Management**: Handles API key authentication securely on the server side, away from client exposure
|
|
219
219
|
|
|
220
220
|
This proxy server can be deployed to any Node.js hosting platform.
|
|
@@ -225,14 +225,14 @@ This proxy server can be deployed to any Node.js hosting platform.
|
|
|
225
225
|
|
|
226
226
|
```bash
|
|
227
227
|
# Copy .env.example to .env and configure required settings:
|
|
228
|
-
API_HOST=https://your-
|
|
229
|
-
|
|
228
|
+
API_HOST=https://your-cagent-instance.com
|
|
229
|
+
CAGENT_API_KEY=your-api-key
|
|
230
230
|
|
|
231
231
|
# Configure your chatflows:
|
|
232
232
|
# Format: [identifier]=[chatflowId],[allowedDomain1],[allowedDomain2],...
|
|
233
233
|
#
|
|
234
234
|
# identifier: Any name you choose (e.g., agent1, support, salesbot)
|
|
235
|
-
# chatflowId: The UUID of your
|
|
235
|
+
# chatflowId: The UUID of your CAgent chatflow
|
|
236
236
|
# allowedDomains: Comma-separated list of domains where this chat can be embedded
|
|
237
237
|
#
|
|
238
238
|
# Examples:
|
|
@@ -256,7 +256,7 @@ yarn start
|
|
|
256
256
|
# - Cloud: [Your Platform URL] (e.g., https://your-app.herokuapp.com)
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
4. Once the proxy server is running in production, you will be able to embed your chatbots safely without exposing your
|
|
259
|
+
4. Once the proxy server is running in production, you will be able to embed your chatbots safely without exposing your CAgent API host and chatflow IDs as below:
|
|
260
260
|
|
|
261
261
|
```html
|
|
262
262
|
<script type="module">
|
|
@@ -320,7 +320,7 @@ For full page testing, use this configuration instead:
|
|
|
320
320
|
|
|
321
321
|
```html
|
|
322
322
|
<!-- public/index.html -->
|
|
323
|
-
<
|
|
323
|
+
<cagent-fullchatbot></cagent-fullchatbot>
|
|
324
324
|
<script type="module">
|
|
325
325
|
import Chatbot from './web.js';
|
|
326
326
|
Chatbot.initFull({
|
|
@@ -346,4 +346,4 @@ yarn dev
|
|
|
346
346
|
|
|
347
347
|
## License
|
|
348
348
|
|
|
349
|
-
Source code in this repository is made available under the [MIT License](https://github.com/
|
|
349
|
+
Source code in this repository is made available under the [MIT License](https://github.com/CAgentAI/CAgent/blob/master/LICENSE.md).
|
package/auggie_shell.ps1
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Set-Location -Path 'D:\projects\cmc\flowise-chatbox'
|
|
2
|
+
$userRequest = Get-Content -Path 'D:\projects\cmc\flowise-chatbox\auggie_shell_user_request.txt' -Raw
|
|
3
|
+
$originalUserRequest = Get-Content -Path 'D:\projects\cmc\flowise-chatbox\auggie_shell_user_request.txt' -Raw
|
|
4
|
+
Write-Host "---
|
|
5
|
+
$userRequest"
|
|
6
|
+
$userRequest | auggie --print - --compact --continue
|
|
7
|
+
Add-Content -Path (Join-Path (Split-Path $PSCommandPath) 'auggie_shell_conversation.txt') -Value "================================================================================`n[2025-12-04T08:03:02.060Z]`n$originalUserRequest`n"
|
|
8
|
+
Remove-Item $PSCommandPath -Force
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
================================================================================
|
|
2
|
+
[2025-12-04T08:00:17.940Z]
|
|
3
|
+
Cherry-pick/merge text-to-speech (TTS) and speech-to-text (STT) related code from branch `c-agent-embedding` to the current branch `vpcp-embedding`.
|
|
4
|
+
|
|
5
|
+
**Task:**
|
|
6
|
+
1. First, check current branch to confirm we're on `vpcp-embedding`
|
|
7
|
+
2. Examine the `c-agent-embedding` branch to identify all code related to:
|
|
8
|
+
- Text-to-speech (TTS) functionality - converting text responses to audio output
|
|
9
|
+
- Speech-to-text (STT) functionality - converting voice input to text
|
|
10
|
+
- Audio recording and playback
|
|
11
|
+
- Voice synthesis
|
|
12
|
+
- Any API integrations for speech services
|
|
13
|
+
3. Compare what TTS/STT features exist in `c-agent-embedding` but not in `vpcp-embedding`
|
|
14
|
+
4. Carefully merge/cherry-pick only the TTS and STT related code changes to the current branch
|
|
15
|
+
|
|
16
|
+
**Definition of Done:**
|
|
17
|
+
- All TTS and STT code from `c-agent-embedding` is successfully integrated into `vpcp-embedding` branch
|
|
18
|
+
- No unrelated code changes are included
|
|
19
|
+
- The code compiles without errors
|
|
20
|
+
- Run lint-fix and type-check to ensure code quality
|
|
21
|
+
|
|
22
|
+
Do not create or modify any markdown document files or code examples.
|
|
23
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Continue the previous task of cherry-picking TTS/STT code from `c-agent-embedding` to `vpcp-embedding`.
|
|
2
|
+
|
|
3
|
+
**Progress so far:**
|
|
4
|
+
- Created `src/utils/transcriptApi.ts` file
|
|
5
|
+
- Added import for transcriptApi to Bot.tsx
|
|
6
|
+
|
|
7
|
+
**Remaining work:**
|
|
8
|
+
1. Add `isVoiceChat` signal to Bot.tsx
|
|
9
|
+
2. Add TTS state signals (ttsEnabled, ttsError, etc.) and TTS-related variables (ttsWS, audioContext, etc.)
|
|
10
|
+
3. Add TTS functions: ttsConnect, ttsDisconnect, ttsStartNewStream, ttsFinalizeStream, ttsAddTokenToLine, ttsSendText
|
|
11
|
+
4. Add STT functions: handleTranscriptAudio, handleRecordingToText
|
|
12
|
+
5. Modify onRecordingStopped to use transcription and voice chat mode
|
|
13
|
+
6. Add voice chat UI toggle button in the UI
|
|
14
|
+
7. Run lint-fix and type-check to ensure code quality
|
|
15
|
+
|
|
16
|
+
**Definition of Done:**
|
|
17
|
+
- All TTS and STT code from `c-agent-embedding` is successfully integrated into `vpcp-embedding` branch
|
|
18
|
+
- The code compiles without errors
|
|
19
|
+
- Run lint-fix and type-check to ensure code quality
|
|
20
|
+
|
|
21
|
+
Do not create or modify any markdown document files or code examples.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare global {
|
|
3
|
+
namespace JSX {
|
|
4
|
+
interface IntrinsicElements {
|
|
5
|
+
'flowise-chatbot': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare const BubbleChat: (props: BubbleProps) => null;
|
|
10
|
+
//# sourceMappingURL=BubbleChat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BubbleChat.d.ts","sourceRoot":"","sources":["../src/BubbleChat.tsx"],"names":[],"mappings":";AAKA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CACxC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,WAAW,CACZ,CAAA;SACF;KACF;CACF;AAID,eAAO,MAAM,UAAU,8BAkCtB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { BotProps } from 'cmcts-c-agent-embedding';
|
|
3
|
+
type Props = BotProps & {
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
declare global {
|
|
8
|
+
namespace JSX {
|
|
9
|
+
interface IntrinsicElements {
|
|
10
|
+
'flowise-fullchatbot': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
|
|
11
|
+
class?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export declare const FullPageChat: ({ style, className, ...assignableProps }: Props) => JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=FullPageChat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FullPageChat.d.ts","sourceRoot":"","sources":["../src/FullPageChat.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAGvD,KAAK,KAAK,GAAG,QAAQ,GAAG;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,qBAAqB,EAAE,KAAK,CAAC,iBAAiB,CAC5C,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,WAAW,CACZ,GAAG;gBAAE,KAAK,CAAC,EAAE,MAAM,CAAA;aAAE,CAAA;SACvB;KACF;CACF;AAID,eAAO,MAAM,YAAY,6CAA8C,KAAK,gBAe3E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/components/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,KAAK,KAAK,GAAG;IACX,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,YAAY,EAAE,cAAc,GAAG,SAAS,CAAC;IACzC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAIF,eAAO,MAAM,KAAK,UAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/components/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,KAAK,KAAK,GAAG;IACX,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,YAAY,EAAE,cAAc,GAAG,SAAS,CAAC;IACzC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAIF,eAAO,MAAM,KAAK,UAAW,KAAK,mCAyFjC,CAAC"}
|
package/dist/components/Bot.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { FilePreview } from '@/components/inputs/textInput/components/FilePreview';
|
|
2
1
|
import { BotMessageTheme, DateTimeToggleTheme, DisclaimerPopUpTheme, FeedbackTheme, FooterTheme, TextInputTheme, UserMessageTheme } from '@/features/bubble/types';
|
|
3
2
|
import { FeedbackRatingType } from '@/queries/sendMessageQuery';
|
|
4
|
-
export type FileEvent<T = EventTarget> = {
|
|
5
|
-
target: T;
|
|
6
|
-
};
|
|
7
3
|
export type FormEvent<T = EventTarget> = {
|
|
8
4
|
preventDefault: () => void;
|
|
9
5
|
currentTarget: T;
|
|
@@ -19,20 +15,11 @@ export type UploadsConfig = {
|
|
|
19
15
|
isSpeechToTextEnabled: boolean;
|
|
20
16
|
isRAGFileUploadAllowed: boolean;
|
|
21
17
|
};
|
|
22
|
-
type FilePreviewData = string | ArrayBuffer;
|
|
23
|
-
type FilePreview = {
|
|
24
|
-
data: FilePreviewData;
|
|
25
|
-
mime: string;
|
|
26
|
-
name: string;
|
|
27
|
-
preview: string;
|
|
28
|
-
type: string;
|
|
29
|
-
};
|
|
30
18
|
type messageType = 'apiMessage' | 'userMessage' | 'usermessagewaiting' | 'leadCaptureMessage';
|
|
31
19
|
export type IAgentReasoning = {
|
|
32
20
|
agentName?: string;
|
|
33
21
|
messages?: string[];
|
|
34
22
|
usedTools?: any[];
|
|
35
|
-
artifacts?: FileUpload[];
|
|
36
23
|
sourceDocuments?: any[];
|
|
37
24
|
instructions?: string;
|
|
38
25
|
nextAgent?: string;
|
|
@@ -49,15 +36,12 @@ export type IAction = {
|
|
|
49
36
|
toolCalls: any[];
|
|
50
37
|
};
|
|
51
38
|
};
|
|
52
|
-
export type FileUpload = Omit<FilePreview, 'preview'>;
|
|
53
39
|
export type MessageType = {
|
|
54
40
|
messageId?: string;
|
|
55
41
|
message: string;
|
|
56
42
|
type: messageType;
|
|
57
43
|
sourceDocuments?: any;
|
|
58
44
|
fileAnnotations?: any;
|
|
59
|
-
fileUploads?: Partial<FileUpload>[];
|
|
60
|
-
artifacts?: Partial<FileUpload>[];
|
|
61
45
|
agentReasoning?: IAgentReasoning[];
|
|
62
46
|
usedTools?: any[];
|
|
63
47
|
action?: IAction | null;
|
|
@@ -109,9 +93,6 @@ export type BotProps = {
|
|
|
109
93
|
externalData?: string;
|
|
110
94
|
callBackFunction?: (e: any) => void;
|
|
111
95
|
callBackIcon?: string;
|
|
112
|
-
onToggleFullScreen?: () => void;
|
|
113
|
-
isFullScreen?: boolean;
|
|
114
|
-
onResetChat?: () => void;
|
|
115
96
|
};
|
|
116
97
|
export type LeadsConfig = {
|
|
117
98
|
status: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bot.d.ts","sourceRoot":"","sources":["../../src/components/Bot.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Bot.d.ts","sourceRoot":"","sources":["../../src/components/Bot.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,WAAW,EACX,cAAc,EACd,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,kBAAkB,EAOnB,MAAM,4BAA4B,CAAC;AAsBpC,MAAM,MAAM,SA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AO,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAKF,eAAO,MAAM,GAAG,aAAc,QAAQ,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,mCA0vE1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackContentDialog.d.ts","sourceRoot":"","sources":["../../src/components/FeedbackContentDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"FeedbackContentDialog.d.ts","sourceRoot":"","sources":["../../src/components/FeedbackContentDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAE1D,KAAK,0BAA0B,GAAG;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;CAC/B,CAAC;AAKF,QAAA,MAAM,qBAAqB,UAAW,0BAA0B,mCAuF/D,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatars/DefaultAvatar.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"DefaultAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatars/DefaultAvatar.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,sCAWzB,CAAC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { FileUpload } from '../Bot';
|
|
2
1
|
type Props = {
|
|
3
2
|
apiHost?: string;
|
|
4
3
|
chatflowid: string;
|
|
5
4
|
chatId: string;
|
|
6
5
|
agentName: string;
|
|
7
6
|
agentMessage: string;
|
|
8
|
-
agentArtifacts?: FileUpload[];
|
|
9
7
|
backgroundColor?: string;
|
|
10
8
|
textColor?: string;
|
|
11
9
|
fontSize?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentReasoningBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/AgentReasoningBubble.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AgentReasoningBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/AgentReasoningBubble.tsx"],"names":[],"mappings":"AAKA,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAMF,eAAO,MAAM,oBAAoB,UAAW,KAAK,mCAmChD,CAAC"}
|
|
@@ -29,6 +29,7 @@ type Props = {
|
|
|
29
29
|
callBackIcon?: string;
|
|
30
30
|
callBackFunction?: (e: any) => void;
|
|
31
31
|
checkShowCallbackBtn?: boolean;
|
|
32
|
+
setIsFeedbackDialogOpen?: (value: boolean) => void;
|
|
32
33
|
};
|
|
33
34
|
export declare const BotBubble: (props: Props) => import("solid-js").JSX.Element;
|
|
34
35
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BotBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/BotBubble.tsx"],"names":[],"mappings":"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