Fix(search): Search application list supports renaming function #3221 (#9555)

### What problem does this PR solve?

Fix (search): Search application list supports renaming function #3221

-Update the search application list page and add a renaming operation
entry
-Modify the search application details interface to support obtaining
detailed information
-Optimize search settings page layout and style

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-08-19 17:35:32 +08:00
committed by GitHub
parent 0aa3c4cdae
commit f2c5ad170d
14 changed files with 152 additions and 67 deletions

View File

@ -30,18 +30,20 @@ interface LlmSettingFieldItemsProps {
prefix?: string;
options?: any[];
}
export const LlmSettingSchema = {
llm_id: z.string(),
parameter: z.string(),
temperature: z.coerce.number(),
top_p: z.coerce.number(),
presence_penalty: z.coerce.number(),
frequency_penalty: z.coerce.number(),
const LlmSettingEnableSchema = {
temperatureEnabled: z.boolean(),
topPEnabled: z.boolean(),
presencePenaltyEnabled: z.boolean(),
frequencyPenaltyEnabled: z.boolean(),
};
export const LlmSettingSchema = {
llm_id: z.string(),
parameter: z.string().optional(),
temperature: z.coerce.number().optional(),
top_p: z.coerce.number().optional(),
presence_penalty: z.coerce.number().optional(),
frequency_penalty: z.coerce.number().optional(),
...LlmSettingEnableSchema,
// maxTokensEnabled: z.boolean(),
};
@ -65,6 +67,7 @@ export function LlmSettingFieldItems({
settledModelVariableMap[
parameter as keyof typeof settledModelVariableMap
];
const enabledKeys = Object.keys(LlmSettingEnableSchema);
// const nextValues = { ...currentValues, ...values };
@ -75,6 +78,11 @@ export function LlmSettingFieldItems({
form.setValue(`${prefix}.${key}`, element);
}
}
if (enabledKeys && enabledKeys.length) {
for (const key of enabledKeys) {
form.setValue(`${prefix}.${key}`, true);
}
}
},
[form, prefix],
);