yt-chat-components 2.0.8 → 2.0.9
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
|
@@ -76,9 +76,9 @@ const style = `
|
|
|
76
76
|
width: 100vw;
|
|
77
77
|
height:100vh;
|
|
78
78
|
background: #fff;
|
|
79
|
-
border-radius: 15px;
|
|
80
79
|
display: flex;
|
|
81
80
|
flex-direction: row;
|
|
81
|
+
border-radius:0;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
.p_toolDialog .dialog_box .p_toolLogo {
|
|
@@ -313,16 +313,23 @@ export class ToolDialogV3 extends React.Component {
|
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
async componentDidMount() {
|
|
316
|
-
const { appId: flowId,sceneId } = this.props;
|
|
317
|
-
this.setState({
|
|
318
|
-
|
|
316
|
+
const { appId: flowId, sceneId } = this.props;
|
|
317
|
+
this.setState({loading:true})
|
|
318
|
+
this.getSceneInfo()
|
|
319
|
+
.then(sceneInfo => {
|
|
320
|
+
this.setState({ appId: sceneInfo.data.flow_ids[0] }, () => {
|
|
321
|
+
this.getHistoryList(true);
|
|
322
|
+
})
|
|
323
|
+
}).finally(() => {
|
|
324
|
+
// this.setState({loading:false})
|
|
319
325
|
})
|
|
320
|
-
this.getSceneInfo();
|
|
321
326
|
getFlowPage(this.props.hostUrl, api_key)
|
|
322
327
|
.then(res => {
|
|
323
328
|
if(res.status === 200) {
|
|
324
329
|
this.setState({ allFlowList: res.data?.data_list })
|
|
325
330
|
}
|
|
331
|
+
}).finally(() => {
|
|
332
|
+
this.setState({loading:false})
|
|
326
333
|
})
|
|
327
334
|
}
|
|
328
335
|
|
|
@@ -447,6 +454,9 @@ export class ToolDialogV3 extends React.Component {
|
|
|
447
454
|
|
|
448
455
|
removeFromScene = (flow) => {
|
|
449
456
|
const { sceneInfo } = this.state;
|
|
457
|
+
if(sceneInfo.flow_ids.length === 1) {
|
|
458
|
+
return message.error("至少需要一个对话")
|
|
459
|
+
}
|
|
450
460
|
sceneInfo.flow_ids = sceneInfo.flow_ids.filter(item => item !== flow.id)
|
|
451
461
|
modifyScene(this.props.hostUrl, api_key, sceneInfo).then(res => {
|
|
452
462
|
if(res.status === 200) {
|