Fix code step and logic function step in workflows (#17856)

- AI still often forgets to update the code step after creating it.
Adding a next step
- Starting by loading logic functions, so it avoids creating code steps
when a function exists
- Fix create complete workflow logic. Should not create code steps
directly
This commit is contained in:
Thomas Trompette
2026-02-11 16:08:23 +01:00
committed by GitHub
parent d0c1841f0f
commit 1e01f15182
8 changed files with 147 additions and 15 deletions
@@ -4,7 +4,15 @@ import { baseWorkflowActionSettingsSchema } from './base-workflow-action-setting
export const workflowCodeActionSettingsSchema =
baseWorkflowActionSettingsSchema.extend({
input: z.object({
logicFunctionId: z.string(),
logicFunctionInput: z.record(z.string(), z.any()),
logicFunctionId: z
.string()
.describe(
'The ID of the logic function that holds the code. This is auto-generated when a CODE step is created via create_workflow_version_step — do NOT set this manually.',
),
logicFunctionInput: z
.record(z.string(), z.any())
.describe(
'Key-value map of input parameters to pass to the logic function at runtime.',
),
}),
});