fix: file upload tip

This commit is contained in:
StyleZhang 2024-09-30 14:51:38 +08:00
parent c05902404d
commit b67b81bf8f
6 changed files with 7 additions and 5 deletions

View File

@ -178,7 +178,7 @@ const Debug: FC<IDebug> = ({
} }
if (completionFiles.find(item => item.transfer_method === TransferMethod.local_file && !item.upload_file_id)) { if (completionFiles.find(item => item.transfer_method === TransferMethod.local_file && !item.upload_file_id)) {
notify({ type: 'info', message: t('appDebug.errorMessage.waitForImgUpload') }) notify({ type: 'info', message: t('appDebug.errorMessage.waitForFileUpload') })
return false return false
} }
return !hasEmptyInput return !hasEmptyInput

View File

@ -80,7 +80,7 @@ const ChatInputArea = ({
if (onSend) { if (onSend) {
const { files, setFiles } = filesStore.getState() const { files, setFiles } = filesStore.getState()
if (files.find(item => item.transferMethod === TransferMethod.local_file && !item.uploadedId)) { if (files.find(item => item.transferMethod === TransferMethod.local_file && !item.uploadedId)) {
notify({ type: 'info', message: t('appDebug.errorMessage.waitForImgUpload') }) notify({ type: 'info', message: t('appDebug.errorMessage.waitForFileUpload') })
return return
} }
if (!query || !query.trim()) { if (!query || !query.trim()) {

View File

@ -38,7 +38,7 @@ export const useCheckInputsForms = () => {
} }
if (fileIsUploading) { if (fileIsUploading) {
notify({ type: 'info', message: t('appDebug.errorMessage.waitForImgUpload') }) notify({ type: 'info', message: t('appDebug.errorMessage.waitForFileUpload') })
return return
} }

View File

@ -119,7 +119,7 @@ const Result: FC<IResultProps> = ({
const prompt_variables = promptConfig?.prompt_variables const prompt_variables = promptConfig?.prompt_variables
if (!prompt_variables || prompt_variables?.length === 0) { if (!prompt_variables || prompt_variables?.length === 0) {
if (completionFiles.find(item => item.transfer_method === TransferMethod.local_file && !item.upload_file_id)) { if (completionFiles.find(item => item.transfer_method === TransferMethod.local_file && !item.upload_file_id)) {
notify({ type: 'info', message: t('appDebug.errorMessage.waitForImgUpload') }) notify({ type: 'info', message: t('appDebug.errorMessage.waitForFileUpload') })
return false return false
} }
return true return true
@ -144,7 +144,7 @@ const Result: FC<IResultProps> = ({
} }
if (completionFiles.find(item => item.transfer_method === TransferMethod.local_file && !item.upload_file_id)) { if (completionFiles.find(item => item.transfer_method === TransferMethod.local_file && !item.upload_file_id)) {
notify({ type: 'info', message: t('appDebug.errorMessage.waitForImgUpload') }) notify({ type: 'info', message: t('appDebug.errorMessage.waitForFileUpload') })
return false return false
} }
return !hasEmptyInput return !hasEmptyInput

View File

@ -287,6 +287,7 @@ const translation = {
'Please wait for the response to the batch task to complete.', 'Please wait for the response to the batch task to complete.',
notSelectModel: 'Please choose a model', notSelectModel: 'Please choose a model',
waitForImgUpload: 'Please wait for the image to upload', waitForImgUpload: 'Please wait for the image to upload',
waitForFileUpload: 'Please wait for the file/files to upload',
}, },
warningMessage: { warningMessage: {
timeoutExceeded: 'Results are not displayed due to timeout. Please refer to the logs to gather complete results.', timeoutExceeded: 'Results are not displayed due to timeout. Please refer to the logs to gather complete results.',

View File

@ -285,6 +285,7 @@ const translation = {
waitForBatchResponse: '请等待批量任务完成', waitForBatchResponse: '请等待批量任务完成',
notSelectModel: '请选择模型', notSelectModel: '请选择模型',
waitForImgUpload: '请等待图片上传完成', waitForImgUpload: '请等待图片上传完成',
waitForFileUpload: '请等待文件上传完成',
}, },
chatSubTitle: '提示词', chatSubTitle: '提示词',
completionSubTitle: '前缀提示词', completionSubTitle: '前缀提示词',