fix(workflow): restore initial input fields on code step creation (#20756)
## Summary - Fixes a regression from #20208 where creating a new CODE workflow step shows no input fields - The split-triggers PR removed `SEED_LOGIC_FUNCTION_INPUT_SCHEMA` and replaced `toolInputSchema` with `workflowActionTriggerSettings`, but `CodeStepBuildService.createCodeStepLogicFunction` was not updated to pass the seed schema — causing `logicFunctionInput` to default to `{}` and no fields to render - Adds `SEED_WORKFLOW_ACTION_TRIGGER_SETTINGS` constant (matching the seed template's `{ a: string, b: number }` params) and passes it when creating the seed logic function ## Test plan - [x] Unit test updated to assert `logicFunctionInput` contains `{ a: null, b: null }` on code step creation - [x] Create a new CODE step in the workflow builder and verify input fields `a` and `b` appear immediately Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
import { type WorkflowActionTriggerSettings } from '@/application';
|
||||
import { jsonSchemaToInputSchema } from '@/logic-function/json-schema-to-input-schema';
|
||||
|
||||
export const SEED_WORKFLOW_ACTION_TRIGGER_SETTINGS: WorkflowActionTriggerSettings =
|
||||
{
|
||||
inputSchema: jsonSchemaToInputSchema({
|
||||
type: 'object',
|
||||
properties: {
|
||||
a: { type: 'string' },
|
||||
b: { type: 'number' },
|
||||
},
|
||||
}),
|
||||
};
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
export { DEFAULT_TOOL_INPUT_SCHEMA } from './constants/DefaultToolInputSchema';
|
||||
export { SEED_WORKFLOW_ACTION_TRIGGER_SETTINGS } from './constants/SeedWorkflowActionTriggerSettings';
|
||||
export { getInputSchemaFromSourceCode } from './get-input-schema-from-source-code';
|
||||
export { getOutputSchemaFromValue } from './get-output-schema-from-value';
|
||||
export type { InputJsonSchema } from './input-json-schema.type';
|
||||
|
||||
Reference in New Issue
Block a user