fix: don't re-add user_said upon phase transition

ref: N25B-429
This commit is contained in:
2026-01-08 13:44:25 +01:00
parent 625ef0c365
commit 4d0ba69443

View File

@@ -181,17 +181,17 @@ class AgentSpeakGenerator:
AstStatement(StatementType.ADD_BELIEF, to_phase_ast), AstStatement(StatementType.ADD_BELIEF, to_phase_ast),
] ]
if from_phase: # if from_phase:
body.extend( # body.extend(
[ # [
AstStatement( # AstStatement(
StatementType.TEST_GOAL, AstLiteral("user_said", [AstVar("Message")]) # StatementType.TEST_GOAL, AstLiteral("user_said", [AstVar("Message")])
), # ),
AstStatement( # AstStatement(
StatementType.REPLACE_BELIEF, AstLiteral("user_said", [AstVar("Message")]) # StatementType.REPLACE_BELIEF, AstLiteral("user_said", [AstVar("Message")])
), # ),
] # ]
) # )
# Notify outside world about transition # Notify outside world about transition
body.append( body.append(