(paramsObj: ICommonObject)
| 1037 | let flowNodeData = cloneDeep(reactFlowNodeData) |
| 1038 | |
| 1039 | const getParamValues = async (paramsObj: ICommonObject) => { |
| 1040 | for (const key in paramsObj) { |
| 1041 | const paramValue: string = paramsObj[key] |
| 1042 | if (Array.isArray(paramValue)) { |
| 1043 | const resolvedInstances = [] |
| 1044 | for (const param of paramValue) { |
| 1045 | const resolvedInstance = await getVariableValue( |
| 1046 | param, |
| 1047 | reactFlowNodes, |
| 1048 | question, |
| 1049 | chatHistory, |
| 1050 | undefined, |
| 1051 | flowConfig, |
| 1052 | uploadedFilesContent, |
| 1053 | availableVariables, |
| 1054 | variableOverrides |
| 1055 | ) |
| 1056 | resolvedInstances.push(resolvedInstance) |
| 1057 | } |
| 1058 | paramsObj[key] = resolvedInstances |
| 1059 | } else { |
| 1060 | const isAcceptVariable = reactFlowNodeData.inputParams.find((param) => param.name === key)?.acceptVariable ?? false |
| 1061 | const resolvedInstance = await getVariableValue( |
| 1062 | paramValue, |
| 1063 | reactFlowNodes, |
| 1064 | question, |
| 1065 | chatHistory, |
| 1066 | isAcceptVariable, |
| 1067 | flowConfig, |
| 1068 | uploadedFilesContent, |
| 1069 | availableVariables, |
| 1070 | variableOverrides |
| 1071 | ) |
| 1072 | paramsObj[key] = resolvedInstance |
| 1073 | } |
| 1074 | } |
| 1075 | } |
| 1076 | |
| 1077 | const paramsObj = flowNodeData['inputs'] ?? {} |
| 1078 | await getParamValues(paramsObj) |
no test coverage detected