fix: prevent model update when same model is selected

This commit is contained in:
icarus 2025-09-26 04:06:17 +08:00
parent de9cb2fbdb
commit fab1d29c83

View File

@ -25,7 +25,7 @@ const SelectAgentModelButton: FC<Props> = ({ agent, model }) => {
const onSelectModel = async () => {
const selectedModel = await SelectApiModelPopup.show({ model, filter: modelFilter })
if (selectedModel) {
if (selectedModel && selectedModel.id !== agent.model) {
update({ id: agent.id, model: selectedModel.id })
}
}