Feat: Fixed the issue where the parameters could not be set after switching the large model parameter template. #8282 (#8283)

### What problem does this PR solve?

Feat: Fixed the issue where the parameters could not be set after
switching the large model parameter template. #8282

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-06-16 16:28:05 +08:00
committed by GitHub
parent 601e024d77
commit 36ee1d271d
3 changed files with 37 additions and 12 deletions

View File

@ -21,6 +21,7 @@ import {
ISwitchForm,
RAGFlowNodeType,
} from '@/interfaces/database/flow';
import { setChatVariableEnabledFieldValuePage } from '@/utils/chat';
import { message } from 'antd';
import { humanId } from 'human-id';
import { get, lowerFirst } from 'lodash';
@ -271,11 +272,13 @@ export const useHandleFormValuesChange = (id?: string) => {
'parameter' in changedValues &&
changedValues['parameter'] in settledModelVariableMap
) {
const enabledValues = setChatVariableEnabledFieldValuePage();
nextValues = {
...values,
...settledModelVariableMap[
changedValues['parameter'] as keyof typeof settledModelVariableMap
],
...enabledValues,
};
}
if (id) {