diff --git a/ai_knowledge_base_v2/apps/admin-web/src/App.vue b/ai_knowledge_base_v2/apps/admin-web/src/App.vue index e39e234..64b132f 100644 --- a/ai_knowledge_base_v2/apps/admin-web/src/App.vue +++ b/ai_knowledge_base_v2/apps/admin-web/src/App.vue @@ -310,6 +310,7 @@ function modelSceneLabel(scene: string) { return ({ background_report: "周期报告", background_summary: "摘要沉淀", + fixed_info: "固定信息问答", knowledge_grounded: "知识问答", general_chat: "通用对话", } as Record)[scene] || scene || "未分类"; @@ -1459,11 +1460,14 @@ function formatRecordDateTime(value: string, boundary: "start" | "end") { -
- 固定信息 - 深度对话 - 摘要沉淀 - 周期报告 +
+
+ 固定信息 + 深度对话 + 摘要沉淀 + 周期报告 +
+ 默认主模型勾选某项能力时会优先承担该场景;如需专用模型接管,请取消主模型的对应能力,并为专用模型开启该能力。
diff --git a/ai_knowledge_base_v2/apps/admin-web/src/components/AgentManagementView.vue b/ai_knowledge_base_v2/apps/admin-web/src/components/AgentManagementView.vue index 3c61b50..7498bb2 100644 --- a/ai_knowledge_base_v2/apps/admin-web/src/components/AgentManagementView.vue +++ b/ai_knowledge_base_v2/apps/admin-web/src/components/AgentManagementView.vue @@ -33,6 +33,7 @@ const historyDetailOpen = ref(false); const selectedHistory = ref(null); const historyDetailLoading = ref(false); const agentDebugTrace = ref[]>([]); +const lastDebugRoute = ref<{ modelName?: string; routeReason?: string } | null>(null); const agentPreviewMessages = ref<{ role: "user" | "assistant" | "system"; content: string; @@ -104,7 +105,9 @@ async function load() { applyPrompt(promptResult); models.value = modelRows; knowledge.value = knowledgeRows; - agentForm.modelId = modelRows.find((item) => item.enabled === 1)?.id ?? modelRows[0]?.id; + agentForm.modelId = modelRows.find((item) => item.isDefault === 1)?.id + ?? modelRows.find((item) => item.enabled === 1)?.id + ?? modelRows[0]?.id; applyRuntimeConfig(formalConfig); applyDebugModelDefaults(agentForm.modelId); agentForm.knowledgeIds = knowledgeRows @@ -313,6 +316,7 @@ async function debugAgent() { agentForm.question = ""; agentDebugging.value = true; agentDebugTrace.value = []; + lastDebugRoute.value = null; agentDebugAbortController.value = new AbortController(); scrollAgentPreview(); try { @@ -348,7 +352,8 @@ async function debugAgent() { }, (result) => { agentDebugTrace.value = result.retrievalTrace || []; - ElMessage.success(result.message || "Agent 调试完成"); + lastDebugRoute.value = { modelName: result.modelName, routeReason: result.routeReason }; + ElMessage.success(`${result.message || "Agent 调试完成"} · ${result.modelName || selectedModelName.value}`); }, agentDebugAbortController.value.signal, ); @@ -383,6 +388,7 @@ function scrollAgentPreview() { function clearAgentPreview() { agentPreviewMessages.value = [{ role: "assistant", content: "预览已清空,可以继续发起新的 Agent 调试。" }]; agentDebugTrace.value = []; + lastDebugRoute.value = null; } function changeTypeLabel(value?: string) { @@ -588,7 +594,7 @@ function errorMessage(error: unknown, fallback: string) {