diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index 81b979490..b8bbd9e99 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -413,7 +413,7 @@ func (al *AgentLoop) Run(ctx context.Context) error { } // Process message - func() { + go func() { defer func() { if al.channelManager != nil { al.channelManager.InvokeTypingStop(msg.Channel, msg.ChatID) @@ -523,8 +523,6 @@ func (al *AgentLoop) Run(ctx context.Context) error { al.publishResponseIfNeeded(ctx, target.Channel, target.ChatID, finalResponse) } }() - default: - time.Sleep(time.Microsecond * 200) } }