CI: add TS indentation check via esLint (#24810)
This commit is contained in:
@@ -70,9 +70,9 @@ export const addDefaultValue = (value: Record<string, any>, formSchemas: { varia
|
||||
if (formSchema.type === 'boolean' && itemValue !== undefined && itemValue !== null && itemValue !== '') {
|
||||
if (typeof itemValue === 'string')
|
||||
newValues[formSchema.variable] = itemValue === 'true' || itemValue === '1' || itemValue === 'True'
|
||||
else if (typeof itemValue === 'number')
|
||||
else if (typeof itemValue === 'number')
|
||||
newValues[formSchema.variable] = itemValue === 1
|
||||
else if (typeof itemValue === 'boolean')
|
||||
else if (typeof itemValue === 'boolean')
|
||||
newValues[formSchema.variable] = itemValue
|
||||
}
|
||||
})
|
||||
@@ -162,13 +162,13 @@ export const getConfiguredValue = (value: Record<string, any>, formSchemas: { va
|
||||
}
|
||||
|
||||
const getVarKindType = (type: FormTypeEnum) => {
|
||||
if (type === FormTypeEnum.file || type === FormTypeEnum.files)
|
||||
return VarKindType.variable
|
||||
if (type === FormTypeEnum.select || type === FormTypeEnum.boolean || type === FormTypeEnum.textNumber)
|
||||
return VarKindType.constant
|
||||
if (type === FormTypeEnum.textInput || type === FormTypeEnum.secretInput)
|
||||
return VarKindType.mixed
|
||||
}
|
||||
if (type === FormTypeEnum.file || type === FormTypeEnum.files)
|
||||
return VarKindType.variable
|
||||
if (type === FormTypeEnum.select || type === FormTypeEnum.boolean || type === FormTypeEnum.textNumber)
|
||||
return VarKindType.constant
|
||||
if (type === FormTypeEnum.textInput || type === FormTypeEnum.secretInput)
|
||||
return VarKindType.mixed
|
||||
}
|
||||
|
||||
export const generateAgentToolValue = (value: Record<string, any>, formSchemas: { variable: string; default?: any; type: string }[], isReasoning = false) => {
|
||||
const newValues = {} as any
|
||||
|
Reference in New Issue
Block a user