mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
merge main
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
import type { NodeDefault, Var } from '../../types'
|
||||
import { getNotExistVariablesByArray } from '../../utils/workflow'
|
||||
import type { NodeDefault } from '../../types'
|
||||
import type { DocExtractorNodeType } from './types'
|
||||
import { genNodeMetaData } from '@/app/components/workflow/utils'
|
||||
import { BlockEnum } from '@/app/components/workflow/types'
|
||||
@ -30,19 +29,6 @@ const nodeDefault: NodeDefault<DocExtractorNodeType> = {
|
||||
errorMessage: errorMessages,
|
||||
}
|
||||
},
|
||||
checkVarValid(payload: DocExtractorNodeType, varMap: Record<string, Var>, t: any) {
|
||||
const errorMessageArr: string[] = []
|
||||
|
||||
const variables_warnings = getNotExistVariablesByArray([payload.variable_selector], varMap)
|
||||
if (variables_warnings.length)
|
||||
errorMessageArr.push(`${t('workflow.nodes.docExtractor.inputVar')} ${t('workflow.common.referenceVar')}${variables_warnings.join('、')}${t('workflow.common.noExist')}`)
|
||||
|
||||
return {
|
||||
isValid: true,
|
||||
warning_vars: variables_warnings,
|
||||
errorMessage: errorMessageArr,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export default nodeDefault
|
||||
|
||||
Reference in New Issue
Block a user