mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-18 03:35:57 +08:00
fix: file upload tip
This commit is contained in:
parent
c05902404d
commit
b67b81bf8f
@ -178,7 +178,7 @@ const Debug: FC<IDebug> = ({
|
||||
}
|
||||
|
||||
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 !hasEmptyInput
|
||||
|
@ -80,7 +80,7 @@ const ChatInputArea = ({
|
||||
if (onSend) {
|
||||
const { files, setFiles } = filesStore.getState()
|
||||
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
|
||||
}
|
||||
if (!query || !query.trim()) {
|
||||
|
@ -38,7 +38,7 @@ export const useCheckInputsForms = () => {
|
||||
}
|
||||
|
||||
if (fileIsUploading) {
|
||||
notify({ type: 'info', message: t('appDebug.errorMessage.waitForImgUpload') })
|
||||
notify({ type: 'info', message: t('appDebug.errorMessage.waitForFileUpload') })
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ const Result: FC<IResultProps> = ({
|
||||
const prompt_variables = promptConfig?.prompt_variables
|
||||
if (!prompt_variables || prompt_variables?.length === 0) {
|
||||
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 true
|
||||
@ -144,7 +144,7 @@ const Result: FC<IResultProps> = ({
|
||||
}
|
||||
|
||||
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 !hasEmptyInput
|
||||
|
@ -287,6 +287,7 @@ const translation = {
|
||||
'Please wait for the response to the batch task to complete.',
|
||||
notSelectModel: 'Please choose a model',
|
||||
waitForImgUpload: 'Please wait for the image to upload',
|
||||
waitForFileUpload: 'Please wait for the file/files to upload',
|
||||
},
|
||||
warningMessage: {
|
||||
timeoutExceeded: 'Results are not displayed due to timeout. Please refer to the logs to gather complete results.',
|
||||
|
@ -285,6 +285,7 @@ const translation = {
|
||||
waitForBatchResponse: '请等待批量任务完成',
|
||||
notSelectModel: '请选择模型',
|
||||
waitForImgUpload: '请等待图片上传完成',
|
||||
waitForFileUpload: '请等待文件上传完成',
|
||||
},
|
||||
chatSubTitle: '提示词',
|
||||
completionSubTitle: '前缀提示词',
|
||||
|
Loading…
x
Reference in New Issue
Block a user