feat(aichat): force cut multi calls

This commit is contained in:
源文雨 2026-01-06 23:29:48 +08:00
parent 36397fb583
commit 9bfaa0c195

View File

@ -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
} }