@myun/gimi-chat 0.9.62 → 0.9.64

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.
@@ -380,7 +380,7 @@ var AnswerItem = function AnswerItem(_ref) {
380
380
  onRegenerateClick: onRegenerateClick
381
381
  })), /*#__PURE__*/React.createElement("div", {
382
382
  className: styles.totalTokensWrap
383
- }, item !== null && item !== void 0 && item.durationMs ? formatDurationMs(item.durationMs) : '', " ", platform === 'preview' && item.totalTokens ? " | ".concat(item.totalTokens, " Tokens") : ''))), (item.relatedResourceList || []).length > 0 && (showCommend === null || showCommend === void 0 ? void 0 : showCommend(item.id)) && /*#__PURE__*/React.createElement("div", {
383
+ }, item !== null && item !== void 0 && item.durationMs ? formatDurationMs(item.durationMs) : '', " ", platform === 'preview' && item.totalTokens ? " | ".concat(Number(item.totalTokens).toLocaleString('en-US'), " Tokens") : ''))), (item.relatedResourceList || []).length > 0 && (showCommend === null || showCommend === void 0 ? void 0 : showCommend(item.id)) && /*#__PURE__*/React.createElement("div", {
384
384
  className: styles.quickInputList
385
385
  }, (item.relatedResourceList || []).map(function (item, index) {
386
386
  return /*#__PURE__*/React.createElement("div", {
@@ -141,7 +141,13 @@
141
141
  :global .semi-aiChatInput-footer-action-send-disabled {
142
142
  background-color: rgba(46, 50, 56, 0.1294117647);
143
143
  }
144
+ :global .semi-aiChatInput-editor-content {
145
+ display: flex;
146
+ flex-direction: column;
147
+ }
144
148
  :global .semi-aiChatInput-editor-content .tiptap {
149
+ flex: 1;
150
+ min-height: 0;
145
151
  font-size: 16px;
146
152
  color: var(--theme-mediumNeutral, #9AA7B7);
147
153
  }
@@ -92,9 +92,14 @@ export var KnowledgeIconComponent = function KnowledgeIconComponent(_ref2) {
92
92
  curPlayer === null || curPlayer === void 0 || curPlayer.pause();
93
93
  }
94
94
  setShowPanel(false);
95
+ // 资讯溯源:有权益直接跳转资讯详情,无权益则弹试看弹框
96
+ if (type === 'information' && trace.hasEntitlement) {
97
+ window.open("/news-list/new-information/".concat(trace.informationId, "?packageId=").concat(trace.packageId));
98
+ return;
99
+ }
95
100
  setCurTrace(trace);
96
101
  setTryWatchVisible(true);
97
- }, [setCurTrace]);
102
+ }, [type, curPlayer, setCurTrace]);
98
103
  var hoverPanelContent = useMemo(function () {
99
104
  if (isLoading) return /*#__PURE__*/React.createElement("div", {
100
105
  style: {
@@ -337,7 +337,7 @@ var TryWatch = function TryWatch(_ref7) {
337
337
  className: styles.tryFullBtnContainer
338
338
  }, /*#__PURE__*/React.createElement("div", {
339
339
  className: styles.tips
340
- }, t('trace.tryFullTips')), /*#__PURE__*/React.createElement(Button, {
340
+ }, t(type === 'information' ? 'trace.tryFullTipsNoEntitlement' : 'trace.tryFullTips')), type !== 'information' && /*#__PURE__*/React.createElement(Button, {
341
341
  className: styles.tryFullBtn,
342
342
  onClick: handleFull
343
343
  }, t('trace.tryFull')))));
@@ -1,18 +1,18 @@
1
1
  .skillItem {
2
2
  display: inline-block;
3
- height: 24px;
4
- padding: 0 8px;
5
- height: 24px;
3
+ padding: 2px 8px;
6
4
  border-radius: 10px;
7
5
  margin-right: 6px;
8
6
  background-color: #E3E3E1;
9
7
  line-height: 20px;
8
+ margin-bottom: 4px;
10
9
  }
11
10
  .skillItem .icon {
12
11
  width: 14px;
13
12
  height: 14px;
14
13
  margin-right: 4px;
15
14
  vertical-align: middle;
15
+ border-radius: unset;
16
16
  }
17
17
  .skillItem .name {
18
18
  font-size: 14px;
@@ -403,7 +403,6 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
403
403
  moduleType: dataObj.moduleType,
404
404
  artifacts: dataObj.artifacts || []
405
405
  })]);
406
- console.log('handleArtifactStreamRs-----', newMessageList);
407
406
  messageListRef.current = newMessageList;
408
407
  dispatch(setMessageList({
409
408
  messageList: newMessageList
@@ -565,7 +564,6 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
565
564
  // if (isSystemAuto) return;
566
565
  setIgnoreOnMessage(true);
567
566
  currentMessageList = messageListRef.current;
568
- console.log('currentMessageList-----', currentMessageList);
569
567
  lastToolList = _toConsumableArray(currentMessageList[currentMessageList.length - 1].toolList || []);
570
568
  newMessageList = [];
571
569
  if (type === 'user_confirm') {
@@ -604,7 +602,6 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
604
602
  return v.moduleType !== "agent" && v.moduleType !== 'end';
605
603
  }))))]);
