From 8e4a5213befe62f9ecf5814d5249b8e169e79e3c Mon Sep 17 00:00:00 2001 From: lxowalle Date: Fri, 27 Feb 2026 15:24:43 +0800 Subject: [PATCH] * update --- pkg/agent/loop.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index 4249cde92..930546fe1 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -52,6 +52,8 @@ type processOptions struct { NoHistory bool // If true, don't load session history (for heartbeat) } +const defaultResponse = "I've completed processing but have no response to give. Increase `max_tool_iterations` in configs.json." + func NewAgentLoop(cfg *config.Config, msgBus *bus.MessageBus, provider providers.LLMProvider) *AgentLoop { registry := NewAgentRegistry(cfg, provider) @@ -260,7 +262,7 @@ func (al *AgentLoop) ProcessHeartbeat(ctx context.Context, content, channel, cha Channel: channel, ChatID: chatID, UserMessage: content, - DefaultResponse: "I've completed processing but have no response to give. Increase `max_tool_iterations` in configs.json.", + DefaultResponse: defaultResponse, EnableSummary: false, SendResponse: false, NoHistory: true, // Don't load session history for heartbeat @@ -326,7 +328,7 @@ func (al *AgentLoop) processMessage(ctx context.Context, msg bus.InboundMessage) Channel: msg.Channel, ChatID: msg.ChatID, UserMessage: msg.Content, - DefaultResponse: "I've completed processing but have no response to give. Increase `max_tool_iterations` in configs.json.", + DefaultResponse: defaultResponse, EnableSummary: true, SendResponse: false, })