From daf94a30f3e18544439b057ef2d46a1ae40107eb Mon Sep 17 00:00:00 2001 From: liugangjian Date: Thu, 5 Mar 2026 09:58:37 +0800 Subject: [PATCH] WIP: Temporary commit --- pkg/agent/loop.go | 2 +- pkg/channels/qq/qq.go | 2 ++ pkg/tools/subagent.go | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index db9efa2cf..e9ed57c91 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -571,7 +571,7 @@ func (al *AgentLoop) processSystemMessage( UserMessage: fmt.Sprintf("[System: %s] %s", msg.SenderID, msg.Content), DefaultResponse: "Background task completed.", EnableSummary: false, - SendResponse: true, + SendResponse: false, // Prevent duplicate responses caused by system message processing }) } diff --git a/pkg/channels/qq/qq.go b/pkg/channels/qq/qq.go index 112964143..2ba43cdf3 100644 --- a/pkg/channels/qq/qq.go +++ b/pkg/channels/qq/qq.go @@ -31,6 +31,8 @@ type QQChannel struct { processedIDs map[string]bool mu sync.RWMutex } + chatTypeMap map[string]string // Track whether a ChatID is group or C2C + chatTypeMu sync.RWMutex // Protects chatTypeMap func NewQQChannel(cfg config.QQConfig, messageBus *bus.MessageBus) (*QQChannel, error) { base := channels.NewBaseChannel("qq", cfg, messageBus, cfg.AllowFrom, diff --git a/pkg/tools/subagent.go b/pkg/tools/subagent.go index 69f1a49a2..47443f35f 100644 --- a/pkg/tools/subagent.go +++ b/pkg/tools/subagent.go @@ -20,6 +20,7 @@ type SubagentTask struct { Status string Result string Created int64 + announcedOnce sync.Once // Ensures the completion announcement is sent only once } type SubagentManager struct {