606
604
  }
607
- console.log('end---------', newMessageList);
608
605
  dispatch(setMessageList({
609
606
  messageList: newMessageList
610
607
  }));
@@ -615,13 +612,13 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
615
612
  // 获取最新的agent详情,防止redux异步更新
616
613
  agentDetail = agentInfo || agentObjRef.current; // 获取推荐追问
617
614
  if (!((agentDetail === null || agentDetail === void 0 ? void 0 : agentDetail.isEnableRelated) === 1 && (type === 'end' || type === 'COMPLETED'))) {
618
- _context5.next = 14;
615
+ _context5.next = 12;
619
616
  break;
620
617
  }
621
618
  setMsgLoading(true);
622
- _context5.next = 14;
619
+ _context5.next = 12;
623
620
  return getRecommendList(newMessageList, lastId, statusRef.current);
624
- case 14:
621
+ case 12:
625
622
  // 获取相关课程
626
623
  userInput = newMessageList[newMessageList.length - 2].content;
627
624
  getRelatedCourses(userInput || '');
@@ -632,7 +629,7 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
632
629
  }
633
630
  setMsgLoading(false);
634
631
  onSendEnd === null || onSendEnd === void 0 || onSendEnd(newMessageList[newMessageList.length - 1]);
635
- case 19:
632
+ case 17:
636
633
  case "end":
637
634
  return _context5.stop();
638
635
  }
@@ -59,6 +59,7 @@ declare const enUS: {
59
59
  'trace.document.trialInvalidDoc': string;
60
60
  'trace.document.trialFailed': string;
61
61
  'trace.tryFullTips': string;
62
+ 'trace.tryFullTipsNoEntitlement': string;
62
63
  'trace.tryFull': string;
63
64
  'trace.iconAlt': string;
64
65
  'trace.countByType': string;
@@ -59,6 +59,7 @@ var enUS = {
59
59
  'trace.document.trialInvalidDoc': 'This document does not support trial preview',
60
60
  'trace.document.trialFailed': 'Failed to load trial preview',
61
61
  'trace.tryFullTips': 'You can preview part of the content. Click the button on the right to view the full content.',
62
+ 'trace.tryFullTipsNoEntitlement': 'No access rights to view the full content',
62
63
  'trace.tryFull': 'View',
63
64
  'trace.iconAlt': 'Knowledge source icon',
64
65
  'trace.countByType': '{{count}} {{type}}',
@@ -59,6 +59,7 @@ declare const zhCN: {
59
59
  'trace.document.trialInvalidDoc': string;
60
60
  'trace.document.trialFailed': string;
61
61
  'trace.tryFullTips': string;
62
+ 'trace.tryFullTipsNoEntitlement': string;
62
63
  'trace.tryFull': string;
63
64
  'trace.iconAlt': string;
64
65
  'trace.countByType': string;
@@ -59,6 +59,7 @@ var zhCN = {
59
59
  'trace.document.trialInvalidDoc': '该文档暂不支持试看',
60
60
  'trace.document.trialFailed': '试看加载失败',
61
61
  'trace.tryFullTips': '您当前可试看部分内容,点击右侧按钮查看完整内容。',
62
+ 'trace.tryFullTipsNoEntitlement': '暂无权益查看智库资讯完整内容',
62
63
  'trace.tryFull': '查看',
63
64
  'trace.iconAlt': '知识库溯源图标',
64
65
  'trace.countByType': '{{count}}{{unit}}{{type}}',