mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 00:46:52 +08:00
Feat: Switching the programming language of the code operator will switch the corresponding language template #3221 (#7770)
### What problem does this PR solve? Feat: Switching the programming language of the code operator will switch the corresponding language template #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -17,7 +17,8 @@ import { useForm } from 'react-hook-form';
|
||||
import { BeginId, Operator, operatorMap } from '../constant';
|
||||
import { FlowFormContext } from '../context';
|
||||
import { RunTooltip } from '../flow-tooltip';
|
||||
import { useHandleFormValuesChange, useHandleNodeNameChange } from '../hooks';
|
||||
import { useHandleNodeNameChange } from '../hooks';
|
||||
import { useHandleFormValuesChange } from '../hooks/use-watch-form-change';
|
||||
import OperatorIcon from '../operator-icon';
|
||||
import {
|
||||
buildCategorizeListFromObject,
|
||||
|
||||
@ -133,14 +133,12 @@ export function useFormConfigMap() {
|
||||
},
|
||||
[Operator.Code]: {
|
||||
component: CodeForm,
|
||||
defaultValues: {
|
||||
message_history_window_size: 6,
|
||||
},
|
||||
defaultValues: { arguments: [] },
|
||||
schema: z.object({
|
||||
script: z.string(),
|
||||
arguments: z
|
||||
.array(z.object({ name: z.string(), component_id: z.string() }))
|
||||
.optional(),
|
||||
arguments: z.array(
|
||||
z.object({ name: z.string(), component_id: z.string() }),
|
||||
),
|
||||
lang: z.string(),
|
||||
}),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user