@myun/gimi-chat 0.9.42 → 0.9.44

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.
@@ -46,6 +46,7 @@ interface IAIInputProps {
46
46
  agentList?: AgentConfig[];
47
47
  hiddenDeepThink?: boolean;
48
48
  onAgentChange?: (agentId: number) => void;
49
+ hasSuggestTips?: boolean;
49
50
  }
50
51
  declare const ChatInput: React.ForwardRefExoticComponent<IAIInputProps & React.RefAttributes<ChatInputRef>>;
51
52
  export default ChatInput;
@@ -615,7 +615,8 @@ var ChatInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
615
615
  ref: inputWrapRef,
616
616
  id: "myun_gimi_design_chat_input",
617
617
  style: {
618
- position: 'relative'
618
+ position: 'relative',
619
+ marginBottom: props !== null && props !== void 0 && props.hasSuggestTips ? '46px' : '20px'
619
620
  }
620
621
  }, props.isRecording && /*#__PURE__*/React.createElement("div", {
621
622
  style: {
@@ -673,6 +674,9 @@ var ChatInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
673
674
  },
674
675
  setSpeech: setShowChatCommunication,
675
676
  handleHangUp: handleHangUp
676
- }));
677
+ }), (props === null || props === void 0 ? void 0 : props.hasSuggestTips) && /*#__PURE__*/React.createElement("div", {
678
+ className: styles.suggestTips,
679
+ id: "myun_gimi_design_suggestTips"
680
+ }, t('chatInput.aiGeneratedTip')));
677
681
  });
678
682
  export default ChatInput;
@@ -205,4 +205,13 @@
205
205
  .agentPopover .agentItem {
206
206
  padding: 3px 8px;
207
207
  border-radius: 10px;
208
+ }
209
+
210
+ .suggestTips {
211
+ font-size: 11px;
212
+ color: var(--theme-mediumNeutral, #B3B2B2);
213
+ position: absolute;
214
+ bottom: -24px;
215
+ left: 50%;
216
+ transform: translateX(-50%);
208
217
  }
@@ -143,6 +143,8 @@ export var KnowledgeIconComponent = function KnowledgeIconComponent(_ref2) {
143
143
  // }
144
144
  // }));
145
145
  }, [isMsgRecieving, isLastMessage, dispatch, messageId, resources, type]);
