chore: can use setting config

This commit is contained in:
Joel
2025-04-15 18:18:46 +08:00
parent 4ae03c2101
commit beda954867
3 changed files with 36 additions and 5 deletions

View File

@ -21,7 +21,7 @@ export const userInputsFormToPromptVariables = (useInputs: UserInputFormItem[] |
return [type === 'text-input' ? 'string' : type, item[type]]
})()
if (type === 'string' || type === 'paragraph' || type === 'file' || type === 'file-list') {
if (type === 'string' || type === 'paragraph') {
promptVariables.push({
key: content.variable,
name: content.label,
@ -40,6 +40,17 @@ export const userInputsFormToPromptVariables = (useInputs: UserInputFormItem[] |
options: [],
})
}
else if (type === 'file' || type === 'file-list') {
promptVariables.push({
...content,
key: content.variable,
name: content.label,
required: content.required,
type,
max_length: content.max_length,
options: [],
})
}
else {
promptVariables.push({
key: content.variable,