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
+4
View File
@@ -62,6 +62,9 @@ type PipelineRequest struct {
// IntentPromptOverrides holds agent-level intent prompt overrides for the
// query-understanding stage. Empty values fall back to tenant/global defaults.
IntentPromptOverrides map[string]string `json:"-"`
// AgentSystemPromptApplied is true when SummaryConfig.Prompt was supplied
// by a custom agent. Global intent prompts must not replace that prompt.
AgentSystemPromptApplied bool `json:"-"`
// Misc request-scoped config
TenantID uint64 `json:"-"`
@@ -226,6 +229,7 @@ func (c *ChatManage) Clone() *ChatManage {
WebFetchTopN: c.WebFetchTopN,
Language: c.Language,
IntentPromptOverrides: maps.Clone(c.IntentPromptOverrides),
AgentSystemPromptApplied: c.AgentSystemPromptApplied,
},
PipelineState: PipelineState{
RewriteQuery: c.RewriteQuery,