fix: some bugs and some tests

ref: N25B-429
This commit is contained in:
Twirre Meulenbelt
2026-01-12 09:00:50 +01:00
parent 866d7c4958
commit 4b71981a3e
8 changed files with 103 additions and 87 deletions

View File

@@ -67,14 +67,14 @@ class BDIProgramManager(BaseAgent):
await self.send(msg)
def handle_message(self, msg: InternalMessage):
async def handle_message(self, msg: InternalMessage):
match msg.thread:
case "transition_phase":
phases = json.loads(msg.body)
self._transition_phase(phases["old"], phases["new"])
await self._transition_phase(phases["old"], phases["new"])
def _transition_phase(self, old: str, new: str):
async def _transition_phase(self, old: str, new: str):
assert old == str(self._phase.id)
if new == "end":
@@ -85,8 +85,8 @@ class BDIProgramManager(BaseAgent):
if str(phase.id) == new:
self._phase = phase
self._send_beliefs_to_semantic_belief_extractor()
self._send_goals_to_semantic_belief_extractor()
await self._send_beliefs_to_semantic_belief_extractor()
await self._send_goals_to_semantic_belief_extractor()
# Notify user interaction agent
msg = InternalMessage(