fix: do not close loading when evaluating

This commit is contained in:
jialin
2025-04-24 20:36:34 +08:00
parent 9a6b907c11
commit d4ffd8e8e4
3 changed files with 15 additions and 4 deletions
@@ -239,7 +239,6 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
};
});
setIsEvaluating(true);
displayEvaluateStatus?.(true);
const evaluations = await getEvaluateResults(repoList);
const resultList = list.map((item, index) => {
return {
@@ -248,6 +247,7 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
};
});
setIsEvaluating(false);
setDataSource((pre) => {
return {
...pre,
@@ -258,6 +258,7 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
const currentItem = resultList.find(
(item) => item.id === currentRef.current
);
displayEvaluateStatus?.(false);
if (currentItem) {
handleOnSelectModel(currentItem, true);
}
@@ -283,6 +284,7 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
return { ...pre };
});
setLoadingModel?.(true);
displayEvaluateStatus?.(true);
cacheRepoOptions.current = [];
let list: any[] = [];
if (modelSource === modelSourceMap.huggingface_value) {