cmcts-c-agent-embedding 1.0.2 → 1.0.3-cagent-ask-hr
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/.augment/agents/CODE.toml +22 -0
- package/.augment/agents/COMMIT.toml +38 -0
- package/.augment/agents/DEEPDIVE.toml +18 -0
- package/.env +3 -5
- package/.eslintrc.cjs +1 -0
- package/.idea/AugmentWebviewStateStore.xml +10 -0
- package/.idea/codeStyles/Project.xml +3 -0
- package/.idea/inspectionProfiles/Project_Default.xml +1 -11
- package/.idea/modules.xml +1 -1
- package/.idea/vcs.xml +5 -5
- package/AGENT.md +43 -0
- package/README.md +349 -349
- package/dist/components/Bot.d.ts +11 -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/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 +4 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -1
- package/dist/components/inputs/textInput/components/TextInput.d.ts +23 -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 +55 -1
- package/dist/queries/sendMessageQuery.d.ts.map +1 -1
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -1
- 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 +6 -0
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +1 -1
- package/dist/window.d.ts +3 -0
- package/dist/window.d.ts.map +1 -1
- package/package.json +7 -4
- package/public/index.html +30 -133
- package/server.js +401 -401
- package/.husky/pre-commit +0 -18
- 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/.idea/{Flowise-share-chatbox.iml → flowise-chatbox.iml} +0 -0
package/dist/window.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ type BotProps = {
|
|
|
8
8
|
observersConfig?: observersConfigType;
|
|
9
9
|
theme?: BubbleTheme;
|
|
10
10
|
chatwootUrl?: string;
|
|
11
|
+
roomIds?: Record<string, string>;
|
|
12
|
+
isUseFAQ?: boolean;
|
|
13
|
+
onResetChat?: () => Promise<void>;
|
|
11
14
|
};
|
|
12
15
|
export declare const initFull: (props: BotProps & {
|
|
13
16
|
id?: string;
|
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,yBAAy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M,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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cmcts-c-agent-embedding",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3-cagent-ask-hr",
|
|
4
4
|
"description": "Javascript library to display flowise chatbot on your website",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -8,18 +8,21 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"dev": "cross-env NODE_ENV=development rollup --watch --config rollup.config.js",
|
|
10
10
|
"build": "cross-env NODE_ENV=production rollup --config rollup.config.js",
|
|
11
|
+
"type-check": "tsc --noEmit",
|
|
11
12
|
"lint": "eslint \"src/**/*.ts*\"",
|
|
12
13
|
"lint-fix": "eslint --fix \"src/**/*.ts*\"",
|
|
13
14
|
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
|
|
14
15
|
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
|
|
15
16
|
"prepare": "husky install",
|
|
16
|
-
"start": "node server.js"
|
|
17
|
+
"start": "node server.js",
|
|
18
|
+
"publish": "npm publish --access public"
|
|
17
19
|
},
|
|
18
20
|
"license": "MIT",
|
|
19
21
|
"dependencies": {
|
|
20
22
|
"@babel/core": "^7.22.1",
|
|
21
23
|
"@microsoft/fetch-event-source": "^2.0.1",
|
|
22
24
|
"@ts-stack/markdown": "^1.4.0",
|
|
25
|
+
"@types/pdfjs-dist": "^2.10.378",
|
|
23
26
|
"axios": "^1.7.7",
|
|
24
27
|
"c-agent-embedding": "^1.0.4",
|
|
25
28
|
"c-agent-embedding-react": "^1.0.1",
|
|
@@ -32,6 +35,7 @@
|
|
|
32
35
|
"lodash": "^4.17.21",
|
|
33
36
|
"multer": "^1.4.5-lts.1",
|
|
34
37
|
"node-fetch": "^3.3.2",
|
|
38
|
+
"pdfjs-dist": "3.11.174",
|
|
35
39
|
"prettier": "^3.4.2",
|
|
36
40
|
"solid-element": "1.7.0",
|
|
37
41
|
"solid-js": "1.7.1",
|
|
@@ -68,10 +72,9 @@
|
|
|
68
72
|
"rollup-plugin-postcss": "4.0.2",
|
|
69
73
|
"rollup-plugin-serve": "2.0.2",
|
|
70
74
|
"rollup-plugin-typescript-paths": "1.4.0",
|
|
71
|
-
"rollup-plugin-uglify": "^6.0.4",
|
|
72
75
|
"tailwindcss": "3.3.1",
|
|
73
76
|
"typescript": "5.0.3",
|
|
74
77
|
"uuid": "^9.0.1"
|
|
75
78
|
},
|
|
76
79
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
77
|
-
}
|
|
80
|
+
}
|
package/public/index.html
CHANGED
|
@@ -8,139 +8,36 @@
|
|
|
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
|
-
|
|
58
|
-
dragAndDrop: true,
|
|
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>
|
|
25
|
+
// Example initialization:
|
|
26
|
+
// If your .env contains:
|
|
27
|
+
// agent1=xyz789-uvw456,https://example.com
|
|
28
|
+
// support=abc123-def456,https://example.com
|
|
29
|
+
// salesbot=ghi123-jkl456,https://example.com
|
|
30
|
+
//
|
|
31
|
+
// Then use the environment variable name as chatflowid:
|
|
32
|
+
Chatbot.init({
|
|
33
|
+
// chatflowid: '6a63bb88-88f7-4c4d-805e-9c027c85707b', // or 'support', 'salesbot', etc.
|
|
34
|
+
// chatflowid: 'b573e66d-0e28-4798-8e4f-fbbaff8e236f', // or 'support', 'salesbot', etc.
|
|
35
|
+
// chatflowid: '7ee803b4-e3f8-4f33-bf85-ef9ab9d6f693', // or 'support', 'salesbot', etc.
|
|
36
|
+
chatflowid: 'fa98037e-7c0d-4b64-a6cf-60d5743333fa', // or 'support', 'salesbot', etc.
|
|
37
|
+
// apiHost: 'https://vib.cagent.cmcts.ai',
|
|
38
|
+
apiHost: 'https://stock.cmcts.ai/c-agent',
|
|
39
|
+
});
|
|
40
|
+
</script>
|
|
41
|
+
</body>
|
|
42
|
+
|
|
43
|
+
</html>
|