rename: des→description

pull/21556/head
Mminamiyama 11 months ago
parent 7e7962146e
commit d8d1103c1e

@ -462,7 +462,7 @@ const formatItem = (
return {
variable: `env.${env.name}`,
type: env.value_type,
des: env.description,
description: env.description,
}
}) as Var[]
break
@ -473,7 +473,7 @@ const formatItem = (
return {
variable: `conversation.${chatVar.name}`,
type: chatVar.value_type,
des: chatVar.description,
description: chatVar.description,
}
}) as Var[]
break

@ -80,7 +80,7 @@ const ChatVariableModal = ({
const [objectValue, setObjectValue] = React.useState<ObjectValueItem[]>([DEFAULT_OBJECT_VALUE])
const [editorContent, setEditorContent] = React.useState<string>()
const [editInJSON, setEditInJSON] = React.useState(false)
const [des, setDes] = React.useState<string>('')
const [description, setDescription] = React.useState<string>('')
const editorMinHeight = useMemo(() => {
if (type === ChatVarType.ArrayObject)
@ -230,7 +230,7 @@ const ChatVariableModal = ({
name,
value_type: type,
value: formatValue(value),
description: des,
description,
})
onClose()
}
@ -240,7 +240,7 @@ const ChatVariableModal = ({
setName(chatVar.name)
setType(chatVar.value_type)
setValue(chatVar.value)
setDes(chatVar.description)
setDescription(chatVar.description)
setObjectValue(getObjectValue())
if (chatVar.value_type === ChatVarType.ArrayObject) {
setEditorContent(JSON.stringify(chatVar.value))
@ -378,9 +378,9 @@ const ChatVariableModal = ({
<div className='flex'>
<textarea
className='system-sm-regular placeholder:system-sm-regular block h-20 w-full resize-none appearance-none rounded-lg border border-transparent bg-components-input-bg-normal p-2 text-components-input-text-filled caret-primary-600 outline-none placeholder:text-components-input-text-placeholder hover:border-components-input-border-hover hover:bg-components-input-bg-hover focus:border-components-input-border-active focus:bg-components-input-bg-active focus:shadow-xs'
value={des}
value={description}
placeholder={t('workflow.chatVariable.modal.descriptionPlaceholder') || ''}
onChange={e => setDes(e.target.value)}
onChange={e => setDescription(e.target.value)}
/>
</div>
</div>

@ -29,7 +29,7 @@ const VariableModal = ({
const [type, setType] = React.useState<'string' | 'number' | 'secret'>('string')
const [name, setName] = React.useState('')
const [value, setValue] = React.useState<any>()
const [des, setDes] = React.useState<string>('')
const [description, setDescription] = React.useState<string>('')
const checkVariableName = (value: string) => {
const { isValid, errorMessageKey } = checkKeys([value], false)
@ -61,7 +61,7 @@ const VariableModal = ({
value_type: type,
name,
value: type === 'number' ? Number(value) : value,
description: des,
description,
})
onClose()
}
@ -71,7 +71,7 @@ const VariableModal = ({
setType(env.value_type)
setName(env.name)
setValue(env.value_type === 'secret' ? envSecrets[env.id] : env.value)
setDes(env.description)
setDescription(env.description)
}
}, [env, envSecrets])
@ -162,9 +162,9 @@ const VariableModal = ({
<div className='flex'>
<textarea
className='system-sm-regular placeholder:system-sm-regular block h-20 w-full resize-none appearance-none rounded-lg border border-transparent bg-components-input-bg-normal p-2 text-components-input-text-filled caret-primary-600 outline-none placeholder:text-components-input-text-placeholder hover:border-components-input-border-hover hover:bg-components-input-bg-hover focus:border-components-input-border-active focus:bg-components-input-bg-active focus:shadow-xs'
value={des}
value={description}
placeholder={t('workflow.env.modal.descriptionPlaceholder') || ''}
onChange={e => setDes(e.target.value)}
onChange={e => setDescription(e.target.value)}
/>
</div>
</div>

Loading…
Cancel
Save