improve ui

This commit is contained in:
Yoan.liu
2025-05-19 17:41:39 +08:00
parent 2906576de0
commit b8ab077b57
4 changed files with 346 additions and 8 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, type?: 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) => {
getWorkflowOuptutBeforeId: (nodeId: string, type: string = "all") => {
return getOutputBeforeNodeId(get().workflow.draft as WorkflowNode, nodeId, type);
},
}));