From 537e4ed550038e37034ba26c542de3dd96497996 Mon Sep 17 00:00:00 2001 From: AskaEth Date: Sun, 28 Jun 2026 12:17:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BE=A4=E8=81=8A=E9=9D=9E@=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E8=B5=B0=E5=AE=A1=E6=9F=A5=E6=A8=A1=E5=BC=8F=E2=80=94?= =?UTF-8?q?=E5=80=BC=E5=BE=97=E6=8F=92=E8=AF=9D=E6=89=8D=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/ai-core/cmd/main.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/backend/ai-core/cmd/main.go b/backend/ai-core/cmd/main.go index 4be5e99..5b157e7 100644 --- a/backend/ai-core/cmd/main.go +++ b/backend/ai-core/cmd/main.go @@ -1077,7 +1077,18 @@ func handleChat( } // 平台静默观察模式:只记录消息、提取记忆、触发后台思考,不生成回复。 - if req.Mode == "platform_silent" { + if req.Mode == "group_ambient" { + // 群聊环境消息 — 审查是否值得回应 + message := req.Message + ctxBuilder.CacheMessage(req.SessionID, model.RoleUser, message) + if thinker != nil { + thinker.RecordUserMessage(req.SessionID) + } + // 在消息前加审查指令,让 LLM 自己判断是否插话 + req.Message = "【群聊环境消息】" + message + "\n\n你不需要回复这条消息,除非你真有特别相关的话要说。如果不想说话,只用 在心里轻轻想一下即可,不用发消息。" + req.Mode = "text" + } + if req.Mode == "platform_silent" { if thinker != nil { thinker.RecordUserMessage(req.SessionID) if req.Source.Platform != "" && req.Source.BotUID != "" {