diff --git a/frontend/src/api/agent/index.ts b/frontend/src/api/agent/index.ts index 927daa63..71254f59 100644 --- a/frontend/src/api/agent/index.ts +++ b/frontend/src/api/agent/index.ts @@ -4,8 +4,7 @@ import { get, post, put, del } from "../../utils/request"; export interface CustomAgentConfig { // ===== 基础设置 ===== agent_mode?: 'quick-answer' | 'smart-reasoning'; // 运行模式:quick-answer=RAG模式, smart-reasoning=ReAct Agent模式 - system_prompt?: string; // 系统提示词(普通模式,或Agent模式网络搜索关闭时) - system_prompt_web_enabled?: string; // Agent模式网络搜索开启时的系统提示词 + system_prompt?: string; // 统一系统提示词(使用 {{web_search_status}} 占位符动态控制行为) context_template?: string; // 上下文模板(普通模式) // ===== 模型设置 ===== diff --git a/frontend/src/api/system/index.ts b/frontend/src/api/system/index.ts index 934cc8f5..9063b6f6 100644 --- a/frontend/src/api/system/index.ts +++ b/frontend/src/api/system/index.ts @@ -29,8 +29,7 @@ export interface AgentConfig { allowed_tools: string[] temperature: number knowledge_bases?: string[] - system_prompt_web_enabled?: string // Custom system prompt when web search is enabled - system_prompt_web_disabled?: string // Custom system prompt when web search is disabled + system_prompt?: string // Unified system prompt (uses {{web_search_status}} placeholder) available_tools?: ToolDefinition[] // GET 响应中包含,POST/PUT 不需要 available_placeholders?: PlaceholderDefinition[] // GET 响应中包含,POST/PUT 不需要 } diff --git a/frontend/src/components/AgentSelector.vue b/frontend/src/components/AgentSelector.vue index 701da0ae..17629a94 100644 --- a/frontend/src/components/AgentSelector.vue +++ b/frontend/src/components/AgentSelector.vue @@ -20,12 +20,13 @@
{{ $t('agent.builtinAgents') }}
-
-
+ +
{{ $t('agent.customAgents') }}
-
-
+ +
@@ -94,7 +150,7 @@