picoclaw/pkg/agent
Zhaoyikaiii 132fe7db51
bugfix: fix duplicate Telegram message sending
Two issues caused duplicate messages to be sent to users:

1. System messages (from subagent): processSystemMessage set SendResponse:true,
   causing runAgentLoop to publish outbound. Then Run() also published outbound
   using the returned response string, resulting in two identical messages.
   Fix: processSystemMessage now returns empty string since runAgentLoop already
   handles the send.

2. Message tool double-send: When LLM called the "message" tool during
   processing, it published outbound immediately. Then Run() published the
   final response again. Fix: Track whether MessageTool sent a message in the
   current round (sentInRound flag, reset on each SetContext call). Run()
   checks HasSentInRound() before publishing to avoid duplicates.
2026-02-13 14:41:21 +08:00
..
context.go Fix LLM error by cleaning up CONSCIOUSLY message history 2026-02-12 00:42:40 -06:00
loop.go bugfix: fix duplicate Telegram message sending 2026-02-13 14:41:21 +08:00
memory.go Add memory system, dynamic tool loading, and fix logging issues 2026-02-11 00:14:33 +08:00