chore: improve bool input of start node (#26647)

This commit is contained in:
非法操作
2025-10-08 19:09:03 +08:00
committed by GitHub
parent dbd23f91e5
commit 9cca605bac
6 changed files with 59 additions and 7 deletions

View File

@@ -126,8 +126,8 @@ const Result: FC<IResultProps> = ({
let hasEmptyInput = ''
const requiredVars = prompt_variables?.filter(({ key, name, required, type }) => {
if(type === 'boolean')
return false // boolean input is not required
if(type === 'boolean' || type === 'checkbox')
return false // boolean/checkbox input is not required
const res = (!key || !key.trim()) || (!name || !name.trim()) || (required || required === undefined || required === null)
return res
}) || [] // compatible with old version