feat(agent): add intent prompt customization in agent editor

Allow per-intent system prompt overrides for non-retrieval intents in normal mode.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
helloandyzhang
2026-05-26 18:06:43 +08:00
committed by lyingbug
parent 09892ef763
commit e6a469631b
13 changed files with 322 additions and 29 deletions
@@ -210,6 +210,11 @@ func (s *sessionService) applyAgentOverridesToChatManage(
if cm.DataAnalysisEnabled {
logger.Infof(ctx, "Data analysis pipeline stage enabled by custom agent")
}
if len(customAgent.Config.IntentPrompts) > 0 {
cm.IntentPromptOverrides = customAgent.Config.IntentPrompts
logger.Infof(ctx, "Using custom agent's intent_prompts (%d overrides)", len(cm.IntentPromptOverrides))
}
}
// restrictMentionsToAgentScope filters user-provided @mention targets (KB IDs