mirror of
https://github.com/langgenius/dify.git
synced 2025-07-28 20:10:22 +00:00

Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: Yeuoly <admin@srmxy.cn>
11 lines
348 B
TypeScript
11 lines
348 B
TypeScript
export const transformFormSchemasSecretInput = (isPristineSecretInputNames: string[], values: Record<string, any>) => {
|
|
const transformedValues: Record<string, any> = { ...values }
|
|
|
|
isPristineSecretInputNames.forEach((name) => {
|
|
if (transformedValues[name])
|
|
transformedValues[name] = '[__HIDDEN__]'
|
|
})
|
|
|
|
return transformedValues
|
|
}
|