Revert "fix: preserve agent system prompt for greetings"

This reverts commit b22303cec8.
This commit is contained in:
lyingbug
2026-06-04 17:39:10 +08:00
parent b22303cec8
commit 4369d156e1
5 changed files with 3 additions and 54 deletions
@@ -59,23 +59,6 @@ func TestApplyIntentPromptOverride_BlankAgentFallsBackToGlobal(t *testing.T) {
}
}
func TestApplyIntentPromptOverride_CustomAgentSystemPromptSkipsGlobalFallback(t *testing.T) {
cm := &types.ChatManage{
PipelineRequest: types.PipelineRequest{
AgentSystemPromptApplied: true,
},
PipelineState: types.PipelineState{Intent: types.IntentGreeting},
}
global := map[string]string{"greeting": "global prompt"}
if applyIntentPromptOverride(cm, global) {
t.Fatal("expected applied=false")
}
if cm.SystemPromptOverride != "" {
t.Errorf("override should remain empty, got %q", cm.SystemPromptOverride)
}
}
func TestApplyIntentPromptOverride_NoOverrideAndNoGlobal(t *testing.T) {
cm := &types.ChatManage{
PipelineState: types.PipelineState{Intent: types.IntentChitchat},