fix: agent strategy string type parameter default value invalid (#18185)

This commit is contained in:
Junjie.M 2025-04-16 17:03:18 +08:00 committed by GitHub
parent 8cc37f3115
commit da7c8621f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,7 +65,7 @@ export const AgentStrategy = memo((props: AgentStrategyProps) => {
switch (schema.type) {
case FormTypeEnum.textInput: {
const def = schema as CredentialFormSchemaTextInput
const value = props.value[schema.variable]
const value = props.value[schema.variable] || schema.default
const onChange = (value: string) => {
props.onChange({ ...props.value, [schema.variable]: value })
}