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:
balibabu
2025-05-21 18:22:06 +08:00
committed by GitHub
parent 754a5e1cee
commit 558b252c5a
7 changed files with 133 additions and 25 deletions

View File

@ -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(),
}),
},