mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
Moving logging from INFO to DEBUG for messages
Removing extrnaeous comments about mutex in loop.go Made-with: Cursor
This commit is contained in:
+1
-1
@@ -218,6 +218,7 @@ func (al *AgentLoop) Run(ctx context.Context) error {
|
||||
} else {
|
||||
logger.DebugCF("agent", "Skipped outbound (message tool already sent)", map[string]any{"channel": msg.Channel})
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
@@ -315,7 +316,6 @@ func (al *AgentLoop) ProcessDirectWithChannel(
|
||||
|
||||
// ProcessHeartbeat processes a heartbeat request without session history.
|
||||
// Each heartbeat is independent and doesn't accumulate context.
|
||||
// It uses the same mutex as processMessage so heartbeat and user messages never run concurrently.
|
||||
func (al *AgentLoop) ProcessHeartbeat(ctx context.Context, content, channel, chatID string) (string, error) {
|
||||
agent := al.registry.GetDefaultAgent()
|
||||
if agent == nil {
|
||||
|
||||
@@ -267,7 +267,7 @@ func (c *WhatsAppNativeChannel) handleIncoming(evt *events.Message) {
|
||||
metadata["peer_id"] = senderID
|
||||
}
|
||||
|
||||
logger.InfoCF("channels", "WhatsApp message received", map[string]any{"sender_id": senderID, "content_preview": utils.Truncate(content, 50)})
|
||||
logger.DebugCF("channels", "WhatsApp message received", map[string]any{"sender_id": senderID, "content_preview": utils.Truncate(content, 50)})
|
||||
c.HandleMessage(senderID, chatID, content, mediaPaths, metadata)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user