yt-chat-components 1.8.7 → 1.8.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
|
@@ -187,7 +187,7 @@ const ChatWindow = forwardRef<ChatWindowRef, ChatWindowProps>(({
|
|
|
187
187
|
const isStream = true;//是否流式输出(手动开关)
|
|
188
188
|
const [recordState, setRecordState] = useState(false); // 录音状态。true为正在录音,false为停止录音
|
|
189
189
|
const [tagList, setTagList] = useState([]); // 问题标签列表
|
|
190
|
-
const {isTitleSideIcon, logoWidth, agentUrl, stopMessageUrl, sendMessageUrl, speakUrl, callUrl, smartBoyUrl, wonderBoyUrl} = baseConfig;
|
|
190
|
+
const {isTitleSideIcon, logoWidth, agentUrl, stopMessageUrl, sendMessageUrl, speakUrl, callUrl, smartBoyUrl, wonderBoyUrl, isHideTabSelector} = baseConfig;
|
|
191
191
|
const [inputContainerHeight, setInputContainerHeight] = useState('120px')
|
|
192
192
|
let content_id: string = null
|
|
193
193
|
let content_ns: string = null
|
|
@@ -1051,15 +1051,16 @@ const ChatWindow = forwardRef<ChatWindowRef, ChatWindowProps>(({
|
|
|
1051
1051
|
customUrl={cnxwBottomUrl}
|
|
1052
1052
|
welcomeWords={welcomeWords || '很高兴认识您,您有什么问题尽可咨询我!'}
|
|
1053
1053
|
handleRowClick={(word) => {
|
|
1054
|
-
if(!receivingMessageRef.current){
|
|
1054
|
+
if (!receivingMessageRef.current) {
|
|
1055
1055
|
handleSendMessage(word)
|
|
1056
|
-
}else{
|
|
1056
|
+
} else {
|
|
1057
1057
|
messageTip.destroy();
|
|
1058
1058
|
messageTip.info("请等待回复结束后再发送")
|
|
1059
1059
|
}
|
|
1060
1060
|
}}
|
|
1061
1061
|
dataList={questions}
|
|
1062
1062
|
customUrl={wonderBoyUrl}
|
|
1063
|
+
isHideTabSelector={isHideTabSelector}
|
|
1063
1064
|
/>
|
|
1064
1065
|
</div>,
|
|
1065
1066
|
isSend: false,
|
|
@@ -478,6 +478,7 @@ export class ToolDialogV2 extends React.Component {
|
|
|
478
478
|
cnxwBottomUrl,
|
|
479
479
|
isShowVoiceButton,
|
|
480
480
|
footerStyle,
|
|
481
|
+
isHideTabSelector,
|
|
481
482
|
} = this.props;
|
|
482
483
|
const { currentFlow = {} } = this.state;
|
|
483
484
|
return (
|
|
@@ -549,7 +550,7 @@ export class ToolDialogV2 extends React.Component {
|
|
|
549
550
|
</div>
|
|
550
551
|
</div>
|
|
551
552
|
}
|
|
552
|
-
<div className="p_toolRight">
|
|
553
|
+
<div className="p_toolRight" style={isShowSideRight ? {} : { borderBottomRightRadius: '15px' }}>
|
|
553
554
|
<MethodContext.Provider value={{registerChatMethods:this.registerChatMethods}}>
|
|
554
555
|
<ChatWidget
|
|
555
556
|
window_title={currentFlow?.name || title}
|
|
@@ -563,7 +564,7 @@ export class ToolDialogV2 extends React.Component {
|
|
|
563
564
|
getHistoryList={this.getHistoryList}
|
|
564
565
|
setDropDownList={(list) => this.setState({ dropDownList: list })}
|
|
565
566
|
dropDownList={this.state.dropDownList}
|
|
566
|
-
baseConfig={{ isTitleSideIcon, logoWidth, agentUrl, ...assetMap }}
|
|
567
|
+
baseConfig={{ isTitleSideIcon, logoWidth, agentUrl, ...assetMap, isHideTabSelector }}
|
|
567
568
|
isShowUploadButton={isShowUploadButton}
|
|
568
569
|
isShowVoiceButton={isShowVoiceButton}
|
|
569
570
|
dropManUrl={currentFlow.character}
|
|
@@ -608,15 +609,17 @@ export class ToolDialogV2 extends React.Component {
|
|
|
608
609
|
src={'https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/hot.png'}/>
|
|
609
610
|
<span>热点问题</span>
|
|
610
611
|
</div>
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
612
|
+
{
|
|
613
|
+
isHideTabSelector && <TabSelector
|
|
614
|
+
isSimple={true}
|
|
615
|
+
keyShowSize={2}
|
|
616
|
+
isShowByPages={false}
|
|
617
|
+
handleRowClick={(word) => {
|
|
618
|
+
this.handleClick(word)
|
|
619
|
+
}}
|
|
620
|
+
dataList={this.state.knowledgeInfo?.question || []}
|
|
621
|
+
/>
|
|
622
|
+
}
|
|
620
623
|
</div>
|
|
621
624
|
}
|
|
622
625
|
</div>
|