cmcts-c-agent-embedding 1.0.4 → 1.0.5-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/.env +5 -36
- package/.env.example +34 -34
- package/.eslintrc.cjs +14 -14
- package/.prettierignore +3 -3
- package/.prettierrc +8 -8
- package/base.json +21 -21
- 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 +5 -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/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/FeedbackButtons.d.ts +1 -0
- package/dist/components/buttons/FeedbackButtons.d.ts.map +1 -1
- 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/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 +4 -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/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/queries/sendMessageQuery.d.ts +47 -1
- package/dist/queries/sendMessageQuery.d.ts.map +1 -1
- package/dist/test/ScrollTest.d.ts +6 -0
- package/dist/test/ScrollTest.d.ts.map +1 -0
- package/dist/test/integrateBotScrollTest.d.ts +74 -0
- package/dist/test/integrateBotScrollTest.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/scrollTestUtils.d.ts +130 -0
- package/dist/utils/scrollTestUtils.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 +135 -134
- 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/BubbleChat.d.ts +0 -13
- package/dist/BubbleChat.d.ts.map +0 -1
- package/dist/FullPageChat.d.ts +0 -18
- package/dist/FullPageChat.d.ts.map +0 -1
- 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/dist/index.js +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;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,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;IACnB,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACnC,CAAC;AAIF,eAAO,MAAM,QAAQ,UAAW,QAAQ,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,SAMzD,CAAC;AAEF,eAAO,MAAM,IAAI,UAAW,QAAQ,SAOnC,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;sBAjCO,QAAQ,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE;kBAQ9B,QAAQ;;CA6BlC,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.5-cagent",
|
|
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
|
@@ -8,146 +8,147 @@
|
|
|
8
8
|
|
|
9
9
|
<!doctype html>
|
|
10
10
|
<html lang="en">
|
|
11
|
-
<head>
|
|
12
|
-
<meta charset="UTF-8" />
|
|
13
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
14
|
-
<title>Flowise Chatbot Widget</title>
|
|
15
|
-
</head>
|
|
16
11
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import Chatbot from './web.js';
|
|
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>
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return stringified
|
|
31
|
-
.split('\n')
|
|
32
|
-
.map((line, index) => {
|
|
33
|
-
if (index === 0) return line;
|
|
34
|
-
return ' '.repeat(8) + line;
|
|
35
|
-
})
|
|
36
|
-
.join('\n');
|
|
37
|
-
};
|
|
18
|
+
<body>
|
|
19
|
+
<!-- <div id="root">
|
|
20
|
+
<flowise-fullchatbot></flowise-fullchatbot>
|
|
21
|
+
</div> -->
|
|
22
|
+
<script type="module">
|
|
23
|
+
import Chatbot from './web.js';
|
|
38
24
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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: '529479a0-d808-4b73-8d32-102ba4ac2216', // or 'support', 'salesbot', etc.
|
|
52
|
+
// apiHost: 'https://vib.cagent.cmcts.ai',
|
|
53
|
+
apiHost: 'https://stock.cmcts.ai/c-agent',
|
|
54
|
+
chatwootUrl: 'https://livechat.cagent.cmcts.ai',
|
|
55
|
+
roomIds: {
|
|
56
|
+
'0123456789': 'Xa6HmhfbU5K73ZhHnspzKhqs',
|
|
57
|
+
},
|
|
58
|
+
onResetChat: () => { console.log('reset chat') },
|
|
59
|
+
theme: customStringify({
|
|
60
|
+
button: {
|
|
61
|
+
backgroundColor: '#3B81F6',
|
|
62
|
+
right: 20,
|
|
63
|
+
bottom: 20,
|
|
64
|
+
size: 48,
|
|
65
|
+
dragAndDrop: true,
|
|
66
|
+
iconColor: 'white',
|
|
67
|
+
customIconSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
|
|
68
|
+
autoWindowOpen: {
|
|
69
|
+
autoOpen: true,
|
|
70
|
+
openDelay: 2,
|
|
71
|
+
autoOpenOnMobile: false,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
tooltip: {
|
|
75
|
+
showTooltip: true,
|
|
76
|
+
tooltipMessage: 'Hi There 👋!',
|
|
77
|
+
tooltipBackgroundColor: 'black',
|
|
78
|
+
tooltipTextColor: 'white',
|
|
79
|
+
tooltipFontSize: 16,
|
|
58
80
|
},
|
|
59
|
-
|
|
60
|
-
|
|
81
|
+
disclaimer: {
|
|
82
|
+
title: 'Disclaimer',
|
|
83
|
+
message: 'By using this chatbot, you agree to the <a target="_blank" href="https://flowiseai.com/terms">Terms & Condition</a>',
|
|
84
|
+
textColor: 'black',
|
|
85
|
+
buttonColor: '#3b82f6',
|
|
86
|
+
buttonText: 'Start Chatting',
|
|
87
|
+
buttonTextColor: 'white',
|
|
88
|
+
blurredBackgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
89
|
+
backgroundColor: 'white',
|
|
90
|
+
},
|
|
91
|
+
customCSS: ``,
|
|
92
|
+
chatWindow: {
|
|
93
|
+
showTitle: true,
|
|
94
|
+
showAgentMessages: true,
|
|
95
|
+
title: 'Agent Studio Bot',
|
|
96
|
+
titleAvatarSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
|
|
97
|
+
welcomeMessage: 'Hello! This is custom welcome message',
|
|
98
|
+
errorMessage: 'This is a custom error message',
|
|
99
|
+
backgroundColor: '#ffffff',
|
|
100
|
+
backgroundImage: 'enter image path or link',
|
|
101
|
+
height: 700,
|
|
102
|
+
width: 400,
|
|
103
|
+
fontSize: 16,
|
|
104
|
+
starterPrompts: ['What is a bot?', 'Who are you?'],
|
|
105
|
+
starterPromptFontSize: 15,
|
|
106
|
+
clearChatOnReload: false,
|
|
107
|
+
sourceDocsTitle: 'Sources:',
|
|
108
|
+
renderHTML: true,
|
|
109
|
+
botMessage: {
|
|
110
|
+
backgroundColor: '#f7f8ff',
|
|
111
|
+
textColor: '#303235',
|
|
112
|
+
showAvatar: true,
|
|
113
|
+
avatarSrc: 'https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/parroticon.png',
|
|
114
|
+
},
|
|
115
|
+
userMessage: {
|
|
61
116
|
backgroundColor: '#3B81F6',
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
dragAndDrop: true,
|
|
66
|
-
iconColor: 'white',
|
|
67
|
-
customIconSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
|
|
68
|
-
autoWindowOpen: {
|
|
69
|
-
autoOpen: true,
|
|
70
|
-
openDelay: 2,
|
|
71
|
-
autoOpenOnMobile: false,
|
|
72
|
-
},
|
|
117
|
+
textColor: '#ffffff',
|
|
118
|
+
showAvatar: true,
|
|
119
|
+
avatarSrc: 'https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/usericon.png',
|
|
73
120
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
121
|
+
textInput: {
|
|
122
|
+
placeholder: 'Type your question',
|
|
123
|
+
backgroundColor: '#ffffff',
|
|
124
|
+
textColor: '#303235',
|
|
125
|
+
sendButtonColor: '#3B81F6',
|
|
126
|
+
maxChars: 50,
|
|
127
|
+
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
|
|
128
|
+
autoFocus: true,
|
|
129
|
+
sendMessageSound: true,
|
|
130
|
+
sendSoundLocation: 'send_message.mp3',
|
|
131
|
+
receiveMessageSound: true,
|
|
132
|
+
receiveSoundLocation: 'receive_message.mp3',
|
|
80
133
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
message: 'By using this chatbot, you agree to the <a target="_blank" href="https://flowiseai.com/terms">Terms & Condition</a>',
|
|
84
|
-
textColor: 'black',
|
|
85
|
-
buttonColor: '#3b82f6',
|
|
86
|
-
buttonText: 'Start Chatting',
|
|
87
|
-
buttonTextColor: 'white',
|
|
88
|
-
blurredBackgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
89
|
-
backgroundColor: 'white',
|
|
134
|
+
feedback: {
|
|
135
|
+
color: '#303235',
|
|
90
136
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
height: 700,
|
|
102
|
-
width: 400,
|
|
103
|
-
fontSize: 16,
|
|
104
|
-
starterPrompts: ['What is a bot?', 'Who are you?'],
|
|
105
|
-
starterPromptFontSize: 15,
|
|
106
|
-
clearChatOnReload: false,
|
|
107
|
-
sourceDocsTitle: 'Sources:',
|
|
108
|
-
renderHTML: true,
|
|
109
|
-
botMessage: {
|
|
110
|
-
backgroundColor: '#f7f8ff',
|
|
111
|
-
textColor: '#303235',
|
|
112
|
-
showAvatar: true,
|
|
113
|
-
avatarSrc: 'https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/parroticon.png',
|
|
114
|
-
},
|
|
115
|
-
userMessage: {
|
|
116
|
-
backgroundColor: '#3B81F6',
|
|
117
|
-
textColor: '#ffffff',
|
|
118
|
-
showAvatar: true,
|
|
119
|
-
avatarSrc: 'https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/usericon.png',
|
|
120
|
-
},
|
|
121
|
-
textInput: {
|
|
122
|
-
placeholder: 'Type your question',
|
|
123
|
-
backgroundColor: '#ffffff',
|
|
124
|
-
textColor: '#303235',
|
|
125
|
-
sendButtonColor: '#3B81F6',
|
|
126
|
-
maxChars: 50,
|
|
127
|
-
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
|
|
128
|
-
autoFocus: true,
|
|
129
|
-
sendMessageSound: true,
|
|
130
|
-
sendSoundLocation: 'send_message.mp3',
|
|
131
|
-
receiveMessageSound: true,
|
|
132
|
-
receiveSoundLocation: 'receive_message.mp3',
|
|
133
|
-
},
|
|
134
|
-
feedback: {
|
|
135
|
-
color: '#303235',
|
|
136
|
-
},
|
|
137
|
-
dateTimeToggle: {
|
|
138
|
-
date: true,
|
|
139
|
-
time: true,
|
|
140
|
-
},
|
|
141
|
-
footer: {
|
|
142
|
-
textColor: '#303235',
|
|
143
|
-
text: 'Powered by',
|
|
144
|
-
company: 'Agent Studio',
|
|
145
|
-
// companyLink: 'https://flowiseai.com'
|
|
146
|
-
companyLink: '#',
|
|
147
|
-
},
|
|
137
|
+
dateTimeToggle: {
|
|
138
|
+
date: true,
|
|
139
|
+
time: true,
|
|
140
|
+
},
|
|
141
|
+
footer: {
|
|
142
|
+
textColor: '#303235',
|
|
143
|
+
text: 'Powered by',
|
|
144
|
+
company: 'Agent Studio',
|
|
145
|
+
// companyLink: 'https://flowiseai.com'
|
|
146
|
+
companyLink: '#',
|
|
148
147
|
},
|
|
149
|
-
}
|
|
150
|
-
})
|
|
151
|
-
|
|
152
|
-
</
|
|
153
|
-
</
|
|
148
|
+
},
|
|
149
|
+
}),
|
|
150
|
+
});
|
|
151
|
+
</script>
|
|
152
|
+
</body>
|
|
153
|
+
|
|
154
|
+
</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