mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 16:33:49 +00:00
@@ -672,7 +672,7 @@ export const useWorkflow = () => {
|
||||
export const useLoopNode = () => {
|
||||
const nodes = useContextSelector(WorkflowInitContext, (state) => state.nodes);
|
||||
const onNodesChange = useContextSelector(WorkflowNodeEdgeContext, (state) => state.onNodesChange);
|
||||
const { onChangeNode } = useContextSelector(WorkflowContext, (v) => v);
|
||||
const onChangeNode = useContextSelector(WorkflowContext, (v) => v.onChangeNode);
|
||||
|
||||
const resetParentNodeSizeAndPosition = useMemoizedFn((parentId: string) => {
|
||||
const { childNodes, loopNode } = nodes.reduce(
|
||||
|
@@ -831,7 +831,7 @@ const WorkflowContextProvider = ({
|
||||
const undo = useMemoizedFn(() => {
|
||||
if (past.length > 1) {
|
||||
forbiddenSaveSnapshot.current = true;
|
||||
|
||||
// Current version is the first one, so we need to reset the second one
|
||||
const firstPast = past[1];
|
||||
resetSnapshot(firstPast);
|
||||
|
||||
|
@@ -634,7 +634,7 @@ export const compareSnapshot = (
|
||||
selectedTypeIndex: input.selectedTypeIndex ?? 0,
|
||||
renderTypeLis: input.renderTypeList,
|
||||
// set to arrayAny for loopInputArray to skip valueType comparison
|
||||
valueType: input.key === NodeInputKeyEnum.loopInputArray ? 'arrayAny' : input.valueType,
|
||||
// valueType: input.key === NodeInputKeyEnum.loopInputArray ? 'arrayAny' : input.valueType,
|
||||
value: input.value ?? undefined
|
||||
})),
|
||||
outputs: node.data.outputs.map((item: FlowNodeOutputItemType) => ({
|
||||
|
Reference in New Issue
Block a user