feat: added rule to prevent one belief being connected to both inferredBelief inputs
ref: N25B-433
This commit is contained in:
@@ -12,7 +12,7 @@ import {allowOnlyConnectionsFromHandle, allowOnlyConnectionsFromType} from "../H
|
||||
import useFlowStore from '../VisProgStores';
|
||||
import { PlanReduce, type Plan } from '../components/Plan';
|
||||
import PlanEditorDialog from '../components/PlanEditor';
|
||||
import {BeliefReduce} from "./BeliefReduce.ts";
|
||||
import {BeliefGlobals} from "./BeliefGlobals.ts";
|
||||
|
||||
/**
|
||||
* The default data structure for a Trigger node
|
||||
@@ -86,13 +86,13 @@ export default function TriggerNode(props: NodeProps<TriggerNode>) {
|
||||
/**
|
||||
* Reduces each Trigger, including its children down into its core data.
|
||||
* @param node - The Trigger node to reduce.
|
||||
* @param _nodes - The list of all nodes in the current flow graph.
|
||||
* @param nodes - The list of all nodes in the current flow graph.
|
||||
* @returns A simplified object containing the node label and its list of triggers.
|
||||
*/
|
||||
export function TriggerReduce(node: Node, nodes: Node[]) {
|
||||
const data = node.data as TriggerNodeData;
|
||||
const conditionNode = data.condition ? nodes.find((n)=>n.id===data.condition) : undefined
|
||||
const conditionData = conditionNode ? BeliefReduce(conditionNode, nodes) : ""
|
||||
const conditionData = conditionNode ? BeliefGlobals(conditionNode, nodes) : ""
|
||||
return {
|
||||
id: node.id,
|
||||
condition: conditionData, // Make sure we have a condition before reducing, or default to ""
|
||||
|
||||
Reference in New Issue
Block a user