b454ad2aea
## 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>
14 lines
414 B
TypeScript
14 lines
414 B
TypeScript
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' },
|
|
},
|
|
}),
|
|
};
|