Skip to content

Commit

Permalink
refactor: desire committed intention information
Browse files Browse the repository at this point in the history
  • Loading branch information
yan-elena committed Sep 11, 2023
1 parent d3fb453 commit 39c52e6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/component/event/bdi/DesireCommitted.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, <br/>] : []
}
let reason = getIntentionReason(desire, intention.message.event.intentionInfo)
let parentDesire = reason ? ["Intention " + im[0].trigger + "/" + id + " is an intention" + reason, <br/>] : []

if (agentState.intention[id]) {
agentState.intention[id].push(desire)
Expand Down

0 comments on commit 39c52e6

Please sign in to comment.