@clikvn/agent-widget-embedded 0.0.38-dev → 0.0.39-dev

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.
@@ -30,6 +30,14 @@ type ConfigurationData = {
30
30
  header?: {
31
31
  title?: string;
32
32
  };
33
+ language?: {
34
+ code?: string;
35
+ options?: {
36
+ code?: string;
37
+ name?: string;
38
+ icon?: string;
39
+ }[];
40
+ };
33
41
  } & Record<string, unknown>;
34
42
  };
35
43
  export declare const ConfigurationProvider: ({ children, config, }: {
@@ -1 +1 @@
1
- {"version":3,"file":"useConfiguration.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfiguration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE;QACN,UAAU,CAAC,EAAE;YACX,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;SAChC,CAAC;QACF,UAAU,CAAC,EAAE,iBAAiB,CAAC;QAC/B,WAAW,CAAC,EAAE,iBAAiB,CAAC;QAChC,KAAK,CAAC,EAAE;YACN,WAAW,CAAC,EAAE,MAAM,CAAC;SACtB,CAAC;QACF,QAAQ,CAAC,EAAE;YACT,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,CAAC,EAAE,MAAM,CAAC;SACtB,CAAC;QACF,OAAO,CAAC,E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MAAM,CAAC;SACtB,CAAC;QACF,OAAO,CAAC,EAAE;YACR,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,WAAW,CAAC,EAAE,MAAM,CAAC;SACtB,CAAC;QACF,MAAM,CAAC,EAAE;YACP,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;QACF,QAAQ,CAAC,EAAE;YACT,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,OAAO,CAAC,EAAE;gBACR,IAAI,CAAC,EAAE,MAAM,CAAC;gBACd,IAAI,CAAC,EAAE,MAAM,CAAC;gBACd,IAAI,CAAC,EAAE,MAAM,CAAC;aACf,EAAE,CAAC;SACL,CAAC;KACH,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7B,CAAC;AAMF,eAAO,MAAM,qBAAqB,0BAG/B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,iBAAiB,CAAC;CAC3B,4CAiBA,CAAC;AAEF,eAAO,MAAM,gBAAgB,yBAQ5B,CAAC"}
package/dist/index.html CHANGED
@@ -1,47 +1,108 @@
1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <title></title>
6
- <script type="module">
7
- import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
8
- Agent.initWidget({
9
- apiHost: 'http://localhost:8085/chatbot',
10
- agentId: 'cd49f913-b0e4-4395-8beb-0d74f34d58cc',
11
- voice: {
12
- livekitUrl: 'wss://clik-dev-t95ky4ge.livekit.cloud'
13
- },
14
- theme: {
15
- input: {
16
- placeholder: 'Tin nhắn...'
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <title></title>
6
+ <script type="module">
7
+ import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
8
+ Agent.initWidget({
9
+ apiHost: 'http://localhost:8085/chatbot',
10
+ agentId: '6d02b23f-465f-44ec-8766-27a82890a9b8',
11
+ theme: {
12
+ input: {
13
+ placeholder: 'Tin nhắn...',
14
+ },
15
+ overview: {
16
+ title: 'Van Mieu, Quoc Tu Giam',
17
+ description:
18
+ 'Your personal AI tutor by Khan Academy! Im Khanmigo Lite - here to help you with math, science, and humanities and questions.',
19
+ },
20
+ header: {
21
+ title: 'tung test',
22
+ },
23
+ language: {
24
+ code: 'global',
25
+ options: [
26
+ {
27
+ name: 'en',
28
+ code: 'global',
29
+ },
30
+ {
31
+ name: 'vi',
32
+ code: 'vi',
33
+ },
34
+ {
35
+ name: 'us',
36
+ code: 'en',
37
+ },
38
+ {
39
+ name: 'jp',
40
+ code: 'jp',
41
+ },
42
+ {
43
+ name: 'kr',
44
+ code: 'kr',
45
+ },
46
+ {
47
+ name: 'cn',
48
+ code: 'cn',
49
+ },
50
+ {
51
+ name: 'th',
52
+ code: 'th',
53
+ },
54
+ {
55
+ name: 'tw',
56
+ code: 'tw',
57
+ },
58
+ {
59
+ name: 'sg',
60
+ code: 'sg',
61
+ },
62
+ {
63
+ name: 'my',
64
+ code: 'my',
65
+ },
66
+ {
67
+ name: 'kh',
68
+ code: 'kh',
69
+ },
70
+ {
71
+ name: 'au',
72
+ code: 'au',
73
+ },
74
+ ],
75
+ },
17
76
  },
18
- overview: {
19
- title: 'Van Mieu, Quoc Tu Giam',
20
- description: 'Your personal AI tutor by Khan Academy! Im Khanmigo Lite - here to help you with math, science, and humanities and questions.'
21
- }
22
- },
23
- overrideConfig: {
24
- chatId: '14342fe3-8991-4a67-afea-b1c4266da126',
25
77
  overrideConfig: {
26
- vars: {
27
- POI_CODE: 'MLI_VKLVVAJEFHLH',
28
- LANGUAGE: 'VN'
29
- }
78
+ // chatId: '14342fe3-8991-4a67-afea-b1c4266da82b',
79
+ chatId: 'f547e5e3-363f-425c-adc1-7f618330d551',
80
+ overrideConfig: {
81
+ vars: {
82
+ POI_CODE: 'MLI_VKLVVAJEFHLH',
83
+ LANGUAGE: 'US',
84
+ },
85
+ },
86
+ // suggestedActions: [
87
+ // {
88
+ // title: 'How are you?',
89
+ // label: 'are you?',
90
+ // action: 'How are you?'
91
+ // }
92
+ // ]
30
93
  },
31
-
32
- },
33
- });
34
- </script>
35
- <style>
36
- .chatbox {
94
+ });
95
+ </script>
96
+ <style>
97
+ .chatbox {
37
98
  width: 100%;
38
99
  height: 100vh;
39
- }
40
- </style>
41
- </head>
42
- <body>
43
- <div class="chatbox">
44
- <clik-agent-widget></clik-agent-widget>
45
- </div>
46
- </body>
100
+ }
101
+ </style>
102
+ </head>
103
+ <body>
104
+ <div class="chatbox">
105
+ <clik-agent-widget></clik-agent-widget>
106
+ </div>
107
+ </body>
47
108
  </html>