@myun/gimi-chat 0.9.26 → 0.9.27

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.
@@ -479,8 +479,26 @@ var ChatInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
479
479
  var _props$onSend;
480
480
  var inputContents = content.inputContents || [];
481
481
  var text = extractText(inputContents);
482
+
483
+ // 检查是否有文件正在上传或解析中
484
+ var uploadingFile = fileList === null || fileList === void 0 ? void 0 : fileList.find(function (file) {
485
+ return file.status === FileStatus.UPLOADING || file.status === FileStatus.PADDING || file.status === FileStatus.RETRING;
486
+ });
487
+ if (uploadingFile) {
488
+ var _inputRef$current7;
489
+ // 文件处理中,恢复输入内容,不发送
490
+ var message = '';
491
+ if (uploadingFile.status === FileStatus.UPLOADING || uploadingFile.status === FileStatus.RETRING) {
492
+ message = t('fileValidation.uploading');
493
+ } else if (uploadingFile.status === FileStatus.PADDING) {
494
+ message = t('fileValidation.parsing');
495
+ }
496
+ Toast.info(message);
497
+ (_inputRef$current7 = inputRef.current) === null || _inputRef$current7 === void 0 || _inputRef$current7.setContent(text);
498
+ return;
499
+ }
482
500
  (_props$onSend = props.onSend) === null || _props$onSend === void 0 || _props$onSend.call(props, text);
483
- }, [props]);
501
+ }, [props, fileList, t]);
484
502
  var renderConfigureArea = React.useCallback(function () {
485
503
  return /*#__PURE__*/React.createElement("div", {
486
504
  className: styles.configureArea
@@ -335,7 +335,7 @@ var FileUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
335
335
  limit: MAX_TOTAL_COUNT
336
336
  }));
337
337
  },
338
- multiple: true,
338
+ multiple: false,
339
339
  accept: (accept === null || accept === void 0 ? void 0 : accept.join(',')) || DEFAULT_ACCEPT,
340
340
  maxSize: maxSize * 1024,
341
341
  onSizeError: function onSizeError() {
@@ -15,7 +15,7 @@ var enUS = {
15
15
  'chatInput.uploadLimitFive': 'Upload limit is 5 files',
16
16
  'chatInput.uploadLimitTen': 'Upload limit is 10 files',
17
17
  'chatInput.flowUnsupported': 'This button is not supported in the current flow. Please wait for the current flow to finish or follow the instructions on the chat card.',
18
- 'chatInput.uploadFile': 'Supports Word, Excel, images\nUp to 10 files (max 20MB each)',
18
+ 'chatInput.uploadFile': 'Supports Word, Excel, images\nUp to 10 files (max 10MB each)',
19
19
  'chatInput.newConversation': 'New conversation',
20
20
  'chatInput.deepThinkTip': 'System intelligently switches thinking mode',
21
21
  'chatInput.deepThinkModeAuto': 'Thinking',
@@ -15,7 +15,7 @@ var zhCN = {
15
15
  'chatInput.uploadLimitFive': '最多上传5个文件哦',
16
16
  'chatInput.uploadLimitTen': '最多上传10个文件哦',
17
17
  'chatInput.flowUnsupported': '当前流程不支持该按钮的使用,请等待正在进行的流程结束或按对话卡片指示继续流程',
18
- 'chatInput.uploadFile': '支持Word、Excel、图片\n最多10个文件(单个不超过20M)',
18
+ 'chatInput.uploadFile': '支持Word、Excel、图片\n最多10个文件(单个不超过10M)',
19
19
  'chatInput.newConversation': '新对话',
20
20
  'chatInput.deepThinkTip': '系统智能切换思考模式',
21
21
  'chatInput.deepThinkModeAuto': '思考',