From 39c52e63328309172e516788f832fdf7b8010c6b Mon Sep 17 00:00:00 2001 From: Elena Yan Date: Mon, 11 Sep 2023 15:26:27 +0200 Subject: [PATCH] refactor: desire committed intention information --- src/component/event/bdi/DesireCommitted.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/component/event/bdi/DesireCommitted.js b/src/component/event/bdi/DesireCommitted.js index bf2a8a4..f766948 100644 --- a/src/component/event/bdi/DesireCommitted.js +++ b/src/component/event/bdi/DesireCommitted.js @@ -15,13 +15,10 @@ function DesireCommitted(props) { const body = selectedPlan.body ? "Plan body: " + selectedPlan.body : "" const im = intention.message.event.intentionInfo.intendedMeansInfo const id = intention.message.event.intentionInfo.id - const description = "I committed to desire " + desire + context + ", and it became a new intention " + desire + "/" + id - let parentDesire = [] + const description = "I committed to desire " + desire + context + ", and it became a new intention " + im[0].trigger + "/" + id - if (im.length > 0) { - let reason = getIntentionReason(desire, intention.message.event.intentionInfo) - parentDesire = reason ? ["Intention " + desire + "/" + id + " is an intention" + reason,
] : [] - } + let reason = getIntentionReason(desire, intention.message.event.intentionInfo) + let parentDesire = reason ? ["Intention " + im[0].trigger + "/" + id + " is an intention" + reason,
] : [] if (agentState.intention[id]) { agentState.intention[id].push(desire)