mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 20:12:38 +08:00
fix(AgentEssentialSettings): prevent unnecessary updates when name unchanged
This commit is contained in:
parent
20dd4794b0
commit
4d266fddb1
@ -61,7 +61,11 @@ const AgentEssentialSettings: FC<AgentEssentialSettingsProps> = ({ agent, update
|
||||
placeholder={t('common.assistant') + t('common.name')}
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
onBlur={onUpdate}
|
||||
onBlur={() => {
|
||||
if (name !== agent.name) {
|
||||
onUpdate()
|
||||
}
|
||||
}}
|
||||
style={{ flex: 1 }}
|
||||
/>
|
||||
</HStack>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user