yt-chat-components 1.8.8 → 1.9.0

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.8.8",
3
+ "version": "1.9.0",
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",
@@ -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, isShowTabSelect} = 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
@@ -1041,14 +1041,13 @@ const ChatWindow = forwardRef<ChatWindowRef, ChatWindowProps>(({
1041
1041
  <div style={{width: '36px', height: '1px', border: '1px dashed rgb(192, 194, 197)'}}></div>
1042
1042
  </div>
1043
1043
  }
1044
- {isShowTabSelect && <TabSelector
1044
+ <TabSelector
1045
1045
  isMobile={isMobile}
1046
1046
  isSimple={isMobile}
1047
1047
  isShowByPages={true}
1048
1048
  keyShowSize={4}
1049
1049
  agentName={window_title}
1050
1050
  agentUrl={agentUrl}
1051
- customUrl={cnxwBottomUrl}
1052
1051
  welcomeWords={welcomeWords || '很高兴认识您,您有什么问题尽可咨询我!'}
1053
1052
  handleRowClick={(word) => {
1054
1053
  if (!receivingMessageRef.current) {
@@ -1059,9 +1058,9 @@ const ChatWindow = forwardRef<ChatWindowRef, ChatWindowProps>(({
1059
1058
  }
1060
1059
  }}
1061
1060
  dataList={questions}
1062
- customUrl={wonderBoyUrl}
1061
+ customUrl={cnxwBottomUrl || wonderBoyUrl}
1062
+ isHideTabSelector={isHideTabSelector}
1063
1063
  />
1064
- }
1065
1064
  </div>,
1066
1065
  isSend: false,
1067
1066
  error: false,
@@ -18,6 +18,7 @@ const TabSelector = ({
18
18
  isShowByPages = true,
19
19
  agentName = '杏鸽',
20
20
  agentUrl = '',
21
+ isHideTabSelector = false,
21
22
  }) => {
22
23
  const [activeKey, setActiveKey] = useState();
23
24
  const [valuePage, setValuePage] = useState(0);
@@ -162,7 +163,11 @@ const TabSelector = ({
162
163
  }
163
164
  <div
164
165
  className={styles.tabSelector}
165
- style={{ width: isSimple ? "auto" : '550px', height: isSimple ? '100%' : 'auto' }}
166
+ style={{
167
+ width: isSimple ? "auto" : '550px',
168
+ height: isSimple ? '100%' : 'auto',
169
+ display: isHideTabSelector ? 'none' : 'flex'
170
+ }}
166
171
  >
167
172
  {
168
173
  !isSimple && <div className={styles.leftPanel}>
@@ -478,7 +478,7 @@ export class ToolDialogV2 extends React.Component {
478
478
  cnxwBottomUrl,
479
479
  isShowVoiceButton,
480
480
  footerStyle,
481
- isShowTabSelect,
481
+ isHideTabSelector,
482
482
  } = this.props;
483
483
  const { currentFlow = {} } = this.state;
484
484
  return (
@@ -564,7 +564,7 @@ export class ToolDialogV2 extends React.Component {
564
564
  getHistoryList={this.getHistoryList}
565
565
  setDropDownList={(list) => this.setState({ dropDownList: list })}
566
566
  dropDownList={this.state.dropDownList}
567
- baseConfig={{ isTitleSideIcon, logoWidth, agentUrl, ...assetMap, isShowTabSelect }}
567
+ baseConfig={{ isTitleSideIcon, logoWidth, agentUrl, ...assetMap, isHideTabSelector }}
568
568
  isShowUploadButton={isShowUploadButton}
569
569
  isShowVoiceButton={isShowVoiceButton}
570
570
  dropManUrl={currentFlow.character}
@@ -610,7 +610,7 @@ export class ToolDialogV2 extends React.Component {
610
610
  <span>热点问题</span>
611
611
  </div>
612
612
  {
613
- isShowTabSelect && <TabSelector
613
+ isHideTabSelector && <TabSelector
614
614
  isSimple={true}
615
615
  keyShowSize={2}
616
616
  isShowByPages={false}