fix(settings): prioritize actual agent type when editing agent configurations

This commit is contained in:
yiling
2026-06-22 09:27:37 +08:00
parent 754131f13a
commit c20ef0e4b6
@@ -116,7 +116,7 @@ export function AgentFormDialog({
const form = useForm({
defaultValues: {
name: initialValues?.name || '',
type: type || initialValues?.type || 'chat',
type: initialValues?.type || type || 'chat',
avatar: initialValues?.avatar || AVAILABLE_AVATARS[0],
providerId: initialValues?.providerId || '',
modelId: initialValues?.modelId || '',