Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Charles Bochet
2026-02-23 12:01:37 +01:00
committed by GitHub
parent 22bc3004b9
commit b51eb6471f
538 changed files with 4664 additions and 4127 deletions
@@ -14,17 +14,18 @@ import {
computeStepOutputSchema,
shouldComputeOutputSchemaOnFrontend,
} from '@/workflow/workflow-variables/utils/generate/computeStepOutputSchema';
import { useStore } from 'jotai';
import { useRecoilCallback } from 'recoil';
import { isDefined } from 'twenty-shared/utils';
import { TRIGGER_STEP_ID } from 'twenty-shared/workflow';
export const useStepsOutputSchema = () => {
const store = useStore();
const populateStepsOutputSchema = useRecoilCallback(
({ set, snapshot }) =>
(workflowVersion: WorkflowVersion) => {
const objectMetadataItems = snapshot
.getLoadable(objectMetadataItemsState)
.getValue();
const objectMetadataItems = store.get(objectMetadataItemsState.atom);
workflowVersion.steps?.forEach((step) => {
const stepKey = getStepOutputSchemaFamilyStateKey(
@@ -108,7 +109,7 @@ export const useStepsOutputSchema = () => {
set(shouldRecomputeOutputSchemaFamilyState(triggerKey), false);
}
},
[],
[store],
);
const markStepForRecomputation = useRecoilCallback(