chore: clear backend parameters、backend_version、env on change backend

This commit is contained in:
jialin
2025-04-11 18:49:06 +08:00
parent 7542ac9d87
commit 092aeceb9d
11 changed files with 102 additions and 95 deletions
+3 -1
View File
@@ -82,7 +82,9 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
const handleBackendChange = async (val: string) => {
const updates = {
backend_version: ''
backend_version: '',
backend_parameters: [],
env: {}
};
if (val === backendOptionsMap.llamaBox) {
Object.assign(updates, {
@@ -126,7 +126,9 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
const handleBackendChange = (backend: string) => {
const updates = {
backend_version: ''
backend_version: '',
backend_parameters: [],
env: {}
};
if (backend === backendOptionsMap.llamaBox) {
Object.assign(updates, {