From 8fa3941db900f9815e32c843c2423410a9c11244 Mon Sep 17 00:00:00 2001 From: jialin Date: Wed, 30 Jul 2025 11:10:32 +0800 Subject: [PATCH] fix: do not evaluate when local path is null --- src/pages/llmodels/hooks/index.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pages/llmodels/hooks/index.ts b/src/pages/llmodels/hooks/index.ts index f872e5f1..63fff8fe 100644 --- a/src/pages/llmodels/hooks/index.ts +++ b/src/pages/llmodels/hooks/index.ts @@ -535,13 +535,22 @@ export const useCheckCompatibility = () => { cacheFormValuesRef.current = {}; }; + const noLocalPathValue = (allValues: any) => { + return ( + allValues.source === modelSourceMap.local_path_value && + !allValues.local_path + ); + }; const handleOnValuesChange = async (params: { changedValues: any; allValues: any; source: string; }) => { const { allValues, source } = params; - if (_.isEqual(cacheFormValuesRef.current, allValues)) { + if ( + _.isEqual(cacheFormValuesRef.current, allValues) || + noLocalPathValue(allValues) + ) { console.log('No changes detected, skipping evaluation.'); return; }