feat: added a functionality for monitoring page
ref: N25B-400
This commit is contained in:
@@ -176,6 +176,16 @@ class AgentSpeakGenerator:
|
||||
context.append(self._astify(from_phase.goals[-1], achieved=True))
|
||||
|
||||
body = [
|
||||
AstStatement(
|
||||
StatementType.DO_ACTION,
|
||||
AstLiteral(
|
||||
"notify_transition_phase",
|
||||
[
|
||||
AstString(str(from_phase.id)),
|
||||
AstString(str(to_phase.id) if to_phase else "end"),
|
||||
],
|
||||
),
|
||||
),
|
||||
AstStatement(StatementType.REMOVE_BELIEF, from_phase_ast),
|
||||
AstStatement(StatementType.ADD_BELIEF, to_phase_ast),
|
||||
]
|
||||
@@ -192,20 +202,6 @@ class AgentSpeakGenerator:
|
||||
]
|
||||
)
|
||||
|
||||
# Notify outside world about transition
|
||||
body.append(
|
||||
AstStatement(
|
||||
StatementType.DO_ACTION,
|
||||
AstLiteral(
|
||||
"notify_transition_phase",
|
||||
[
|
||||
AstString(str(from_phase.id)),
|
||||
AstString(str(to_phase.id) if to_phase else "end"),
|
||||
],
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
self._asp.plans.append(
|
||||
AstPlan(TriggerType.ADDED_GOAL, AstLiteral("transition_phase"), context, body)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user