Skip to content

Commit

Permalink
refactor: updated narrative
Browse files Browse the repository at this point in the history
  • Loading branch information
yan-elena committed Jun 18, 2024
1 parent 88773f5 commit 8d681c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/component/event/design/ActionExecuted.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ function ActionExecuted(props) {
const type = "Action Executed"
if (props.event.message.type === "SendMessage") {
const message = props.event.message.event.messageInfo
const intendedMeansInfo = props.event.message.event.intentionInfo.intendedMeansInfo[0]
const description = "Action send message " + message.message + " to " + message.receiver + " was executed following the intention int-" + intendedMeansInfo.id + "-" + intendedMeansInfo.trigger
const explanation = [props.log.slice(0, props.log.indexOf(props.event)).findLast(e => e.message.type === "IntentionCreated" && e.message.event.intentionInfo.intendedMeansInfo[0].plan.body.includes(intendedMeansInfo.trigger))]
const intentionInfo = props.event.message.event.intentionInfo
const description = "Action send message " + message.message + " to " + message.receiver + " was executed following the intention int-" + intentionInfo.id + "-" + intentionInfo.trigger
const explanation = [props.log.slice(0, props.log.indexOf(props.event)).findLast(e => e.message.type === "IntentionCreated" && intentionInfo.id === props.event.message.event.intentionInfo.id )]

if (!intendedMeansInfo.trigger.includes("kqml")) {
if (!intentionInfo.trigger.includes("kqml")) {
return (
<Event type={"Executed action"} description={description} info={""} timestamp={props.event.timestamp}
<Event type={type} description={description} info={""} timestamp={props.event.timestamp}
filter={props.filter} log={props.log} level={Level.DESIGN} explanation={explanation}/>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/component/event/design/NewIntention.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function NewIntention(props) {

if (!goal.includes("kqml")) {
if (selectPlan) {
const description = "New intention " + id + " for goal " + goal + " using plan " + selectPlan.message.event.selectedPlan.label
const description = "New intention " + id + " created for goal " + goal + " using plan " + selectPlan.message.event.selectedPlan.label

return (
<Event type={type} description={description} timestamp={props.event.timestamp} filter={props.filter}
Expand Down

0 comments on commit 8d681c7

Please sign in to comment.