feat: added endpoint userinterrupt to userinterrupt

ref: N25B-400
This commit is contained in:
Pim Hutting
2026-01-07 17:42:54 +01:00
parent 3b4dccc760
commit be6bbbb849
5 changed files with 162 additions and 48 deletions

View File

@@ -0,0 +1,45 @@
phase("9922935f-ec70-4792-9a61-37a129e1ec14").
keyword_said(Keyword) :- (user_said(Message) & .substring(Keyword, Message, Pos)) & (Pos >= 0).
+!reply_with_goal(Goal)
: user_said(Message)
<- +responded_this_turn;
.findall(Norm, norm(Norm), Norms);
.reply_with_goal(Message, Norms, Goal).
+!say(Text)
<- +responded_this_turn;
.say(Text).
+!reply
: user_said(Message)
<- +responded_this_turn;
.findall(Norm, norm(Norm), Norms);
.reply(Message, Norms).
+user_said(Message)
: phase("9922935f-ec70-4792-9a61-37a129e1ec14")
<- .notify_user_said(Message);
-responded_this_turn;
!check_triggers;
!transition_phase.
+!transition_phase
: phase("9922935f-ec70-4792-9a61-37a129e1ec14") &
not responded_this_turn
<- -phase("9922935f-ec70-4792-9a61-37a129e1ec14");
+phase("end");
?user_said(Message);
-+user_said(Message);
.notify_transition_phase("9922935f-ec70-4792-9a61-37a129e1ec14", "end").
+user_said(Message)
: phase("end")
<- !reply.
+!check_triggers
<- true.
+!transition_phase
<- true.