cmcts-c-agent-embedding 1.0.3 → 1.0.4-cmcuni
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 +2 -36
- package/.env.example +34 -34
- package/.eslintrc.cjs +14 -14
- package/.prettierignore +3 -3
- package/.prettierrc +8 -8
- package/README.md +1 -1
- package/base.json +21 -21
- package/dist/BubbleChat.d.ts +12 -12
- 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 +3 -0
- 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 +6 -0
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -1
- package/dist/components/bubbles/GuestBubble.d.ts.map +1 -1
- 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 +1 -0
- package/dist/components/bubbles/SourceBubble.d.ts.map +1 -1
- package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -1
- package/dist/components/buttons/FeedbackButtons.d.ts +1 -0
- package/dist/components/buttons/FeedbackButtons.d.ts.map +1 -1
- package/dist/components/buttons/SendButton.d.ts +1 -0
- 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/FullScreenIcon.d.ts +3 -0
- package/dist/components/icons/FullScreenIcon.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/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/ThumbsDownIcon.d.ts +3 -1
- package/dist/components/icons/ThumbsDownIcon.d.ts.map +1 -1
- package/dist/components/icons/ThumbsUpIcon.d.ts +3 -1
- package/dist/components/icons/ThumbsUpIcon.d.ts.map +1 -1
- package/dist/components/icons/index.d.ts +1 -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 +3 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -1
- package/dist/components/inputs/textInput/components/TextInput.d.ts +19 -3
- package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -1
- package/dist/components/mobile/MobileWelcomeScreen.d.ts +13 -0
- package/dist/components/mobile/MobileWelcomeScreen.d.ts.map +1 -0
- 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/hooks/useMobileDetection.d.ts +52 -0
- package/dist/hooks/useMobileDetection.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/queries/sendMessageQuery.d.ts +37 -1
- package/dist/queries/sendMessageQuery.d.ts.map +1 -1
- package/dist/test-markdown-component.d.ts +2 -0
- package/dist/test-markdown-component.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/mobileUtils.d.ts +32 -0
- package/dist/utils/mobileUtils.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 -0
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +1 -1
- package/dist/window.d.ts +2 -0
- package/dist/window.d.ts.map +1 -1
- package/package.json +81 -77
- package/public/index.html +58 -146
- package/.husky/pre-commit +0 -18
- package/.idea/Flowise-share-chatbox.iml +0 -12
- package/.idea/codeStyles/Project.xml +0 -60
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -16
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.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/dist/window.d.ts
CHANGED
package/dist/window.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../src/window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,KAAK,QAAQ,GAAG;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../src/window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,KAAK,QAAQ,GAAG;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAIF,eAAO,MAAM,QAAQ,UAAW,QAAQ,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,SAMzD,CAAC;AAEF,eAAO,MAAM,IAAI,UAAW,QAAQ,SAMnC,CAAC;AAEF,eAAO,MAAM,OAAO,YAEnB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,OAAO,QAAQ,CAAC;IAC1B,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,OAAO,CAAC;CACzB,CAAC;AAQF,eAAO,MAAM,YAAY;sBAhCO,QAAQ,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE;kBAQ9B,QAAQ;;CA4BlC,CAAC;AAEH,eAAO,MAAM,qBAAqB,QAAS,OAAO,SAGjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,77 +1,81 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "cmcts-c-agent-embedding",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Javascript library to display flowise chatbot on your website",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"dev": "cross-env NODE_ENV=development rollup --watch --config rollup.config.js",
|
|
10
|
-
"build": "cross-env NODE_ENV=production rollup --config rollup.config.js",
|
|
11
|
-
"
|
|
12
|
-
"lint
|
|
13
|
-
"
|
|
14
|
-
"format
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"@
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"@
|
|
46
|
-
"@rollup/plugin-
|
|
47
|
-
"@rollup/plugin-
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"eslint": "^
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"eslint
|
|
62
|
-
"eslint-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"react": "
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"rollup
|
|
71
|
-
"rollup-plugin-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "cmcts-c-agent-embedding",
|
|
3
|
+
"version": "1.0.4-cmcuni",
|
|
4
|
+
"description": "Javascript library to display flowise chatbot on your website",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "cross-env NODE_ENV=development rollup --watch --config rollup.config.js",
|
|
10
|
+
"build": "cross-env NODE_ENV=production rollup --config rollup.config.js",
|
|
11
|
+
"type-check": "tsc --noEmit",
|
|
12
|
+
"lint": "eslint \"src/**/*.ts*\"",
|
|
13
|
+
"lint-fix": "eslint --fix \"src/**/*.ts*\"",
|
|
14
|
+
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
|
|
15
|
+
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
|
|
16
|
+
"prepare": "husky install",
|
|
17
|
+
"start": "node server.js",
|
|
18
|
+
"build-and-publish": "yarn build && npm publish"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@babel/core": "^7.22.1",
|
|
23
|
+
"@microsoft/fetch-event-source": "^2.0.1",
|
|
24
|
+
"@ts-stack/markdown": "^1.4.0",
|
|
25
|
+
"@types/pdfjs-dist": "^2.10.378",
|
|
26
|
+
"axios": "^1.7.7",
|
|
27
|
+
"c-agent-embedding": "^1.0.4",
|
|
28
|
+
"c-agent-embedding-react": "^1.0.1",
|
|
29
|
+
"cors": "^2.8.5",
|
|
30
|
+
"cross-env": "^7.0.3",
|
|
31
|
+
"device-detector-js": "^3.0.3",
|
|
32
|
+
"dotenv": "^16.4.5",
|
|
33
|
+
"express": "^4.21.1",
|
|
34
|
+
"form-data": "^4.0.1",
|
|
35
|
+
"lodash": "^4.17.21",
|
|
36
|
+
"multer": "^1.4.5-lts.1",
|
|
37
|
+
"node-fetch": "^3.3.2",
|
|
38
|
+
"pdfjs-dist": "3.11.174",
|
|
39
|
+
"prettier": "^3.4.2",
|
|
40
|
+
"solid-element": "1.7.0",
|
|
41
|
+
"solid-js": "1.7.1",
|
|
42
|
+
"zod": "^3.22.4"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@babel/preset-typescript": "7.21.4",
|
|
46
|
+
"@rollup/plugin-babel": "6.0.3",
|
|
47
|
+
"@rollup/plugin-commonjs": "^25.0.0",
|
|
48
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
49
|
+
"@rollup/plugin-node-resolve": "15.0.1",
|
|
50
|
+
"@rollup/plugin-terser": "0.4.0",
|
|
51
|
+
"@rollup/plugin-typescript": "11.0.0",
|
|
52
|
+
"@tailwindcss/typography": "^0.5.10",
|
|
53
|
+
"@types/lodash": "^4.14.195",
|
|
54
|
+
"@types/node": "18.15.11",
|
|
55
|
+
"@types/uuid": "^8.3.4",
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^5.57.0",
|
|
57
|
+
"@typescript-eslint/parser": "^5.57.0",
|
|
58
|
+
"autoprefixer": "10.4.14",
|
|
59
|
+
"babel-plugin-lodash": "^3.3.4",
|
|
60
|
+
"babel-preset-solid": "1.7.1",
|
|
61
|
+
"eslint": "^8.24.0",
|
|
62
|
+
"eslint-config-next": "13.2.4",
|
|
63
|
+
"eslint-config-prettier": "^9.0.0",
|
|
64
|
+
"eslint-plugin-prettier": "^5.0.1",
|
|
65
|
+
"eslint-plugin-react": "^7.26.1",
|
|
66
|
+
"eslint-plugin-solid": "0.12.0",
|
|
67
|
+
"husky": "^8.0.0",
|
|
68
|
+
"postcss": "8.4.21",
|
|
69
|
+
"react": "18.2.0",
|
|
70
|
+
"rollup": "3.23.0",
|
|
71
|
+
"rollup-plugin-livereload": "2.0.5",
|
|
72
|
+
"rollup-plugin-postcss": "4.0.2",
|
|
73
|
+
"rollup-plugin-serve": "2.0.2",
|
|
74
|
+
"rollup-plugin-typescript-paths": "1.4.0",
|
|
75
|
+
"rollup-plugin-uglify": "^6.0.4",
|
|
76
|
+
"tailwindcss": "3.3.1",
|
|
77
|
+
"typescript": "5.0.3",
|
|
78
|
+
"uuid": "^9.0.1"
|
|
79
|
+
},
|
|
80
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
81
|
+
}
|
package/public/index.html
CHANGED
|
@@ -1,146 +1,58 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
NOTE: This .html file (and public folder) is optional and can be safely deleted.
|
|
3
|
-
It serves only as a demo/test page.
|
|
4
|
-
|
|
5
|
-
The chatbot can be embedded directly on any allowed domain using the embed script that
|
|
6
|
-
is generated when starting the server.
|
|
7
|
-
-->
|
|
8
|
-
|
|
9
|
-
<!doctype html>
|
|
10
|
-
<html lang="en">
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
iconColor: 'white',
|
|
60
|
-
customIconSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
|
|
61
|
-
autoWindowOpen: {
|
|
62
|
-
autoOpen: true,
|
|
63
|
-
openDelay: 2,
|
|
64
|
-
autoOpenOnMobile: false,
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
tooltip: {
|
|
68
|
-
showTooltip: true,
|
|
69
|
-
tooltipMessage: 'Hi There 👋!',
|
|
70
|
-
tooltipBackgroundColor: 'black',
|
|
71
|
-
tooltipTextColor: 'white',
|
|
72
|
-
tooltipFontSize: 16,
|
|
73
|
-
},
|
|
74
|
-
disclaimer: {
|
|
75
|
-
title: 'Disclaimer',
|
|
76
|
-
message: 'By using this chatbot, you agree to the <a target="_blank" href="https://flowiseai.com/terms">Terms & Condition</a>',
|
|
77
|
-
textColor: 'black',
|
|
78
|
-
buttonColor: '#3b82f6',
|
|
79
|
-
buttonText: 'Start Chatting',
|
|
80
|
-
buttonTextColor: 'white',
|
|
81
|
-
blurredBackgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
82
|
-
backgroundColor: 'white',
|
|
83
|
-
},
|
|
84
|
-
customCSS: ``,
|
|
85
|
-
chatWindow: {
|
|
86
|
-
showTitle: true,
|
|
87
|
-
showAgentMessages: true,
|
|
88
|
-
title: 'Agent Studio Bot',
|
|
89
|
-
titleAvatarSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
|
|
90
|
-
welcomeMessage: 'Hello! This is custom welcome message',
|
|
91
|
-
errorMessage: 'This is a custom error message',
|
|
92
|
-
backgroundColor: '#ffffff',
|
|
93
|
-
backgroundImage: 'enter image path or link',
|
|
94
|
-
height: 700,
|
|
95
|
-
width: 400,
|
|
96
|
-
fontSize: 16,
|
|
97
|
-
starterPrompts: ['What is a bot?', 'Who are you?'],
|
|
98
|
-
starterPromptFontSize: 15,
|
|
99
|
-
clearChatOnReload: false,
|
|
100
|
-
sourceDocsTitle: 'Sources:',
|
|
101
|
-
renderHTML: true,
|
|
102
|
-
botMessage: {
|
|
103
|
-
backgroundColor: '#f7f8ff',
|
|
104
|
-
textColor: '#303235',
|
|
105
|
-
showAvatar: true,
|
|
106
|
-
avatarSrc: 'https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/parroticon.png',
|
|
107
|
-
},
|
|
108
|
-
userMessage: {
|
|
109
|
-
backgroundColor: '#3B81F6',
|
|
110
|
-
textColor: '#ffffff',
|
|
111
|
-
showAvatar: true,
|
|
112
|
-
avatarSrc: 'https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/usericon.png',
|
|
113
|
-
},
|
|
114
|
-
textInput: {
|
|
115
|
-
placeholder: 'Type your question',
|
|
116
|
-
backgroundColor: '#ffffff',
|
|
117
|
-
textColor: '#303235',
|
|
118
|
-
sendButtonColor: '#3B81F6',
|
|
119
|
-
maxChars: 50,
|
|
120
|
-
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
|
|
121
|
-
autoFocus: true,
|
|
122
|
-
sendMessageSound: true,
|
|
123
|
-
sendSoundLocation: 'send_message.mp3',
|
|
124
|
-
receiveMessageSound: true,
|
|
125
|
-
receiveSoundLocation: 'receive_message.mp3',
|
|
126
|
-
},
|
|
127
|
-
feedback: {
|
|
128
|
-
color: '#303235',
|
|
129
|
-
},
|
|
130
|
-
dateTimeToggle: {
|
|
131
|
-
date: true,
|
|
132
|
-
time: true,
|
|
133
|
-
},
|
|
134
|
-
footer: {
|
|
135
|
-
textColor: '#303235',
|
|
136
|
-
text: 'Powered by',
|
|
137
|
-
company: 'Agent Studio',
|
|
138
|
-
// companyLink: 'https://flowiseai.com'
|
|
139
|
-
companyLink: '#',
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
}),
|
|
143
|
-
});
|
|
144
|
-
</script>
|
|
145
|
-
</body>
|
|
146
|
-
</html>
|
|
1
|
+
<!--
|
|
2
|
+
NOTE: This .html file (and public folder) is optional and can be safely deleted.
|
|
3
|
+
It serves only as a demo/test page.
|
|
4
|
+
|
|
5
|
+
The chatbot can be embedded directly on any allowed domain using the embed script that
|
|
6
|
+
is generated when starting the server.
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<!doctype html>
|
|
10
|
+
<html lang="en">
|
|
11
|
+
|
|
12
|
+
<head>
|
|
13
|
+
<meta charset="UTF-8" />
|
|
14
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
15
|
+
<title>Flowise Chatbot Widget</title>
|
|
16
|
+
</head>
|
|
17
|
+
|
|
18
|
+
<body>
|
|
19
|
+
<!-- <div id="root">
|
|
20
|
+
<flowise-fullchatbot></flowise-fullchatbot>
|
|
21
|
+
</div> -->
|
|
22
|
+
<script type="module">
|
|
23
|
+
import Chatbot from './web.js';
|
|
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
|
+
// Example initialization:
|
|
41
|
+
// If your .env contains:
|
|
42
|
+
// agent1=xyz789-uvw456,https://example.com
|
|
43
|
+
// support=abc123-def456,https://example.com
|
|
44
|
+
// salesbot=ghi123-jkl456,https://example.com
|
|
45
|
+
//
|
|
46
|
+
// Then use the environment variable name as chatflowid:
|
|
47
|
+
Chatbot.init({
|
|
48
|
+
// chatflowid: '6a63bb88-88f7-4c4d-805e-9c027c85707b', // or 'support', 'salesbot', etc.
|
|
49
|
+
// chatflowid: 'b573e66d-0e28-4798-8e4f-fbbaff8e236f', // or 'support', 'salesbot', etc.
|
|
50
|
+
// chatflowid: '7ee803b4-e3f8-4f33-bf85-ef9ab9d6f693', // or 'support', 'salesbot', etc.
|
|
51
|
+
chatflowid: '226da69f-74ed-4250-b754-a388e57b2877', // or 'support', 'salesbot', etc.
|
|
52
|
+
apiHost: 'https://cmc-uni.cagent.cmcts.ai',
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
</script>
|
|
56
|
+
</body>
|
|
57
|
+
|
|
58
|
+
</html>
|
package/.husky/pre-commit
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
-
|
|
4
|
-
set -e # Exit on any error
|
|
5
|
-
|
|
6
|
-
echo "Running ESLint for linting..."
|
|
7
|
-
npm run lint
|
|
8
|
-
|
|
9
|
-
echo "Running ESLint for fixing issues..."
|
|
10
|
-
npm run lint-fix
|
|
11
|
-
|
|
12
|
-
echo "Formatting code..."
|
|
13
|
-
npm run format
|
|
14
|
-
|
|
15
|
-
echo "Checking formatting..."
|
|
16
|
-
npm run format:check
|
|
17
|
-
|
|
18
|
-
echo "Pre-commit checks passed."
|
|
@@ -1,12 +0,0 @@
|
|
|
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>
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
-
<code_scheme name="Project" version="173">
|
|
3
|
-
<option name="LINE_SEPARATOR" value=" " />
|
|
4
|
-
<HTMLCodeStyleSettings>
|
|
5
|
-
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
6
|
-
</HTMLCodeStyleSettings>
|
|
7
|
-
<JSCodeStyleSettings version="0">
|
|
8
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
9
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
10
|
-
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
11
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
12
|
-
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
13
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
14
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
15
|
-
</JSCodeStyleSettings>
|
|
16
|
-
<TypeScriptCodeStyleSettings version="0">
|
|
17
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
18
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
19
|
-
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
20
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
21
|
-
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
22
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
23
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
24
|
-
</TypeScriptCodeStyleSettings>
|
|
25
|
-
<VueCodeStyleSettings>
|
|
26
|
-
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
|
27
|
-
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
|
28
|
-
</VueCodeStyleSettings>
|
|
29
|
-
<codeStyleSettings language="HTML">
|
|
30
|
-
<option name="SOFT_MARGINS" value="150" />
|
|
31
|
-
<indentOptions>
|
|
32
|
-
<option name="INDENT_SIZE" value="2" />
|
|
33
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
34
|
-
<option name="TAB_SIZE" value="2" />
|
|
35
|
-
</indentOptions>
|
|
36
|
-
</codeStyleSettings>
|
|
37
|
-
<codeStyleSettings language="JavaScript">
|
|
38
|
-
<option name="SOFT_MARGINS" value="150" />
|
|
39
|
-
<indentOptions>
|
|
40
|
-
<option name="INDENT_SIZE" value="2" />
|
|
41
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
42
|
-
<option name="TAB_SIZE" value="2" />
|
|
43
|
-
</indentOptions>
|
|
44
|
-
</codeStyleSettings>
|
|
45
|
-
<codeStyleSettings language="TypeScript">
|
|
46
|
-
<option name="SOFT_MARGINS" value="150" />
|
|
47
|
-
<indentOptions>
|
|
48
|
-
<option name="INDENT_SIZE" value="2" />
|
|
49
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
50
|
-
<option name="TAB_SIZE" value="2" />
|
|
51
|
-
</indentOptions>
|
|
52
|
-
</codeStyleSettings>
|
|
53
|
-
<codeStyleSettings language="Vue">
|
|
54
|
-
<option name="SOFT_MARGINS" value="150" />
|
|
55
|
-
<indentOptions>
|
|
56
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
57
|
-
</indentOptions>
|
|
58
|
-
</codeStyleSettings>
|
|
59
|
-
</code_scheme>
|
|
60
|
-
</component>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<component name="InspectionProjectProfileManager">
|
|
2
|
-
<profile version="1.0">
|
|
3
|
-
<option name="myName" value="Project Default" />
|
|
4
|
-
<inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
|
|
5
|
-
<option name="myValues">
|
|
6
|
-
<value>
|
|
7
|
-
<list size="1">
|
|
8
|
-
<item index="0" class="java.lang.String" itemvalue="className" />
|
|
9
|
-
</list>
|
|
10
|
-
</value>
|
|
11
|
-
</option>
|
|
12
|
-
<option name="myCustomValuesEnabled" value="true" />
|
|
13
|
-
</inspection_tool>
|
|
14
|
-
<inspection_tool class="JSXNamespaceValidation" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
|
15
|
-
</profile>
|
|
16
|
-
</component>
|
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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-share-chatbox.iml" filepath="$PROJECT_DIR$/.idea/Flowise-share-chatbox.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/.idea/prettier.xml
DELETED
package/.idea/vcs.xml
DELETED
package/a.json
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"agentName": "question_analyzer",
|
|
4
|
-
"messages": [
|
|
5
|
-
"{\"sub_requests\":[\"gọi tư vấn viên\"],\"convesation_related\":true,\"worker_call\":false,\"name\":\"Van dong\",\"phone_number\":\"0376561156\",\"human_support\":true,\"unsatisfied_times\":0}"
|
|
6
|
-
],
|
|
7
|
-
"usedTools": [
|
|
8
|
-
null
|
|
9
|
-
],
|
|
10
|
-
"sourceDocuments": [
|
|
11
|
-
null
|
|
12
|
-
],
|
|
13
|
-
"artifacts": [
|
|
14
|
-
null
|
|
15
|
-
],
|
|
16
|
-
"state": {
|
|
17
|
-
"worker_call": false,
|
|
18
|
-
"sub_requests": [
|
|
19
|
-
"gọi tư vấn viên"
|
|
20
|
-
],
|
|
21
|
-
"current_date": "Thursday, December 26, 2024 at 05:11 AM UTC",
|
|
22
|
-
"name": "Van dong",
|
|
23
|
-
"phone_number": "0376561156",
|
|
24
|
-
"human_support": true
|
|
25
|
-
},
|
|
26
|
-
"nodeName": "seqLLMNode",
|
|
27
|
-
"nodeId": "seqLLMNode_0"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"agentName": "check_call_CMC_worker",
|
|
31
|
-
"messages": [
|
|
32
|
-
"human_router"
|
|
33
|
-
],
|
|
34
|
-
"nodeName": "seqCondition",
|
|
35
|
-
"nodeId": "seqCondition_0"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"agentName": "human_router",
|
|
39
|
-
"messages": [
|
|
40
|
-
"{\"assistant_phone_number\":\"034567812\",\"assistant_name\":\"Huy - Tư vấn viên học phí, học bổng\"}"
|
|
41
|
-
],
|
|
42
|
-
"usedTools": [
|
|
43
|
-
null
|
|
44
|
-
],
|
|
45
|
-
"sourceDocuments": [
|
|
46
|
-
null
|
|
47
|
-
],
|
|
48
|
-
"artifacts": [
|
|
49
|
-
null
|
|
50
|
-
],
|
|
51
|
-
"state": {
|
|
52
|
-
"human_support": false
|
|
53
|
-
},
|
|
54
|
-
"nodeName": "seqLLMNode",
|
|
55
|
-
"nodeId": "seqLLMNode_3"
|
|
56
|
-
}
|
|
57
|
-
]
|
package/bun.lockb
DELETED
|
Binary file
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { JSX } from 'solid-js/jsx-runtime';
|
|
2
|
-
type ImageUploadButtonProps = {
|
|
3
|
-
buttonColor?: string;
|
|
4
|
-
isDisabled?: boolean;
|
|
5
|
-
isLoading?: boolean;
|
|
6
|
-
disableIcon?: boolean;
|
|
7
|
-
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
8
|
-
export declare const ImageUploadButton: (props: ImageUploadButtonProps) => JSX.Element;
|
|
9
|
-
export declare const Spinner: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=ImageUploadButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ImageUploadButton.d.ts","sourceRoot":"","sources":["../../src/components/ImageUploadButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAG3C,KAAK,sBAAsB,GAAG;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEhD,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,gBAiB9D,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,IAAI,gBAAgB,CAAC,aAAa,CAAC,gBAgBjE,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { JSX } from 'solid-js/jsx-runtime';
|
|
2
|
-
type RecordAudioButtonProps = {
|
|
3
|
-
buttonColor?: string;
|
|
4
|
-
isDisabled?: boolean;
|
|
5
|
-
isLoading?: boolean;
|
|
6
|
-
disableIcon?: boolean;
|
|
7
|
-
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
8
|
-
export declare const RecordAudioButton: (props: RecordAudioButtonProps) => JSX.Element;
|
|
9
|
-
export declare const Spinner: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=RecordAudioButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecordAudioButton.d.ts","sourceRoot":"","sources":["../../src/components/RecordAudioButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAG3C,KAAK,sBAAsB,GAAG;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEhD,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,gBAiB9D,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,IAAI,gBAAgB,CAAC,aAAa,CAAC,gBAgBjE,CAAC"}
|