diff --git a/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx b/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx index 89de40add4..28001bef5e 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx @@ -167,7 +167,9 @@ function Form< validated={validatedSuccess} placeholder={placeholder?.[language] || placeholder?.en_US} disabled={disabled} - type={formSchema.type === FormTypeEnum.textNumber ? 'number' : 'text'} + type={formSchema.type === FormTypeEnum.secretInput ? 'password' + : formSchema.type === FormTypeEnum.textNumber ? 'number' + : 'text'} {...(formSchema.type === FormTypeEnum.textNumber ? { min: (formSchema as CredentialFormSchemaNumberInput).min, max: (formSchema as CredentialFormSchemaNumberInput).max } : {})} /> {fieldMoreInfo?.(formSchema)} {validating && changeKey === variable && } diff --git a/web/app/components/workflow/nodes/tool/node.tsx b/web/app/components/workflow/nodes/tool/node.tsx index 4a3469cc52..812d3e723f 100644 --- a/web/app/components/workflow/nodes/tool/node.tsx +++ b/web/app/components/workflow/nodes/tool/node.tsx @@ -7,7 +7,7 @@ import { FormTypeEnum } from '@/app/components/header/account-setting/model-prov const Node: FC> = ({ data, }) => { - const { tool_configurations } = data + const { tool_configurations, paramSchemas } = data const toolConfigs = Object.keys(tool_configurations || {}) if (!toolConfigs.length) @@ -23,6 +23,11 @@ const Node: FC> = ({ {typeof tool_configurations[key] === 'string' && (
+ {paramSchemas?.find(i => i.name === key)?.type === FormTypeEnum.secretInput ? '********' : tool_configurations[key]} +
+ )} + {typeof tool_configurations[key] === 'number' && ( +
{tool_configurations[key]}
)} diff --git a/web/app/components/workflow/nodes/tool/types.ts b/web/app/components/workflow/nodes/tool/types.ts index 4fbd945710..4b78c53ab2 100644 --- a/web/app/components/workflow/nodes/tool/types.ts +++ b/web/app/components/workflow/nodes/tool/types.ts @@ -21,4 +21,5 @@ export type ToolNodeType = CommonNodeType & { tool_parameters: ToolVarInputs tool_configurations: Record output_schema: Record + paramSchemas?: Record[] }