146
+ var typeLabel = type === 'video' ? t('knowledgeTrace.type.video') : type === 'product' ? t('knowledgeTrace.type.course') : type === 'information' ? t('knowledgeTrace.type.information') : t('knowledgeTrace.type.document');
147
+ var unit = type === 'information' ? t('trace.unit.article') : t('trace.unit.piece');
146
148
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popover, {
147
149
  content: /*#__PURE__*/React.createElement(React.Fragment, null, hoverPanelContent),
148
150
  visible: showPanel,
@@ -157,7 +159,8 @@ export var KnowledgeIconComponent = function KnowledgeIconComponent(_ref2) {
157
159
  url: iconUrl
158
160
  }), /*#__PURE__*/React.createElement("span", null, t('trace.countByType', {
159
161
  count: resources === null || resources === void 0 ? void 0 : resources.length,
160
- type: type === 'video' ? t('knowledgeTrace.type.video') : type === 'product' ? t('knowledgeTrace.type.course') : type === "information" ? t('knowledgeTrace.type.information') : t('knowledgeTrace.type.document')
162
+ unit: unit,
163
+ type: typeLabel
161
164
  })))), /*#__PURE__*/React.createElement(TryWatch, {
162
165
  item: curTrace,
163
166
  type: type,
@@ -55,7 +55,9 @@ var CommonChat = /*#__PURE__*/React.forwardRef(function (props, ref) {
55
55
  _props$agentList = props.agentList,
56
56
  agentList = _props$agentList === void 0 ? [] : _props$agentList,
57
57
  _props$hiddenDeepThin = props.hiddenDeepThink,
58
- hiddenDeepThink = _props$hiddenDeepThin === void 0 ? false : _props$hiddenDeepThin;
58
+ hiddenDeepThink = _props$hiddenDeepThin === void 0 ? false : _props$hiddenDeepThin,
59
+ _props$hasSuggestTips = props.hasSuggestTips,
60
+ hasSuggestTips = _props$hasSuggestTips === void 0 ? false : _props$hasSuggestTips;
59
61
  var store = useStore();
60
62
  var dispatch = useAppDispatch();
61
63
  var containerRef = React.useRef(null);
@@ -305,6 +307,7 @@ var CommonChat = /*#__PURE__*/React.forwardRef(function (props, ref) {
305
307
  initQuoteSource: props.initQuoteSource,
306
308
  agentList: agentList,
307
309
  hiddenDeepThink: hiddenDeepThink,
310
+ hasSuggestTips: hasSuggestTips,
308
311
  onAgentChange: setCurrentAgentId
309
312
  }, props.chatInputConfig)), showPrologue && messageList.length === 0 && !isMoreLoading && quickQuestionListPosition === 'bottom' && /*#__PURE__*/React.createElement(PresetAgentContent, {
310
313
  prologue: '',
@@ -25,6 +25,7 @@ declare const enUS: {
25
25
  'chatInput.micPermissionRequired': string;
26
26
  'chatInput.more': string;
27
27
  'chatInput.stopVoiceInput': string;
28
+ 'chatInput.aiGeneratedTip': string;
28
29
  'answer.taskCompleted': string;
29
30
  'answer.stopped': string;
30
31
  'answer.courseRecommend': string;
@@ -25,6 +25,7 @@ var enUS = {
25
25
  'chatInput.micPermissionRequired': 'Microphone access required',
26
26
  'chatInput.more': 'More',
27
27
  'chatInput.stopVoiceInput': 'Stop Voice Input',
28
+ 'chatInput.aiGeneratedTip': 'AI-generated response for reference only',
28
29
  'answer.taskCompleted': 'Task completed!',
29
30
  'answer.stopped': 'Stopped',
30
31
  'answer.courseRecommend': 'Related Courses',
@@ -25,6 +25,7 @@ declare const zhCN: {
25
25
  'chatInput.micPermissionRequired': string;
26
26
  'chatInput.more': string;
27
27
  'chatInput.stopVoiceInput': string;
28
+ 'chatInput.aiGeneratedTip': string;
28
29
  'answer.taskCompleted': string;
29
30
  'answer.stopped': string;
30
31
  'answer.courseRecommend': string;
@@ -60,6 +61,8 @@ declare const zhCN: {
60
61
  'trace.tryFull': string;
61
62
  'trace.iconAlt': string;
62
63
  'trace.countByType': string;
64
+ 'trace.unit.piece': string;
65
+ 'trace.unit.article': string;
63
66
  'file.totalInConversation': string;
64
67
  'file.download': string;
65
68
  'file.previewTitle': string;
@@ -9,7 +9,7 @@ var zhCN = {
9
9
  'knowledgeTrace.type.document': '文档',
10
10
  'knowledgeTrace.type.video': '视频',
11
11
  'knowledgeTrace.type.course': '课程',
12
- 'knowledgeTrace.type.information': '篇溯源内容',
12
+ 'knowledgeTrace.type.information': '溯源内容',
13
13
  'reasoningSearch.summary': '搜索结果',
14
14
  'chatInput.maxLength': '最多输入10000个字符',
15
15
  'chatInput.uploadLimitOne': '最多上传一个文件哦',
@@ -25,6 +25,7 @@ var zhCN = {
25
25
  'chatInput.micPermissionRequired': '需要麦克风访问权限',
26
26
  'chatInput.more': '更多',
27
27
  'chatInput.stopVoiceInput': '停止语音输入',
28
+ 'chatInput.aiGeneratedTip': '回答由AI生成,仅供参考',
28
29
  'answer.taskCompleted': '本次任务已完成!',
29
30
  'answer.stopped': '已停止',
30
31
  'answer.courseRecommend': '相关课程推荐',
@@ -59,7 +60,9 @@ var zhCN = {
59
60
  'trace.tryFullTips': '您当前可试看部分内容,点击右侧按钮查看完整内容。',
60
61
  'trace.tryFull': '查看',
61
62
  'trace.iconAlt': '知识库溯源图标',
62
- 'trace.countByType': '{{count}}{{type}}',
63
+ 'trace.countByType': '{{count}}{{unit}}{{type}}',
64
+ 'trace.unit.piece': '个',
65
+ 'trace.unit.article': '篇',
63
66
  'file.totalInConversation': '本对话共{{count}}个文档',
64
67
  'file.download': '下载',
65
68
  'file.previewTitle': '文档预览',
@@ -153,6 +153,7 @@ export interface CommonChatProps {
153
153
  interruptKey?: string;
154
154
  agentList?: AgentConfig[];
155
155
  hiddenDeepThink?: boolean;
156
+ hasSuggestTips?: boolean;
156
157
  }
157
158
 
158
159
  export interface MessageConfig {