feat: added endpoint userinterrupt to userinterrupt
ref: N25B-400
This commit is contained in:
45
src/control_backend/agents/bdi/agentspeak.asl
Normal file
45
src/control_backend/agents/bdi/agentspeak.asl
Normal 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.
|
||||
Reference in New Issue
Block a user