chore: display warning message after form change in edit model

This commit is contained in:
jialin
2025-04-10 12:21:55 +08:00
parent 1182fdeb43
commit 7c79accda7
23 changed files with 126 additions and 71 deletions
@@ -96,7 +96,7 @@ const AddModal: FC<AddModalProps> = (props) => {
const intl = useIntl();
const [selectedModel, setSelectedModel] = useState<any>({});
const [collapsed, setCollapsed] = useState<boolean>(false);
const [isGGUF, setIsGGUF] = useState<boolean>(props.isGGUF || false);
const [isGGUF, setIsGGUF] = useState<boolean>(false);
const modelFileRef = useRef<any>(null);
const getDefaultSpec = (item: any) => {
@@ -225,6 +225,7 @@ const AddModal: FC<AddModalProps> = (props) => {
? backendOptionsMap.llamaBox
: backendOptionsMap.vllm;
form.current?.setFieldValue?.('backend', backend);
setIsGGUF(source === modelSourceMap.ollama_library_value);
}
};