yt-chat-components 0.9.0 → 0.9.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-chat-components",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "main": "build/static/js/bundle.min.js",
5
5
  "module": "build/static/js/bundle.min.js",
6
6
  "types": "build/static/js/index.d.ts",
package/public/index.html CHANGED
@@ -5,78 +5,79 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>Document</title>
7
7
  </head>
8
- <body style="width: 100vw; height: 100vh; position: relative; margin: unset ">
9
- <yt-chat
10
- right="100"
11
- bottom="100"
12
- width="50"
13
- height="50"
14
- title="菜鸟驿站"
15
- icon-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/ccit/user/xc//image/ebfaf4da-c1d9-46fb-a0b1-f159e95cffc2_AI招生咨询小助手.png"
16
- host-url="https://ai-api.yuntu.cn"
17
- user-info='{"id": "123", "name": "John Doe", "code":"1606451129" }'
18
- app-id="620005e0-3370-4447-951f-b1d5c814a92a"
19
- is-show-side-right=false
20
- is-show-side-left=false
21
- modal-index="9999999999"
22
- modal-width="1200"
23
- dialog-index="999999999"
24
- agent-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/ccit/user/xc//image/ebfaf4da-c1d9-46fb-a0b1-f159e95cffc2_AI招生咨询小助手.png"
25
- agent-name="医专智能助手"
26
- logo-width="42px"
27
- logo-font-size="26px"
28
- logo-position="fixed"
29
- is-title-side-icon=false
30
- is-show-upload-button=true
31
- drop-man-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/ai_man01.png"
32
- />
33
- </body>
34
-
35
- <!--<body style="width: 100vw; height: 100vh; margin:0 ">-->
36
- <!--<yt-page-chat-->
8
+ <!--<body style="width: 100vw; height: 100vh; position: relative; margin: unset ">-->
9
+ <!--<yt-chat-->
10
+ <!-- right="100"-->
11
+ <!-- bottom="100"-->
12
+ <!-- width="50"-->
13
+ <!-- height="50"-->
37
14
  <!-- title="菜鸟驿站"-->
15
+ <!-- icon-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/ccit/user/xc//image/ebfaf4da-c1d9-46fb-a0b1-f159e95cffc2_AI招生咨询小助手.png"-->
38
16
  <!-- host-url="https://ai-api.yuntu.cn"-->
39
- <!-- app-id="a8e7ebd8-9bf7-499b-9e4a-c235078a0910"-->
40
17
  <!-- user-info='{"id": "123", "name": "John Doe", "code":"1606451129" }'-->
41
- <!-- tags='[{"name":"今天天气怎么样?"},{"name":"明天天气怎么样?"},{"name":"昨天天气怎么样?"}]'-->
42
- <!-- box-style='{"height":"100%"}'-->
18
+ <!-- app-id="620005e0-3370-4447-951f-b1d5c814a92a"-->
19
+ <!-- is-show-side-left=true-->
43
20
  <!-- is-show-side-right=false-->
44
- <!-- is-show-side-left=false-->
21
+ <!-- modal-index="9999999999"-->
22
+ <!-- modal-width="1200"-->
45
23
  <!-- dialog-index="999999999"-->
46
24
  <!-- agent-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/ccit/user/xc//image/ebfaf4da-c1d9-46fb-a0b1-f159e95cffc2_AI招生咨询小助手.png"-->
47
25
  <!-- agent-name="医专智能助手"-->
48
26
  <!-- logo-width="42px"-->
49
27
  <!-- logo-font-size="26px"-->
50
- <!-- is-title-side-icon=true-->
51
- <!-- is-show-upload-button=false-->
28
+ <!-- logo-position="fixed"-->
29
+ <!-- is-title-side-icon=false-->
30
+ <!-- is-show-upload-button=true-->
52
31
  <!-- drop-man-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/ai_man01.png"-->
53
32
  <!--/>-->
54
33
  <!--</body>-->
55
34
 
56
- <!--<body style="width: 100vw; height: 100vh; position: relative; margin: unset ">-->
57
- <!--<yt-split-modal-chat-->
58
- <!-- right="100"-->
59
- <!-- bottom="100"-->
60
- <!-- width="50"-->
61
- <!-- height="50"-->
62
- <!-- title="招生助手"-->
63
- <!-- icon-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/ccit/user/xc//image/ebfaf4da-c1d9-46fb-a0b1-f159e95cffc2_AI招生咨询小助手.png"-->
35
+ <!--<body style="width: 100vw; height: 100vh; margin:0 ">-->
36
+ <!--<yt-page-chat-->
37
+ <!-- title="菜鸟驿站"-->
64
38
  <!-- host-url="https://ai-api.yuntu.cn"-->
