mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-06 21:35:52 +08:00
fix: prevent model update when same model is selected
This commit is contained in:
parent
de9cb2fbdb
commit
fab1d29c83
@ -25,7 +25,7 @@ const SelectAgentModelButton: FC<Props> = ({ agent, model }) => {
|
|||||||
|
|
||||||
const onSelectModel = async () => {
|
const onSelectModel = async () => {
|
||||||
const selectedModel = await SelectApiModelPopup.show({ model, filter: modelFilter })
|
const selectedModel = await SelectApiModelPopup.show({ model, filter: modelFilter })
|
||||||
if (selectedModel) {
|
if (selectedModel && selectedModel.id !== agent.model) {
|
||||||
update({ id: agent.id, model: selectedModel.id })
|
update({ id: agent.id, model: selectedModel.id })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user