mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-01-18 06:10: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
|
break
|
||||||
}
|
}
|
||||||
hasresp = true
|
hasresp = true
|
||||||
haseoa := false
|
|
||||||
for _, req := range reqs {
|
for _, req := range reqs {
|
||||||
if req.Action == goba.SVM { // is a fake action
|
if req.Action == goba.SVM { // is a fake action
|
||||||
if hassavemem {
|
if hassavemem {
|
||||||
if !haseoa {
|
|
||||||
ag.AddTerminus(gid)
|
ag.AddTerminus(gid)
|
||||||
haseoa = true
|
|
||||||
logrus.Warnln("[aichat] agent call save mem multi times, force inserting EOA")
|
logrus.Warnln("[aichat] agent call save mem multi times, force inserting EOA")
|
||||||
} else {
|
return
|
||||||
logrus.Warnln("[aichat] agent call save mem multi times, but EOA has been inserted")
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
hassavemem = true
|
hassavemem = true
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if req.Action == "send_private_msg" || req.Action == "send_group_msg" {
|
if req.Action == "send_private_msg" || req.Action == "send_group_msg" {
|
||||||
if ispuremsg {
|
if ispuremsg {
|
||||||
if !haseoa {
|
|
||||||
ag.AddTerminus(gid)
|
ag.AddTerminus(gid)
|
||||||
haseoa = true
|
|
||||||
logrus.Warnln("[aichat] agent call send msg multi times, force inserting EOA")
|
logrus.Warnln("[aichat] agent call send msg multi times, force inserting EOA")
|
||||||
} else {
|
return
|
||||||
logrus.Warnln("[aichat] agent call send msg multi times, but EOA has been inserted")
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
ispuremsg = true
|
ispuremsg = true
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user