fix: handle debug run valid

This commit is contained in:
Joel 2024-04-02 15:26:55 +08:00
parent 01e832a587
commit 34f4f76f67
1 changed files with 12 additions and 10 deletions

View File

@ -142,7 +142,18 @@ const useConfig = (id: string, payload: ToolNodeType) => {
data: inputs,
defaultRunInputData: {},
moreDataForCheckValid: {
toolInputsSchema: [],
toolInputsSchema: (() => {
const formInputs: InputVar[] = []
toolInputVarSchema.forEach((item: any) => {
formInputs.push({
label: item.label[language] || item.label.en_US,
variable: item.variable,
type: item.type,
required: item.required,
})
})
return formInputs
})(),
toolSettingSchema,
language,
},
@ -160,15 +171,6 @@ const useConfig = (id: string, payload: ToolNodeType) => {
}))
const singleRunForms = (() => {
const formInputs: InputVar[] = []
toolInputVarSchema.forEach((item: any) => {
formInputs.push({
label: item.label[language] || item.label.en_US,
variable: item.variable,
type: item.type,
required: item.required,
})
})
const forms: FormProps[] = [{
inputs: varInputs,
values: inputVarValuesWithConstantValue(),