mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-01-17 22:00:31 +00:00
feat(aichat): force cut multi calls
This commit is contained in:
parent
36397fb583
commit
9bfaa0c195
@ -119,32 +119,21 @@ func init() {
|
||||
break
|
||||
}
|
||||
hasresp = true
|
||||
haseoa := false
|
||||
for _, req := range reqs {
|
||||
if req.Action == goba.SVM { // is a fake action
|
||||
if hassavemem {
|
||||
if !haseoa {
|
||||
ag.AddTerminus(gid)
|
||||
haseoa = true
|
||||
logrus.Warnln("[aichat] agent call save mem multi times, force inserting EOA")
|
||||
} else {
|
||||
logrus.Warnln("[aichat] agent call save mem multi times, but EOA has been inserted")
|
||||
}
|
||||
break
|
||||
ag.AddTerminus(gid)
|
||||
logrus.Warnln("[aichat] agent call save mem multi times, force inserting EOA")
|
||||
return
|
||||
}
|
||||
hassavemem = true
|
||||
continue
|
||||
}
|
||||
if req.Action == "send_private_msg" || req.Action == "send_group_msg" {
|
||||
if ispuremsg {
|
||||
if !haseoa {
|
||||
ag.AddTerminus(gid)
|
||||
haseoa = true
|
||||
logrus.Warnln("[aichat] agent call send msg multi times, force inserting EOA")
|
||||
} else {
|
||||
logrus.Warnln("[aichat] agent call send msg multi times, but EOA has been inserted")
|
||||
}
|
||||
break
|
||||
ag.AddTerminus(gid)
|
||||
logrus.Warnln("[aichat] agent call send msg multi times, force inserting EOA")
|
||||
return
|
||||
}
|
||||
ispuremsg = true
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user