65
- <!-- user-info='{"id": "test", "name": "test", "code":"test" }'-->
39
+ <!-- app-id="a8e7ebd8-9bf7-499b-9e4a-c235078a0910"-->
40
+ <!-- user-info='{"id": "123", "name": "John Doe", "code":"1606451129" }'-->
41
+ <!-- tags='[{"name":"今天天气怎么样?"},{"name":"明天天气怎么样?"},{"name":"昨天天气怎么样?"}]'-->
42
+ <!-- box-style='{"height":"100%"}'-->
43
+ <!-- scene-id="c1e7a2a4-6127-4e53-a529-113da78eb069"-->
66
44
  <!-- is-show-side-right=true-->
67
45
  <!-- is-show-side-left=true-->
68
- <!-- scene-id="c1e7a2a4-6127-4e53-a529-113da78eb069"-->
69
- <!-- modal-index="9999999999"-->
70
- <!-- modal-width="1400"-->
71
46
  <!-- dialog-index="999999999"-->
72
- <!-- agent-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/agent.png"-->
47
+ <!-- agent-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/ccit/user/xc//image/ebfaf4da-c1d9-46fb-a0b1-f159e95cffc2_AI招生咨询小助手.png"-->
73
48
  <!-- agent-name="医专智能助手"-->
74
49
  <!-- logo-width="42px"-->
75
50
  <!-- logo-font-size="26px"-->
76
- <!-- logo-position="fixed"-->
77
- <!-- is-title-side-icon=false-->
51
+ <!-- is-title-side-icon=true-->
78
52
  <!-- is-show-upload-button=false-->
79
53
  <!-- drop-man-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/ai_man01.png"-->
80
54
  <!--/>-->
81
55
  <!--</body>-->
56
+
57
+ <body style="width: 100vw; height: 100vh; position: relative; margin: unset ">
58
+ <yt-split-modal-chat
59
+ right="100"
60
+ bottom="100"
61
+ width="50"
62
+ height="50"
63
+ title="招生助手"
64
+ icon-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/ccit/user/xc//image/ebfaf4da-c1d9-46fb-a0b1-f159e95cffc2_AI招生咨询小助手.png"
65
+ host-url="https://ai-api.yuntu.cn"
66
+ user-info='{"id": "test", "name": "test", "code":"test" }'
67
+ is-show-side-right=true
68
+ is-show-side-left=true
69
+ scene-id="c1e7a2a4-6127-4e53-a529-113da78eb069"
70
+ modal-index="9999999999"
71
+ modal-width="1400"
72
+ dialog-index="999999999"
73
+ agent-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/agent.png"
74
+ agent-name="医专智能助手"
75
+ logo-width="42px"
76
+ logo-font-size="26px"
77
+ logo-position="fixed"
78
+ is-title-side-icon=false
79
+ is-show-upload-button=false
80
+ drop-man-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/ai_man01.png"
81
+ />
82
+ </body>
82
83
  </html>
@@ -477,6 +477,7 @@ video {
477
477
  .cl-drop-man{
478
478
  width:100%;
479
479
  display:flex;
480
+ margin-top:0.81rem;
480
481
  }
481
482
  .cl-drop-man .drop-man-img{
482
483
  height:340px;
@@ -497,7 +498,7 @@ video {
497
498
  }
498
499
 
499
500
  .cl-drop-man .cl-drop-down .drop-down-item-card{
500
- width:48%;
501
+ width:calc(50% - 0.65rem);
501
502
  }
502
503
 
503
504
  .cl-drop-man .cl-drop-down{
@@ -512,19 +513,18 @@ video {
512
513
  border-radius: 10px;
513
514
  box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.05);
514
515
  z-index: 1;
515
- position: absolute;
516
516
  width: 100%;
517
517
  min-height: 50px;
518
- bottom: -13.3rem;
518
+ position: absolute;
519
+ bottom: -14.7rem;
519
520
  padding:1.3rem;
520
521
  }
521
522
 
522
523
  .drop-down-title {
523
- height:1rem;
524
524
  font-weight: 500;
525
525
  font-size: 24px;
526
526
  color: #000000;
527
- line-height: 24px;
527
+ line-height: 1.1;
528
528
  text-align: left;
529
529
  }
530
530
  .drop-down-list {
@@ -444,7 +444,7 @@ export class ToolDialog extends React.Component {
444
444
  dropManUrl
445
445
  } = this.props;
446
446
  const { sceneInfo, currentFlow = {} } = this.state;
447
- const { flows=[], name: sceneName, } = sceneInfo;
447
+ const { flows = [], name: sceneName, character } = sceneInfo;
448
448
  return (
449
449
  <div style={boxStyle}>
450
450
  <style dangerouslySetInnerHTML={{ __html: style }}></style>
@@ -514,7 +514,7 @@ export class ToolDialog extends React.Component {
514
514
  dropDownList={this.state.dropDownList}
515
515
  baseConfig={{ isTitleSideIcon, logoWidth, agentUrl }}
516
516
  isShowUploadButton={isShowUploadButton}
517
- dropManUrl={dropManUrl}
517
+ dropManUrl={character || dropManUrl}
518
518
  />
519
519
  </div>
520
520
  {