feat: The Big One UI #47
@@ -57,7 +57,7 @@ import InferredBeliefNode, {
|
||||
InferredBeliefConnectionSource,
|
||||
InferredBeliefDisconnectionTarget,
|
||||
InferredBeliefDisconnectionSource,
|
||||
InferredBeliefReduce
|
||||
InferredBeliefReduce, InferredBeliefTooltip
|
||||
} from "./nodes/InferredBeliefNode";
|
||||
import { InferredBeliefNodeDefaults } from "./nodes/InferredBeliefNode.default";
|
||||
import BasicBeliefNode, {
|
||||
@@ -216,4 +216,5 @@ export const NodeTooltips = {
|
||||
goal: GoalTooltip,
|
||||
trigger: TriggerTooltip,
|
||||
basic_belief: BasicBeliefTooltip,
|
||||
inferred_belief: InferredBeliefTooltip,
|
||||
}
|
||||
@@ -81,8 +81,9 @@ export function InferredBeliefDisconnectionSource(_thisNode: Node, _targetNodeId
|
||||
// no additional connection logic exists yet
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const InferredBeliefTooltip = `
|
||||
Combines two beliefs into a single belief using logical inference,
|
||||
the node can be toggled between using "AND" and "OR" mode for inference`;
|
||||
/**
|
||||
* Defines how an InferredBelief node should be rendered
|
||||
* @param {NodeProps<InferredBeliefNode>} props - Node properties provided by React Flow, including `id` and `data`.
|
||||
@@ -96,7 +97,8 @@ export default function InferredBeliefNode(props: NodeProps<InferredBeliefNode>)
|
||||
|
||||
// used to toggle operator
|
||||
function onToggle() {
|
||||
setEnforceAllBeliefs(!enforceAllBeliefs);
|
||||
const newOperator = !enforceAllBeliefs; // compute the new value
|
||||
setEnforceAllBeliefs(newOperator);
|
||||
|
||||
updateNodeData(props.id, {
|
||||
...data,
|
||||
|
||||
Reference in New Issue
Block a user