mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-13 09:16:04 +00:00
fix(botForm): default value not set to adapter_config while creating bot
This commit is contained in:
@@ -54,3 +54,10 @@ export function isDynamicFormItemType(
|
||||
export function parseDynamicFormItemType(value: string): DynamicFormItemType {
|
||||
return isDynamicFormItemType(value) ? value : DynamicFormItemType.UNKNOWN;
|
||||
}
|
||||
|
||||
export function getDefaultValues(itemConfigList: IDynamicFormItemConfig[]): Record<string, any> {
|
||||
return itemConfigList.reduce((acc, item) => {
|
||||
acc[item.name] = item.default;
|
||||
return acc;
|
||||
}, {} as Record<string, any>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user