fix: preserve agent system prompt for greetings

This commit is contained in:
wolfkill
2026-05-28 20:04:20 +08:00
committed by lyingbug
parent 10383c6ddd
commit b22303cec8
5 changed files with 54 additions and 3 deletions
@@ -117,6 +117,7 @@ func (s *sessionService) applyAgentOverridesToChatManage(
// Override summary config fields
if customAgent.Config.SystemPrompt != "" {
cm.SummaryConfig.Prompt = customAgent.Config.SystemPrompt
cm.AgentSystemPromptApplied = true
logger.Infof(ctx, "Using custom agent's system_prompt")
}
if customAgent.Config.ContextTemplate != "" {