Fix variable config (#23070)

This commit is contained in:
GuanMu
2025-07-29 11:24:59 +08:00
committed by GitHub
parent 47cc951841
commit 7721648867
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