From af2862b561bda3b7e1c96e8572adc8030776f3c7 Mon Sep 17 00:00:00 2001 From: t <452214834@qq.com> Date: Mon, 9 Mar 2026 18:11:40 +0800 Subject: [PATCH] bug fixed --- pkg/agent/loop.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index 3ffbb2432..0fbdec61f 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -1856,7 +1856,14 @@ func (al *AgentLoop) handleCommandAsync(ctx context.Context, msg bus.InboundMess // Get default agent for command handling agent := al.registry.GetDefaultAgent() - response, handled := al.handleCommand(ctx, msg, agent) + // Build processOptions for commands that need session info (e.g., /clear) + opts := &processOptions{ + SessionKey: msg.SessionKey, + Channel: msg.Channel, + ChatID: msg.ChatID, + } + + response, handled := al.handleCommand(ctx, msg, agent, opts) if !handled { // Command not recognized or passed through, ignore return