yt-chat-components 1.4.0 → 1.4.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": "1.4.0",
3
+ "version": "1.4.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",
@@ -52,8 +52,7 @@ export const customThoughtChainStyle = `
52
52
 
53
53
  /* 节点头部样式 */
54
54
  .custom-thought-chain-item-header {
55
- display: flex;
56
- align-items: flex-start;
55
+ display: inline-block;
57
56
  margin-bottom: 8px;
58
57
  }
59
58
 
@@ -92,7 +91,7 @@ export const customThoughtChainStyle = `
92
91
 
93
92
  /* 标题容器样式 */
94
93
  .custom-thought-chain-item-title-container {
95
- flex: 1;
94
+ display: inline-block
96
95
  }
97
96
 
98
97
  /* 标题样式 */
@@ -113,13 +112,16 @@ export const customThoughtChainStyle = `
113
112
 
114
113
  /* 内容样式 */
115
114
  .custom-thought-chain-item-content {
115
+ max-width: 780px
116
+ display: inline-block;
116
117
  margin-bottom: 8px;
117
118
  background: white;
118
119
  padding: 12px;
119
120
  border-radius: 8px;
120
121
  border: 1px solid #f0f0f0;
121
122
  margin-left: -30px;
122
- z-index: 2;
123
+ position: relative;
124
+ z-index: 2 !important;
123
125
  }
124
126
 
125
127
  /* 页脚样式 */
@@ -18,6 +18,9 @@ export const cardStyle= `
18
18
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
19
19
  padding: 12px;
20
20
  }
21
+ .section_1 > img {
22
+ margin: 0 8px 0 0 !important;
23
+ }
21
24
  .image-text_2 {
22
25
  width: 100%;
23
26
  padding: 0 12px 0 12px;
@@ -28,6 +31,7 @@ export const cardStyle= `
28
31
  width: 45px;
29
32
  height: 45px;
30
33
  border-radius: 12px;
34
+ margin: 0 8px 0 0 !important;
31
35
  }
32
36
  .text-group_3 {
33
37
  margin-left: 12px;
@@ -89,7 +93,7 @@ export const cardStyle= `
89
93
  .thumbnail_1 {
90
94
  width: 10px;
91
95
  height: 12px;
92
- margin-left: 8px;
96
+ margin: 0 8px 0 0 !important;
93
97
  }
94
98
  `
95
99
 
@@ -296,18 +296,18 @@ export default function ChatWindow({
296
296
  }
297
297
 
298
298
  // id切换表示一句话说完了, 新增信息
299
- if (content_id !== id){
300
- content_id = id
301
-
302
- // 如果 event_latest 是 token,此刻变成了 t_full_token,表示之前都在输出占位符,所以更新信息
303
- if (event_latest === 'token' && event === 't_full_token'){
304
- updateMessageItem({chunk, loadingMessage: loading_message || ''})
305
- } else {
306
- addMessageItem({chunk, id, name, loadingMessage:loading_message})
307
- }
308
- }else{
299
+ // if (content_id !== id){
300
+ // content_id = id
301
+ //
302
+ // // 如果 event_latest 是 token,此刻变成了 t_full_token,表示之前都在输出占位符,所以更新信息
303
+ // if (event_latest === 'token' && event === 't_full_token'){
304
+ // updateMessageItem({chunk, loadingMessage: loading_message || ''})
305
+ // } else {
306
+ // addMessageItem({chunk, id, name, loadingMessage:loading_message})
307
+ // }
308
+ // }else{
309
309
  updateMessageItem({chunk, loadingMessage: loading_message || ''})
310
- }
310
+ // }
311
311
  }
312
312
 
313
313
  if (lastMessage.current) {