yt-chat-components 0.9.5 → 0.9.7
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
|
@@ -160,7 +160,7 @@ export default function ChatWindow({
|
|
|
160
160
|
} else if (event == 'token') {
|
|
161
161
|
setNowAIContent((prevState) => prevState + data['chunk']);
|
|
162
162
|
if (lastMessage.current) lastMessage.current.scrollIntoView({ behavior: 'smooth' });
|
|
163
|
-
} else if (event == 'end') {
|
|
163
|
+
} else if (false && event == 'end') {// 移除end事件的响应
|
|
164
164
|
const res = {
|
|
165
165
|
data: data['result'],
|
|
166
166
|
};
|
|
@@ -2350,17 +2350,15 @@ input::-ms-input-placeholder { /* Microsoft Edge */
|
|
|
2350
2350
|
}
|
|
2351
2351
|
|
|
2352
2352
|
.w_tagListClass {
|
|
2353
|
-
// position: absolute;
|
|
2354
2353
|
width: 100%;
|
|
2355
2354
|
height: fit-content;
|
|
2356
|
-
// background: #F9FAFB;
|
|
2357
2355
|
display: flex;
|
|
2358
2356
|
align-items: center;
|
|
2359
2357
|
padding: 8px 0 8px 10px;
|
|
2360
2358
|
flex-wrap: wrap;
|
|
2361
2359
|
gap: 8px;
|
|
2362
|
-
|
|
2363
|
-
|
|
2360
|
+
}
|
|
2361
|
+
.w_tagListClass .w_tagItemBox {
|
|
2364
2362
|
padding: 8px 12px;
|
|
2365
2363
|
display: flex;
|
|
2366
2364
|
align-items: center;
|
|
@@ -2372,36 +2370,34 @@ input::-ms-input-placeholder { /* Microsoft Edge */
|
|
|
2372
2370
|
border: 1px solid #4B4FFF;
|
|
2373
2371
|
cursor: pointer;
|
|
2374
2372
|
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2373
|
+
}
|
|
2374
|
+
.w_tagListClass .w_tagItemBox:hover, .w_tagListClass .w_tagItemBox:active {
|
|
2375
|
+
background: linear-gradient( 270deg, #828EFE 0%, #4B4FFF 100%);
|
|
2376
|
+
}
|
|
2377
|
+
.w_tagListClass .w_tagItemBox:hover .w_tagImgh,.w_tagListClass .w_tagItemBox:active .w_tagImgh {
|
|
2378
|
+
filter: brightness(100);
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
.w_tagListClass .w_tagItemBox:hover .w_tagItemText, .w_tagListClass .w_tagItemBox:active .w_tagItemText {
|
|
2382
|
+
color: #fff;
|
|
2383
|
+
}
|
|
2384
|
+
.w_tagListClass .w_tagItemBox .w_tagImgh{
|
|
2385
2385
|
width: 16px;
|
|
2386
2386
|
height: 16px;
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
.w_tagItemText {
|
|
2387
|
+
}
|
|
2388
|
+
.w_tagListClass .w_tagItemBox .w_tagItemText {
|
|
2390
2389
|
width: fit-content;
|
|
2391
2390
|
padding-top: 2px;
|
|
2392
2391
|
color: #1552FF;
|
|
2393
2392
|
font-size: 14px;
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
.w_tagImg {
|
|
2393
|
+
}
|
|
2394
|
+
.w_tagListClass .w_tagItemBox .w_tagImg {
|
|
2397
2395
|
margin-left: 6px;
|
|
2398
2396
|
width: 12px;
|
|
2399
2397
|
height: 12px;
|
|
2400
2398
|
background-repeat: no-repeat;
|
|
2401
2399
|
background-size: cover;
|
|
2402
|
-
}
|
|
2403
2400
|
}
|
|
2404
|
-
}
|
|
2405
2401
|
|
|
2406
2402
|
.w_inputBox {
|
|
2407
2403
|
width: calc(100% - 16px);
|
|
@@ -2412,7 +2408,8 @@ input::-ms-input-placeholder { /* Microsoft Edge */
|
|
|
2412
2408
|
border-radius: 30px;
|
|
2413
2409
|
background: #FFFFFF;
|
|
2414
2410
|
transition: height 0.2s ease;
|
|
2415
|
-
|
|
2411
|
+
}
|
|
2412
|
+
.w_inputBox textarea {
|
|
2416
2413
|
resize: none;
|
|
2417
2414
|
min-height: 48px;
|
|
2418
2415
|
max-height: 96px;
|
|
@@ -2429,15 +2426,11 @@ input::-ms-input-placeholder { /* Microsoft Edge */
|
|
|
2429
2426
|
border-top-left-radius: 50px;
|
|
2430
2427
|
border-bottom-left-radius: 50px;
|
|
2431
2428
|
}
|
|
2432
|
-
|
|
2433
|
-
|
|
2429
|
+
|
|
2430
|
+
.w_inputBox textarea::-webkit-scrollbar {
|
|
2431
|
+
display: none;
|
|
2434
2432
|
}
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
/**
|
|
2438
|
-
* 输入框上方的标签问题列表
|
|
2439
|
-
*/
|
|
2440
|
-
|
|
2433
|
+
|
|
2441
2434
|
.w_send_voice_box {
|
|
2442
2435
|
height: 23px;
|
|
2443
2436
|
display: flex;
|
|
@@ -355,7 +355,7 @@ export class ToolDialog extends React.Component {
|
|
|
355
355
|
// 单独组件情况
|
|
356
356
|
if(isRefreshWords){
|
|
357
357
|
this.getFlowInfo().then(currentFlow=>{
|
|
358
|
-
const dropDownList = this.getDropDownList(currentFlow.welcome_words);
|
|
358
|
+
const dropDownList = this.getDropDownList(currentFlow.welcome_words||[]);
|
|
359
359
|
this.setState({ dropDownList, currentFlow })
|
|
360
360
|
})
|
|
361
361
|
}
|
|
@@ -365,7 +365,7 @@ export class ToolDialog extends React.Component {
|
|
|
365
365
|
}else{
|
|
366
366
|
const currentScene = sceneData||this.state.sceneInfo;
|
|
367
367
|
const currentFlow = currentScene.flows[0];
|
|
368
|
-
const dropDownList = this.getDropDownList(currentFlow.welcome_words);
|
|
368
|
+
const dropDownList = this.getDropDownList(currentFlow.welcome_words||[]);
|
|
369
369
|
if(!isEmpty(sceneData)){
|
|
370
370
|
this.setState({ currentFlow, dropDownList })
|
|
371
371
|
}else if(isEmpty(this.state.sceneInfo)){
|
|
@@ -400,7 +400,7 @@ export class ToolDialog extends React.Component {
|
|
|
400
400
|
return;
|
|
401
401
|
}
|
|
402
402
|
this.setState({ sessionId: uuidv4() });
|
|
403
|
-
this.setState({ dropDownList: this.getDropDownList(this.state.currentFlow.welcome_words) })
|
|
403
|
+
this.setState({ dropDownList: this.getDropDownList(this.state.currentFlow.welcome_words||[]) })
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
updateSessionId = (sessionId) => {
|
|
@@ -411,7 +411,7 @@ export class ToolDialog extends React.Component {
|
|
|
411
411
|
if(isEmpty(welcome_words)){
|
|
412
412
|
return defaultList;
|
|
413
413
|
}
|
|
414
|
-
return welcome_words.map((question,index)=>(
|
|
414
|
+
return welcome_words.slice(0,3).map((question,index)=>(
|
|
415
415
|
{
|
|
416
416
|
backgroundImg:defaultList[index].backgroundImg,
|
|
417
417
|
title:question,
|