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
+2
View File
@@ -84,6 +84,8 @@ export interface CustomAgentConfig {
fallback_strategy?: 'fixed' | 'model'; // 兜底策略
fallback_response?: string; // 固定兜底回复
fallback_prompt?: string; // 兜底提示词(模型生成时)
// 意图提示词:非检索意图(问候、闲聊等)时覆盖主系统提示词
intent_prompts?: Record<string, string>;
// ===== 已废弃字段(保留兼容)=====
welcome_message?: string;
+1
View File
@@ -48,6 +48,7 @@ export interface PromptTemplatesConfig {
keywords_extraction?: PromptTemplate[]
chat_summary?: PromptTemplate[]
agent_system_prompt?: PromptTemplate[]
intent_prompts?: PromptTemplate[]
}
export function getSystemInfo(): Promise<{ data: SystemInfo }> {