Fix variable config (#23070)

This commit is contained in:
GuanMu 2025-07-29 11:24:59 +08:00 • committed by GitHub
commit 7721648867
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 30 additions and 6 deletions

View file

@ -66,7 +66,9 @@ const RunOnce: FC<IRunOnceProps> = ({
useEffect(() => {
const newInputs: Record<string, any> = {}
promptConfig.prompt_variables.forEach((item) => {
if (item.type === 'string' || item.type === 'paragraph')
if (item.type === 'select')
newInputs[item.key] = item.default
else if (item.type === 'string' || item.type === 'paragraph')
newInputs[item.key] = ''
else
newInputs[item.key] = undefined