cmcts-c-agent-embedding 1.0.30 → 1.0.31-cagent
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/.eslintrc.cjs +1 -0
- package/.idea/{Flowise-share-chatbox.iml → flowise-chatbox.iml} +0 -1
- package/.idea/modules.xml +1 -2
- package/.idea/vcs.xml +5 -6
- package/AGENTS.md +166 -0
- package/README.md +349 -349
- package/auggie_shell_conversation.txt +32 -0
- package/auggie_shell_user_request.txt +29 -0
- package/dist/BubbleChat.d.ts +9 -12
- package/dist/BubbleChat.d.ts.map +1 -1
- package/dist/FullPageChat.d.ts +17 -17
- package/dist/components/Bot.d.ts +10 -0
- package/dist/components/Bot.d.ts.map +1 -1
- package/dist/components/FeedbackContentDialog.d.ts.map +1 -1
- package/dist/components/Toast.d.ts +10 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/bubbles/BotBubble.d.ts +7 -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/LoadingBubble.d.ts +7 -1
- 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/CopyMessageButton.d.ts +10 -0
- package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/EditMessageButton.d.ts +8 -0
- package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/PopupToast.d.ts +7 -0
- package/dist/components/buttons/PopupToast.d.ts.map +1 -0
- package/dist/components/buttons/SendButton.d.ts +1 -0
- package/dist/components/buttons/SendButton.d.ts.map +1 -1
- package/dist/components/dialogs/EditMessageDialog.d.ts +9 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
- package/dist/components/icons/AddImageIcon.d.ts.map +1 -1
- package/dist/components/icons/CheckIcon.d.ts +3 -0
- package/dist/components/icons/CheckIcon.d.ts.map +1 -0
- package/dist/components/icons/CopyIcon.d.ts +5 -0
- package/dist/components/icons/CopyIcon.d.ts.map +1 -0
- package/dist/components/icons/EditIcon.d.ts +5 -0
- package/dist/components/icons/EditIcon.d.ts.map +1 -0
- package/dist/components/icons/FullScreenIcon.d.ts +3 -0
- package/dist/components/icons/FullScreenIcon.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/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 +7 -0
- package/dist/components/icons/index.d.ts.map +1 -1
- package/dist/components/image/PreviewImage.d.ts +5 -0
- package/dist/components/image/PreviewImage.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts +4 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -1
- package/dist/components/inputs/textInput/components/TextInput.d.ts +16 -1
- 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/types.d.ts +1 -0
- package/dist/features/bubble/types.d.ts.map +1 -1
- package/dist/features/full/components/Full.d.ts.map +1 -1
- package/dist/features/popup/components/Popup.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/queries/sendMessageQuery.d.ts +19 -1
- 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 +4 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/textStreamSmoother.d.ts +40 -0
- package/dist/utils/textStreamSmoother.d.ts.map +1 -0
- package/dist/utils/transcriptApi.d.ts +8 -0
- package/dist/utils/transcriptApi.d.ts.map +1 -0
- package/dist/utils/ultimateJsonParser.d.ts +2 -0
- package/dist/utils/ultimateJsonParser.d.ts.map +1 -0
- package/dist/web.d.ts +4 -2
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +1 -1
- package/dist/window.d.ts +2 -1
- package/dist/window.d.ts.map +1 -1
- package/docs/chart-rendering-implementation-plan.md +565 -0
- package/package.json +10 -5
- package/public/index.html +6 -115
- package/server.js +401 -401
- package/.env +0 -36
- package/.husky/pre-commit +0 -18
- package/.idea/codeStyles/Project.xml +0 -60
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -16
- package/.idea/prettier.xml +0 -6
- package/a.json +0 -57
- package/bun.lockb +0 -0
- package/dist/components/ImageUploadButton.d.ts +0 -11
- package/dist/components/ImageUploadButton.d.ts.map +0 -1
- package/dist/components/RecordAudioButton.d.ts +0 -11
- package/dist/components/RecordAudioButton.d.ts.map +0 -1
- package/dist/components/SendButton.d.ts +0 -12
- package/dist/components/SendButton.d.ts.map +0 -1
- package/test.html +0 -17
package/public/index.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
NOTE: This .html file (and public folder) is optional and can be safely deleted.
|
|
3
3
|
It serves only as a demo/test page.
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
The chatbot can be embedded directly on any allowed domain using the embed script that
|
|
6
6
|
is generated when starting the server.
|
|
7
7
|
-->
|
|
@@ -22,21 +22,6 @@
|
|
|
22
22
|
<script type="module">
|
|
23
23
|
import Chatbot from './web.js';
|
|
24
24
|
|
|
25
|
-
const customStringify = (obj) => {
|
|
26
|
-
let stringified = JSON.stringify(obj, null, 4)
|
|
27
|
-
.replace(/"([^"]+)":/g, '$1:')
|
|
28
|
-
.replace(/: "([^"]+)"/g, (match, value) => (value.includes('<') ? `: "${value}"` : `: '${value}'`))
|
|
29
|
-
.replace(/: "(true|false|\d+)"/g, ': $1')
|
|
30
|
-
.replace(/customCSS: ""/g, 'customCSS: ``');
|
|
31
|
-
return stringified
|
|
32
|
-
.split('\n')
|
|
33
|
-
.map((line, index) => {
|
|
34
|
-
if (index === 0) return line;
|
|
35
|
-
return ' '.repeat(8) + line;
|
|
36
|
-
})
|
|
37
|
-
.join('\n');
|
|
38
|
-
};
|
|
39
|
-
|
|
40
25
|
// Example initialization:
|
|
41
26
|
// If your .env contains:
|
|
42
27
|
// agent1=xyz789-uvw456,https://example.com
|
|
@@ -48,106 +33,12 @@
|
|
|
48
33
|
// chatflowid: '6a63bb88-88f7-4c4d-805e-9c027c85707b', // or 'support', 'salesbot', etc.
|
|
49
34
|
// chatflowid: 'b573e66d-0e28-4798-8e4f-fbbaff8e236f', // or 'support', 'salesbot', etc.
|
|
50
35
|
// chatflowid: '7ee803b4-e3f8-4f33-bf85-ef9ab9d6f693', // or 'support', 'salesbot', etc.
|
|
51
|
-
chatflowid: '
|
|
52
|
-
|
|
53
|
-
// apiHost: 'https://
|
|
54
|
-
|
|
55
|
-
roomIds: {
|
|
56
|
-
'0123456789': 'Xa6HmhfbU5K73ZhHnspzKhqs',
|
|
57
|
-
},
|
|
58
|
-
theme: customStringify({
|
|
59
|
-
button: {
|
|
60
|
-
backgroundColor: '#3B81F6',
|
|
61
|
-
right: 20,
|
|
62
|
-
bottom: 20,
|
|
63
|
-
size: 48,
|
|
64
|
-
dragAndDrop: true,
|
|
65
|
-
iconColor: 'white',
|
|
66
|
-
customIconSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
|
|
67
|
-
autoWindowOpen: {
|
|
68
|
-
autoOpen: true,
|
|
69
|
-
openDelay: 2,
|
|
70
|
-
autoOpenOnMobile: false,
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
tooltip: {
|
|
74
|
-
showTooltip: true,
|
|
75
|
-
tooltipMessage: 'Hi There 👋!',
|
|
76
|
-
tooltipBackgroundColor: 'black',
|
|
77
|
-
tooltipTextColor: 'white',
|
|
78
|
-
tooltipFontSize: 16,
|
|
79
|
-
},
|
|
80
|
-
disclaimer: {
|
|
81
|
-
title: 'Disclaimer',
|
|
82
|
-
message: 'By using this chatbot, you agree to the <a target="_blank" href="https://flowiseai.com/terms">Terms & Condition</a>',
|
|
83
|
-
textColor: 'black',
|
|
84
|
-
buttonColor: '#3b82f6',
|
|
85
|
-
buttonText: 'Start Chatting',
|
|
86
|
-
buttonTextColor: 'white',
|
|
87
|
-
blurredBackgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
88
|
-
backgroundColor: 'white',
|
|
89
|
-
},
|
|
90
|
-
customCSS: ``,
|
|
91
|
-
chatWindow: {
|
|
92
|
-
showTitle: true,
|
|
93
|
-
showAgentMessages: true,
|
|
94
|
-
title: 'Agent Studio Bot',
|
|
95
|
-
titleAvatarSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
|
|
96
|
-
welcomeMessage: 'Hello! This is custom welcome message',
|
|
97
|
-
errorMessage: 'This is a custom error message',
|
|
98
|
-
backgroundColor: '#ffffff',
|
|
99
|
-
backgroundImage: 'enter image path or link',
|
|
100
|
-
height: 700,
|
|
101
|
-
width: 400,
|
|
102
|
-
fontSize: 16,
|
|
103
|
-
starterPrompts: ['What is a bot?', 'Who are you?'],
|
|
104
|
-
starterPromptFontSize: 15,
|
|
105
|
-
clearChatOnReload: false,
|
|
106
|
-
sourceDocsTitle: 'Sources:',
|
|
107
|
-
renderHTML: true,
|
|
108
|
-
botMessage: {
|
|
109
|
-
backgroundColor: '#f7f8ff',
|
|
110
|
-
textColor: '#303235',
|
|
111
|
-
showAvatar: true,
|
|
112
|
-
avatarSrc: 'https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/parroticon.png',
|
|
113
|
-
},
|
|
114
|
-
userMessage: {
|
|
115
|
-
backgroundColor: '#3B81F6',
|
|
116
|
-
textColor: '#ffffff',
|
|
117
|
-
showAvatar: true,
|
|
118
|
-
avatarSrc: 'https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/usericon.png',
|
|
119
|
-
},
|
|
120
|
-
textInput: {
|
|
121
|
-
placeholder: 'Type your question',
|
|
122
|
-
backgroundColor: '#ffffff',
|
|
123
|
-
textColor: '#303235',
|
|
124
|
-
sendButtonColor: '#3B81F6',
|
|
125
|
-
maxChars: 50,
|
|
126
|
-
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
|
|
127
|
-
autoFocus: true,
|
|
128
|
-
sendMessageSound: true,
|
|
129
|
-
sendSoundLocation: 'send_message.mp3',
|
|
130
|
-
receiveMessageSound: true,
|
|
131
|
-
receiveSoundLocation: 'receive_message.mp3',
|
|
132
|
-
},
|
|
133
|
-
feedback: {
|
|
134
|
-
color: '#303235',
|
|
135
|
-
},
|
|
136
|
-
dateTimeToggle: {
|
|
137
|
-
date: true,
|
|
138
|
-
time: true,
|
|
139
|
-
},
|
|
140
|
-
footer: {
|
|
141
|
-
textColor: '#303235',
|
|
142
|
-
text: 'Powered by',
|
|
143
|
-
company: 'Agent Studio',
|
|
144
|
-
// companyLink: 'https://flowiseai.com'
|
|
145
|
-
companyLink: '#',
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
}),
|
|
36
|
+
// chatflowid: '1dd678f5-85ed-440c-8800-33cea11c18b4', // or 'support', 'salesbot', etc.
|
|
37
|
+
chatflowid: '66571066-226a-49e8-80f8-f62b5300a3dc', // Thủ tướng, render chart: "Hãy phân tích doanh thu + lợi nhuận theo tháng cho năm 2025"
|
|
38
|
+
// apiHost: 'https://vib.cagent.cmcts.ai',
|
|
39
|
+
apiHost: 'https://stock.cmcts.ai/c-agent',
|
|
149
40
|
});
|
|
150
41
|
</script>
|
|
151
42
|
</body>
|
|
152
43
|
|
|
153
|
-
</html>
|
|
44
|
+
</html>
|