Feat: Add agent advanced settings form #3221 (#8592)

### What problem does this PR solve?

Feat: Add agent advanced settings form #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-01 10:52:48 +08:00
committed by GitHub
parent 32f8b3ad77
commit 103027580e
12 changed files with 157 additions and 29 deletions

View File

@ -2,7 +2,7 @@ import { useFetchModelId } from '@/hooks/logic-hooks';
import { RAGFlowNodeType } from '@/interfaces/database/flow';
import { get, isEmpty } from 'lodash';
import { useMemo } from 'react';
import { initialAgentValues } from '../../constant';
import { AgentExceptionMethod, initialAgentValues } from '../../constant';
export function useValues(node?: RAGFlowNodeType) {
const llmId = useFetchModelId();
@ -23,7 +23,14 @@ export function useValues(node?: RAGFlowNodeType) {
return defaultValues;
}
return { ...formData, prompts: get(formData, 'prompts.0.content', '') };
return {
...formData,
prompts: get(formData, 'prompts.0.content', ''),
exception_method:
formData.exception_method === null
? AgentExceptionMethod.Null
: formData.exception_method,
};
}, [defaultValues, node?.data?.form]);
return values;