From 0b3884b1a5be45686fd8ef24b248e85bde24b92b Mon Sep 17 00:00:00 2001 From: jialin Date: Tue, 19 May 2026 11:39:39 +0800 Subject: [PATCH] fix: gguf input box is hidden when deploying from model files --- src/pages/benchmark/index.tsx | 2 +- src/pages/llmodels/components/deployment/deploy-modal.tsx | 4 +++- src/pages/llmodels/components/download/index.tsx | 1 + src/pages/llmodels/forms/backend.tsx | 5 ----- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/pages/benchmark/index.tsx b/src/pages/benchmark/index.tsx index bccf5dff..af774f6c 100644 --- a/src/pages/benchmark/index.tsx +++ b/src/pages/benchmark/index.tsx @@ -180,7 +180,7 @@ const Benchmark: React.FC = () => { loading={dataSource.loading} loadend={dataSource.loadend} dataSource={[]} - image={} + image={} filters={_.omit(queryParams, ['sort_by'])} noFoundText={intl.formatMessage({ id: 'noresult.benchmark.nofound' diff --git a/src/pages/llmodels/components/deployment/deploy-modal.tsx b/src/pages/llmodels/components/deployment/deploy-modal.tsx index ba8d5033..0a2f9255 100644 --- a/src/pages/llmodels/components/deployment/deploy-modal.tsx +++ b/src/pages/llmodels/components/deployment/deploy-modal.tsx @@ -104,6 +104,7 @@ const AddModal: FC = (props) => { width = 600, deploymentType = 'modelList', initialValues, + isGGUF: isGGUFProp, clusterList } = props || {}; const SEARCH_SOURCE = [ @@ -543,6 +544,7 @@ const AddModal: FC = (props) => { useEffect(() => { if (open) { + setIsGGUF(isGGUFProp || false); handleOnOpen(); } else { cancelEvaluate(); @@ -556,7 +558,7 @@ const AddModal: FC = (props) => { message: [] }); }; - }, [open, clusterList, initialValues?.cluster_id]); + }, [open, clusterList, initialValues?.cluster_id, isGGUFProp]); return ( = (props) => { onCollapse={setCollapsed} collapsed={collapsed} modelSource={props.source} + isGGUF={isGGUF} setIsGGUF={handleSetIsGGUF} > {isGGUF && ( diff --git a/src/pages/llmodels/forms/backend.tsx b/src/pages/llmodels/forms/backend.tsx index 9762f0a6..ea971199 100644 --- a/src/pages/llmodels/forms/backend.tsx +++ b/src/pages/llmodels/forms/backend.tsx @@ -45,11 +45,6 @@ const BackendFields: React.FC = () => { useCompareEnvs(); const handleBackendVersionOnChange = (value: any, option: any) => { - // const oldEnvs = _.get(initialValues, 'env') || {}; - // const newEnvs = option.data?.env || {}; - - // handleCompareEnvs(oldEnvs, newEnvs); - if (Object.keys(option.data?.env || {}).length > 0) { form.setFieldValue('env', { ...(option?.data?.env || {}) }); }