fix: update the requestId when switch model

This commit is contained in:
jialin
2025-07-09 16:03:07 +08:00
parent b167170aa9
commit af0aaddbfd
14 changed files with 116 additions and 27 deletions
@@ -299,6 +299,7 @@ const AddModal: FC<AddModalProps> = (props) => {
) {
return;
}
console.log('isgguf==================> select 1', item.isGGUF);
console.log('handleOnSelectModel:', item, selectedModel);
setIsGGUF(item.isGGUF);
clearCahceFormValues();
@@ -343,6 +344,7 @@ const AddModal: FC<AddModalProps> = (props) => {
if (manual) {
form.current?.resetFields(resetFields);
}
console.log('isgguf==================> select 2', item.isGGUF);
// If the item is empty
setIsGGUF(item.isGGUF);
updateSelectedModel(item);
@@ -398,6 +400,7 @@ const AddModal: FC<AddModalProps> = (props) => {
};
const handleSetIsGGUF = async (flag: boolean) => {
console.log('isgguf==================>', flag);
setIsGGUF(flag);
};
@@ -40,6 +40,14 @@ const PaginationMain = styled(Pagination)`
}
`;
const IconFontWrapper = styled.div`
.ant-pagination-item-link {
display: flex !important;
align-items: center;
justify-content: center;
}
`;
interface SearchInputProps {
hasLinuxWorker?: boolean;
modelSource: string;
@@ -499,6 +507,7 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
if (model.id === currentRef.current) {
return;
}
setRquestId();
handleOnSelectModel(model, true);
};
+1 -1
View File
@@ -200,7 +200,7 @@ const resultList = options.map((option) => {
value: option.value,
opts: option.options?.map((opt) => {
return {
label: opt,
label: `${opt}`,
value: opt
};
})