refactor: workflow condition node

refactor: workflow condition node
This commit is contained in:
Fu Diwei
2025-05-28 23:30:38 +08:00
parent 3a829ad53b
commit 6731c465e7
59 changed files with 1140 additions and 988 deletions

View File

@@ -32,7 +32,7 @@ export type WorkflowState = {
addBranch: (branchId: string) => void;
removeBranch: (branchId: string, index: number) => void;
getWorkflowOuptutBeforeId: (nodeId: string, type?: string) => WorkflowNode[];
getWorkflowOuptutBeforeId: (nodeId: string, typeFilter?: string | string[]) => WorkflowNode[];
};
export const useWorkflowStore = create<WorkflowState>((set, get) => ({
@@ -243,7 +243,7 @@ export const useWorkflowStore = create<WorkflowState>((set, get) => ({
});
},
getWorkflowOuptutBeforeId: (nodeId: string, type: string = "all") => {
return getOutputBeforeNodeId(get().workflow.draft as WorkflowNode, nodeId, type);
getWorkflowOuptutBeforeId: (nodeId: string, typeFilter?: string | string[]) => {
return getOutputBeforeNodeId(get().workflow.draft as WorkflowNode, nodeId, typeFilter);
},
}));