yt-chat-components 1.7.1 → 1.7.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.7.1",
3
+ "version": "1.7.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",
@@ -331,11 +331,14 @@ const defaultList = [
331
331
  title: '哪里可以找到心理咨询服务?',
332
332
  },
333
333
  ];
334
-
334
+ const currentTabKeyMap = {
335
+ agent: 'agent',
336
+ history: 'history'
337
+ }
335
338
  const api_key = 'sk-mniUFDpcWwvNF3iFzssXa6etN-S_Y4AApyHYcBU44L0';
336
339
  const drawerTabs = [
337
- // {id:'agent', name:'专项技能',icon:'https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/icon/icon_tab_agent.png',activeIcon:'https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/icon/icon_tab_agent_1.png'},
338
- {id:'history', name:'对话记录',icon:'https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/icon/icon_tab_history.png',activeIcon:'https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/icon/icon_tab_history_1.png'}
340
+ // {id:currentTabKeyMap.agent, name:'专项技能',icon:'https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/icon/icon_tab_agent.png',activeIcon:'https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/icon/icon_tab_agent_1.png'},
341
+ {id:currentTabKeyMap.history, name:'对话记录',icon:'https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/icon/icon_tab_history.png',activeIcon:'https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/icon/icon_tab_history_1.png'}
339
342
  ]
340
343
  export const MethodContext = React.createContext();
341
344
 
@@ -347,7 +350,7 @@ export class MobileChatPageV2 extends React.Component {
347
350
  dropDownList: [],
348
351
  sceneInfo: {},
349
352
  currentFlow: {},
350
- currentTabKey:'agent',
353
+ currentTabKey: currentTabKeyMap.history,
351
354
  historyDrawerVisible: false, // 抽屉历史记录状态
352
355
  agentDrawerVisible: false, // 多智能体切换抽屉状态
353
356
  knowledgeInfo: {},
@@ -583,7 +586,7 @@ export class MobileChatPageV2 extends React.Component {
583
586
  </div>
584
587
  {/*对话记录*/}
585
588
  {
586
- this.state.currentTabKey === 'history' &&
589
+ this.state.currentTabKey === currentTabKeyMap.history &&
587
590
  (this.state.historyList.length > 0 ? (
588
591
  <div className="p_historyList" style={{overflowY: 'auto', height: 'calc(100% - 70px)'}}>
589
592
  {this.state.historyList?.map((item) => (